From 004eb4fb0314851b96858152b49a44cff90564de Mon Sep 17 00:00:00 2001 From: fesily Date: Thu, 27 Apr 2023 16:02:49 +0800 Subject: doc fix coroutine isyieldable --- meta/template/coroutine.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta') diff --git a/meta/template/coroutine.lua b/meta/template/coroutine.lua index b3890bfd..085ff6fc 100644 --- a/meta/template/coroutine.lua +++ b/meta/template/coroutine.lua @@ -10,7 +10,7 @@ coroutine = {} ---@nodiscard function coroutine.create(f) end ----#if VERSION >= 5.4 then +---#if VERSION >= 5.3 then ---#DES 'coroutine.isyieldable>5.4' ---@param co? thread ---@return boolean -- cgit v1.2.3 From a3ff71dbd33ea04337327d8a2ee3f2d450d19601 Mon Sep 17 00:00:00 2001 From: fesily Date: Thu, 27 Apr 2023 16:04:12 +0800 Subject: fix --- meta/template/coroutine.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'meta') diff --git a/meta/template/coroutine.lua b/meta/template/coroutine.lua index 085ff6fc..91a3aba3 100644 --- a/meta/template/coroutine.lua +++ b/meta/template/coroutine.lua @@ -10,13 +10,14 @@ coroutine = {} ---@nodiscard function coroutine.create(f) end ----#if VERSION >= 5.3 then +---#if VERSION >= 5.4 then ---#DES 'coroutine.isyieldable>5.4' ---@param co? thread ---@return boolean ---@nodiscard function coroutine.isyieldable(co) end ---#else +---@version >5.2 ---#DES 'coroutine.isyieldable' ---@return boolean ---@nodiscard -- cgit v1.2.3 From 568694644d498e6023747e3f8421a0eeafd9dd43 Mon Sep 17 00:00:00 2001 From: fesily Date: Thu, 11 May 2023 11:58:40 +0800 Subject: meta:support metatable --- meta/template/basic.lua | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) (limited to 'meta') diff --git a/meta/template/basic.lua b/meta/template/basic.lua index c024b222..0bbf2f3d 100644 --- a/meta/template/basic.lua +++ b/meta/template/basic.lua @@ -209,9 +209,46 @@ function select(index, ...) end ---@return function function setfenv(f, table) end + +---@class metatable +---@field __mode 'v'|'k'|'kv' +---@field __metatable any +---@field __tostring fun(t):string +---@field __gc fun(t) +---@field __add fun(t1,t2):any +---@field __sub fun(t1,t2):any +---@field __mul fun(t1,t2):any +---@field __div fun(t1,t2):any +---@field __mod fun(t1,t2):any +---@field __pow fun(t1,t2):any +---@field __unm fun(t):any +---#if VERSION >= 5.3 then +---@field __idiv fun(t1,t2):any +---@field __band fun(t1,t2):any +---@field __bor fun(t1,t2):any +---@field __bxor fun(t1,t2):any +---@field __bnot fun(t):any +---@field __shl fun(t1,t2):any +---@field __shr fun(t1,t2):any +---#end +---@field __concat fun(t1,t2):any +---@field __len fun(t):integer +---@field __eq fun(t1,t2):boolean +---@field __lt fun(t1,t2):boolean +---@field __le fun(t1,t2):boolean +---@field __index table|fun(t,k) +---@field __newindex table|fun(t,k,v) +---@field __call fun(t,...) +---#if VERSION > 5.1 or VERSION == JIT then +---@field __pairs fun(t):fun(t,k,v) +---#end +---#if VERSION == JIT or VERSION == 5.2 then +---@field __ipairs fun(t):fun(t,k,v) +---#end + ---#DES 'setmetatable' ---@param table table ----@param metatable? table +---@param metatable? metatable ---@return table function setmetatable(table, metatable) end -- cgit v1.2.3 From b890bbfc8e60e90f78f102a17312f3ca28f170b6 Mon Sep 17 00:00:00 2001 From: fesily Date: Thu, 11 May 2023 14:42:51 +0800 Subject: add base class --- meta/template/basic.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta') diff --git a/meta/template/basic.lua b/meta/template/basic.lua index 0bbf2f3d..7004cc44 100644 --- a/meta/template/basic.lua +++ b/meta/template/basic.lua @@ -210,7 +210,7 @@ function select(index, ...) end function setfenv(f, table) end ----@class metatable +---@class metatable : table ---@field __mode 'v'|'k'|'kv' ---@field __metatable any ---@field __tostring fun(t):string -- cgit v1.2.3 From 3d837666e6a0e01a5c1f207d56ba81fd99bdcd52 Mon Sep 17 00:00:00 2001 From: fesily Date: Thu, 11 May 2023 14:43:12 +0800 Subject: delete __index --- meta/template/basic.lua | 1 - 1 file changed, 1 deletion(-) (limited to 'meta') diff --git a/meta/template/basic.lua b/meta/template/basic.lua index 7004cc44..05c63188 100644 --- a/meta/template/basic.lua +++ b/meta/template/basic.lua @@ -236,7 +236,6 @@ function setfenv(f, table) end ---@field __eq fun(t1,t2):boolean ---@field __lt fun(t1,t2):boolean ---@field __le fun(t1,t2):boolean ----@field __index table|fun(t,k) ---@field __newindex table|fun(t,k,v) ---@field __call fun(t,...) ---#if VERSION > 5.1 or VERSION == JIT then -- cgit v1.2.3 From bc2dfd01e1b740c0924196dc5064abde1d067aae Mon Sep 17 00:00:00 2001 From: fesily Date: Mon, 15 May 2023 15:40:17 +0800 Subject: meta:fix jit module --- meta/template/jit.lua | 155 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 149 insertions(+), 6 deletions(-) (limited to 'meta') diff --git a/meta/template/jit.lua b/meta/template/jit.lua index dae996b5..72749814 100644 --- a/meta/template/jit.lua +++ b/meta/template/jit.lua @@ -5,29 +5,172 @@ ---@class jitlib ---@field version string ---@field version_num number ----@field os string ----@field arch string +---@field os 'Windows'|'Linux'|'OSX'|'BSD'|'POSIX'|'Other' +---@field arch 'x86'|'x64'|'arm'|'arm64'|'arm64be'|'ppc'|'ppc64'|'ppc64le'|'mips'|'mipsel'|'mips64'|'mips64el'|string jit = {} ---@overload fun(...):... ---@param func function|boolean ---@param recursive? boolean -function jit.on(func, recursive) end +function jit.on(func, recursive) +end ---@overload fun(...):... ---@param func function|boolean ---@param recursive? boolean -function jit.off(func, recursive) end +function jit.off(func, recursive) +end ---@overload fun(...):... ---@overload fun(tr: number) ---@param func function|boolean ---@param recursive? boolean -function jit.flush(func, recursive) end +function jit.flush(func, recursive) +end ---@return boolean status ---@return string ... ---@nodiscard -function jit.status() end +function jit.status() +end + +jit.profile = {} + +---@param mode string +---@param func fun(L:thread,samples:integer,vmst:string) +function jit.profile.start(mode, func) +end + +function jit.profile.stop() +end + +---@overload fun(th:thread,fmt:string,depth:integer) +---@param fmt string +---@param depth integer +function jit.profile.dumpstack(fmt, depth) +end + +---@class Trace +---@class Proto + +jit.util = {} + +---@class jit.funcinfo.lua +local funcinfo = { + linedefined = 0, + lastlinedefined = 0, + stackslots = 0, + params = 0, + bytecodes = 0, + gcconsts = 0, + nconsts = 0, + upvalues = 0, + currentline = 0, + isvararg = false, + children = false, + source = "", + loc = "", + ---@type Proto[] + proto = {} +} + +---@class jit.funcinfo.c +---@field ffid integer|nil +local funcinfo2 = { + addr = 0, + upvalues = 0, +} + + +---@param func function +---@param pc? integer +---@return jit.funcinfo.c|jit.funcinfo.lua info +function jit.util.funcinfo(func, pc) +end + +---@param func function +---@param pc integer +---@return integer? ins +---@return integer? m +function jit.util.funcbc(func, pc) +end + +---@param func function +---@param idx integer +---@return any? k +function jit.util.funck(func, idx) +end + +---@param func function +---@param idx integer +---@return string? name +function jit.util.funcuvname(func, idx) +end + +---@class jit.traceinfo +local traceinfo = { + nins = 0, + nk=0, + link=0, + nexit=0, + linktype = "" +} + +---@param tr Trace +---@return jit.traceinfo? info +function jit.util.traceinfo(tr) +end + +---@param tr Trace +---@param ref integer +---@return integer? m +---@return integer? ot +---@return integer? op1 +---@return integer? op2 +---@return integer? prev +function jit.util.traceir(tr, ref) +end + +---@param tr Trace +---@param idx integer +---@return any? k +---@return integer? t +---@return integer? slot +function jit.util.tracek(tr, idx) +end + +---@class jit.snap : integer[] + +---@param tr Trace +---@param sn integer +---@return jit.snap? snap +function jit.util.tracesnap(tr, sn) +end + +---@param tr Trace +---@return string? mcode +---@return integer? addr +---@return integer? loop +function jit.util.tracemc(tr) +end + +---@overload fun(exitno:integer):integer +---@param tr Trace +---@param exitno integer +---@return integer? addr +function jit.util.traceexitstub(tr, exitno) +end + +---@param idx integer +---@return integer? addr +function jit.util.ircalladdr(idx) +end + +jit.opt = {} + +---@param ... any flags +function jit.opt.start(...) + +end return jit -- cgit v1.2.3 From 2372d6ee9cdf34cb0feb78a32f5b82f8b9074d9f Mon Sep 17 00:00:00 2001 From: fesily Date: Mon, 15 May 2023 15:52:23 +0800 Subject: move other file --- meta/template/jit.lua | 133 ------------------------------------------ meta/template/jit.profile.lua | 20 +++++++ meta/template/jit.util.lua | 120 +++++++++++++++++++++++++++++++++++++ 3 files changed, 140 insertions(+), 133 deletions(-) create mode 100644 meta/template/jit.profile.lua create mode 100644 meta/template/jit.util.lua (limited to 'meta') diff --git a/meta/template/jit.lua b/meta/template/jit.lua index 72749814..b047ba4e 100644 --- a/meta/template/jit.lua +++ b/meta/template/jit.lua @@ -34,143 +34,10 @@ end function jit.status() end -jit.profile = {} - ----@param mode string ----@param func fun(L:thread,samples:integer,vmst:string) -function jit.profile.start(mode, func) -end - -function jit.profile.stop() -end - ----@overload fun(th:thread,fmt:string,depth:integer) ----@param fmt string ----@param depth integer -function jit.profile.dumpstack(fmt, depth) -end - ----@class Trace ----@class Proto - -jit.util = {} - ----@class jit.funcinfo.lua -local funcinfo = { - linedefined = 0, - lastlinedefined = 0, - stackslots = 0, - params = 0, - bytecodes = 0, - gcconsts = 0, - nconsts = 0, - upvalues = 0, - currentline = 0, - isvararg = false, - children = false, - source = "", - loc = "", - ---@type Proto[] - proto = {} -} - ----@class jit.funcinfo.c ----@field ffid integer|nil -local funcinfo2 = { - addr = 0, - upvalues = 0, -} - - ----@param func function ----@param pc? integer ----@return jit.funcinfo.c|jit.funcinfo.lua info -function jit.util.funcinfo(func, pc) -end - ----@param func function ----@param pc integer ----@return integer? ins ----@return integer? m -function jit.util.funcbc(func, pc) -end - ----@param func function ----@param idx integer ----@return any? k -function jit.util.funck(func, idx) -end - ----@param func function ----@param idx integer ----@return string? name -function jit.util.funcuvname(func, idx) -end - ----@class jit.traceinfo -local traceinfo = { - nins = 0, - nk=0, - link=0, - nexit=0, - linktype = "" -} - ----@param tr Trace ----@return jit.traceinfo? info -function jit.util.traceinfo(tr) -end - ----@param tr Trace ----@param ref integer ----@return integer? m ----@return integer? ot ----@return integer? op1 ----@return integer? op2 ----@return integer? prev -function jit.util.traceir(tr, ref) -end - ----@param tr Trace ----@param idx integer ----@return any? k ----@return integer? t ----@return integer? slot -function jit.util.tracek(tr, idx) -end - ----@class jit.snap : integer[] - ----@param tr Trace ----@param sn integer ----@return jit.snap? snap -function jit.util.tracesnap(tr, sn) -end - ----@param tr Trace ----@return string? mcode ----@return integer? addr ----@return integer? loop -function jit.util.tracemc(tr) -end - ----@overload fun(exitno:integer):integer ----@param tr Trace ----@param exitno integer ----@return integer? addr -function jit.util.traceexitstub(tr, exitno) -end - ----@param idx integer ----@return integer? addr -function jit.util.ircalladdr(idx) -end - jit.opt = {} ---@param ... any flags function jit.opt.start(...) - end return jit diff --git a/meta/template/jit.profile.lua b/meta/template/jit.profile.lua new file mode 100644 index 00000000..d0e788ce --- /dev/null +++ b/meta/template/jit.profile.lua @@ -0,0 +1,20 @@ +---#if not JIT then DISABLE() end +---@meta jit.profile + +local profile = {} + +---@param mode string +---@param func fun(L:thread,samples:integer,vmst:string) +function profile.start(mode, func) +end + +function profile.stop() +end + +---@overload fun(th:thread,fmt:string,depth:integer) +---@param fmt string +---@param depth integer +function profile.dumpstack(fmt, depth) +end + +return profile \ No newline at end of file diff --git a/meta/template/jit.util.lua b/meta/template/jit.util.lua new file mode 100644 index 00000000..08694286 --- /dev/null +++ b/meta/template/jit.util.lua @@ -0,0 +1,120 @@ +---#if not JIT then DISABLE() end +---@meta jit.util + +---@class Trace +---@class Proto + +local util = {} + +---@class jit.funcinfo.lua +local funcinfo = { + linedefined = 0, + lastlinedefined = 0, + stackslots = 0, + params = 0, + bytecodes = 0, + gcconsts = 0, + nconsts = 0, + upvalues = 0, + currentline = 0, + isvararg = false, + children = false, + source = "", + loc = "", + ---@type Proto[] + proto = {} +} + +---@class jit.funcinfo.c +---@field ffid integer|nil +local funcinfo2 = { + addr = 0, + upvalues = 0, +} + + +---@param func function +---@param pc? integer +---@return jit.funcinfo.c|jit.funcinfo.lua info +function util.funcinfo(func, pc) +end + +---@param func function +---@param pc integer +---@return integer? ins +---@return integer? m +function util.funcbc(func, pc) +end + +---@param func function +---@param idx integer +---@return any? k +function util.funck(func, idx) +end + +---@param func function +---@param idx integer +---@return string? name +function util.funcuvname(func, idx) +end + +---@class jit.traceinfo +local traceinfo = { + nins = 0, + nk = 0, + link = 0, + nexit = 0, + linktype = "" +} + +---@param tr Trace +---@return jit.traceinfo? info +function util.traceinfo(tr) +end + +---@param tr Trace +---@param ref integer +---@return integer? m +---@return integer? ot +---@return integer? op1 +---@return integer? op2 +---@return integer? prev +function util.traceir(tr, ref) +end + +---@param tr Trace +---@param idx integer +---@return any? k +---@return integer? t +---@return integer? slot +function util.tracek(tr, idx) +end + +---@class jit.snap : integer[] + +---@param tr Trace +---@param sn integer +---@return jit.snap? snap +function util.tracesnap(tr, sn) +end + +---@param tr Trace +---@return string? mcode +---@return integer? addr +---@return integer? loop +function util.tracemc(tr) +end + +---@overload fun(exitno:integer):integer +---@param tr Trace +---@param exitno integer +---@return integer? addr +function util.traceexitstub(tr, exitno) +end + +---@param idx integer +---@return integer? addr +function util.ircalladdr(idx) +end + +return util -- cgit v1.2.3 From 20c089e1664fadce54a44cee7d6055ab92923f3e Mon Sep 17 00:00:00 2001 From: C3pa <41503714+C3pa@users.noreply.github.com> Date: Mon, 15 May 2023 17:56:54 +0200 Subject: meta: add some spaces to improve readability --- meta/template/jit.profile.lua | 4 ++-- meta/template/jit.util.lua | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'meta') diff --git a/meta/template/jit.profile.lua b/meta/template/jit.profile.lua index d0e788ce..a7db77bf 100644 --- a/meta/template/jit.profile.lua +++ b/meta/template/jit.profile.lua @@ -4,14 +4,14 @@ local profile = {} ---@param mode string ----@param func fun(L:thread,samples:integer,vmst:string) +---@param func fun(L: thread, samples: integer, vmst: string) function profile.start(mode, func) end function profile.stop() end ----@overload fun(th:thread,fmt:string,depth:integer) +---@overload fun(th: thread, fmt: string, depth: integer) ---@param fmt string ---@param depth integer function profile.dumpstack(fmt, depth) diff --git a/meta/template/jit.util.lua b/meta/template/jit.util.lua index 08694286..cf525527 100644 --- a/meta/template/jit.util.lua +++ b/meta/template/jit.util.lua @@ -105,7 +105,7 @@ end function util.tracemc(tr) end ----@overload fun(exitno:integer):integer +---@overload fun(exitno: integer): integer ---@param tr Trace ---@param exitno integer ---@return integer? addr -- cgit v1.2.3 From a41227005417301dcf2f2d93abcba8ed3521901c Mon Sep 17 00:00:00 2001 From: fesily Date: Mon, 22 May 2023 15:48:33 +0800 Subject: Update basic.lua --- meta/template/basic.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'meta') diff --git a/meta/template/basic.lua b/meta/template/basic.lua index 05c63188..7004cc44 100644 --- a/meta/template/basic.lua +++ b/meta/template/basic.lua @@ -236,6 +236,7 @@ function setfenv(f, table) end ---@field __eq fun(t1,t2):boolean ---@field __lt fun(t1,t2):boolean ---@field __le fun(t1,t2):boolean +---@field __index table|fun(t,k) ---@field __newindex table|fun(t,k,v) ---@field __call fun(t,...) ---#if VERSION > 5.1 or VERSION == JIT then -- cgit v1.2.3 From 2bf30bdd364a4c7a02340d2ebb5360cf8002f2f1 Mon Sep 17 00:00:00 2001 From: fesily Date: Wed, 31 May 2023 16:38:35 +0800 Subject: fix assign-type-mismatch --- meta/template/basic.lua | 58 ++++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'meta') diff --git a/meta/template/basic.lua b/meta/template/basic.lua index 7004cc44..0dad91ba 100644 --- a/meta/template/basic.lua +++ b/meta/template/basic.lua @@ -210,40 +210,40 @@ function select(index, ...) end function setfenv(f, table) end ----@class metatable : table ----@field __mode 'v'|'k'|'kv' ----@field __metatable any ----@field __tostring fun(t):string ----@field __gc fun(t) ----@field __add fun(t1,t2):any ----@field __sub fun(t1,t2):any ----@field __mul fun(t1,t2):any ----@field __div fun(t1,t2):any ----@field __mod fun(t1,t2):any ----@field __pow fun(t1,t2):any ----@field __unm fun(t):any +---@class metatable +---@field __mode 'v'|'k'|'kv'|nil +---@field __metatable any|nil +---@field __tostring fun(t):string|nil +---@field __gc fun(t)|nil +---@field __add fun(t1,t2):any|nil +---@field __sub fun(t1,t2):any|nil +---@field __mul fun(t1,t2):any|nil +---@field __div fun(t1,t2):any|nil +---@field __mod fun(t1,t2):any|nil +---@field __pow fun(t1,t2):any|nil +---@field __unm fun(t):any|nil ---#if VERSION >= 5.3 then ----@field __idiv fun(t1,t2):any ----@field __band fun(t1,t2):any ----@field __bor fun(t1,t2):any ----@field __bxor fun(t1,t2):any ----@field __bnot fun(t):any ----@field __shl fun(t1,t2):any ----@field __shr fun(t1,t2):any +---@field __idiv fun(t1,t2):any|nil +---@field __band fun(t1,t2):any|nil +---@field __bor fun(t1,t2):any|nil +---@field __bxor fun(t1,t2):any|nil +---@field __bnot fun(t):any|nil +---@field __shl fun(t1,t2):any|nil +---@field __shr fun(t1,t2):any|nil ---#end ----@field __concat fun(t1,t2):any ----@field __len fun(t):integer ----@field __eq fun(t1,t2):boolean ----@field __lt fun(t1,t2):boolean ----@field __le fun(t1,t2):boolean ----@field __index table|fun(t,k) ----@field __newindex table|fun(t,k,v) ----@field __call fun(t,...) +---@field __concat fun(t1,t2):any|nil +---@field __len fun(t):integer|nil +---@field __eq fun(t1,t2):boolean|nil +---@field __lt fun(t1,t2):boolean|nil +---@field __le fun(t1,t2):boolean|nil +---@field __index table|fun(t,k)|nil +---@field __newindex table|fun(t,k,v)|nil +---@field __call fun(t,...)|nil ---#if VERSION > 5.1 or VERSION == JIT then ----@field __pairs fun(t):fun(t,k,v) +---@field __pairs fun(t):fun(t,k,v)|nil ---#end ---#if VERSION == JIT or VERSION == 5.2 then ----@field __ipairs fun(t):fun(t,k,v) +---@field __ipairs fun(t):fun(t,k,v)|nil ---#end ---#DES 'setmetatable' -- cgit v1.2.3 From 1c08c00fea5e8cd83bcc2b805b5324d26fb53e58 Mon Sep 17 00:00:00 2001 From: fesily Date: Wed, 31 May 2023 16:47:37 +0800 Subject: reset --- meta/template/basic.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta') diff --git a/meta/template/basic.lua b/meta/template/basic.lua index 0dad91ba..62ab999e 100644 --- a/meta/template/basic.lua +++ b/meta/template/basic.lua @@ -248,7 +248,7 @@ function setfenv(f, table) end ---#DES 'setmetatable' ---@param table table ----@param metatable? metatable +---@param metatable? metatable|table ---@return table function setmetatable(table, metatable) end -- cgit v1.2.3 From b9b6d2167107d0f120dba115f858cdb052c42e73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 6 Jun 2023 14:51:17 +0800 Subject: update metatable --- meta/template/basic.lua | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'meta') diff --git a/meta/template/basic.lua b/meta/template/basic.lua index 62ab999e..e646d3b8 100644 --- a/meta/template/basic.lua +++ b/meta/template/basic.lua @@ -213,37 +213,37 @@ function setfenv(f, table) end ---@class metatable ---@field __mode 'v'|'k'|'kv'|nil ---@field __metatable any|nil ----@field __tostring fun(t):string|nil +---@field __tostring (fun(t):string)|nil ---@field __gc fun(t)|nil ----@field __add fun(t1,t2):any|nil ----@field __sub fun(t1,t2):any|nil ----@field __mul fun(t1,t2):any|nil ----@field __div fun(t1,t2):any|nil ----@field __mod fun(t1,t2):any|nil ----@field __pow fun(t1,t2):any|nil ----@field __unm fun(t):any|nil +---@field __add (fun(t1,t2):any)|nil +---@field __sub (fun(t1,t2):any)|nil +---@field __mul (fun(t1,t2):any)|nil +---@field __div (fun(t1,t2):any)|nil +---@field __mod (fun(t1,t2):any)|nil +---@field __pow (fun(t1,t2):any)|nil +---@field __unm (fun(t):any)|nil ---#if VERSION >= 5.3 then ----@field __idiv fun(t1,t2):any|nil ----@field __band fun(t1,t2):any|nil ----@field __bor fun(t1,t2):any|nil ----@field __bxor fun(t1,t2):any|nil ----@field __bnot fun(t):any|nil ----@field __shl fun(t1,t2):any|nil ----@field __shr fun(t1,t2):any|nil +---@field __idiv (fun(t1,t2):any)|nil +---@field __band (fun(t1,t2):any)|nil +---@field __bor (fun(t1,t2):any)|nil +---@field __bxor (fun(t1,t2):any)|nil +---@field __bnot (fun(t):any)|nil +---@field __shl (fun(t1,t2):any)|nil +---@field __shr (fun(t1,t2):any)|nil ---#end ----@field __concat fun(t1,t2):any|nil ----@field __len fun(t):integer|nil ----@field __eq fun(t1,t2):boolean|nil ----@field __lt fun(t1,t2):boolean|nil ----@field __le fun(t1,t2):boolean|nil ----@field __index table|fun(t,k)|nil +---@field __concat (fun(t1,t2):any)|nil +---@field __len (fun(t):integer)|nil +---@field __eq (fun(t1,t2):boolean)|nil +---@field __lt (fun(t1,t2):boolean)|nil +---@field __le (fun(t1,t2):boolean)|nil +---@field __index table|(fun(t,k):any)|nil ---@field __newindex table|fun(t,k,v)|nil ----@field __call fun(t,...)|nil +---@field __call (fun(t,...):...)|nil ---#if VERSION > 5.1 or VERSION == JIT then ----@field __pairs fun(t):fun(t,k,v)|nil +---@field __pairs (fun(t):(fun(t,k,v):any,any))|nil ---#end ---#if VERSION == JIT or VERSION == 5.2 then ----@field __ipairs fun(t):fun(t,k,v)|nil +---@field __ipairs (fun(t):(fun(t,k,v):(integer|nil),any))|nil ---#end ---#DES 'setmetatable' -- cgit v1.2.3 From 0b961858509c7e6cbd73cfc2c9ed8fe272e392bb Mon Sep 17 00:00:00 2001 From: C3pa <41503714+C3pa@users.noreply.github.com> Date: Tue, 4 Jul 2023 09:55:20 +0200 Subject: Mark string.find return values as nilable --- meta/template/string.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'meta') diff --git a/meta/template/string.lua b/meta/template/string.lua index 841654f5..b0acb5b8 100644 --- a/meta/template/string.lua +++ b/meta/template/string.lua @@ -31,9 +31,9 @@ function string.dump(f, strip) end ---@param pattern string|number ---@param init? integer ---@param plain? boolean ----@return integer start ----@return integer end ----@return any ... captured +---@return integer|nil start +---@return integer|nil end +---@return any|nil ... captured ---@nodiscard function string.find(s, pattern, init, plain) end -- cgit v1.2.3 From 04ab77081defa1d66598a4429ad5707f5ab6a06d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 19 Jul 2023 16:41:30 +0800 Subject: update submodules --- meta/3rd/love2d/library/love/graphics.lua | 1 + meta/3rd/lovr/library/callback.lua | 18 ++++ meta/3rd/lovr/library/lovr/data.lua | 29 +++++- meta/3rd/lovr/library/lovr/graphics.lua | 94 +++++++++++++++++- meta/3rd/lovr/library/lovr/headset.lua | 45 ++++++--- meta/3rd/lovr/library/lovr/math.lua | 154 ++++++++++++++++++------------ meta/3rd/lovr/library/lovr/physics.lua | 40 +++++++- meta/3rd/lovr/library/lovr/system.lua | 26 +++++ meta/3rd/lovr/library/lovr/thread.lua | 4 +- 9 files changed, 324 insertions(+), 87 deletions(-) (limited to 'meta') diff --git a/meta/3rd/love2d/library/love/graphics.lua b/meta/3rd/love2d/library/love/graphics.lua index 87ad4a8f..02647e0b 100644 --- a/meta/3rd/love2d/library/love/graphics.lua +++ b/meta/3rd/love2d/library/love/graphics.lua @@ -794,6 +794,7 @@ function love.graphics.newParticleSystem(image, buffer) end --- ---[Open in Browser](https://love2d.org/wiki/love.graphics.newQuad) --- +---@overload fun(x: number, y: number, width: number, height: number, texture: love.Texture):love.Quad ---@param x number # The top-left position in the Image along the x-axis. ---@param y number # The top-left position in the Image along the y-axis. ---@param width number # The width of the Quad in the Image. (Must be greater than 0.) diff --git a/meta/3rd/lovr/library/callback.lua b/meta/3rd/lovr/library/callback.lua index 76a536db..903a3e8e 100644 --- a/meta/3rd/lovr/library/callback.lua +++ b/meta/3rd/lovr/library/callback.lua @@ -132,6 +132,24 @@ lovr.log = nil ---@type fun(pass: lovr.Pass):boolean lovr.mirror = nil +--- +---This callback is called when the mouse is moved. +--- +---@type fun(x: number, y: number, dx: number, dy: number) +lovr.mousemoved = nil + +--- +---This callback is called when a mouse button is pressed. +--- +---@type fun(x: number, y: number, button: number) +lovr.mousepressed = nil + +--- +---This callback is called when a mouse button is released. +--- +---@type fun(x: number, y: number, button: number) +lovr.mousereleased = nil + --- ---This callback contains a permission response previously requested with `lovr.system.requestPermission`. --- diff --git a/meta/3rd/lovr/library/lovr/data.lua b/meta/3rd/lovr/library/lovr/data.lua index dd47aa14..8c841962 100644 --- a/meta/3rd/lovr/library/lovr/data.lua +++ b/meta/3rd/lovr/library/lovr/data.lua @@ -150,8 +150,10 @@ function Blob:getSize() end --- ---Returns a binary string containing the Blob's data. --- +---@param offset? number # A byte offset into the Blob where the string will start. +---@param size? number # The number of bytes the string will contain. If nil, the rest of the data in the Blob will be used, based on the `offset` parameter. ---@return string data # The Blob's data. -function Blob:getString() end +function Blob:getString(offset, size) end --- ---An Image stores raw 2D pixel info for `Texture`s. @@ -341,7 +343,7 @@ function ModelData:getAnimationNode(index, channel) end ---@overload fun(self: lovr.ModelData, name: string, channel: number):lovr.AnimationProperty ---@param index number # The index of an animation. ---@param channel number # The index of a channel in the animation. ----@return lovr.AnimationProperty property # The property (translation, rotation, scale) affected by the keyframes. +---@return lovr.AnimationProperty property # The property (translation, rotation, scale, weights) affected by the keyframes. function ModelData:getAnimationProperty(index, channel) end --- @@ -353,6 +355,23 @@ function ModelData:getAnimationProperty(index, channel) end ---@return lovr.SmoothMode smooth # The smooth mode of the keyframes. function ModelData:getAnimationSmoothMode(index, channel) end +--- +---Returns the number of blend shapes in the model. +--- +---@return number count # The number of blend shapes in the model. +function ModelData:getBlendShapeCount() end + +--- +---Returns the name of a blend shape in the model. +--- +--- +---### NOTE: +---This function will throw an error if the blend shape index is invalid. +--- +---@param index number # The index of a blend shape. +---@return string name # The name of the blend shape. +function ModelData:getBlendShapeName(index) end + --- ---Returns one of the Blobs in the model, by index. --- @@ -1112,7 +1131,7 @@ function Sound:isStream() end function Sound:setFrames(t, count, dstOffset, srcOffset) end --- ----This indicates the different transform properties that can be animated. +---This indicates the different node properties that can be animated. --- ---@alias lovr.AnimationProperty --- @@ -1127,6 +1146,10 @@ function Sound:setFrames(t, count, dstOffset, srcOffset) end ---Node scale. --- ---| "scale" +--- +---Node blend shape weights. +--- +---| "weights" --- ---These are the data types that can be used by vertex data in meshes. diff --git a/meta/3rd/lovr/library/lovr/graphics.lua b/meta/3rd/lovr/library/lovr/graphics.lua index b0833fea..956d91ae 100644 --- a/meta/3rd/lovr/library/lovr/graphics.lua +++ b/meta/3rd/lovr/library/lovr/graphics.lua @@ -149,7 +149,7 @@ function lovr.graphics.getDevice() end --- ---Returns a table indicating which features are supported by the GPU. --- ----@return {textureBC: boolean, textureASTC: boolean, wireframe: boolean, depthClamp: boolean, indirectDrawFirstInstance: boolean, float64: boolean, int64: boolean, int16: boolean} features # +---@return {textureBC: boolean, textureASTC: boolean, wireframe: boolean, depthClamp: boolean, depthResolve: boolean, indirectDrawFirstInstance: boolean, float64: boolean, int64: boolean, int16: boolean} features # function lovr.graphics.getFeatures() end --- @@ -471,7 +471,6 @@ function lovr.graphics.newMaterial(properties) end ---### NOTE: ---Currently, the following features are not supported by the model importer: --- ----- glTF: Morph targets are not supported. ---- glTF: Only the default scene is loaded. ---- glTF: Currently, each skin in a Model can have up to 256 joints. ---- glTF: Meshes can't appear multiple times in the node hierarchy with different skins, they need @@ -482,6 +481,10 @@ function lovr.graphics.newMaterial(properties) end --- ---Diffuse and emissive textures will be loaded using sRGB encoding, all other textures will be loaded as linear. --- +---Loading a model file will fail if the asset references textures or other files using absolute paths. +--- +---Relative paths should be used instead, and will be relative to the model file within the virtual filesystem. +--- ---@overload fun(blob: lovr.Blob, options?: table):lovr.Model ---@overload fun(modelData: lovr.ModelData, options?: table):lovr.Model ---@param filename string # The path to model file. @@ -1098,6 +1101,45 @@ function Model:getAnimationDuration(index) end ---@return string name # The name of the animation. function Model:getAnimationName(index) end +--- +---Returns the number of blend shapes in the model. +--- +---@return number count # The number of blend shapes in the model. +function Model:getBlendShapeCount() end + +--- +---Returns the name of a blend shape in the model. +--- +--- +---### NOTE: +---This function will throw an error if the blend shape index is invalid. +--- +---@param index number # The index of a blend shape. +---@return string name # The name of the blend shape. +function Model:getBlendShapeName(index) end + +--- +---Returns the weight of a blend shape. +--- +---A blend shape contains offset values for the vertices of one of the meshes in a Model. +--- +---Whenever the Model is drawn, the offsets are multiplied by the weight of the blend shape, allowing for smooth blending between different meshes. +--- +---A weight of zero won't apply any displacement and will skip processing of the blend shape. +--- +--- +---### NOTE: +---The initial weights are declared in the model file. +--- +---Weights can be any number, but usually they're kept between 0 and 1. +--- +---This function will throw an error if the blend shape name or index doesn't exist. +--- +---@overload fun(self: lovr.Model, name: string):number +---@param index number # The index of a blend shape. +---@return number weight # The weight of the blend shape. +function Model:getBlendShapeWeight(index) end + --- ---Returns the 6 values of the Model's axis-aligned bounding box. --- @@ -1401,6 +1443,28 @@ function Model:hasJoints() end --- function Model:resetNodeTransforms() end +--- +---Sets the weight of a blend shape. +--- +---A blend shape contains offset values for the vertices of one of the meshes in a Model. +--- +---Whenever the Model is drawn, the offsets are multiplied by the weight of the blend shape, allowing for smooth blending between different meshes. +--- +---A weight of zero won't apply any displacement and will skip processing of the blend shape. +--- +--- +---### NOTE: +---The initial weights are declared in the model file. +--- +---Weights can be any number, but usually they're kept between 0 and 1. +--- +---This function will throw an error if the blend shape name or index doesn't exist. +--- +---@overload fun(self: lovr.Model, name: string, weight: number) +---@param index number # The index of a blend shape. +---@param weight number # The new weight for the blend shape. +function Model:setBlendShapeWeight(index, weight) end + --- ---Sets or blends the orientation of a node to a new orientation. --- @@ -1707,6 +1771,7 @@ function Pass:compute(x, y, z) end --- ---@overload fun(self: lovr.Pass, position: lovr.Vec3, scale: lovr.Vec3, orientation: lovr.Quat, segments?: number) ---@overload fun(self: lovr.Pass, transform: lovr.Mat4, segments?: number) +---@overload fun(self: lovr.Pass, p1: lovr.Vec3, p2: lovr.Vec3, radius?: number, segments?: number) ---@param x? number # The x coordinate of the center of the base of the cone. ---@param y? number # The y coordinate of the center of the base of the cone. ---@param z? number # The z coordinate of the center of the base of the cone. @@ -2081,19 +2146,38 @@ function Pass:read(buffer, index, count) end ---@param az number # The z component of the axis of rotation. function Pass:rotate(angle, ax, ay, az) end +--- +---Draws a rounded rectangle. +--- +---@overload fun(self: lovr.Pass, position: lovr.Vec3, size: lovr.Vec3, orientation: lovr.Quat, radius?: number, segments?: number) +---@overload fun(self: lovr.Pass, transform: lovr.Mat4, radius?: number, segments?: number) +---@param x? number # The x coordinate of the center of the rectangle. +---@param y? number # The y coordinate of the center of the rectangle. +---@param z? number # The z coordinate of the center of the rectangle. +---@param width? number # The width of the rectangle. +---@param height? number # The height of the rectangle. +---@param thickness? number # The thickness of the rectangle. +---@param angle? number # The rotation of the rectangle around its rotation axis, in radians. +---@param ax? number # The x component of the axis of rotation. +---@param ay? number # The y component of the axis of rotation. +---@param az? number # The z component of the axis of rotation. +---@param radius? number # The radius of the rectangle corners. If the radius is zero or negative, the rectangle will have sharp corners. +---@param segments? number # The number of circular segments to use for each corner. This increases the smoothness, but increases the number of vertices in the mesh. +function Pass:roundrect(x, y, z, width, height, thickness, angle, ax, ay, az, radius, segments) end + --- ---Scales the coordinate system. --- ---@overload fun(self: lovr.Pass, scale: lovr.Vec3) ---@param sx number # The x component of the scale. ----@param sy number # The y component of the scale. ----@param sz number # The z component of the scale. +---@param sy? number # The y component of the scale. +---@param sz? number # The z component of the scale. function Pass:scale(sx, sy, sz) end --- ---Sends a value to a variable in the Pass's active `Shader`. --- ----The active shader is changed using using `Pass:setShader`. +---The active shader is changed using `Pass:setShader`. --- --- ---### NOTE: diff --git a/meta/3rd/lovr/library/lovr/headset.lua b/meta/3rd/lovr/library/lovr/headset.lua index 8a7372c2..82c0e6c4 100644 --- a/meta/3rd/lovr/library/lovr/headset.lua +++ b/meta/3rd/lovr/library/lovr/headset.lua @@ -33,6 +33,10 @@ function lovr.headset.animate(device, model) end --- ---Returns the current angular velocity of a device. --- +--- +---### NOTE: +---If the device isn't tracked, all zeroes will be returned. +--- ---@param device? lovr.Device # The device to get the velocity of. ---@return number x # The x component of the angular velocity. ---@return number y # The y component of the angular velocity. @@ -61,20 +65,12 @@ function lovr.headset.getAxis(device, axis) end --- ---Returns the depth of the play area, in meters. --- ---- ----### NOTE: ----This currently returns 0 on the Quest. ---- ---@return number depth # The depth of the play area, in meters. function lovr.headset.getBoundsDepth() end --- ---Returns the size of the play area, in meters. --- ---- ----### NOTE: ----This currently returns 0 on the Quest. ---- ---@return number width # The width of the play area, in meters. ---@return number depth # The depth of the play area, in meters. function lovr.headset.getBoundsDimensions() end @@ -89,10 +85,6 @@ function lovr.headset.getBoundsGeometry(t) end --- ---Returns the width of the play area, in meters. --- ---- ----### NOTE: ----This currently returns 0 on the Quest. ---- ---@return number width # The width of the play area, in meters. function lovr.headset.getBoundsWidth() end @@ -423,6 +415,10 @@ function lovr.headset.getTime() end --- ---Returns the current linear velocity of a device, in meters per second. --- +--- +---### NOTE: +---If the device isn't tracked, all zeroes will be returned. +--- ---@param device? lovr.Device # The device to get the velocity of. ---@return number vx # The x component of the linear velocity. ---@return number vy # The y component of the linear velocity. @@ -494,6 +490,18 @@ function lovr.headset.isDown(device, button) end ---@return boolean focused # Whether the application is focused. function lovr.headset.isFocused() end +--- +---Returns whether passthrough is active. +--- +---When passthrough is active, the real world will be rendered behind any content rendered by LÖVR, using the alpha channel to blend between the two. +--- +--- +---### NOTE: +---This feature is currently only supported on Oculus Quest devices. +--- +---@return boolean active # Whether passthrough is active. +function lovr.headset.isPassthroughEnabled() end + --- ---Returns whether a button on a device is currently touched. --- @@ -549,6 +557,19 @@ function lovr.headset.setClipDistance(near, far) end ---@return boolean success # Whether the display refresh rate was successfully set. function lovr.headset.setDisplayFrequency(frequency) end +--- +---Sets whether passthrough is active. +--- +---When passthrough is active, the real world will be rendered behind any content rendered by LÖVR, using the alpha channel to blend between the two. +--- +--- +---### NOTE: +---This feature is currently only supported on Oculus Quest devices. +--- +---@param enable boolean # Whether passthrough should be enabled. +---@return boolean success # Whether the passthrough state was set successfully. +function lovr.headset.setPassthroughEnabled(enable) end + --- ---Starts the headset session. --- diff --git a/meta/3rd/lovr/library/lovr/math.lua b/meta/3rd/lovr/library/lovr/math.lua index e3aa426a..163e5954 100644 --- a/meta/3rd/lovr/library/lovr/math.lua +++ b/meta/3rd/lovr/library/lovr/math.lua @@ -50,7 +50,7 @@ function lovr.math.linearToGamma(lr, lg, lb) end --- ---This function takes the same arguments as `Mat4:set`. --- ----@overload fun(n: lovr.mat4):lovr.Mat4 +---@overload fun(n: lovr.Mat4):lovr.Mat4 ---@overload fun(position?: lovr.Vec3, scale?: lovr.Vec3, rotation?: lovr.Quat):lovr.Mat4 ---@overload fun(position?: lovr.Vec3, rotation?: lovr.Quat):lovr.Mat4 ---@overload fun(...):lovr.Mat4 @@ -76,7 +76,7 @@ function lovr.math.newCurve(x, y, z, ...) end --- ---This function takes the same arguments as `Mat4:set`. --- ----@overload fun(n: lovr.mat4):lovr.Mat4 +---@overload fun(n: lovr.Mat4):lovr.Mat4 ---@overload fun(position?: lovr.Vec3, scale?: lovr.Vec3, rotation?: lovr.Quat):lovr.Mat4 ---@overload fun(position?: lovr.Vec3, rotation?: lovr.Quat):lovr.Mat4 ---@overload fun(...):lovr.Mat4 @@ -89,17 +89,17 @@ function lovr.math.newMat4() end --- ---This function takes the same arguments as `Quat:set`. --- ----@overload fun(r: lovr.quat):lovr.quat ----@overload fun(v: lovr.vec3):lovr.quat ----@overload fun(v: lovr.vec3, u: lovr.vec3):lovr.quat ----@overload fun(m: lovr.mat4):lovr.quat ----@overload fun():lovr.quat +---@overload fun(r: lovr.Quat):lovr.Quat +---@overload fun(v: lovr.Vec3):lovr.Quat +---@overload fun(v: lovr.Vec3, u: lovr.Vec3):lovr.Quat +---@overload fun(m: lovr.Mat4):lovr.Quat +---@overload fun():lovr.Quat ---@param angle? number # An angle to use for the rotation, in radians. ---@param ax? number # The x component of the axis of rotation. ---@param ay? number # The y component of the axis of rotation. ---@param az? number # The z component of the axis of rotation. ---@param raw? boolean # Whether the components should be interpreted as raw `(x, y, z, w)` components. ----@return lovr.quat q # The new quaternion. +---@return lovr.Quat q # The new quaternion. function lovr.math.newQuat(angle, ax, ay, az, raw) end --- @@ -164,17 +164,17 @@ function lovr.math.noise(x) end --- ---This function takes the same arguments as `Quat:set`. --- ----@overload fun(r: lovr.quat):lovr.quat ----@overload fun(v: lovr.vec3):lovr.quat ----@overload fun(v: lovr.vec3, u: lovr.vec3):lovr.quat ----@overload fun(m: lovr.mat4):lovr.quat ----@overload fun():lovr.quat +---@overload fun(r: lovr.Quat):lovr.Quat +---@overload fun(v: lovr.Vec3):lovr.Quat +---@overload fun(v: lovr.Vec3, u: lovr.Vec3):lovr.Quat +---@overload fun(m: lovr.Mat4):lovr.Quat +---@overload fun():lovr.Quat ---@param angle? number # An angle to use for the rotation, in radians. ---@param ax? number # The x component of the axis of rotation. ---@param ay? number # The y component of the axis of rotation. ---@param az? number # The z component of the axis of rotation. ---@param raw? boolean # Whether the components should be interpreted as raw `(x, y, z, w)` components. ----@return lovr.quat q # The new quaternion. +---@return lovr.Quat q # The new quaternion. function lovr.math.quat(angle, ax, ay, az, raw) end --- @@ -400,19 +400,19 @@ function Mat4:equals(n) end ---@param down number # The bottom half-angle of the projection, in radians. ---@param near number # The near plane of the projection. ---@param far? number # The far plane. Zero is a special value that will set an infinite far plane with a reversed Z range, which improves depth buffer precision and is the default. ----@return lovr.Mat4 m # The original matrix. +---@return lovr.Mat4 self # The modified matrix. function Mat4:fov(left, right, up, down, near, far) end --- ---Resets the matrix to the identity, effectively setting its translation to zero, its scale to 1, and clearing any rotation. --- ----@return lovr.Mat4 m # The original matrix. +---@return lovr.Mat4 self # The modified matrix. function Mat4:identity() end --- ---Inverts the matrix, causing it to represent the opposite of its old transform. --- ----@return lovr.Mat4 m # The original matrix, with its values inverted. +---@return lovr.Mat4 self # The inverted matrix. function Mat4:invert() end --- @@ -425,7 +425,7 @@ function Mat4:invert() end ---@param from lovr.Vec3 # The position of the viewer. ---@param to lovr.Vec3 # The position of the target. ---@param up? lovr.Vec3 # The up vector of the viewer. ----@return lovr.Mat4 m # The original matrix. +---@return lovr.Mat4 self # The modified matrix. function Mat4:lookAt(from, to, up) end --- @@ -442,7 +442,7 @@ function Mat4:lookAt(from, to, up) end ---@overload fun(self: lovr.Mat4, v3: lovr.Vec3):lovr.Vec3 ---@overload fun(self: lovr.Mat4, v4: lovr.Vec4):lovr.Vec4 ---@param n lovr.Mat4 # The matrix. ----@return lovr.Mat4 m # The original matrix, containing the result. +---@return lovr.Mat4 self # The modified matrix. function Mat4:mul(n) end --- @@ -457,7 +457,7 @@ function Mat4:mul(n) end ---@param top number # The top edge of the projection. ---@param near number # The position of the near clipping plane. ---@param far number # The position of the far clipping plane. ----@return lovr.Mat4 m # The original matrix. +---@return lovr.Mat4 self # The modified matrix. function Mat4:orthographic(left, right, bottom, top, near, far) end --- @@ -469,15 +469,23 @@ function Mat4:orthographic(left, right, bottom, top, near, far) end ---@param aspect number # The horizontal aspect ratio of the projection (width / height). ---@param near number # The near plane. ---@param far? number # The far plane. Zero is a special value that will set an infinite far plane with a reversed Z range, which improves depth buffer precision and is the default. ----@return lovr.Mat4 m # The original matrix. +---@return lovr.Mat4 self # The modified matrix. function Mat4:perspective(fov, aspect, near, far) end +--- +---Turns the matrix into a reflection matrix that transforms values as though they were reflected across a plane. +--- +---@param position lovr.Vec3 # The position of the plane. +---@param normal lovr.Vec3 # The normal vector of the plane. +---@return lovr.Mat4 self # The reflected matrix. +function Mat4:reflect(position, normal) end + --- ---Rotates the matrix using a quaternion or an angle/axis rotation. --- ---@overload fun(self: lovr.Mat4, angle: number, ax?: number, ay?: number, az?: number):lovr.Mat4 ---@param q lovr.Quat # The rotation to apply to the matrix. ----@return lovr.Mat4 m # The original matrix. +---@return lovr.Mat4 self # The rotated matrix. function Mat4:rotate(q) end --- @@ -485,13 +493,13 @@ function Mat4:rotate(q) end --- ---@overload fun(self: lovr.Mat4, sx: number, sy?: number, sz?: number):lovr.Mat4 ---@param scale lovr.Vec3 # The 3D scale to apply. ----@return lovr.Mat4 m # The original matrix. +---@return lovr.Mat4 self # The modified matrix. function Mat4:scale(scale) end --- ---Sets the components of the matrix from separate position, rotation, and scale arguments or an existing matrix. --- ----@overload fun(self: lovr.Mat4, n: lovr.mat4):lovr.Mat4 +---@overload fun(self: lovr.Mat4, n: lovr.Mat4):lovr.Mat4 ---@overload fun(self: lovr.Mat4, x: number, y: number, z: number, sx: number, sy: number, sz: number, angle: number, ax: number, ay: number, az: number):lovr.Mat4 ---@overload fun(self: lovr.Mat4, x: number, y: number, z: number, angle: number, ax: number, ay: number, az: number):lovr.Mat4 ---@overload fun(self: lovr.Mat4, position: lovr.Vec3, scale: lovr.Vec3, rotation: lovr.Quat):lovr.Mat4 @@ -511,7 +519,7 @@ function Mat4:set() end ---@param from lovr.Vec3 # The position of the viewer. ---@param to lovr.Vec3 # The position of the target. ---@param up? lovr.Vec3 # The up vector of the viewer. ----@return lovr.Mat4 m # The original matrix. +---@return lovr.Mat4 self # The modified matrix. function Mat4:target(from, to, up) end --- @@ -519,13 +527,13 @@ function Mat4:target(from, to, up) end --- ---@overload fun(self: lovr.Mat4, x: number, y: number, z: number):lovr.Mat4 ---@param v lovr.Vec3 # The translation vector. ----@return lovr.Mat4 m # The original matrix. +---@return lovr.Mat4 self # The translated matrix. function Mat4:translate(v) end --- ---Transposes the matrix, mirroring its values along the diagonal. --- ----@return lovr.Mat4 m # The original matrix. +---@return lovr.Mat4 self # The transposed matrix. function Mat4:transpose() end --- @@ -547,7 +555,7 @@ local Quat = {} --- ---It negates the (x, y, z) components of the quaternion. --- ----@return lovr.Quat q # The original quaternion. +---@return lovr.Quat self # The inverted quaternion. function Quat:conjugate() end --- @@ -576,9 +584,9 @@ function Quat:length() end --- ---If the value is a vector, then the input vector is rotated by the quaternion and returned. --- ----@overload fun(self: lovr.Quat, v3: lovr.vec3):lovr.vec3 ----@param r lovr.quat # A quaternion to combine with the original. ----@return lovr.quat q # The original quaternion. +---@overload fun(self: lovr.Quat, v3: lovr.Vec3):lovr.Vec3 +---@param r lovr.Quat # A quaternion to combine with the original. +---@return lovr.Quat self # The modified quaternion. function Quat:mul(r) end --- @@ -590,7 +598,7 @@ function Quat:mul(r) end --- ---Try normalizing a quaternion if some of the calculations aren't working quite right! --- ----@return lovr.Quat q # The original quaternion. +---@return lovr.Quat self # The normalized quaternion. function Quat:normalize() end --- @@ -607,17 +615,17 @@ function Quat:normalize() end --- two vectors. ---- A matrix can be passed in to extract the rotation of the matrix into a quaternion. --- ----@overload fun(self: lovr.Quat, r: lovr.quat):lovr.quat ----@overload fun(self: lovr.Quat, v: lovr.vec3):lovr.quat ----@overload fun(self: lovr.Quat, v: lovr.vec3, u: lovr.vec3):lovr.quat ----@overload fun(self: lovr.Quat, m: lovr.mat4):lovr.quat ----@overload fun(self: lovr.Quat):lovr.quat +---@overload fun(self: lovr.Quat, r: lovr.Quat):lovr.Quat +---@overload fun(self: lovr.Quat, v: lovr.Vec3):lovr.Quat +---@overload fun(self: lovr.Quat, v: lovr.Vec3, u: lovr.Vec3):lovr.Quat +---@overload fun(self: lovr.Quat, m: lovr.Mat4):lovr.Quat +---@overload fun(self: lovr.Quat):lovr.Quat ---@param angle? number # The angle to use for the rotation, in radians. ---@param ax? number # The x component of the axis of rotation. ---@param ay? number # The y component of the axis of rotation. ---@param az? number # The z component of the axis of rotation. ---@param raw? boolean # Whether the components should be interpreted as raw `(x, y, z, w)` components. ----@return lovr.quat q # The original quaternion. +---@return lovr.Quat self # The modified quaternion. function Quat:set(angle, ax, ay, az, raw) end --- @@ -631,7 +639,7 @@ function Quat:set(angle, ax, ay, az, raw) end --- ---@param r lovr.Quat # The quaternion to slerp towards. ---@param t number # The lerping parameter. ----@return lovr.Quat q # The original quaternion, containing the new lerped values. +---@return lovr.Quat self # The modified quaternion, containing the new lerped values. function Quat:slerp(r, t) end --- @@ -725,7 +733,7 @@ local Vec2 = {} --- ---@overload fun(self: lovr.Vec2, x: number, y?: number):lovr.Vec2 ---@param u lovr.Vec2 # The other vector. ----@return lovr.Vec2 v # The original vector. +---@return lovr.Vec2 self # The modified vector. function Vec2:add(u) end --- @@ -755,7 +763,7 @@ function Vec2:distance(u) end --- ---@overload fun(self: lovr.Vec2, x: number, y?: number):lovr.Vec2 ---@param u lovr.Vec2 # The other vector to divide the components by. ----@return lovr.Vec2 v # The original vector. +---@return lovr.Vec2 self # The modified vector. function Vec2:div(u) end --- @@ -806,7 +814,7 @@ function Vec2:length() end ---@overload fun(self: lovr.Vec2, x: number, y: number, t: number):lovr.Vec2 ---@param u lovr.Vec2 # The vector to lerp towards. ---@param t number # The lerping parameter. ----@return lovr.Vec2 v # The original vector, containing the new lerped values. +---@return lovr.Vec2 self # The interpolated vector. function Vec2:lerp(u, t) end --- @@ -814,13 +822,13 @@ function Vec2:lerp(u, t) end --- ---@overload fun(self: lovr.Vec2, x: number, y?: number):lovr.Vec2 ---@param u lovr.Vec2 # The other vector to multiply the components by. ----@return lovr.Vec2 v # The original vector. +---@return lovr.Vec2 self # The modified vector. function Vec2:mul(u) end --- ---Adjusts the values in the vector so that its direction stays the same but its length becomes 1. --- ----@return lovr.Vec2 v # The original vector. +---@return lovr.Vec2 self # The normalized vector. function Vec2:normalize() end --- @@ -837,7 +845,7 @@ function Vec2:set(x, y) end --- ---@overload fun(self: lovr.Vec2, x: number, y?: number):lovr.Vec2 ---@param u lovr.Vec2 # The other vector. ----@return lovr.Vec2 v # The original vector. +---@return lovr.Vec2 self # The modified vector. function Vec2:sub(u) end --- @@ -858,7 +866,7 @@ local Vec3 = {} --- ---@overload fun(self: lovr.Vec3, x: number, y?: number, z?: number):lovr.Vec3 ---@param u lovr.Vec3 # The other vector. ----@return lovr.Vec3 v # The original vector. +---@return lovr.Vec3 self # The modified vector. function Vec3:add(u) end --- @@ -886,7 +894,7 @@ function Vec3:angle(u) end --- ---@overload fun(self: lovr.Vec3, x: number, y: number, z: number):lovr.Vec3 ---@param u lovr.Vec3 # The vector to compute the cross product with. ----@return lovr.Vec3 v # The original vector, with the cross product as its values. +---@return lovr.Vec3 self # The modified vector. function Vec3:cross(u) end --- @@ -902,7 +910,7 @@ function Vec3:distance(u) end --- ---@overload fun(self: lovr.Vec3, x: number, y?: number, z?: number):lovr.Vec3 ---@param u lovr.Vec3 # The other vector to divide the components by. ----@return lovr.Vec3 v # The original vector. +---@return lovr.Vec3 self # The modified vector. function Vec3:div(u) end --- @@ -953,7 +961,7 @@ function Vec3:length() end ---@overload fun(self: lovr.Vec3, x: number, y: number, z: number, t: number):lovr.Vec3 ---@param u lovr.Vec3 # The vector to lerp towards. ---@param t number # The lerping parameter. ----@return lovr.Vec3 v # The original vector, containing the new lerped values. +---@return lovr.Vec3 self # The interpolated vector. function Vec3:lerp(u, t) end --- @@ -961,19 +969,20 @@ function Vec3:lerp(u, t) end --- ---@overload fun(self: lovr.Vec3, x: number, y?: number, z?: number):lovr.Vec3 ---@param u lovr.Vec3 # The other vector to multiply the components by. ----@return lovr.Vec3 v # The original vector. +---@return lovr.Vec3 self # The modified vector. function Vec3:mul(u) end --- ---Adjusts the values in the vector so that its direction stays the same but its length becomes 1. --- ----@return lovr.Vec3 v # The original vector. +---@return lovr.Vec3 self # The normalized vector. function Vec3:normalize() end --- ---Sets the components of the vector, either from numbers or an existing vector. --- ---@overload fun(self: lovr.Vec3, u: lovr.Vec3):lovr.Vec3 +---@overload fun(self: lovr.Vec3, q: lovr.Quat):lovr.Vec3 ---@overload fun(self: lovr.Vec3, m: lovr.Mat4):lovr.Vec3 ---@param x? number # The new x value of the vector. ---@param y? number # The new y value of the vector. @@ -986,7 +995,7 @@ function Vec3:set(x, y, z) end --- ---@overload fun(self: lovr.Vec3, x: number, y?: number, z?: number):lovr.Vec3 ---@param u lovr.Vec3 # The other vector. ----@return lovr.Vec3 v # The original vector. +---@return lovr.Vec3 self # The modified vector. function Vec3:sub(u) end --- @@ -1008,7 +1017,7 @@ local Vec4 = {} --- ---@overload fun(self: lovr.Vec4, x: number, y?: number, z?: number, w?: number):lovr.Vec4 ---@param u lovr.Vec4 # The other vector. ----@return lovr.Vec4 v # The original vector. +---@return lovr.Vec4 self # The modified vector. function Vec4:add(u) end --- @@ -1038,7 +1047,7 @@ function Vec4:distance(u) end --- ---@overload fun(self: lovr.Vec4, x: number, y?: number, z?: number, w?: number):lovr.Vec4 ---@param u lovr.Vec4 # The other vector to divide the components by. ----@return lovr.Vec4 v # The original vector. +---@return lovr.Vec4 self # The modified vector. function Vec4:div(u) end --- @@ -1089,7 +1098,7 @@ function Vec4:length() end ---@overload fun(self: lovr.Vec4, x: number, y: number, z: number, w: number, t: number):lovr.Vec4 ---@param u lovr.Vec4 # The vector to lerp towards. ---@param t number # The lerping parameter. ----@return lovr.Vec4 v # The original vector, containing the new lerped values. +---@return lovr.Vec4 self # The interpolated vector. function Vec4:lerp(u, t) end --- @@ -1097,13 +1106,13 @@ function Vec4:lerp(u, t) end --- ---@overload fun(self: lovr.Vec4, x: number, y?: number, z?: number, w?: number):lovr.Vec4 ---@param u lovr.Vec4 # The other vector to multiply the components by. ----@return lovr.Vec4 v # The original vector. +---@return lovr.Vec4 self # The modified vector. function Vec4:mul(u) end --- ---Adjusts the values in the vector so that its direction stays the same but its length becomes 1. --- ----@return lovr.Vec4 v # The original vector. +---@return lovr.Vec4 self # The normalized vector. function Vec4:normalize() end --- @@ -1122,7 +1131,7 @@ function Vec4:set(x, y, z, w) end --- ---@overload fun(self: lovr.Vec4, x: number, y?: number, z?: number, w?: number):lovr.Vec4 ---@param u lovr.Vec4 # The other vector. ----@return lovr.Vec4 v # The original vector. +---@return lovr.Vec4 self # The modified vector. function Vec4:sub(u) end --- @@ -1168,11 +1177,14 @@ function Vec4:unpack() end --- --- local position = lovr.math.vec3(x, y, z) --- ----As a further shorthand, these vector constructors are placed on the global scope. +---As a shortcut, vector constructors are placed on the global scope. --- ----If you prefer to keep the global scope clean, this can be configured using the `t.math.globals` flag in `lovr.conf`. +---The uppercase name of the vector is a function that will create a permanent vector, and the lowercase name will create a temporary vector. +--- +---This can be disabled using the `t.math.globals` option in `lovr.conf`. --- --- local position = vec3(x1, y1, z1) + vec3(x2, y2, z2) +--- local transform = Mat4() --- ---Temporary vectors, with all their speed, come with an important restriction: they can only be used during the frame in which they were created. --- @@ -1181,7 +1193,7 @@ function Vec4:unpack() end --- local position = vec3(1, 2, 3) --- --- function lovr.update(dt) ---- -- Reusing a temporary vector across frames will error: +--- -- Reusing the temporary 'position' vector across frames will error: --- position:add(vec3(dt)) --- end --- @@ -1232,5 +1244,25 @@ function Vec4:unpack() end --- ---Similarly, matrices support raw unpacking as well as decomposition into translation/scale/rotation values. --- +---### Vector Constants +--- +---The following vector constants are available. +--- +---They return new temporary vectors each time they are used: +--- +---- `vec2.zero` (0, 0) +---- `vec2.one` (1, 1) +---- `vec3.zero` (0, 0, 0) +---- `vec3.one` (1, 1, 1) +---- `vec3.left` (-1, 0, 0) +---- `vec3.right` (1, 0, 0) +---- `vec3.up` (0, 1, 0) +---- `vec3.down` (0, -1, 0) +---- `vec3.back` (0, 0, 1) +---- `vec3.forward` (0, 0, -1) +---- `vec4.zero` (0, 0, 0, 0) +---- `vec4.one` (1, 1, 1, 1) +---- `quat.identity` (0, 0, 0, 1) +--- ---@class lovr.Vectors local Vectors = {} diff --git a/meta/3rd/lovr/library/lovr/physics.lua b/meta/3rd/lovr/library/lovr/physics.lua index 6d635c2b..b699fc81 100644 --- a/meta/3rd/lovr/library/lovr/physics.lua +++ b/meta/3rd/lovr/library/lovr/physics.lua @@ -1224,7 +1224,7 @@ function Shape:setPosition(x, y, z) end --- ---Sets whether this Shape is a sensor. --- ----Sensors do not trigger any collision response, but they still report collisions in `World:collide`. +---When a Shape is a sensor, it will not generate any collision response when it collides with things, but collisions can still be detected with `World:collide` and `World:getContacts`. --- ---@param sensor boolean # Whether the Shape should be a sensor. function Shape:setSensor(sensor) end @@ -1343,11 +1343,15 @@ local World = {} --- ---Attempt to collide two shapes. --- ----Internally this uses joints and forces to ensure the colliders attached to the shapes do not pass through each other. +---Internally this sets up constraint forces to move the shapes' colliders apart if they are touching. +--- +---The colliders won't actually move until `World:update` is called again to advance the physics simulation. +--- +---Collision responses can be customized using friction and restitution (bounciness) parameters, and default to using a mix between the parameters of the two colliders. --- ----Collisions can be customized using friction and restitution (bounciness) parameters, and default to using a mix of the colliders' friction and restitution parameters. +---Usually this is called internally by `World:update`, or in a custom collision resolver passed to `World:update`. --- ----Usually this is called automatically by `World:update`. +---If you want to detect if objects are touching without colliding them, use `World:getContacts` or make one or both of the shapes sensors using `Shape:setSensor`. --- --- ---### NOTE: @@ -1369,6 +1373,10 @@ function World:collide(shapeA, shapeB, friction, restitution) end --- ---After calling this function, the `World:overlaps` iterator can be used to iterate over the overlaps, and `World:collide` can be used to resolve a collision for the shapes (if any). Usually this is called automatically by `World:update`. --- +--- +---### NOTE: +---This performs the "broad phase" culling of objects in the World, usually using a spatial hash or other acceleration structure like a quad tree or octree. +--- function World:computeOverlaps() end --- @@ -1426,6 +1434,24 @@ function World:getAngularDamping() end ---@return table colliders # A table of `Collider` objects. function World:getColliders() end +--- +---Computes collision information between two shapes and returns a list of contacts where the shapes intersect. +--- +---Each contact point consists of a position, a normal vector, and a penetration depth. +--- +--- +---### NOTE: +---This only detects collision information, it does not cause the shapes to collide with each other. +--- +---Use `World:collide` for that. +--- +---This function ignores collision tags. +--- +---@param shapeA lovr.Shape # The first shape. +---@param shapeB lovr.Shape # The second shape. +---@return table contacts # A list of contacts. Each contact consists of 7 numbers: the contact position, the normal vector, and a depth value indicating how far the shapes intersect each other at the contact point (`{ x, y, z, nx, ny, nz, depth }`). +function World:getContacts(shapeA, shapeB) end + --- ---Returns the gravity of the World. --- @@ -1477,6 +1503,12 @@ function World:getResponseTime() end ---@return number steps # The step count. function World:getStepCount() end +--- +---Returns the list of collision tags used when creating the World. +--- +---@return table tags # A table of collision tags (strings). +function World:getTags() end + --- ---Returns the tightness of joints in the World. --- diff --git a/meta/3rd/lovr/library/lovr/system.lua b/meta/3rd/lovr/library/lovr/system.lua index de11766b..c0a5b739 100644 --- a/meta/3rd/lovr/library/lovr/system.lua +++ b/meta/3rd/lovr/library/lovr/system.lua @@ -12,6 +12,25 @@ lovr.system = {} ---@return number cores # The number of logical cores on the system. function lovr.system.getCoreCount() end +--- +---Returns the position of the mouse. +--- +---@return number x # The x position of the mouse, relative to the top-left of the window. +---@return number y # The y position of the mouse, relative to the top-left of the window. +function lovr.system.getMousePosition() end + +--- +---Returns the x position of the mouse. +--- +---@return number x # The x position of the mouse, relative to the top-left of the window. +function lovr.system.getMouseX() end + +--- +---Returns the y position of the mouse. +--- +---@return number y # The y position of the mouse, relative to the top-left of the window. +function lovr.system.getMouseY() end + --- ---Returns the current operating system. --- @@ -66,6 +85,13 @@ function lovr.system.getWindowWidth() end ---@return boolean down # Whether the key is currently pressed. function lovr.system.isKeyDown(key) end +--- +---Returns whether a mouse button is currently pressed. +--- +---@param button number # The index of a button to check. Use 1 for the primary mouse button, 2 for the secondary button, and 3 for the middle button. Other indices can be used, but are hardware-specific. +---@return boolean down # Whether the mouse button is currently down. +function lovr.system.isMouseDown(button) end + --- ---Returns whether the desktop window is open. --- diff --git a/meta/3rd/lovr/library/lovr/thread.lua b/meta/3rd/lovr/library/lovr/thread.lua index f281edcb..5b22c9c3 100644 --- a/meta/3rd/lovr/library/lovr/thread.lua +++ b/meta/3rd/lovr/library/lovr/thread.lua @@ -116,9 +116,9 @@ function Channel:pop(wait) end --- ---Pushes a message onto the Channel. --- ----The following types of data can be pushed: nil, boolean, number, string, and userdata. +---The following types of data can be pushed: nil, boolean, number, string, lightuserdata, vectors, and userdata (LÖVR objects). --- ----Tables should be serialized to strings. +---Notably, tables are not currently supported and should be serialized to strings. --- --- ---### NOTE: -- cgit v1.2.3 From a254bb56f06999d2580e908f9e0946fe166fd546 Mon Sep 17 00:00:00 2001 From: ellutionist Date: Thu, 20 Jul 2023 14:26:55 +0800 Subject: fix: doc mistake in meta/3rd/OpenResty/library/prometheus.lua --- meta/3rd/OpenResty/library/prometheus.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta') diff --git a/meta/3rd/OpenResty/library/prometheus.lua b/meta/3rd/OpenResty/library/prometheus.lua index c56ebb03..88036b81 100644 --- a/meta/3rd/OpenResty/library/prometheus.lua +++ b/meta/3rd/OpenResty/library/prometheus.lua @@ -234,7 +234,7 @@ local PrometheusHist = {} --- metric_response_sizes:observe(tonumber(ngx.var.bytes_sent)) ---} ---``` ----@param value string is a value that should be recorded. Required. +---@param value number is a value that should be recorded. Required. ---@param label_values? string[] is an array of label values. function PrometheusHist:observe(value, label_values) end -- cgit v1.2.3 From 8f09bd43cbf8f650ab857f0c5710f9d1ddc93de3 Mon Sep 17 00:00:00 2001 From: C3pa <41503714+C3pa@users.noreply.github.com> Date: Wed, 26 Jul 2023 11:16:04 +0200 Subject: Update string.dump so it doesn't have strip argument in Lua 5.1 and 5.2 --- meta/template/string.lua | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'meta') diff --git a/meta/template/string.lua b/meta/template/string.lua index b0acb5b8..c5fe6ab6 100644 --- a/meta/template/string.lua +++ b/meta/template/string.lua @@ -20,11 +20,18 @@ function string.byte(s, i, j) end function string.char(byte, ...) end ---#DES 'string.dump' +---#if VERSION >= 5.3 or JIT then ---@param f async fun(...):... ---@param strip? boolean ---@return string ---@nodiscard function string.dump(f, strip) end +---#else +---@param f async fun(...):... +---@return string +---@nodiscard +function string.dump(f) end +---#end ---#DES 'string.find' ---@param s string|number @@ -93,6 +100,7 @@ function string.match(s, pattern, init) end ---#DES 'string.pack' ---@param fmt string ---@param v1 string|number +---@param v2 string|number ---@param ... string|number ---@return string binary ---@nodiscard -- cgit v1.2.3 From 38524fabef24e3a7594c91c63a0db21c51ac98ca Mon Sep 17 00:00:00 2001 From: carsakiller Date: Fri, 28 Jul 2023 12:34:21 -0400 Subject: fix: os.time parameter Closes #2235 --- meta/template/os.lua | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'meta') diff --git a/meta/template/os.lua b/meta/template/os.lua index 102a9228..c491ecba 100644 --- a/meta/template/os.lua +++ b/meta/template/os.lua @@ -100,8 +100,28 @@ function os.rename(oldname, newname) end ---@return string localecategory function os.setlocale(locale, category) end +---@class osdateparam +---#DES 'osdate.year' +---@field year integer|string +---#DES 'osdate.month' +---@field month integer|string +---#DES 'osdate.day' +---@field day integer|string +---#DES 'osdate.hour' +---@field hour (integer|string)? +---#DES 'osdate.min' +---@field min (integer|string)? +---#DES 'osdate.sec' +---@field sec (integer|string)? +---#DES 'osdate.wday' +---@field wday integer|string +---#DES 'osdate.yday' +---@field yday integer|string +---#DES 'osdate.isdst' +---@field isdst boolean? + ---#DES 'os.time' ----@param date? osdate +---@param date? osdateparam ---@return integer ---@nodiscard function os.time(date) end -- cgit v1.2.3 From 9e04432122eee34ea21ae2b56fe1f1b832bb2fbe Mon Sep 17 00:00:00 2001 From: carsakiller Date: Sun, 30 Jul 2023 22:54:02 -0400 Subject: fix: os.time optionals Closes `os.time` expected input is wrong #2235 --- meta/template/os.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'meta') diff --git a/meta/template/os.lua b/meta/template/os.lua index c491ecba..4dbffc6b 100644 --- a/meta/template/os.lua +++ b/meta/template/os.lua @@ -114,9 +114,9 @@ function os.setlocale(locale, category) end ---#DES 'osdate.sec' ---@field sec (integer|string)? ---#DES 'osdate.wday' ----@field wday integer|string +---@field wday (integer|string)? ---#DES 'osdate.yday' ----@field yday integer|string +---@field yday (integer|string)? ---#DES 'osdate.isdst' ---@field isdst boolean? -- cgit v1.2.3 From e98b56ffbcb49b465abd2ba1eddfc73ce8f2a3c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 2 Aug 2023 18:34:23 +0800 Subject: fix template --- meta/template/string.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta') diff --git a/meta/template/string.lua b/meta/template/string.lua index c5fe6ab6..e23b0803 100644 --- a/meta/template/string.lua +++ b/meta/template/string.lua @@ -100,7 +100,7 @@ function string.match(s, pattern, init) end ---#DES 'string.pack' ---@param fmt string ---@param v1 string|number ----@param v2 string|number +---@param v2? string|number ---@param ... string|number ---@return string binary ---@nodiscard -- cgit v1.2.3 From 3899160724e488f194c7844e819a649445f0dd57 Mon Sep 17 00:00:00 2001 From: carsakiller Date: Thu, 10 Aug 2023 23:29:50 -0400 Subject: chore: replace wiki references --- meta/3rd/example/plugin.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta') diff --git a/meta/3rd/example/plugin.lua b/meta/3rd/example/plugin.lua index 0ece12f5..7224f914 100644 --- a/meta/3rd/example/plugin.lua +++ b/meta/3rd/example/plugin.lua @@ -1,5 +1,5 @@ -- if this file exists, then change setting `Lua.runtime.plugin` --- see https://github.com/LuaLS/lua-language-server/wiki/Plugins +-- see https://luals.github.io/wiki/plugins function OnSetText(uri, text) local diffs = {} -- cgit v1.2.3 From a5c3b64c217fb2691a23ca3b849567474b653ddf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 22 Aug 2023 14:44:25 +0800 Subject: whimsical --- meta/whimsical/basic.lua | 38 +++++++++++++++ meta/whimsical/builtin.lua | 116 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 154 insertions(+) create mode 100644 meta/whimsical/basic.lua create mode 100644 meta/whimsical/builtin.lua (limited to 'meta') diff --git a/meta/whimsical/basic.lua b/meta/whimsical/basic.lua new file mode 100644 index 00000000..8f25d19f --- /dev/null +++ b/meta/whimsical/basic.lua @@ -0,0 +1,38 @@ +---@meta _ + +---#DES 'arg' +---@type string[] +arg = {} + +---#DES 'assert' +---@generic T +---@param v? T +---@param message? any +---@param ... any +---@return T +---@return any ... => args[reti + 1] +---@error => args[1].istruly +---@narrow v => args[1].truly +function assert(v, message, ...) end + +--[[@@@ +---@overload fun(opt: 'collect') # ---#DESTAIL 'cgopt.collect' +---@overload fun(opt: 'stop') # ---#DESTAIL 'cgopt.stop' +---@overload fun(opt: 'restart') # ---#DESTAIL 'cgopt.restart' +---@overload fun(opt: 'count'): integer # ---#DESTAIL 'cgopt.count' +---@overload fun(opt: 'step'): boolean # ---#DESTAIL 'cgopt.step' +---@overload fun(opt: 'isrunning'): boolean # ---#DESTAIL 'cgopt.isrunning' +---#if VERSION >= 5.4 then +---@overload fun(opt: 'incremental' + , pause?: integer + , stepmul?: integer + , stepsize?: integer) # ---#DESTAIL 'cgopt.incremental' +---@overload fun(opt: 'generational' + , minor?: integer + , major?: integer) # ---#DESTAIL 'cgopt.generational' +---#end +---@overload fun(opt: 'setpause', arg: integer) # ---#DESTAIL 'cgopt.setpause' +---@overload fun(opt: 'setstepmul', arg: integer) # ---#DESTAIL 'cgopt.setstepmul' +---@prototype +]] +function collectgarbage(...) end diff --git a/meta/whimsical/builtin.lua b/meta/whimsical/builtin.lua new file mode 100644 index 00000000..6521bb4b --- /dev/null +++ b/meta/whimsical/builtin.lua @@ -0,0 +1,116 @@ +---@meta _ + +--[[@@@ +---@inner class -> { + self.istruly = true + self.truly = self + self.falsy = Class 'never' + self.view = self.name +} +---@inner integer -> { + self.istruly = true + self.truly = self + self.falsy = Class 'never' + self.view = tostring(self.value) +} +---@inner string -> { + self.istruly = true + self.truly = self + self.falsy = Class 'never' + self.view = cat.util.viewString(self.value, self.quotation) +} +---@inner union -> { + self.istruly = function (subs) + local istruly = subs[1].istruly + if istruly == nil then + return nil + end + if istruly == true then + for i = 2, #subs do + if subs[i].istruly ~= true then + return nil + end + end + return true + else + for i = 2, #subs do + if subs[i].istruly ~= false then + return nil + end + end + return false + end + return nil + end + self.truly = function (subs) + local union = Union() + for i = 1, #subs do + union:add(subs[i].truly) + end + if union:len() == 0 then + return Class 'never' + end + if union:len() == 1 then + return union:first() + end + return union + end + self.falsy = function (subs) + local union = Union() + for i = 1, #subs do + union:add(subs[i].falsy) + end + if union:len() == 0 then + return Class 'never' + end + if union:len() == 1 then + return union:first() + end + return union + end + self.view = function (subs) + local views = {} + for i = 1, #subs do + views[i] = subs[i].view + end + if #views == 0 then + return 'never' + end + return table.concat(views, '|') + end +} +---@class nil -> { + self.istruly = false + self.truly = Class 'never' + self.falsy = self +} +---@class never -> { + self.istruly = nil +} +---@class true -> { + self.istruly = true + self.truly = self + self.falsy = Class 'never' +} +---@class false -> { + self.istruly = false + self.truly = Class 'never' + self.falsy = self +} +---@class any: { [unknown]: any } -> { + self.istruly = nil + self.truly = Class 'truly' + self.falsy = Class 'false' | Class 'nil' +} +---@class truly: { [unknown]: any } +---@class unknown: truly | false +---@class boolean: true | false +---@class number +---@class thread +---@class table: { [unknown]: any } +---@class table: { [K]: V } +---@class string: stringlib +---@class userdata: { [unknown]: any } +---@class lightuserdata +---@class function: fun(...): ... +]] -- cgit v1.2.3 From 9269032792f18b895ae7f8f5950ea5df4284e4a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Thu, 24 Aug 2023 17:30:15 +0800 Subject: =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9F=BA=E7=A1=80=E5=BA=93=E5=AE=9A?= =?UTF-8?q?=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- meta/template/basic.lua | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'meta') diff --git a/meta/template/basic.lua b/meta/template/basic.lua index e646d3b8..44f62a46 100644 --- a/meta/template/basic.lua +++ b/meta/template/basic.lua @@ -8,6 +8,7 @@ arg = {} ---@generic T ---@param v? T ---@param message? any +---@param ... any ---@return T ---@return any ... function assert(v, message, ...) end @@ -30,6 +31,7 @@ function assert(v, message, ...) end ---#if VERSION >= 5.4 then ---#DES 'collectgarbage' ---@param opt? gcoptions +---@param ... any ---@return any function collectgarbage(opt, ...) end ---#else @@ -136,6 +138,7 @@ function newproxy(proxy) end ---@version 5.1 ---#DES 'module' ---@param name string +---@param ... any function module(name, ...) end ---#DES 'next' @@ -161,12 +164,14 @@ function pairs(t) end ---@param f async fun(...):... ---#end ---@param arg1? any +---@param ... any ---@return boolean success ---@return any result ---@return any ... function pcall(f, arg1, ...) end ---#DES 'print' +---@param ... any function print(...) end ---#DES 'rawequal' @@ -198,6 +203,7 @@ function rawset(table, index, value) end ---#DES 'select' ---@param index integer|"#" +---@param ... any ---@return any ---@nodiscard function select(index, ...) end @@ -298,6 +304,7 @@ _VERSION = "Lua 5.4" ---@version >5.4 ---#DES 'warn' ---@param message string +---@param ... any function warn(message, ...) end ---#if VERSION == 5.1 and not JIT then @@ -313,6 +320,7 @@ function xpcall(f, err) end ---@param f async fun(...):... ---@param msgh function ---@param arg1? any +---@param ... any ---@return boolean success ---@return any result ---@return any ... -- cgit v1.2.3 From 4ac49f6c54f44658beb46e362d7afedf311905f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 30 Aug 2023 18:36:54 +0800 Subject: update --- meta/whimsical/builtin.lua | 110 +++------------------------------------- meta/whimsical/rule.lua | 122 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 128 insertions(+), 104 deletions(-) create mode 100644 meta/whimsical/rule.lua (limited to 'meta') diff --git a/meta/whimsical/builtin.lua b/meta/whimsical/builtin.lua index 6521bb4b..17905798 100644 --- a/meta/whimsical/builtin.lua +++ b/meta/whimsical/builtin.lua @@ -1,110 +1,13 @@ ---@meta _ ---[[@@@ ----@inner class -> { - self.istruly = true - self.truly = self - self.falsy = Class 'never' - self.view = self.name -} ----@inner integer -> { - self.istruly = true - self.truly = self - self.falsy = Class 'never' - self.view = tostring(self.value) -} ----@inner string -> { - self.istruly = true - self.truly = self - self.falsy = Class 'never' - self.view = cat.util.viewString(self.value, self.quotation) -} ----@inner union -> { - self.istruly = function (subs) - local istruly = subs[1].istruly - if istruly == nil then - return nil - end - if istruly == true then - for i = 2, #subs do - if subs[i].istruly ~= true then - return nil - end - end - return true - else - for i = 2, #subs do - if subs[i].istruly ~= false then - return nil - end - end - return false - end - return nil - end - self.truly = function (subs) - local union = Union() - for i = 1, #subs do - union:add(subs[i].truly) - end - if union:len() == 0 then - return Class 'never' - end - if union:len() == 1 then - return union:first() - end - return union - end - self.falsy = function (subs) - local union = Union() - for i = 1, #subs do - union:add(subs[i].falsy) - end - if union:len() == 0 then - return Class 'never' - end - if union:len() == 1 then - return union:first() - end - return union - end - self.view = function (subs) - local views = {} - for i = 1, #subs do - views[i] = subs[i].view - end - if #views == 0 then - return 'never' - end - return table.concat(views, '|') - end -} ----@class nil -> { - self.istruly = false - self.truly = Class 'never' - self.falsy = self -} ----@class never -> { - self.istruly = nil -} ----@class true -> { - self.istruly = true - self.truly = self - self.falsy = Class 'never' -} ----@class false -> { - self.istruly = false - self.truly = Class 'never' - self.falsy = self -} ----@class any: { [unknown]: any } -> { - self.istruly = nil - self.truly = Class 'truly' - self.falsy = Class 'false' | Class 'nil' -} +---@class nil +---@class never +---@class true +---@class false +---@class any: { [unknown]: any } ---@class truly: { [unknown]: any } ---@class unknown: truly | false ----@class boolean: true | false +---@class boolean ---@class number ---@class thread ---@class table: { [unknown]: any } @@ -113,4 +16,3 @@ ---@class userdata: { [unknown]: any } ---@class lightuserdata ---@class function: fun(...): ... -]] diff --git a/meta/whimsical/rule.lua b/meta/whimsical/rule.lua new file mode 100644 index 00000000..2cfe865f --- /dev/null +++ b/meta/whimsical/rule.lua @@ -0,0 +1,122 @@ +local cat + +cat.rule.inner.default = function (self) + self.istruly = true + self.truly = self + self.falsy = cat.class 'never' + self.view = self.name +end + +cat.rule.inner.never = function (self) + self.istruly = nil +end + +cat.rule.inner.any = function (self) + self.istruly = nil + self.truly = cat.class 'truly' + self.falsy = cat.boolean(false) | cat.class 'nil' +end + +cat.rule.inner['nil'] = function (self) + self.istruly = false + self.truly = cat.class 'never' + self.falsy = self +end + +cat.rule.inner.boolean = function (self) + if self.value == true then + self.istruly = true + self.truly = self + self.falsy = cat.class 'never' + elseif self.value == false then + self.istruly = false + self.truly = cat.class 'never' + self.falsy = self + else + self.istruly = nil + self.truly = cat.boolean(true) + self.falsy = cat.boolean(false) + end +end + +cat.rule.inner.number = function (self) + self.istruly = true + self.truly = self + self.falsy = cat.class 'never' + self.view = tostring(self.value) +end + +cat.rule.inner.integer = function (self) + self.istruly = true + self.truly = self + self.falsy = cat.class 'never' + self.view = tostring(self.value) +end + +cat.rule.inner.string = function (self) + self.istruly = true + self.truly = self + self.falsy = cat.class 'never' + self.view = cat.util.viewString(self.value, self.quotation) +end + +cat.rule.inner.union = function (self) + self.istruly = function (union) + local istruly = union.subs[1].istruly + if istruly == nil then + return nil + end + if istruly == true then + for i = 2, #union.subs do + if union.subs[i].istruly ~= true then + return nil + end + end + return true + else + for i = 2, #union.subs do + if union.subs[i].istruly ~= false then + return nil + end + end + return false + end + return nil + end + self.truly = function (union) + local new = cat.union() + for i = 1, #union.subs do + new:add(union.subs[i].truly) + end + if new:len() == 0 then + return cat.class 'never' + end + if new:len() == 1 then + return new[1] + end + return new + end + self.falsy = function (union) + local new = cat.union() + for i = 1, #union.subs do + new:add(union.subs[i].falsy) + end + if new:len() == 0 then + return cat.class 'never' + end + if new:len() == 1 then + return new[1] + end + return new + end + self.view = function (union) + local views = {} + for i = 1, #union.subs do + views[i] = union.subs[i].view + end + if #views == 0 then + return 'never' + end + return table.concat(views, '|') + end +end -- cgit v1.2.3 From a1af5107dd53388d86902c13ae2e0125ebcbc158 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Fri, 8 Sep 2023 18:00:22 +0800 Subject: update whimsical --- meta/whimsical/basic.lua | 14 +++++++++++- meta/whimsical/rule.lua | 56 +++++++++++++++++++++++++++--------------------- 2 files changed, 44 insertions(+), 26 deletions(-) (limited to 'meta') diff --git a/meta/whimsical/basic.lua b/meta/whimsical/basic.lua index 8f25d19f..9075a0e9 100644 --- a/meta/whimsical/basic.lua +++ b/meta/whimsical/basic.lua @@ -11,7 +11,7 @@ arg = {} ---@param ... any ---@return T ---@return any ... => args[reti + 1] ----@error => args[1].istruly +---@throw => args[1].isFalsy ---@narrow v => args[1].truly function assert(v, message, ...) end @@ -36,3 +36,15 @@ function assert(v, message, ...) end ---@prototype ]] function collectgarbage(...) end + +---#DES 'dofile' +---@param filename? string +---@return any +---@custom dofile +function dofile(filename) end + +---#DES 'error' +---@param message any +---@param level? integer +---@throw +function error(message, level) end diff --git a/meta/whimsical/rule.lua b/meta/whimsical/rule.lua index 2cfe865f..0715d78f 100644 --- a/meta/whimsical/rule.lua +++ b/meta/whimsical/rule.lua @@ -1,81 +1,81 @@ local cat -cat.rule.inner.default = function (self) - self.istruly = true +cat.rule.default = function (self) + self.isTruly = true self.truly = self self.falsy = cat.class 'never' self.view = self.name end -cat.rule.inner.never = function (self) - self.istruly = nil +cat.rule.never = function (self) + self.isTruly = nil end -cat.rule.inner.any = function (self) - self.istruly = nil +cat.rule.any = function (self) + self.isTruly = nil self.truly = cat.class 'truly' self.falsy = cat.boolean(false) | cat.class 'nil' end -cat.rule.inner['nil'] = function (self) - self.istruly = false +cat.rule['nil'] = function (self) + self.isTruly = false self.truly = cat.class 'never' self.falsy = self end -cat.rule.inner.boolean = function (self) +cat.rule.boolean = function (self) if self.value == true then - self.istruly = true + self.isTruly = true self.truly = self self.falsy = cat.class 'never' elseif self.value == false then - self.istruly = false + self.isTruly = false self.truly = cat.class 'never' self.falsy = self else - self.istruly = nil + self.isTruly = nil self.truly = cat.boolean(true) self.falsy = cat.boolean(false) end end -cat.rule.inner.number = function (self) - self.istruly = true +cat.rule.number = function (self) + self.isTruly = true self.truly = self self.falsy = cat.class 'never' self.view = tostring(self.value) end -cat.rule.inner.integer = function (self) - self.istruly = true +cat.rule.integer = function (self) + self.isTruly = true self.truly = self self.falsy = cat.class 'never' self.view = tostring(self.value) end -cat.rule.inner.string = function (self) - self.istruly = true +cat.rule.string = function (self) + self.isTruly = true self.truly = self self.falsy = cat.class 'never' self.view = cat.util.viewString(self.value, self.quotation) end -cat.rule.inner.union = function (self) - self.istruly = function (union) - local istruly = union.subs[1].istruly - if istruly == nil then +cat.rule.union = function (self) + self.isTruly = function (union) + local isTruly = union.subs[1].isTruly + if isTruly == nil then return nil end - if istruly == true then + if isTruly == true then for i = 2, #union.subs do - if union.subs[i].istruly ~= true then + if union.subs[i].isTruly ~= true then return nil end end return true else for i = 2, #union.subs do - if union.subs[i].istruly ~= false then + if union.subs[i].isTruly ~= false then return nil end end @@ -120,3 +120,9 @@ cat.rule.inner.union = function (self) return table.concat(views, '|') end end + +cat.custom.dofile.onReturn = function (context) + local filename = context.args[1].asString + local file = cat.files[filename] + return file.returns[1] +end -- cgit v1.2.3 From a641c2658120f1091846085686b4a95b96ce4f04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 20 Sep 2023 14:43:34 +0800 Subject: add `__close` to `setmetatable` fix #2335 --- meta/template/basic.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'meta') diff --git a/meta/template/basic.lua b/meta/template/basic.lua index 44f62a46..4a9360fd 100644 --- a/meta/template/basic.lua +++ b/meta/template/basic.lua @@ -251,6 +251,9 @@ function setfenv(f, table) end ---#if VERSION == JIT or VERSION == 5.2 then ---@field __ipairs (fun(t):(fun(t,k,v):(integer|nil),any))|nil ---#end +---#if VERSION >= 5.4 then +---@field __close (fun(t,errobj):any)|nil +---#end ---#DES 'setmetatable' ---@param table table -- cgit v1.2.3 From d2f198493b8d3de1c98c94db17a17e378925792e Mon Sep 17 00:00:00 2001 From: carsakiller Date: Fri, 27 Oct 2023 20:42:05 -0400 Subject: refactor: replace openresty with LuaCATS submodule --- meta/3rd/OpenResty | 1 + meta/3rd/OpenResty/config.json | 19 - meta/3rd/OpenResty/library/cjson.lua | 488 --- meta/3rd/OpenResty/library/cjson/safe.lua | 46 - meta/3rd/OpenResty/library/jit.lua | 32 - meta/3rd/OpenResty/library/ndk.lua | 4 - meta/3rd/OpenResty/library/ngx.lua | 4393 -------------------- meta/3rd/OpenResty/library/ngx/balancer.lua | 118 - meta/3rd/OpenResty/library/ngx/base64.lua | 21 - meta/3rd/OpenResty/library/ngx/errlog.lua | 122 - meta/3rd/OpenResty/library/ngx/ocsp.lua | 61 - meta/3rd/OpenResty/library/ngx/pipe.lua | 312 -- meta/3rd/OpenResty/library/ngx/process.lua | 52 - meta/3rd/OpenResty/library/ngx/re.lua | 102 - meta/3rd/OpenResty/library/ngx/req.lua | 16 - meta/3rd/OpenResty/library/ngx/resp.lua | 23 - meta/3rd/OpenResty/library/ngx/semaphore.lua | 66 - meta/3rd/OpenResty/library/ngx/ssl.lua | 286 -- meta/3rd/OpenResty/library/ngx/ssl/clienthello.lua | 102 - meta/3rd/OpenResty/library/ngx/ssl/session.lua | 52 - meta/3rd/OpenResty/library/ngx/upstream.lua | 9 - meta/3rd/OpenResty/library/prometheus.lua | 247 -- meta/3rd/OpenResty/library/resty/aes.lua | 75 - meta/3rd/OpenResty/library/resty/core.lua | 4 - meta/3rd/OpenResty/library/resty/core/base.lua | 51 - meta/3rd/OpenResty/library/resty/core/base64.lua | 4 - meta/3rd/OpenResty/library/resty/core/ctx.lua | 9 - meta/3rd/OpenResty/library/resty/core/exit.lua | 4 - meta/3rd/OpenResty/library/resty/core/hash.lua | 4 - meta/3rd/OpenResty/library/resty/core/misc.lua | 6 - meta/3rd/OpenResty/library/resty/core/ndk.lua | 4 - meta/3rd/OpenResty/library/resty/core/phase.lua | 4 - meta/3rd/OpenResty/library/resty/core/regex.lua | 55 - meta/3rd/OpenResty/library/resty/core/request.lua | 5 - meta/3rd/OpenResty/library/resty/core/response.lua | 5 - meta/3rd/OpenResty/library/resty/core/shdict.lua | 4 - meta/3rd/OpenResty/library/resty/core/time.lua | 4 - meta/3rd/OpenResty/library/resty/core/uri.lua | 4 - meta/3rd/OpenResty/library/resty/core/utils.lua | 10 - meta/3rd/OpenResty/library/resty/core/var.lua | 4 - meta/3rd/OpenResty/library/resty/core/worker.lua | 4 - meta/3rd/OpenResty/library/resty/dns/resolver.lua | 424 -- meta/3rd/OpenResty/library/resty/limit/conn.lua | 11 - meta/3rd/OpenResty/library/resty/limit/count.lua | 7 - meta/3rd/OpenResty/library/resty/limit/req.lua | 9 - meta/3rd/OpenResty/library/resty/limit/traffic.lua | 5 - meta/3rd/OpenResty/library/resty/lock.lua | 127 - meta/3rd/OpenResty/library/resty/lrucache.lua | 115 - .../OpenResty/library/resty/lrucache/pureffi.lua | 18 - meta/3rd/OpenResty/library/resty/md5.lua | 16 - meta/3rd/OpenResty/library/resty/memcached.lua | 27 - meta/3rd/OpenResty/library/resty/mysql.lua | 15 - meta/3rd/OpenResty/library/resty/random.lua | 10 - meta/3rd/OpenResty/library/resty/redis.lua | 57 - meta/3rd/OpenResty/library/resty/sha.lua | 4 - meta/3rd/OpenResty/library/resty/sha1.lua | 10 - meta/3rd/OpenResty/library/resty/sha224.lua | 10 - meta/3rd/OpenResty/library/resty/sha256.lua | 10 - meta/3rd/OpenResty/library/resty/sha384.lua | 10 - meta/3rd/OpenResty/library/resty/sha512.lua | 10 - meta/3rd/OpenResty/library/resty/shell.lua | 62 - meta/3rd/OpenResty/library/resty/signal.lua | 74 - meta/3rd/OpenResty/library/resty/string.lua | 75 - meta/3rd/OpenResty/library/resty/upload.lua | 7 - .../library/resty/upstream/healthcheck.lua | 6 - .../OpenResty/library/resty/websocket/client.lua | 63 - .../OpenResty/library/resty/websocket/protocol.lua | 173 - .../OpenResty/library/resty/websocket/server.lua | 16 - meta/3rd/OpenResty/library/table/clone.lua | 25 - meta/3rd/OpenResty/library/table/isarray.lua | 23 - meta/3rd/OpenResty/library/table/isempty.lua | 22 - meta/3rd/OpenResty/library/table/nkeys.lua | 23 - meta/3rd/OpenResty/library/tablepool.lua | 29 - meta/3rd/OpenResty/library/thread/exdata.lua | 43 - meta/3rd/OpenResty/library/thread/exdata2.lua | 8 - meta/3rd/OpenResty/library/toComment.lua | 3 - 76 files changed, 1 insertion(+), 8378 deletions(-) create mode 160000 meta/3rd/OpenResty delete mode 100644 meta/3rd/OpenResty/config.json delete mode 100644 meta/3rd/OpenResty/library/cjson.lua delete mode 100644 meta/3rd/OpenResty/library/cjson/safe.lua delete mode 100644 meta/3rd/OpenResty/library/jit.lua delete mode 100644 meta/3rd/OpenResty/library/ndk.lua delete mode 100644 meta/3rd/OpenResty/library/ngx.lua delete mode 100644 meta/3rd/OpenResty/library/ngx/balancer.lua delete mode 100644 meta/3rd/OpenResty/library/ngx/base64.lua delete mode 100644 meta/3rd/OpenResty/library/ngx/errlog.lua delete mode 100644 meta/3rd/OpenResty/library/ngx/ocsp.lua delete mode 100644 meta/3rd/OpenResty/library/ngx/pipe.lua delete mode 100644 meta/3rd/OpenResty/library/ngx/process.lua delete mode 100644 meta/3rd/OpenResty/library/ngx/re.lua delete mode 100644 meta/3rd/OpenResty/library/ngx/req.lua delete mode 100644 meta/3rd/OpenResty/library/ngx/resp.lua delete mode 100644 meta/3rd/OpenResty/library/ngx/semaphore.lua delete mode 100644 meta/3rd/OpenResty/library/ngx/ssl.lua delete mode 100644 meta/3rd/OpenResty/library/ngx/ssl/clienthello.lua delete mode 100644 meta/3rd/OpenResty/library/ngx/ssl/session.lua delete mode 100644 meta/3rd/OpenResty/library/ngx/upstream.lua delete mode 100644 meta/3rd/OpenResty/library/prometheus.lua delete mode 100644 meta/3rd/OpenResty/library/resty/aes.lua delete mode 100644 meta/3rd/OpenResty/library/resty/core.lua delete mode 100644 meta/3rd/OpenResty/library/resty/core/base.lua delete mode 100644 meta/3rd/OpenResty/library/resty/core/base64.lua delete mode 100644 meta/3rd/OpenResty/library/resty/core/ctx.lua delete mode 100644 meta/3rd/OpenResty/library/resty/core/exit.lua delete mode 100644 meta/3rd/OpenResty/library/resty/core/hash.lua delete mode 100644 meta/3rd/OpenResty/library/resty/core/misc.lua delete mode 100644 meta/3rd/OpenResty/library/resty/core/ndk.lua delete mode 100644 meta/3rd/OpenResty/library/resty/core/phase.lua delete mode 100644 meta/3rd/OpenResty/library/resty/core/regex.lua delete mode 100644 meta/3rd/OpenResty/library/resty/core/request.lua delete mode 100644 meta/3rd/OpenResty/library/resty/core/response.lua delete mode 100644 meta/3rd/OpenResty/library/resty/core/shdict.lua delete mode 100644 meta/3rd/OpenResty/library/resty/core/time.lua delete mode 100644 meta/3rd/OpenResty/library/resty/core/uri.lua delete mode 100644 meta/3rd/OpenResty/library/resty/core/utils.lua delete mode 100644 meta/3rd/OpenResty/library/resty/core/var.lua delete mode 100644 meta/3rd/OpenResty/library/resty/core/worker.lua delete mode 100644 meta/3rd/OpenResty/library/resty/dns/resolver.lua delete mode 100644 meta/3rd/OpenResty/library/resty/limit/conn.lua delete mode 100644 meta/3rd/OpenResty/library/resty/limit/count.lua delete mode 100644 meta/3rd/OpenResty/library/resty/limit/req.lua delete mode 100644 meta/3rd/OpenResty/library/resty/limit/traffic.lua delete mode 100644 meta/3rd/OpenResty/library/resty/lock.lua delete mode 100644 meta/3rd/OpenResty/library/resty/lrucache.lua delete mode 100644 meta/3rd/OpenResty/library/resty/lrucache/pureffi.lua delete mode 100644 meta/3rd/OpenResty/library/resty/md5.lua delete mode 100644 meta/3rd/OpenResty/library/resty/memcached.lua delete mode 100644 meta/3rd/OpenResty/library/resty/mysql.lua delete mode 100644 meta/3rd/OpenResty/library/resty/random.lua delete mode 100644 meta/3rd/OpenResty/library/resty/redis.lua delete mode 100644 meta/3rd/OpenResty/library/resty/sha.lua delete mode 100644 meta/3rd/OpenResty/library/resty/sha1.lua delete mode 100644 meta/3rd/OpenResty/library/resty/sha224.lua delete mode 100644 meta/3rd/OpenResty/library/resty/sha256.lua delete mode 100644 meta/3rd/OpenResty/library/resty/sha384.lua delete mode 100644 meta/3rd/OpenResty/library/resty/sha512.lua delete mode 100644 meta/3rd/OpenResty/library/resty/shell.lua delete mode 100644 meta/3rd/OpenResty/library/resty/signal.lua delete mode 100644 meta/3rd/OpenResty/library/resty/string.lua delete mode 100644 meta/3rd/OpenResty/library/resty/upload.lua delete mode 100644 meta/3rd/OpenResty/library/resty/upstream/healthcheck.lua delete mode 100644 meta/3rd/OpenResty/library/resty/websocket/client.lua delete mode 100644 meta/3rd/OpenResty/library/resty/websocket/protocol.lua delete mode 100644 meta/3rd/OpenResty/library/resty/websocket/server.lua delete mode 100644 meta/3rd/OpenResty/library/table/clone.lua delete mode 100644 meta/3rd/OpenResty/library/table/isarray.lua delete mode 100644 meta/3rd/OpenResty/library/table/isempty.lua delete mode 100644 meta/3rd/OpenResty/library/table/nkeys.lua delete mode 100644 meta/3rd/OpenResty/library/tablepool.lua delete mode 100644 meta/3rd/OpenResty/library/thread/exdata.lua delete mode 100644 meta/3rd/OpenResty/library/thread/exdata2.lua delete mode 100644 meta/3rd/OpenResty/library/toComment.lua (limited to 'meta') diff --git a/meta/3rd/OpenResty b/meta/3rd/OpenResty new file mode 160000 index 00000000..3bec36f0 --- /dev/null +++ b/meta/3rd/OpenResty @@ -0,0 +1 @@ +Subproject commit 3bec36f0f645bb38b3c8208990d5c36feb66ce3d diff --git a/meta/3rd/OpenResty/config.json b/meta/3rd/OpenResty/config.json deleted file mode 100644 index 39d495fc..00000000 --- a/meta/3rd/OpenResty/config.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "files" : [ - "resty/redis%.lua", - "lib/resty/.*%.lua", - "src/resty/.*%.lua", - "lib/ngx.*/.*%.lua", - "src/ngx.*/.*%.lua" - ], - "words" : [ - "resty%.%w+", - "ngx%.%w+" - ], - "settings" : { - "Lua.runtime.version" : "LuaJIT", - "Lua.diagnostics.globals" : [ - "ngx" - ] - } -} diff --git a/meta/3rd/OpenResty/library/cjson.lua b/meta/3rd/OpenResty/library/cjson.lua deleted file mode 100644 index aeef436a..00000000 --- a/meta/3rd/OpenResty/library/cjson.lua +++ /dev/null @@ -1,488 +0,0 @@ ----@meta - ---- lua cjson ---- ---- https://kyne.com.au/~mark/software/lua-cjson.php ---- https://kyne.com.au/~mark/software/lua-cjson-manual.html ---- https://openresty.org/en/lua-cjson-library.html ---- ---- **NOTE:** This includes the additions in the OpenResty-maintained cjson fork: https://github.com/openresty/lua-cjson ---- ---- --- ---- ---- The cjson module will throw an error during JSON conversion if any invalid ---- data is encountered. Refer to `cjson.encode` and cjson.decode for details. ---- ---- The cjson.safe module behaves identically to the cjson module, except when ---- errors are encountered during JSON conversion. On error, the cjson_safe.encode ---- and cjson_safe.decode functions will return nil followed by the error message. ---- ---- cjson.new can be used to instantiate an independent copy of the Lua CJSON ---- module. The new module has a separate persistent encoding buffer, and default settings. ---- ---- Lua CJSON can support Lua implementations using multiple preemptive threads ---- within a single Lua state provided the persistent encoding buffer is not ---- shared. This can be achieved by one of the following methods: ---- ---- * Disabling the persistent encoding buffer with cjson.encode_keep_buffer ---- * Ensuring each thread calls cjson.encode separately (ie, treat cjson.encode as non-reentrant). ---- * Using a separate cjson module table per preemptive thread (cjson.new) ---- ---- ## Note ---- ---- Lua CJSON uses `strtod` and `snprintf` to perform numeric conversion as they ---- are usually well supported, fast and bug free. However, these functions ---- require a workaround for JSON encoding/parsing under locales using a comma ---- decimal separator. Lua CJSON detects the current locale during instantiation ---- to determine and automatically implement the workaround if required. Lua ---- CJSON should be reinitialised via cjson.new if the locale of the current ---- process changes. Using a different locale per thread is not supported. ---- ----@class cjson ----@field _NAME string ----@field _VERSION string ----@field null cjson.null ----@field empty_array cjson.empty_array ----@field array_mt cjson.array_mt ----@field empty_array_mt cjson.empty_array_mt ---- -local cjson = {} - - ---- A metatable which can "tag" a table as a JSON Array in case it is empty (that ---- is, if the table has no elements, `cjson.encode()` will encode it as an empty ---- JSON Array). ---- ---- Instead of: ---- ----```lua ---- local function serialize(arr) ---- if #arr < 1 then ---- arr = cjson.empty_array ---- end ---- ---- return cjson.encode({some_array = arr}) ---- end ----``` ---- ---- This is more concise: ---- ----```lua ---- local function serialize(arr) ---- setmetatable(arr, cjson.empty_array_mt) ---- ---- return cjson.encode({some_array = arr}) ---- end ----``` ---- ---- Both will generate: ---- ----```json ---- { ---- "some_array": [] ---- } ----``` ---- ---- **NOTE:** This field is specific to the OpenResty cjson fork. ---- ----@alias cjson.empty_array_mt table - - ---- When lua-cjson encodes a table with this metatable, it will systematically ---- encode it as a JSON Array. The resulting, encoded Array will contain the ---- array part of the table, and will be of the same length as the `#` operator ---- on that table. Holes in the table will be encoded with the null JSON value. ---- ---- ## Example ---- ----```lua ---- local t = { "hello", "world" } ---- setmetatable(t, cjson.array_mt) ---- cjson.encode(t) -- ["hello","world"] ----``` ---- ---- Or: ---- ----```lua ---- local t = {} ---- t[1] = "one" ---- t[2] = "two" ---- t[4] = "three" ---- t.foo = "bar" ---- setmetatable(t, cjson.array_mt) ---- cjson.encode(t) -- ["one","two",null,"three"] ----``` ---- ---- **NOTE:** This field is specific to the OpenResty cjson fork. ---- ---- This value was introduced in the 2.1.0.5 release of this module. ---- ----@alias cjson.array_mt table - - ---- Sentinel type that denotes a JSON `null` value ----@alias cjson.null lightuserdata - - ---- A lightuserdata, similar to `cjson.null`, which will be encoded as an empty ---- JSON Array by `cjson.encode()`. ---- ---- For example, since encode_empty_table_as_object is true by default: ---- ----```lua ---- local cjson = require "cjson" ---- ---- local json = cjson.encode({ ---- foo = "bar", ---- some_object = {}, ---- some_array = cjson.empty_array ---- }) ----``` ---- ---- This will generate: ---- ----```json ---- { ---- "foo": "bar", ---- "some_object": {}, ---- "some_array": [] ---- } ----``` ---- ---- **NOTE:** This field is specific to the OpenResty cjson fork. ---- ----@alias cjson.empty_array lightuserdata - - ---- unserialize a json string to a lua value ---- ---- `cjson.decode` will deserialise any UTF-9 JSON string into a Lua value or table. ---- ---- UTF-16 and UTF-32 JSON strings are not supported. ---- ---- cjson.decode requires that any NULL (ASCII 0) and double quote (ASCII 34) characters are escaped within strings. All escape codes will be decoded and other bytes will be passed transparently. UTF-8 characters are not validated during decoding and should be checked elsewhere if required. ---- ---- JSON null will be converted to a NULL lightuserdata value. This can be compared with `cjson.null` for convenience. ---- ---- By default, numbers incompatible with the JSON specification (infinity, NaN, hexadecimal) can be decoded. This default can be changed with `cjson.decode_invalid_numbers()`. ---- ---- ```lua ---- local json_text '[ true, { "foo": "bar" } ]' ---- cjson.decode(json_text) --> { true, { foo = "bar" } } ---- ``` ---- ----@param json string ----@return any -function cjson.decode(json) end - - ---- decode_invalid_numbers ---- ---- Lua CJSON may generate an error when trying to decode numbers not supported ---- by the JSON specification. Invalid numbers are defined as: ---- ---- * infinity ---- * not-a-number (NaN) ---- * hexadecimal ---- ---- Available settings: ---- ---- * `true`: Accept and decode invalid numbers. This is the default setting. ---- * `false`: Throw an error when invalid numbers are encountered. ---- ---- The current setting is always returned, and is only updated when an argument is provided. ---- ----@param setting? boolean # (default: `true`) ----@return boolean setting # the value of the current setting -function cjson.decode_invalid_numbers(setting) end - - ---- decode_max_depth ---- ---- Lua CJSON will generate an error when parsing deeply nested JSON once the ---- maximum array/object depth has been exceeded. This check prevents ---- unnecessarily complicated JSON from slowing down the application, or crashing ---- the application due to lack of process stack space. ---- ---- An error may be generated before the depth limit is hit if Lua is unable to ---- allocate more objects on the Lua stack. ---- ---- By default, Lua CJSON will reject JSON with arrays and/or objects nested ---- more than 1000 levels deep. ---- ---- The current setting is always returned, and is only updated when an argument is provided. ---- ----@param depth? integer # must be positive (default `1000`) ----@return integer depth -function cjson.decode_max_depth(depth) end - - ---- decode_array_with_array_mt ---- ---- If enabled, JSON Arrays decoded by cjson.decode will result in Lua tables ---- with the array_mt metatable. This can ensure a 1-to-1 relationship between ---- arrays upon multiple encoding/decoding of your JSON data with this module. ---- ---- If disabled, JSON Arrays will be decoded to plain Lua tables, without the ---- `cjson.array_mt` metatable. ---- ---- ## Example ---- ----```lua ---- local cjson = require "cjson" ---- ---- -- default behavior ---- local my_json = [[{"my_array":[]}]] ---- local t = cjson.decode(my_json) ---- cjson.encode(t) -- {"my_array":{}} back to an object ---- ---- -- now, if this behavior is enabled ---- cjson.decode_array_with_array_mt(true) ---- ---- local my_json = [[{"my_array":[]}]] ---- local t = cjson.decode(my_json) ---- cjson.encode(t) -- {"my_array":[]} properly re-encoded as an array ----``` ---- ---- **NOTE:** This function is specific to the OpenResty cjson fork. ---- ----@param enabled boolean # (default: false) -function cjson.decode_array_with_array_mt(enabled) end - - ---- serialize a lua value to a json string ---- ---- cjson.encode will serialise a Lua value into a string containing the JSON representation. ---- ---- cjson.encode supports the following types: ---- ---- * boolean ---- * lightuserdata (NULL value only) ---- * nil ---- * number ---- * string ---- * table ---- ---- The remaining Lua types will generate an error: ---- ---- * function ---- * lightuserdata (non-NULL values) ---- * thread ---- * userdata ---- ---- By default, numbers are encoded with 14 significant digits. Refer to cjson.encode_number_precision for details. ---- ---- Lua CJSON will escape the following characters within each UTF-8 string: ---- ---- * Control characters (ASCII 0 - 31) ---- * Double quote (ASCII 34) ---- * Forward slash (ASCII 47) ---- * Blackslash (ASCII 92) ---- * Delete (ASCII 127) ---- ---- All other bytes are passed transparently. ---- ---- ---- ## Caution ---- ---- Lua CJSON will successfully encode/decode binary strings, but this is technically not supported by JSON and may not be compatible with other JSON libraries. To ensure the output is valid JSON, applications should ensure all Lua strings passed to cjson.encode are UTF-8. ---- ---- --- ---- Base64 is commonly used to encode binary data as the most efficient encoding under UTF-8 can only reduce the encoded size by a further ~8%. Lua Base64 routines can be found in the LuaSocket and lbase64 packages. ---- ---- Lua CJSON uses a heuristic to determine whether to encode a Lua table as a JSON array or an object. A Lua table with only positive integer keys of type number will be encoded as a JSON array. All other tables will be encoded as a JSON object. ---- ---- Lua CJSON does not use metamethods when serialising tables. ---- ---- * `rawget()` is used to iterate over Lua arrays ---- * `next()` is used to iterate over Lua objects ---- ---- Lua arrays with missing entries (sparse arrays) may optionally be encoded in ---- several different ways. Refer to cjson.encode_sparse_array for details. ---- ---- JSON object keys are always strings. Hence cjson.encode only supports table ---- keys which are type number or string. All other types will generate an error. ---- ---- ## Note ---- Standards compliant JSON must be encapsulated in either an object ({}) or an array ([]). If strictly standards compliant JSON is desired, a table must be passed to cjson.encode. ---- ---- --- ---- ---- By default, encoding the following Lua values will generate errors: ---- ---- * Numbers incompatible with the JSON specification (infinity, NaN) ---- * Tables nested more than 1000 levels deep ---- * Excessively sparse Lua arrays ---- ---- These defaults can be changed with: ---- ---- * cjson.encode_invalid_numbers ---- * cjson.encode_max_depth ---- * cjson.encode_sparse_array ---- ----```lua ---- local value = { true, { foo = "bar" } } ---- cjson.encode(value) --> '[true,{"foo":"bar"}]' ----``` ---- ----@param value any ----@return string json -function cjson.encode(value) end - - ---- encode_invalid_numbers ---- ---- Lua CJSON may generate an error when encoding floating point numbers not ---- supported by the JSON specification (invalid numbers): ---- ---- * infinity ---- * not-a-number (NaN) ---- ---- Available settings: ---- ---- * `true`: Allow invalid numbers to be encoded. This will generate non-standard JSON, but this output is supported by some libraries. ---- * `false`: Throw an error when attempting to encode invalid numbers. This is the default setting. ---- * `"null"`: Encode invalid numbers as a JSON null value. This allows infinity and NaN to be encoded into valid JSON. ---- ---- The current setting is always returned, and is only updated when an argument is provided. ---- ----@param setting? boolean|'"null"' ----@return boolean|'"null"' setting -function cjson.encode_invalid_numbers(setting) end - - ---- encode_keep_buffer ---- ---- Lua CJSON can reuse the JSON encoding buffer to improve performance. ---- ---- Available settings: ---- ---- * `true` - The buffer will grow to the largest size required and is not freed until the Lua CJSON module is garbage collected. This is the default setting. ---- * `false` - Free the encode buffer after each call to cjson.encode. ---- ---- The current setting is always returned, and is only updated when an argument is provided. ---- ----@param setting? boolean ----@return boolean setting -function cjson.encode_keep_buffer(setting) end - - ---- encode_max_depth ---- ---- Once the maximum table depth has been exceeded Lua CJSON will generate an ---- error. This prevents a deeply nested or recursive data structure from ---- crashing the application. ---- ---- By default, Lua CJSON will generate an error when trying to encode data ---- structures with more than 1000 nested tables. ---- ---- The current setting is always returned, and is only updated when an argument is provided. ---- ----@param depth? integer # must be positive (default `1000`) ----@return integer depth -function cjson.encode_max_depth(depth) end - - ---- encode_number_precision ---- ---- The amount of significant digits returned by Lua CJSON when encoding numbers ---- can be changed to balance accuracy versus performance. For data structures ---- containing many numbers, setting cjson.encode_number_precision to a smaller ---- integer, for example 3, can improve encoding performance by up to 50%. ---- ---- By default, Lua CJSON will output 14 significant digits when converting a number to text. ---- ---- The current setting is always returned, and is only updated when an argument is provided. ---- ---- **NOTE:** The maximum value of 16 is only supported by the OpenResty cjson ---- fork. The maximum in the upstream mpx/lua-cjson module is 14. ---- ----@param precision? integer # must be between 1 and 16 ----@return integer precision -function cjson.encode_number_precision(precision) end - - ---- encode_sparse_array ---- ---- Lua CJSON classifies a Lua table into one of three kinds when encoding a JSON array. This is determined by the number of values missing from the Lua array as follows: ---- ---- * Normal - All values are available. ---- * Sparse - At least 1 value is missing. ---- * Excessively sparse - The number of values missing exceeds the configured ratio. ---- ---- Lua CJSON encodes sparse Lua arrays as JSON arrays using JSON null for the missing entries. ---- ---- An array is excessively sparse when all the following conditions are met: ---- ---- * ratio > 0 ---- * maximum_index > safe ---- * maximum_index > item_count * ratio ---- ---- Lua CJSON will never consider an array to be excessively sparse when ratio = 0. ---- The safe limit ensures that small Lua arrays are always encoded as sparse arrays. ---- ---- By default, attempting to encode an excessively sparse array will generate ---- an error. If convert is set to true, excessively sparse arrays will be ---- converted to a JSON object. ---- ---- The current settings are always returned. A particular setting is only ---- changed when the argument is provided (non-nil). ---- ---- ## Example: Encoding a sparse array ---- ----```lua ---- cjson.encode({ [3] = "data" }) ---- -- Returns: '[null,null,"data"]' ----``` ---- ---- ## Example: Enabling conversion to a JSON object ---- ----```lua ---- cjson.encode_sparse_array(true) ---- cjson.encode({ [1000] = "excessively sparse" }) ---- -- Returns: '{"1000":"excessively sparse"}' ----``` ---- ----@param convert? boolean # (default: false) ----@param ratio? integer # must be positive (default: 2) ----@param safe? integer # must be positive (default: 10) ----@return boolean convert ----@return integer ratio ----@return integer safe -function cjson.encode_sparse_array(convert, ratio, safe) end - - ---- encode_empty_table_as_object ---- ---- Change the default behavior when encoding an empty Lua table. ---- ---- By default, empty Lua tables are encoded as empty JSON Objects (`{}`). If ---- this is set to false, empty Lua tables will be encoded as empty JSON Arrays ---- instead (`[]`). ---- ---- **NOTE:** This function is specific to the OpenResty cjson fork. ---- ----@param setting boolean|'"on"'|'"off"' -function cjson.encode_empty_table_as_object(setting) end - - ---- encode_escape_forward_slash ---- ---- If enabled, forward slash '/' will be encoded as '\/'. ---- ---- If disabled, forward slash '/' will be encoded as '/' (no escape is applied). ---- ---- **NOTE:** This function is specific to the OpenResty cjson fork. ---- ----@param enabled boolean # (default: true) -function cjson.encode_escape_forward_slash(enabled) end - - ---- instantiate an independent copy of the Lua CJSON module ---- ---- The new module has a separate persistent encoding buffer, and default settings ----@return cjson -function cjson.new() end - - -return cjson diff --git a/meta/3rd/OpenResty/library/cjson/safe.lua b/meta/3rd/OpenResty/library/cjson/safe.lua deleted file mode 100644 index 64244b15..00000000 --- a/meta/3rd/OpenResty/library/cjson/safe.lua +++ /dev/null @@ -1,46 +0,0 @@ ----@meta - ---- The `cjson.safe` module behaves identically to the `cjson` module, except when ---- errors are encountered during JSON conversion. On error, the `cjson.safe.encode` ---- and `cjson.safe.decode` functions will return `nil` followed by the error message. ---- ---- @see cjson ---- ----@class cjson.safe : cjson -local cjson_safe = {} - - ---- unserialize a json string to a lua value ---- ---- Returns `nil` and an error string when the input cannot be decoded. ---- ---- ```lua ---- local value, err = cjson_safe.decode(some_json_string) ---- ``` ----@param json string ----@return any? decoded ----@return string? error -function cjson_safe.decode(json) end - - ---- serialize a lua value to a json string ---- ---- Returns `nil` and an error string when the input cannot be encoded. ---- ---- ```lua ---- local json, err = cjson_safe.encode(some_lua_value) ---- ``` ----@param value any ----@return string? encoded ----@return string? error -function cjson_safe.encode(value) end - - ---- instantiate an independent copy of the Lua CJSON module ---- ---- The new module has a separate persistent encoding buffer, and default settings ----@return cjson.safe -function cjson_safe.new() end - - -return cjson_safe diff --git a/meta/3rd/OpenResty/library/jit.lua b/meta/3rd/OpenResty/library/jit.lua deleted file mode 100644 index 1adb40fa..00000000 --- a/meta/3rd/OpenResty/library/jit.lua +++ /dev/null @@ -1,32 +0,0 @@ ----@meta - - ---- Returns (and optionally sets) the current PRNG state (an array of 8 Lua ---- numbers with 32-bit integer values) currently used by the JIT compiler. ---- ---- When the `state` argument is non-nil, it is expected to be an array of up to 8 ---- unsigned Lua numbers, each with value less than 2\*\*32-1. This will set the ---- current PRNG state and return the state that was overridden. ---- ---- **Note:** For backward compatibility, `state` argument can also be an unsigned ---- Lua number less than 2\*\*32-1. ---- ---- **Note:** When the `state` argument is an array and less than 8 numbers, or the ---- `state` is a number, the remaining positions are filled with zeros. ---- ---- Usage: ---- ---- ```lua ---- local state = jit.prngstate() ---- local oldstate = jit.prngstate{ a, b, c, ... } ---- ---- jit.prngstate(32) -- {32, 0, 0, 0, 0, 0, 0, 0} ---- jit.prngstate{432, 23, 50} -- {432, 23, 50, 0, 0, 0, 0, 0} ---- ``` ---- ---- **Note:** This API has no effect if LuaJIT is compiled with ---- `-DLUAJIT_DISABLE_JIT`, and will return a table with all `0`. ---- ----@param state? integer[] ----@return integer[] state -function jit.prngstate(state) end diff --git a/meta/3rd/OpenResty/library/ndk.lua b/meta/3rd/OpenResty/library/ndk.lua deleted file mode 100644 index 17085c92..00000000 --- a/meta/3rd/OpenResty/library/ndk.lua +++ /dev/null @@ -1,4 +0,0 @@ ----@meta -ndk={} -ndk.set_var={} -return ndk \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/ngx.lua b/meta/3rd/OpenResty/library/ngx.lua deleted file mode 100644 index a223709d..00000000 --- a/meta/3rd/OpenResty/library/ngx.lua +++ /dev/null @@ -1,4393 +0,0 @@ ----@meta - ----@class ngx : table ---- ---- The `ngx.null` constant is a `NULL` light userdata usually used to represent nil values in Lua tables etc and is similar to the `lua-cjson` library's `cjson.null` constant. ----@field null userdata ---- ---- Read and write the current request's response status. This should be called ---- before sending out the response headers. ---- ---- ```lua ---- -- set ---- ngx.status = ngx.HTTP_CREATED ---- -- get ---- status = ngx.status ---- ``` ---- ---- Setting `ngx.status` after the response header is sent out has no effect but leaving an error message in your NGINX's error log file: ---- attempt to set ngx.status after sending out response headers ----@field status ngx.http.status_code ---- ---- Returns `true` if the response headers have been sent (by ngx_lua), and `false` otherwise. ---- ----@field headers_sent boolean ---- ---- Returns `true` if the current request is an NGINX subrequest, or `false` otherwise. ----@field is_subrequest boolean ---- -ngx = {} - ----@class ngx.OK -ngx.OK = 0 ----@class ngx.ERROR -ngx.ERROR = -1 -ngx.AGAIN = -2 -ngx.DONE = -4 -ngx.DECLINED = -5 - -ngx.HTTP_GET = 2 -ngx.HTTP_HEAD = 4 -ngx.HTTP_POST = 8 -ngx.HTTP_PUT = 16 -ngx.HTTP_DELETE = 32 -ngx.HTTP_MKCOL = 64 -ngx.HTTP_COPY = 128 -ngx.HTTP_MOVE = 256 -ngx.HTTP_OPTIONS = 512 -ngx.HTTP_PROPFIND = 1024 -ngx.HTTP_PROPPATCH = 2048 -ngx.HTTP_LOCK = 4096 -ngx.HTTP_UNLOCK = 8192 -ngx.HTTP_PATCH = 16384 -ngx.HTTP_TRACE = 32768 - ----@alias ngx.http.method ----| `ngx.HTTP_GET` ----| `ngx.HTTP_HEAD` ----| `ngx.HTTP_POST` ----| `ngx.HTTP_PUT` ----| `ngx.HTTP_DELETE` ----| `ngx.HTTP_MKCOL` ----| `ngx.HTTP_COPY` ----| `ngx.HTTP_MOVE` ----| `ngx.HTTP_OPTIONS` ----| `ngx.HTTP_PROPFIND` ----| `ngx.HTTP_PROPPATCH` ----| `ngx.HTTP_LOCK` ----| `ngx.HTTP_UNLOCK` ----| `ngx.HTTP_PATCH` ----| `ngx.HTTP_TRACE` - -ngx.HTTP_CONTINUE = 100 -ngx.HTTP_SWITCHING_PROTOCOLS = 101 -ngx.HTTP_OK = 200 -ngx.HTTP_CREATED = 201 -ngx.HTTP_ACCEPTED = 202 -ngx.HTTP_NO_CONTENT = 204 -ngx.HTTP_PARTIAL_CONTENT = 206 -ngx.HTTP_SPECIAL_RESPONSE = 300 -ngx.HTTP_MOVED_PERMANENTLY = 301 -ngx.HTTP_MOVED_TEMPORARILY = 302 -ngx.HTTP_SEE_OTHER = 303 -ngx.HTTP_NOT_MODIFIED = 304 -ngx.HTTP_TEMPORARY_REDIRECT = 307 -ngx.HTTP_PERMANENT_REDIRECT = 308 -ngx.HTTP_BAD_REQUEST = 400 -ngx.HTTP_UNAUTHORIZED = 401 -ngx.HTTP_PAYMENT_REQUIRED = 402 -ngx.HTTP_FORBIDDEN = 403 -ngx.HTTP_NOT_FOUND = 404 -ngx.HTTP_NOT_ALLOWED = 405 -ngx.HTTP_NOT_ACCEPTABLE = 406 -ngx.HTTP_REQUEST_TIMEOUT = 408 -ngx.HTTP_CONFLICT = 409 -ngx.HTTP_GONE = 410 -ngx.HTTP_UPGRADE_REQUIRED = 426 -ngx.HTTP_TOO_MANY_REQUESTS = 429 -ngx.HTTP_CLOSE = 444 -ngx.HTTP_ILLEGAL = 451 -ngx.HTTP_INTERNAL_SERVER_ERROR = 500 -ngx.HTTP_METHOD_NOT_IMPLEMENTED = 501 -ngx.HTTP_BAD_GATEWAY = 502 -ngx.HTTP_SERVICE_UNAVAILABLE = 503 -ngx.HTTP_GATEWAY_TIMEOUT = 504 -ngx.HTTP_VERSION_NOT_SUPPORTED = 505 -ngx.HTTP_INSUFFICIENT_STORAGE = 507 - ----@alias ngx.http.status_code ----| integer ----| `ngx.HTTP_CONTINUE` ----| `ngx.HTTP_SWITCHING_PROTOCOLS` ----| `ngx.HTTP_OK` ----| `ngx.HTTP_CREATED` ----| `ngx.HTTP_ACCEPTED` ----| `ngx.HTTP_NO_CONTENT` ----| `ngx.HTTP_PARTIAL_CONTENT` ----| `ngx.HTTP_SPECIAL_RESPONSE` ----| `ngx.HTTP_MOVED_PERMANENTLY` ----| `ngx.HTTP_MOVED_TEMPORARILY` ----| `ngx.HTTP_SEE_OTHER` ----| `ngx.HTTP_NOT_MODIFIED` ----| `ngx.HTTP_TEMPORARY_REDIRECT` ----| `ngx.HTTP_PERMANENT_REDIRECT` ----| `ngx.HTTP_BAD_REQUEST` ----| `ngx.HTTP_UNAUTHORIZED` ----| `ngx.HTTP_PAYMENT_REQUIRED` ----| `ngx.HTTP_FORBIDDEN` ----| `ngx.HTTP_NOT_FOUND` ----| `ngx.HTTP_NOT_ALLOWED` ----| `ngx.HTTP_NOT_ACCEPTABLE` ----| `ngx.HTTP_REQUEST_TIMEOUT` ----| `ngx.HTTP_CONFLICT` ----| `ngx.HTTP_GONE` ----| `ngx.HTTP_UPGRADE_REQUIRED` ----| `ngx.HTTP_TOO_MANY_REQUESTS` ----| `ngx.HTTP_CLOSE` ----| `ngx.HTTP_ILLEGAL` ----| `ngx.HTTP_INTERNAL_SERVER_ERROR` ----| `ngx.HTTP_METHOD_NOT_IMPLEMENTED` ----| `ngx.HTTP_BAD_GATEWAY` ----| `ngx.HTTP_SERVICE_UNAVAILABLE` ----| `ngx.HTTP_GATEWAY_TIMEOUT` ----| `ngx.HTTP_VERSION_NOT_SUPPORTED` ----| `ngx.HTTP_INSUFFICIENT_STORAGE` - - -ngx.DEBUG = 8 -ngx.INFO = 7 -ngx.NOTICE = 6 -ngx.WARN = 5 -ngx.ERR = 4 -ngx.CRIT = 3 -ngx.ALERT = 2 -ngx.EMERG = 1 -ngx.STDERR = 0 - ---- NGINX log level constants ---- https://github.com/openresty/lua-nginx-module/#nginx-log-level-constants ----@alias ngx.log.level ----| `ngx.DEBUG` # debug ----| `ngx.INFO` # info ----| `ngx.NOTICE` # notice ----| `ngx.WARN` # warning ----| `ngx.ERR` # error ----| `ngx.ALERT` # alert ----| `ngx.CRIT` # critical ----| `ngx.EMERG` # emergency ----| `ngx.STDERR` # standard error - - ---- ngx.ctx table ---- ---- This table can be used to store per-request Lua context data and has a life time identical to the current request (as with the NGINX variables). ---- ---- Consider the following example, ---- ---- ```nginx ---- location /test { ---- rewrite_by_lua_block { ---- ngx.ctx.foo = 76 ---- } ---- access_by_lua_block { ---- ngx.ctx.foo = ngx.ctx.foo + 3 ---- } ---- content_by_lua_block { ---- ngx.say(ngx.ctx.foo) ---- } ---- } ---- ``` ---- ---- Then `GET /test` will yield the output ---- ---- ```bash ---- 79 ---- ``` ---- ---- That is, the `ngx.ctx.foo` entry persists across the rewrite, access, and content phases of a request. ---- ---- Every request, including subrequests, has its own copy of the table. For example: ---- ---- ```nginx ---- location /sub { ---- content_by_lua_block { ---- ngx.say("sub pre: ", ngx.ctx.blah) ---- ngx.ctx.blah = 32 ---- ngx.say("sub post: ", ngx.ctx.blah) ---- } ---- } ---- ---- location /main { ---- content_by_lua_block { ---- ngx.ctx.blah = 73 ---- ngx.say("main pre: ", ngx.ctx.blah) ---- local res = ngx.location.capture("/sub") ---- ngx.print(res.body) ---- ngx.say("main post: ", ngx.ctx.blah) ---- } ---- } ---- ``` ---- ---- Then `GET /main` will give the output ---- ---- ```bash ---- main pre: 73 ---- sub pre: nil ---- sub post: 32 ---- main post: 73 ---- ``` ---- ---- Here, modification of the `ngx.ctx.blah` entry in the subrequest does not affect the one in the parent request. This is because they have two separate versions of `ngx.ctx.blah`. ---- ---- Internal redirection will destroy the original request `ngx.ctx` data (if any) and the new request will have an empty `ngx.ctx` table. For instance, ---- ---- ```nginx ---- location /new { ---- content_by_lua_block { ---- ngx.say(ngx.ctx.foo) ---- } ---- } ---- ---- location /orig { ---- content_by_lua_block { ---- ngx.ctx.foo = "hello" ---- ngx.exec("/new") ---- } ---- } ---- ``` ---- ---- Then `GET /orig` will give ---- ---- ```bash ---- nil ---- ``` ---- ---- rather than the original `"hello"` value. ---- ---- Arbitrary data values, including Lua closures and nested tables, can be inserted into this "magic" table. It also allows the registration of custom meta methods. ---- ---- Overriding `ngx.ctx` with a new Lua table is also supported, for example, ---- ---- ```lua ---- ngx.ctx = { foo = 32, bar = 54 } ---- ``` ---- ---- When being used in the context of `init_worker_by_lua*`, this table just has the same lifetime of the current Lua handler. ---- ---- The `ngx.ctx` lookup requires relatively expensive metamethod calls and it is much slower than explicitly passing per-request data along by your own function arguments. So do not abuse this API for saving your own function arguments because it usually has quite some performance impact. ---- ---- Because of the metamethod magic, never "local" the `ngx.ctx` table outside your Lua function scope on the Lua module level due to `worker-level data sharing`. For example, the following is bad: ---- ---- ```lua ---- -- mymodule.lua ---- local _M = {} ---- ---- -- the following line is bad since ngx.ctx is a per-request ---- -- data while this ctx variable is on the Lua module level ---- -- and thus is per-nginx-worker. ---- local ctx = ngx.ctx ---- ---- function _M.main() ---- ctx.foo = "bar" ---- end ---- ---- return _M ---- ``` ---- ---- Use the following instead: ---- ---- ```lua ---- -- mymodule.lua ---- local _M = {} ---- ---- function _M.main(ctx) ---- ctx.foo = "bar" ---- end ---- ---- return _M ---- ``` ---- ---- That is, let the caller pass the `ctx` table explicitly via a function argument. -ngx.ctx = {} - ---- NGINX thread methods -ngx.thread = {} - ----@class ngx.thread : thread - ---- Kills a running "light thread" created by `ngx.thread.spawn`. Returns a true value when successful or `nil` and a string describing the error otherwise. ---- ---- According to the current implementation, only the parent coroutine (or "light thread") can kill a thread. Also, a running "light thread" with pending NGINX subrequests (initiated by `ngx.location.capture` for example) cannot be killed due to a limitation in the NGINX core. ---- ----@param thread ngx.thread ----@return boolean ok ----@return string? error -function ngx.thread.kill(thread) end - ---- Waits on one or more child "light threads" and returns the results of the first "light thread" that terminates (either successfully or with an error). ---- ---- The arguments `thread1`, `thread2`, and etc are the Lua thread objects returned by earlier calls of `ngx.thread.spawn`. ---- ---- The return values have exactly the same meaning as `coroutine.resume`, that is, the first value returned is a boolean value indicating whether the "light thread" terminates successfully or not, and subsequent values returned are the return values of the user Lua function that was used to spawn the "light thread" (in case of success) or the error object (in case of failure). ---- ---- Only the direct "parent coroutine" can wait on its child "light thread", otherwise a Lua exception will be raised. ---- ---- The following example demonstrates the use of `ngx.thread.wait` and `ngx.location.capture` to emulate `ngx.location.capture_multi`: ---- ---- ```lua ---- local capture = ngx.location.capture ---- local spawn = ngx.thread.spawn ---- local wait = ngx.thread.wait ---- local say = ngx.say ---- ---- local function fetch(uri) ---- return capture(uri) ---- end ---- ---- local threads = { ---- spawn(fetch, "/foo"), ---- spawn(fetch, "/bar"), ---- spawn(fetch, "/baz") ---- } ---- ---- for i = 1, #threads do ---- local ok, res = wait(threads[i]) ---- if not ok then ---- say(i, ": failed to run: ", res) ---- else ---- say(i, ": status: ", res.status) ---- say(i, ": body: ", res.body) ---- end ---- end ---- ``` ---- ---- Here it essentially implements the "wait all" model. ---- ---- And below is an example demonstrating the "wait any" model: ---- ---- ```lua ---- function f() ---- ngx.sleep(0.2) ---- ngx.say("f: hello") ---- return "f done" ---- end ---- ---- function g() ---- ngx.sleep(0.1) ---- ngx.say("g: hello") ---- return "g done" ---- end ---- ---- local tf, err = ngx.thread.spawn(f) ---- if not tf then ---- ngx.say("failed to spawn thread f: ", err) ---- return ---- end ---- ---- ngx.say("f thread created: ", coroutine.status(tf)) ---- ---- local tg, err = ngx.thread.spawn(g) ---- if not tg then ---- ngx.say("failed to spawn thread g: ", err) ---- return ---- end ---- ---- ngx.say("g thread created: ", coroutine.status(tg)) ---- ---- ok, res = ngx.thread.wait(tf, tg) ---- if not ok then ---- ngx.say("failed to wait: ", res) ---- return ---- end ---- ---- ngx.say("res: ", res) ---- ---- -- stop the "world", aborting other running threads ---- ngx.exit(ngx.OK) ---- ``` ---- ---- And it will generate the following output: ---- ---- f thread created: running ---- g thread created: running ---- g: hello ---- res: g done ---- ----@param ... ngx.thread ----@return boolean ok ----@return any ret_or_error -function ngx.thread.wait(...) end - ---- Spawns a new user "light thread" with the Lua function `func` as well as those optional arguments `arg1`, `arg2`, and etc. Returns a Lua thread (or Lua coroutine) object represents this "light thread". ---- ---- "Light threads" are just a special kind of Lua coroutines that are scheduled by the ngx_lua module. ---- ---- Before `ngx.thread.spawn` returns, the `func` will be called with those optional arguments until it returns, aborts with an error, or gets yielded due to I/O operations via the NGINX APIs for lua (like `tcpsock:receive`). ---- ---- After `ngx.thread.spawn` returns, the newly-created "light thread" will keep running asynchronously usually at various I/O events. ---- ---- All the Lua code chunks running by `rewrite_by_lua`, `access_by_lua`, and `content_by_lua` are in a boilerplate "light thread" created automatically by ngx_lua. Such boilerplate "light thread" are also called "entry threads". ---- ---- By default, the corresponding NGINX handler (e.g., `rewrite_by_lua` handler) will not terminate until ---- ---- 1. both the "entry thread" and all the user "light threads" terminates, ---- 1. a "light thread" (either the "entry thread" or a user "light thread" aborts by calling `ngx.exit`, `ngx.exec`, `ngx.redirect`, or `ngx.req.set_uri(uri, true)`, or ---- 1. the "entry thread" terminates with a Lua error. ---- ---- When the user "light thread" terminates with a Lua error, however, it will not abort other running "light threads" like the "entry thread" does. ---- ---- Due to the limitation in the NGINX subrequest model, it is not allowed to abort a running NGINX subrequest in general. So it is also prohibited to abort a running "light thread" that is pending on one ore more NGINX subrequests. You must call `ngx.thread.wait` to wait for those "light thread" to terminate before quitting the "world". A notable exception here is that you can abort pending subrequests by calling `ngx.exit` with and only with the status code `ngx.ERROR` (-1), `408`, `444`, or `499`. ---- ---- The "light threads" are not scheduled in a pre-emptive way. In other words, no time-slicing is performed automatically. A "light thread" will keep running exclusively on the CPU until ---- ---- 1. a (nonblocking) I/O operation cannot be completed in a single run, ---- 1. it calls `coroutine.yield` to actively give up execution, or ---- 1. it is aborted by a Lua error or an invocation of `ngx.exit`, `ngx.exec`, `ngx.redirect`, or `ngx.req.set_uri(uri, true)`. ---- ---- For the first two cases, the "light thread" will usually be resumed later by the ngx_lua scheduler unless a "stop-the-world" event happens. ---- ---- User "light threads" can create "light threads" themselves. And normal user coroutines created by `coroutine.create` can also create "light threads". The coroutine (be it a normal Lua coroutine or a "light thread") that directly spawns the "light thread" is called the "parent coroutine" for the "light thread" newly spawned. ---- ---- The "parent coroutine" can call `ngx.thread.wait` to wait on the termination of its child "light thread". ---- ---- You can call coroutine.status() and coroutine.yield() on the "light thread" coroutines. ---- ---- The status of the "light thread" coroutine can be "zombie" if ---- ---- 1. the current "light thread" already terminates (either successfully or with an error), ---- 1. its parent coroutine is still alive, and ---- 1. its parent coroutine is not waiting on it with `ngx.thread.wait`. ---- ---- The following example demonstrates the use of coroutine.yield() in the "light thread" coroutines ---- to do manual time-slicing: ---- ---- ```lua ---- local yield = coroutine.yield ---- ---- function f() ---- local self = coroutine.running() ---- ngx.say("f 1") ---- yield(self) ---- ngx.say("f 2") ---- yield(self) ---- ngx.say("f 3") ---- end ---- ---- local self = coroutine.running() ---- ngx.say("0") ---- yield(self) ---- ---- ngx.say("1") ---- ngx.thread.spawn(f) ---- ---- ngx.say("2") ---- yield(self) ---- ---- ngx.say("3") ---- yield(self) ---- ---- ngx.say("4") ---- ``` ---- ---- Then it will generate the output ---- ---- 0 ---- 1 ---- f 1 ---- 2 ---- f 2 ---- 3 ---- f 3 ---- 4 ---- ---- "Light threads" are mostly useful for making concurrent upstream requests in a single NGINX request handler, much like a generalized version of `ngx.location.capture_multi` that can work with all the NGINX APIs for lua. The following example demonstrates parallel requests to MySQL, Memcached, and upstream HTTP services in a single Lua handler, and outputting the results in the order that they actually return (similar to Facebook's BigPipe model): ---- ---- ```lua ---- -- query mysql, memcached, and a remote http service at the same time, ---- -- output the results in the order that they ---- -- actually return the results. ---- ---- local mysql = require "resty.mysql" ---- local memcached = require "resty.memcached" ---- ---- local function query_mysql() ---- local db = mysql:new() ---- db:connect{ ---- host = "127.0.0.1", ---- port = 3306, ---- database = "test", ---- user = "monty", ---- password = "mypass" ---- } ---- local res, err, errno, sqlstate = ---- db:query("select * from cats order by id asc") ---- db:set_keepalive(0, 100) ---- ngx.say("mysql done: ", cjson.encode(res)) ---- end ---- ---- local function query_memcached() ---- local memc = memcached:new() ---- memc:connect("127.0.0.1", 11211) ---- local res, err = memc:get("some_key") ---- ngx.say("memcached done: ", res) ---- end ---- ---- local function query_http() ---- local res = ngx.location.capture("/my-http-proxy") ---- ngx.say("http done: ", res.body) ---- end ---- ---- ngx.thread.spawn(query_mysql) -- create thread 1 ---- ngx.thread.spawn(query_memcached) -- create thread 2 ---- ngx.thread.spawn(query_http) -- create thread 3 ---- ``` ---- ----@param func function ----@param ... any ----@return ngx.thread -function ngx.thread.spawn(func, ...) end - ---- NGINX worker methods -ngx.worker = {} - ---- This function returns a boolean value indicating whether the current NGINX worker process already starts exiting. NGINX worker process exiting happens on NGINX server quit or configuration reload (aka HUP reload). ---- ----@return boolean -function ngx.worker.exiting() end - ---- Returns the ordinal number of the current NGINX worker processes (starting from number 0). ---- ---- So if the total number of workers is `N`, then this method may return a number between 0 ---- and `N - 1` (inclusive). ---- ----@return number -function ngx.worker.id() end - ---- Returns the total number of the NGINX worker processes (i.e., the value configured ---- by the `worker_processes` ---- directive in `nginx.conf`). ---- ----@return number -function ngx.worker.count() end - ---- This function returns a Lua number for the process ID (PID) of the current NGINX worker process. This API is more efficient than `ngx.var.pid` and can be used in contexts where the `ngx.var.VARIABLE` API cannot be used (like `init_worker_by_lua`). ---- ----@return number -function ngx.worker.pid() end - ----@class ngx.config : table ---- ---- This string field indicates the current NGINX subsystem the current Lua environment is based on. For this module, this field always takes the string value `"http"`. ---- For `ngx_stream_lua_module`, however, this field takes the value `"stream"`. ----@field subsystem '"http"'|'"stream"' ---- ---- This field takes an integral value indicating the version number of the current NGINX core being used. For example, the version number `1.4.3` results in the Lua number 1004003. ----@field nginx_version number ---- ---- This field takes an integral value indicating the version number of the current `ngx_lua` module being used. ---- For example, the version number `0.9.3` results in the Lua number 9003. ----@field ngx_lua_version number ---- ---- This boolean field indicates whether the current NGINX is a debug build, i.e., being built by the `./configure` option `--with-debug`. ----@field debug boolean ---- ---- This boolean field indicates whether the current NGINX run by resty. ----@field is_console boolean ---- -ngx.config = {} - - ---- Returns the NGINX server "prefix" path, as determined by the `-p` command-line option when running the NGINX executable, or the path specified by the `--prefix` command-line option when building NGINX with the `./configure` script. ---- ----@return string -function ngx.config.prefix() end - ---- This function returns a string for the NGINX `./configure` command's arguments string. ---- ----@return string -function ngx.config.nginx_configure() end - -ngx.timer = {} - ----@alias ngx.timer.callback fun(premature:boolean, ...:any) - ---- Returns the number of pending timers. ---- ----@return number -function ngx.timer.pending_count() end - ---- Returns the number of timers currently running. ---- ----@return integer -function ngx.timer.running_count() end - ---- Similar to the `ngx.timer.at` API function, but ---- ---- 1. `delay` *cannot* be zero, ---- 2. timer will be created every `delay` seconds until the current NGINX worker process starts exiting. ---- ---- When success, returns a "conditional true" value (but not a `true`). Otherwise, returns a "conditional false" value and a string describing the error. ---- ---- This API also respect the `lua_max_pending_timers` and `lua_max_running_timers`. ---- ----@param delay number the interval to execute the timer on ----@param callback ngx.timer.callback the function to call ----@param ... any extra arguments to pass to `callback` ----@return boolean ok ----@return string? error -function ngx.timer.every(delay, callback, ...) end - ---- Creates an NGINX timer with a user callback function as well as optional user arguments. ---- ---- The first argument, `delay`, specifies the delay for the timer, ---- in seconds. One can specify fractional seconds like `0.001` to mean 1 ---- millisecond here. `0` delay can also be specified, in which case the ---- timer will immediately expire when the current handler yields ---- execution. ---- ---- The second argument, `callback`, can ---- be any Lua function, which will be invoked later in a background ---- "light thread" after the delay specified. The user callback will be ---- called automatically by the NGINX core with the arguments `premature`, ---- `user_arg1`, `user_arg2`, and etc, where the `premature` ---- argument takes a boolean value indicating whether it is a premature timer ---- expiration or not, and `user_arg1`, `user_arg2`, and etc, are ---- those (extra) user arguments specified when calling `ngx.timer.at` ---- as the remaining arguments. ---- ---- Premature timer expiration happens when the NGINX worker process is ---- trying to shut down, as in an NGINX configuration reload triggered by ---- the `HUP` signal or in an NGINX server shutdown. When the NGINX worker ---- is trying to shut down, one can no longer call `ngx.timer.at` to ---- create new timers with nonzero delays and in that case `ngx.timer.at` will return a "conditional false" value and ---- a string describing the error, that is, "process exiting". ---- ---- It is allowed to create zero-delay timers even when the NGINX worker process starts shutting down. ---- ---- When a timer expires, the user Lua code in the timer callback is ---- running in a "light thread" detached completely from the original ---- request creating the timer. So objects with the same lifetime as the ---- request creating them, like `cosockets`, cannot be shared between the ---- original request and the timer user callback function. ---- ---- Here is a simple example: ---- ---- ```nginx ---- location / { ---- ... ---- log_by_lua_block { ---- local function push_data(premature, uri, args, status) ---- -- push the data uri, args, and status to the remote ---- -- via ngx.socket.tcp or ngx.socket.udp ---- -- (one may want to buffer the data in Lua a bit to ---- -- save I/O operations) ---- end ---- local ok, err = ngx.timer.at(0, push_data, ---- ngx.var.uri, ngx.var.args, ngx.header.status) ---- if not ok then ---- ngx.log(ngx.ERR, "failed to create timer: ", err) ---- return ---- end ---- } ---- } ---- ``` ---- ---- One can also create infinite re-occurring timers, for instance, a timer getting triggered every `5` seconds, by calling `ngx.timer.at` recursively in the timer callback function. Here is such an example, ---- ---- ```lua ---- local delay = 5 ---- local handler ---- handler = function (premature) ---- -- do some routine job in Lua just like a cron job ---- if premature then ---- return ---- end ---- local ok, err = ngx.timer.at(delay, handler) ---- if not ok then ---- ngx.log(ngx.ERR, "failed to create the timer: ", err) ---- return ---- end ---- end ---- ---- local ok, err = ngx.timer.at(delay, handler) ---- if not ok then ---- ngx.log(ngx.ERR, "failed to create the timer: ", err) ---- return ---- end ---- ``` ---- ---- It is recommended, however, to use the `ngx.timer.every` API function ---- instead for creating recurring timers since it is more robust. ---- ---- Because timer callbacks run in the background and their running time ---- will not add to any client request's response time, they can easily ---- accumulate in the server and exhaust system resources due to either ---- Lua programming mistakes or just too much client traffic. To prevent ---- extreme consequences like crashing the NGINX server, there are ---- built-in limitations on both the number of "pending timers" and the ---- number of "running timers" in an NGINX worker process. The "pending ---- timers" here mean timers that have not yet been expired and "running ---- timers" are those whose user callbacks are currently running. ---- ---- The maximal number of pending timers allowed in an NGINX ---- worker is controlled by the `lua_max_pending_timers` ---- directive. The maximal number of running timers is controlled by the ---- `lua_max_running_timers` directive. ---- ---- According to the current implementation, each "running timer" will ---- take one (fake) connection record from the global connection record ---- list configured by the standard `worker_connections` directive in ---- `nginx.conf`. So ensure that the ---- `worker_connections` directive is set to ---- a large enough value that takes into account both the real connections ---- and fake connections required by timer callbacks (as limited by the ---- `lua_max_running_timers` directive). ---- ---- A lot of the Lua APIs for NGINX are enabled in the context of the timer ---- callbacks, like stream/datagram cosockets (`ngx.socket.tcp` and `ngx.socket.udp`), shared ---- memory dictionaries (`ngx.shared.DICT`), user coroutines (`coroutine.*`), ---- user "light threads" (`ngx.thread.*`), `ngx.exit`, `ngx.now`/`ngx.time`, ---- `ngx.md5`/`ngx.sha1_bin`, are all allowed. But the subrequest API (like ---- `ngx.location.capture`), the `ngx.req.*` API, the downstream output API ---- (like `ngx.say`, `ngx.print`, and `ngx.flush`) are explicitly disabled in ---- this context. ---- ---- You can pass most of the standard Lua values (nils, booleans, numbers, strings, tables, closures, file handles, and etc) into the timer callback, either explicitly as user arguments or implicitly as upvalues for the callback closure. There are several exceptions, however: you *cannot* pass any thread objects returned by `coroutine.create` and `ngx.thread.spawn` or any cosocket objects returned by `ngx.socket.tcp`, `ngx.socket.udp`, and `ngx.req.socket` because these objects' lifetime is bound to the request context creating them while the timer callback is detached from the creating request's context (by design) and runs in its own (fake) request context. If you try to share the thread or cosocket objects across the boundary of the creating request, then you will get the "no co ctx found" error (for threads) or "bad request" (for cosockets). It is fine, however, to create all these objects inside your timer callback. ---- ----@param delay number ----@param callback ngx.timer.callback ----@param ... any ----@return boolean ok ----@return string? error -function ngx.timer.at(delay, callback, ...) end - - ---- Unescape `str` as an escaped URI component. ---- ---- For example, ---- ---- ```lua ---- ngx.say(ngx.unescape_uri("b%20r56+7")) ---- ``` ---- ---- gives the output ---- ---- b r56 7 ---- ----@param str string ----@return string -function ngx.unescape_uri(str) end - ---- Escape `str` as a URI component. ---- ----@param str string ----@return string -function ngx.escape_uri(str) end - ---- Returns the binary form of the SHA-1 digest of the `str` argument. ---- ---- This function requires SHA-1 support in the NGINX build. (This usually just means OpenSSL should be installed while building NGINX). ---- ----@param str string ----@return any -function ngx.sha1_bin(str) end - ---- Calculates the CRC-32 (Cyclic Redundancy Code) digest for the `str` argument. ---- ---- This method performs better on relatively short `str` inputs (i.e., less than 30 ~ 60 bytes), as compared to `ngx.crc32_long`. The result is exactly the same as `ngx.crc32_long`. ---- ---- Behind the scene, it is just a thin wrapper around the `ngx_crc32_short` function defined in the NGINX core. ---- ----@param str string ----@return number -function ngx.crc32_short(str) end - ---- Calculates the CRC-32 (Cyclic Redundancy Code) digest for the `str` argument. ---- ---- This method performs better on relatively long `str` inputs (i.e., longer than 30 ~ 60 bytes), as compared to `ngx.crc32_short`. The result is exactly the same as `ngx.crc32_short`. ---- ---- Behind the scene, it is just a thin wrapper around the `ngx_crc32_long` function defined in the NGINX core. ---- ----@param str string ----@return number -function ngx.crc32_long(str) end - ---- Returns the binary form of the MD5 digest of the `str` argument. ---- ---- See `ngx.md5` if the hexadecimal form of the MD5 digest is required. ---- ----@param str string ----@return string -function ngx.md5_bin(str) end - ---- Returns the hexadecimal representation of the MD5 digest of the `str` argument. ---- ---- For example, ---- ---- ```nginx ---- location = /md5 { ---- content_by_lua_block { ngx.say(ngx.md5("hello")) } ---- } ---- ``` ---- ---- yields the output ---- ---- 5d41402abc4b2a76b9719d911017c592 ---- ---- See `ngx.md5_bin` if the raw binary MD5 digest is required. ---- ----@param str string ----@return string -function ngx.md5(str) end - ---- Computes the `HMAC-SHA1` digest of the argument `str` and turns the result using the secret key ``. ---- ---- The raw binary form of the `HMAC-SHA1` digest will be generated, use `ngx.encode_base64`, for example, to encode the result to a textual representation if desired. ---- ---- For example, ---- ---- ```lua ---- local key = "thisisverysecretstuff" ---- local src = "some string we want to sign" ---- local digest = ngx.hmac_sha1(key, src) ---- ngx.say(ngx.encode_base64(digest)) ---- ``` ---- ---- yields the output ---- ---- R/pvxzHC4NLtj7S+kXFg/NePTmk= ---- ----@param secret_key string ----@param str string ----@return string -function ngx.hmac_sha1(secret_key, str) end - ---- Returns a quoted SQL string literal according to the MySQL quoting rules. ---- ----@param raw_value string ----@return string -function ngx.quote_sql_str(raw_value) end - -ngx.re = {} - - ---- PCRE regex options string ---- ---- This is a string made up of single-letter PCRE option names, usable in all `ngx.re.*` functions. ---- ---- Options: ---- ---- a - anchored mode (only match from the beginning) ---- d - enable the DFA mode (or the longest token match semantics). ---- D - enable duplicate named pattern support. This allows named subpattern names to be repeated, returning the captures in an array-like Lua table. ---- i - case insensitive mode ---- j - enable PCRE JIT compilation. For optimum performance, this option should always be used together with the 'o' option. ---- J - enable the PCRE Javascript compatible mode ---- m - multi-line mode ---- o - compile-once mode, to enable the worker-process-level compiled-regex cache ---- s - single-line mode ---- u - UTF-8 mode. ---- U - similar to "u" but disables PCRE's UTF-8 validity check on the subject string ---- x - extended mode ---- ---- These options can be combined: ---- ---- ```lua ---- local m, err = ngx.re.match("hello, world", "HEL LO", "ix") ---- -- m[0] == "hello" ---- ``` ---- ---- ```lua ---- local m, err = ngx.re.match("hello, 美好生活", "HELLO, (.{2})", "iu") ---- -- m[0] == "hello, 美好" ---- -- m[1] == "美好" ---- ``` ---- ---- The `o` option is useful for performance tuning, because the regex pattern in question will only be compiled once, cached in the worker-process level, and shared among all requests in the current NGINX worker process. The upper limit of the regex cache can be tuned via the `lua_regex_cache_max_entries` directive. ---- ----@alias ngx.re.options string - - ---- ngx.re.match capture table ---- ---- This table may have both integer and string keys. ---- ---- `captures[0]` is special and contains the whole substring match ---- ---- `captures[1]` through `captures[n]` contain the values of unnamed, parenthesized sub-pattern captures ---- ---- ```lua ---- local m, err = ngx.re.match("hello, 1234", "[0-9]+") ---- if m then ---- -- m[0] == "1234" ---- ---- else ---- if err then ---- ngx.log(ngx.ERR, "error: ", err) ---- return ---- end ---- ---- ngx.say("match not found") ---- end ---- ``` ---- ---- ```lua ---- local m, err = ngx.re.match("hello, 1234", "([0-9])[0-9]+") ---- -- m[0] == "1234" ---- -- m[1] == "1" ---- ``` ---- ---- Named captures are stored with string keys corresponding to the capture name (e.g. `captures["my_capture_name"]`) _in addition to_ their sequential integer key (`captures[n]`): ---- ---- ```lua ---- local m, err = ngx.re.match("hello, 1234", "([0-9])(?[0-9]+)") ---- -- m[0] == "1234" ---- -- m[1] == "1" ---- -- m[2] == "234" ---- -- m["remaining"] == "234" ---- ``` ---- ---- Unmatched captures (named or unnamed) take the value `false`. ---- ---- ```lua ---- local m, err = ngx.re.match("hello, world", "(world)|(hello)|(?howdy)") ---- -- m[0] == "hello" ---- -- m[1] == false ---- -- m[2] == "hello" ---- -- m[3] == false ---- -- m["named"] == false ---- ``` ---- ----@alias ngx.re.captures table - ---- ngx.re.match context table ---- ---- A Lua table holding an optional `pos` field. When the `pos` field in the `ctx` table argument is specified, `ngx.re.match` will start matching from that offset (starting from 1). Regardless of the presence of the `pos` field in the `ctx` table, `ngx.re.match` will always set this `pos` field to the position *after* the substring matched by the whole pattern in case of a successful match. When match fails, the `ctx` table will be left intact. ---- ---- ```lua ---- local ctx = {} ---- local m, err = ngx.re.match("1234, hello", "[0-9]+", "", ctx) ---- -- m[0] = "1234" ---- -- ctx.pos == 5 ---- ``` ---- ---- ```lua ---- local ctx = { pos = 2 } ---- local m, err = ngx.re.match("1234, hello", "[0-9]+", "", ctx) ---- -- m[0] = "234" ---- -- ctx.pos == 5 ---- ``` ---- ----@class ngx.re.ctx : table ----@field pos? integer - - ---- Similar to `ngx.re.match` but only returns the beginning index (`from`) and end index (`to`) of the matched substring. The returned indexes are 1-based and can be fed directly into the `string.sub` API function to obtain the matched substring. ---- ---- In case of errors (like bad regexes or any PCRE runtime errors), this API function returns two `nil` values followed by a string describing the error. ---- ---- If no match is found, this function just returns a `nil` value. ---- ---- Below is an example: ---- ---- ```lua ---- local s = "hello, 1234" ---- local from, to, err = ngx.re.find(s, "([0-9]+)", "jo") ---- if from then ---- ngx.say("from: ", from) ---- ngx.say("to: ", to) ---- ngx.say("matched: ", string.sub(s, from, to)) ---- else ---- if err then ---- ngx.say("error: ", err) ---- return ---- end ---- ngx.say("not matched!") ---- end ---- ``` ---- ---- This example produces the output ---- ---- from: 8 ---- to: 11 ---- matched: 1234 ---- ---- Because this API function does not create new Lua strings nor new Lua tables, it is much faster than `ngx.re.match`. It should be used wherever possible. ---- ---- The optional 5th argument, `nth`, allows the caller to specify which (submatch) capture's indexes to return. When `nth` is 0 (which is the default), the indexes for the whole matched substring is returned; when `nth` is 1, then the 1st submatch capture's indexes are returned; when `nth` is 2, then the 2nd submatch capture is returned, and so on. When the specified submatch does not have a match, then two `nil` values will be returned. Below is an example for this: ---- ---- ```lua ---- local str = "hello, 1234" ---- local from, to = ngx.re.find(str, "([0-9])([0-9]+)", "jo", nil, 2) ---- if from then ---- ngx.say("matched 2nd submatch: ", string.sub(str, from, to)) -- yields "234" ---- end ---- ``` ---- ----@param subject string ----@param regex string ----@param options? ngx.re.options ----@param ctx? ngx.re.ctx ----@param nth? integer ----@return integer? from ----@return integer? to ----@return string? error -function ngx.re.find(subject, regex, options, ctx, nth) end - - ---- Similar to `ngx.re.match`, but returns a Lua iterator instead, so as to let the user programmer iterate all the matches over the `` string argument with the PCRE `regex`. ---- ---- In case of errors, like seeing an ill-formed regular expression, `nil` and a string describing the error will be returned. ---- ---- Here is a small example to demonstrate its basic usage: ---- ---- ```lua ---- local iterator, err = ngx.re.gmatch("hello, world!", "([a-z]+)", "i") ---- if not iterator then ---- ngx.log(ngx.ERR, "error: ", err) ---- return ---- end ---- ---- local m ---- m, err = iterator() -- m[0] == m[1] == "hello" ---- if err then ---- ngx.log(ngx.ERR, "error: ", err) ---- return ---- end ---- ---- m, err = iterator() -- m[0] == m[1] == "world" ---- if err then ---- ngx.log(ngx.ERR, "error: ", err) ---- return ---- end ---- ---- m, err = iterator() -- m == nil ---- if err then ---- ngx.log(ngx.ERR, "error: ", err) ---- return ---- end ---- ``` ---- ---- More often we just put it into a Lua loop: ---- ---- ```lua ---- local it, err = ngx.re.gmatch("hello, world!", "([a-z]+)", "i") ---- if not it then ---- ngx.log(ngx.ERR, "error: ", err) ---- return ---- end ---- ---- while true do ---- local m, err = it() ---- if err then ---- ngx.log(ngx.ERR, "error: ", err) ---- return ---- end ---- ---- if not m then ---- -- no match found (any more) ---- break ---- end ---- ---- -- found a match ---- ngx.say(m[0]) ---- ngx.say(m[1]) ---- end ---- ``` ---- ---- The current implementation requires that the iterator returned should only be used in a single request. That is, one should *not* assign it to a variable belonging to persistent namespace like a Lua package. ---- ----@alias ngx.re.gmatch.iterator fun():string,string ---- ----@param subject string ----@param regex string ----@param options? ngx.re.options ----@return ngx.re.gmatch.iterator? iterator ----@return string? error -function ngx.re.gmatch(subject, regex, options) end - - ---- Matches the `subject` string using the Perl compatible regular expression `regex` with the optional `options`. ---- ---- Only the first occurrence of the match is returned, or `nil` if no match is found. In case of errors, like seeing a bad regular expression or exceeding the PCRE stack limit, `nil` and a string describing the error will be returned. ---- ---- The optional fourth argument, `ctx`, can be a Lua table holding an optional `pos` field. When the `pos` field in the `ctx` table argument is specified, `ngx.re.match` will start matching from that offset (starting from 1). Regardless of the presence of the `pos` field in the `ctx` table, `ngx.re.match` will always set this `pos` field to the position *after* the substring matched by the whole pattern in case of a successful match. When match fails, the `ctx` table will be left intact. ---- ---- ```lua ---- local ctx = {} ---- local m, err = ngx.re.match("1234, hello", "[0-9]+", "", ctx) ---- -- m[0] = "1234" ---- -- ctx.pos == 5 ---- ``` ---- ---- ```lua ---- local ctx = { pos = 2 } ---- local m, err = ngx.re.match("1234, hello", "[0-9]+", "", ctx) ---- -- m[0] = "234" ---- -- ctx.pos == 5 ---- ``` ---- ---- The `ctx` table argument combined with the `a` regex modifier can be used to construct a lexer atop `ngx.re.match`. ---- ---- Note that, the `options` argument is not optional when the `ctx` argument is specified and that the empty Lua string (`""`) must be used as placeholder for `options` if no meaningful regex options are required. ---- ---- The optional 5th argument, `res_table`, allows the caller to supply the Lua table used to hold all the capturing results. Starting from `0.9.6`, it is the caller's responsibility to ensure this table is empty. This is very useful for recycling Lua tables and saving GC and table allocation overhead. ---- ----@param subject string ----@param regex string ----@param options? ngx.re.options ----@param ctx? ngx.re.ctx ----@param res? ngx.re.captures ----@return ngx.re.captures? captures ----@return string? error -function ngx.re.match(subject, regex, options, ctx, res) end - ---- Just like `ngx.re.sub`, but does global substitution. ---- ---- Here is some examples: ---- ---- ```lua ---- local newstr, n, err = ngx.re.gsub("hello, world", "([a-z])[a-z]+", "[$0,$1]", "i") ---- if newstr then ---- -- newstr == "[hello,h], [world,w]" ---- -- n == 2 ---- else ---- ngx.log(ngx.ERR, "error: ", err) ---- return ---- end ---- ``` ---- ---- ```lua ---- local func = function (m) ---- return "[" .. m[0] .. "," .. m[1] .. "]" ---- end ---- local newstr, n, err = ngx.re.gsub("hello, world", "([a-z])[a-z]+", func, "i") ---- -- newstr == "[hello,h], [world,w]" ---- -- n == 2 ---- ``` ---- ----@param subject string ----@param regex string ----@param replace ngx.re.replace ----@param options? ngx.re.options ----@return string? new ----@return integer? n ----@return string? error -function ngx.re.gsub(subject, regex, replace, options) end - ---- When `replace` is string, then it is treated as a special template for string replacement: ---- ---- ```lua ---- local newstr, n, err = ngx.re.sub("hello, 1234", "([0-9])[0-9]", "[$0][$1]") ---- if newstr then ---- -- newstr == "hello, [12][1]34" ---- -- n == 1 ---- else ---- ngx.log(ngx.ERR, "error: ", err) ---- return ---- end ---- ``` ---- ---- ...where `$0` refers to the whole substring matched by the pattern, and `$1` referring to the first parenthesized capturing substring. ---- ---- Curly braces can also be used to disambiguate variable names from the background string literals: ---- ---- ```lua ---- local newstr, n, err = ngx.re.sub("hello, 1234", "[0-9]", "${0}00") ---- -- newstr == "hello, 100234" ---- -- n == 1 ---- ``` ---- ---- Literal dollar sign characters (`$`) in the `replace` string argument can be escaped by another dollar sign: ---- ---- ```lua ---- local newstr, n, err = ngx.re.sub("hello, 1234", "[0-9]", "$$") ---- -- newstr == "hello, $234" ---- -- n == 1 ---- ``` ---- ---- Do not use backlashes to escape dollar signs; it will not work as expected. ----@alias ngx.re.replace.string string - ---- When `replace` is a function, it will be invoked with the capture table as the argument to generate the replace string literal for substitution. The capture table fed into the `replace` function is exactly the same as the return value of `ngx.re.match`. Here is an example: ---- ---- ```lua ---- local func = function (m) ---- return "[" .. m[0] .. "][" .. m[1] .. "]" ---- end ---- local newstr, n, err = ngx.re.sub("hello, 1234", "( [0-9] ) [0-9]", func, "x") ---- -- newstr == "hello, [12][1]34" ---- -- n == 1 ---- ``` ---- ---- The dollar sign characters in the return value of the `replace` function argument are not special at all. ---- ----@alias ngx.re.replace.fn fun(m:ngx.re.captures):string - ----@alias ngx.re.replace ngx.re.replace.string|ngx.re.replace.fn - ---- Substitutes the first match of the Perl compatible regular expression `regex` on the `subject` argument string with the string or function argument `replace`. ---- ---- This method returns the resulting new string as well as the number of successful substitutions. In case of failures, like syntax errors in the regular expressions or the `` string argument, it will return `nil` and a string describing the error. ---- ----@param subject string ----@param regex string ----@param replace ngx.re.replace ----@param options? ngx.re.options ----@return string? new ----@return integer? n ----@return string? error -function ngx.re.sub(subject, regex, replace, options) end - - ---- Decodes the `str` argument as a base64 digest to the raw form. Returns `nil` if `str` is not well formed. ---- ----@param str string ----@return string -function ngx.decode_base64(str) end - ---- Encodes `str` to a base64 digest. ---- ---- An optional boolean-typed `no_padding` argument can be specified to control whether the base64 padding should be appended to the resulting digest (default to `false`, i.e., with padding enabled). ---- ----@param str string ----@param no_padding? boolean ----@return string -function ngx.encode_base64(str, no_padding) end - ---- Fetching the shm-based Lua dictionary object for the shared memory zone named `DICT` defined by the `lua_shared_dict` directive. ---- ---- All these methods are *atomic* operations, that is, safe from concurrent accesses from multiple NGINX worker processes for the same `lua_shared_dict` zone. ---- ---- The shared dictionary will retain its contents through a server config reload (either by sending the `HUP` signal to the NGINX process or by using the `-s reload` command-line option). ---- ---- The contents in the dictionary storage will be lost, however, when the NGINX server quits. ---- ----@type table -ngx.shared = {} - ----@class ngx.shared.DICT -local DICT = {} - ---- Valid values for ngx.shared.DICT ----@alias ngx.shared.DICT.value ----| string ----| number ----| boolean ----| nil - ---- Retrieve a value. If the key does not exist or has expired, then `nil` will be returned. ---- ---- In case of errors, `nil` and a string describing the error will be returned. ---- ---- The value returned will have the original data type when they were inserted into the dictionary, for example, Lua booleans, numbers, or strings. ---- ---- ```lua ---- local cats = ngx.shared.cats ---- local value, flags = cats:get("Marry") ---- ``` ---- ---- If the user flags is `0` (the default), then no flags value will be returned. ---- ----@param key string ----@return ngx.shared.DICT.value? value ----@return ngx.shared.DICT.flags|string|nil flags_or_error -function DICT:get(key) end - - ---- Similar to the `get` method but returns the value even if the key has already expired. ---- ---- Returns a 3rd value, `stale`, indicating whether the key has expired or not. ---- ---- Note that the value of an expired key is not guaranteed to be available so one should never rely on the availability of expired items. ---- ----@param key string ----@return ngx.shared.DICT.value? value ----@return ngx.shared.DICT.flags|string flags_or_error ----@return boolean stale -function DICT:get_stale(key) end - ----@alias ngx.shared.DICT.error string ----| '"no memory"' # not enough available memory to store a value ----| '"exists"' # called add() on an existing value ----| '"not found"' # called a method (replace/ttl/expire) on an absent value ----| '"not a number"' # called incr() on a non-number value ----| '"value not a list"' # called list methods (lpush/lpop/rpush/rpop/llen) on a non-list value - ---- Optional user flags associated with a shm value. ---- ---- The user flags is stored as an unsigned 32-bit integer internally. Defaults to `0`. ---- ----@alias ngx.shared.DICT.flags integer - ---- Expiration time of an shm value (in seconds) ---- ---- The time resolution is `0.001` seconds. ---- If this value is set to `0` (the default), the shm value will never expire. ---- ----@alias ngx.shared.DICT.exptime number - ---- Unconditionally sets a key-value pair into the shm-based dictionary. ---- ---- When it fails to allocate memory for the current key-value item, then `set` will try removing existing items in the storage according to the Least-Recently Used (LRU) algorithm. Note that, LRU takes priority over expiration time here. If up to tens of existing items have been removed and the storage left is still insufficient (either due to the total capacity limit specified by `lua_shared_dict` or memory segmentation), then the `err` return value will be `no memory` and `success` will be `false`. ---- ---- If this method succeeds in storing the current item by forcibly removing other not-yet-expired items in the dictionary via LRU, the `forcible` return value will be `true`. If it stores the item without forcibly removing other valid items, then the return value `forcible` will be `false`. ---- ---- ```lua ---- local cats = ngx.shared.cats ---- local succ, err, forcible = cats:set("Marry", "it is a nice cat!") ---- ``` ---- ---- Please note that while internally the key-value pair is set atomically, the atomicity does not go across the method call boundary. ---- ----@param key string ----@param value ngx.shared.DICT.value ----@param exptime? ngx.shared.DICT.exptime ----@param flags? ngx.shared.DICT.flags ----@return boolean ok # whether the key-value pair is stored or not ----@return ngx.shared.DICT.error? error ----@return boolean forcible # indicates whether other valid items have been removed forcibly when out of storage in the shared memory zone. -function DICT:set(key, value, exptime, flags) end - ---- Similar to the `set` method, but never overrides the (least recently used) unexpired items in the store when running out of storage in the shared memory zone. In this case, it will immediately return `nil` and the string "no memory". ---- ----@param key string ----@param value ngx.shared.DICT.value ----@param exptime? ngx.shared.DICT.exptime ----@param flags? ngx.shared.DICT.flags ----@return boolean ok # whether the key-value pair is stored or not ----@return ngx.shared.DICT.error? error ----@return boolean forcible # indicates whether other valid items have been removed forcibly when out of storage in the shared memory zone. -function DICT:safe_set(key, value, exptime, flags) end - ---- Just like the `set` method, but only stores the key-value pair if the key does *not* exist. ---- ---- If the `key` argument already exists in the dictionary (and not expired for sure), the `success` return value will be `false` and the `err` return value will be `"exists"`. ---- ----@param key string ----@param value ngx.shared.DICT.value ----@param exptime? ngx.shared.DICT.exptime ----@param flags? ngx.shared.DICT.flags ----@return boolean ok # whether the key-value pair is stored or not ----@return ngx.shared.DICT.error? error ----@return boolean forcible # indicates whether other valid items have been removed forcibly when out of storage in the shared memory zone. -function DICT:add(key, value, exptime, flags) end - ---- Similar to the `add` method, but never overrides the (least recently used) unexpired items in the store when running out of storage in the shared memory zone. In this case, it will immediately return `nil` and the string "no memory". ---- ----@param key string ----@param value ngx.shared.DICT.value ----@param exptime? ngx.shared.DICT.exptime ----@param flags? ngx.shared.DICT.flags ----@return boolean ok # whether the key-value pair is stored or not ----@return ngx.shared.DICT.error? error ----@return boolean forcible # indicates whether other valid items have been removed forcibly when out of storage in the shared memory zone. -function DICT:safe_add(key, value, exptime, flags) end - - ---- Just like the `set` method, but only stores the key-value pair if the key *does* exist. ---- ---- If the `key` argument does *not* exist in the dictionary (or expired already), the `success` return value will be `false` and the `err` return value will be `"not found"`. ---- ----@param key string ----@param value ngx.shared.DICT.value ----@param exptime? ngx.shared.DICT.exptime ----@param flags? ngx.shared.DICT.flags ----@return boolean ok # whether the key-value pair is stored or not ----@return ngx.shared.DICT.error? error ----@return boolean forcible # indicates whether other valid items have been removed forcibly when out of storage in the shared memory zone. -function DICT:replace(key, value, exptime, flags) end - ---- Unconditionally removes the key-value pair. ---- ---- It is equivalent to `ngx.shared.DICT:set(key, nil)`. ---- ----@param key string -function DICT:delete(key) end - - ---- Increments the (numerical) value for `key` by the step value `value`. Returns the new resulting number if the operation is successfully completed or `nil` and an error message otherwise. ---- ---- When the key does not exist or has already expired in the shared dictionary, ---- ---- 1. if the `init` argument is not specified or takes the value `nil`, this method will return `nil` and the error string `"not found"`, or ---- 1. if the `init` argument takes a number value, this method will create a new `key` with the value `init + value`. ---- ---- Like the `add` method, it also overrides the (least recently used) unexpired items in the store when running out of storage in the shared memory zone. ---- ---- The optional `init_ttl` argument specifies expiration time (in seconds) of the value when it is initialized via the `init` argument. This argument cannot be provided without providing the `init` argument as well, and has no effect if the value already exists (e.g., if it was previously inserted via `set` or the likes). ---- ---- ```lua ---- local cats = ngx.shared.cats ---- local newval, err = cats:incr("black_cats", 1, 0, 0.1) ---- ---- print(newval) -- 1 ---- ---- ngx.sleep(0.2) ---- ---- local val, err = cats:get("black_cats") ---- print(val) -- nil ---- ``` ---- ---- The `forcible` return value will always be `nil` when the `init` argument is not specified. ---- ---- If this method succeeds in storing the current item by forcibly removing other not-yet-expired items in the dictionary via LRU, the `forcible` return value will be `true`. If it stores the item without forcibly removing other valid items, then the return value `forcible` will be `false`. ---- ---- If the original value is not a valid Lua number in the dictionary, it will return `nil` and `"not a number"`. ---- ---- The `value` argument and `init` argument can be any valid Lua numbers, like negative numbers or floating-point numbers. ---- ---- ----@param key string ----@param value number ----@param init? number ----@param init_ttl? ngx.shared.DICT.exptime ----@return integer? new ----@return ngx.shared.DICT.error? error ----@return boolean forcible -function DICT:incr(key, value, init, init_ttl) end - ---- Valid ngx.shared.DICT value for lists ----@alias ngx.shared.DICT.list_value ----| string ----| number - ---- Inserts the specified (numerical or string) `value` at the head of the list named `key`. ---- ---- If `key` does not exist, it is created as an empty list before performing the push operation. When the `key` already takes a value that is not a list, it will return `nil` and `"value not a list"`. ---- ---- It never overrides the (least recently used) unexpired items in the store when running out of storage in the shared memory zone. In this case, it will immediately return `nil` and the string "no memory". ---- ----@param key string ----@param value ngx.shared.DICT.list_value ----@return number? len # number of elements in the list after the push operation ----@return ngx.shared.DICT.error? error -function DICT:lpush(key, value) end - - ---- Similar to the `lpush` method, but inserts the specified (numerical or string) `value` at the tail of the list named `key`. ---- ----@param key string ----@param value ngx.shared.DICT.list_value ----@return number? len # number of elements in the list after the push operation ----@return ngx.shared.DICT.error? error -function DICT:rpush(key, value) end - - ---- Removes and returns the first element of the list named `key`. ---- ---- If `key` does not exist, it will return `nil`. When the `key` already takes a value that is not a list, it will return `nil` and `"value not a list"`. ---- ----@param key string ----@return ngx.shared.DICT.list_value? item ----@return ngx.shared.DICT.error? error -function DICT:lpop(key) end - - ---- Removes and returns the last element of the list named `key`. ---- ---- If `key` does not exist, it will return `nil`. When the `key` already takes a value that is not a list, it will return `nil` and `"value not a list"`. ---- ----@param key string ----@return ngx.shared.DICT.list_value? item ----@return ngx.shared.DICT.error? error -function DICT:rpop(key) end - ---- Returns the number of elements in the list named `key`. ---- ---- If key does not exist, it is interpreted as an empty list and 0 is returned. When the `key` already takes a value that is not a list, it will return `nil` and `"value not a list"`. ---- ----@param key string ----@return number? len ----@return ngx.shared.DICT.error? error -function DICT:llen(key) end - - ---- Retrieves the remaining TTL (time-to-live in seconds) of a key-value pair. ---- ---- Returns the TTL as a number if the operation is successfully completed or `nil` and an error message otherwise. ---- ---- If the key does not exist (or has already expired), this method will return `nil` and the error string `"not found"`. ---- ---- The TTL is originally determined by the `exptime` argument of the `set`, `add`, `replace` (and the likes) methods. It has a time resolution of `0.001` seconds. A value of `0` means that the item will never expire. ---- ---- Example: ---- ---- ```lua ---- local cats = ngx.shared.cats ---- local succ, err = cats:set("Marry", "a nice cat", 0.5) ---- ---- ngx.sleep(0.2) ---- ---- local ttl, err = cats:ttl("Marry") ---- ngx.say(ttl) -- 0.3 ---- ``` ----@param key string ----@return number? ttl ----@return ngx.shared.DICT.error? error -function DICT:ttl(key) end - - ---- Updates the `exptime` (in second) of a key-value pair. ---- ---- Returns a boolean indicating success if the operation completes or `nil` and an error message otherwise. ---- ---- If the key does not exist, this method will return `nil` and the error string `"not found"`. ---- ---- ```lua ---- local cats = ngx.shared.cats ---- local succ, err = cats:set("Marry", "a nice cat", 0.1) ---- ---- succ, err = cats:expire("Marry", 0.5) ---- ---- ngx.sleep(0.2) ---- ---- local val, err = cats:get("Marry") ---- ngx.say(val) -- "a nice cat" ---- ``` ---- ----@param key string ----@param exptime ngx.shared.DICT.exptime ----@return boolean ok ----@return ngx.shared.DICT.error? error -function DICT:expire(key, exptime) end - - ---- Flushes out all the items in the dictionary. This method does not actuall free up all the memory blocks in the dictionary but just marks all the existing items as expired. ---- -function DICT:flush_all() end - - ---- Flushes out the expired items in the dictionary, up to the maximal number specified by the optional `max_count` argument. When the `max_count` argument is given `0` or not given at all, then it means unlimited. Returns the number of items that have actually been flushed. ---- ---- Unlike the `flush_all` method, this method actually frees up the memory used by the expired items. ---- ----@param max_count? number ----@return number flushed -function DICT:flush_expired(max_count) end - - ---- Fetch a list of the keys from the dictionary, up to ``. ---- ---- By default, only the first 1024 keys (if any) are returned. When the `` argument is given the value `0`, then all the keys will be returned even there is more than 1024 keys in the dictionary. ---- ---- **CAUTION** Avoid calling this method on dictionaries with a very large number of keys as it may lock the dictionary for significant amount of time and block NGINX worker processes trying to access the dictionary. ---- ----@param max_count? number ----@return string[] keys -function DICT:get_keys(max_count) end - - ---- Retrieves the capacity in bytes for the shm-based dictionary. ---- ---- ```lua ---- local cats = ngx.shared.cats ---- local capacity_bytes = cats:capacity() ---- ``` ---- ----@return number -function DICT:capacity() end - - ---- Retrieves the free page size in bytes for the shm-based dictionary. ---- ---- **Note:** The memory for ngx.shared.DICT is allocated via the NGINX slab allocator which has each slot for ---- data size ranges like \~8, 9\~16, 17\~32, ..., 1025\~2048, 2048\~ bytes. And pages are assigned to a slot if there is no room in already assigned pages for the slot. ---- ---- So even if the return value of the `free_space` method is zero, there may be room in already assigned pages, so ---- you may successfully set a new key value pair to the shared dict without getting `true` for `forcible` or ---- non nil `err` from the `ngx.shared.DICT.set`. ---- ---- On the other hand, if already assigned pages for a slot are full and a new key value pair is added to the ---- slot and there is no free page, you may get `true` for `forcible` or non nil `err` from the ---- `ngx.shared.DICT.set` method. ---- ---- ```lua ---- local cats = ngx.shared.cats ---- local free_page_bytes = cats:free_space() ---- ``` ---- ----@return number -function DICT:free_space() end - ---- Read and write NGINX variable values. ---- ---- Usage: ---- ----```lua ---- value = ngx.var.some_nginx_variable_name ---- ngx.var.some_nginx_variable_name = value ----``` ---- ---- Note that only already defined NGINX variables can be written to. ---- For example: ---- ---- ```nginx ---- location /foo { ---- set $my_var ''; # this line is required to create $my_var at config time ---- content_by_lua_block { ---- ngx.var.my_var = 123 ---- ... ---- } ---- } ---- ``` ---- ---- That is, NGINX variables cannot be created on-the-fly. ---- ---- Some special NGINX variables like `$args` and `$limit_rate` can be assigned a value, ---- many others are not, like `$query_string`, `$arg_PARAMETER`, and `$http_NAME`. ---- ---- NGINX regex group capturing variables `$1`, `$2`, `$3`, and etc, can be read by this ---- interface as well, by writing `ngx.var[1]`, `ngx.var[2]`, `ngx.var[3]`, and etc. ---- ---- Setting `ngx.var.Foo` to a `nil` value will unset the `$Foo` NGINX variable. ---- ---- ```lua ---- ngx.var.args = nil ---- ``` ---- ---- **CAUTION** When reading from an NGINX variable, NGINX will allocate memory in the per-request memory pool which is freed only at request termination. So when you need to read from an NGINX variable repeatedly in your Lua code, cache the NGINX variable value to your own Lua variable, for example, ---- ---- ```lua ---- local val = ngx.var.some_var ---- --- use the val repeatedly later ---- ``` ---- ---- to prevent (temporary) memory leaking within the current request's lifetime. Another way of caching the result is to use the `ngx.ctx` table. ---- ---- Undefined NGINX variables are evaluated to `nil` while uninitialized (but defined) NGINX variables are evaluated to an empty Lua string. ---- ---- This API requires a relatively expensive metamethod call and it is recommended to avoid using it on hot code paths. ---- ----@type table -ngx.var = {} - ---- Embedded Variables ---- see https://nginx.org/en/docs/http/ngx_http_core_module.html#variables - ---- client address in a binary form, value’s length is always 4 bytes for IPv4 addresses or 16 bytes for IPv6 addresses ----@type string -ngx.var.binary_remote_addr = nil - ---- number of bytes sent to a client, not counting the response header; this variable is compatible with the “%B” parameter of the mod_log_config Apache module ----@type number -ngx.var.body_bytes_sent = nil - ---- number of bytes sent to a client (1.3.8, 1.2.5) ----@type number -ngx.var.bytes_sent = nil - ---- connection serial number (1.3.8, 1.2.5) ----@type string -ngx.var.connection = nil - ---- current number of requests made through a connection (1.3.8, 1.2.5) ----@type string -ngx.var.connection_requests = nil - ---- connection time in seconds with a milliseconds resolution (1.19.10) ----@type string -ngx.var.connection_time = nil - ---- “Content-Length” request header field ----@type string -ngx.var.content_length = nil - ---- “Content-Type” request header field ----@type string -ngx.var.content_type = nil - ---- root or alias directive’s value for the current request ----@type string -ngx.var.document_root = nil - ---- same as ngx.var.uri ----@type string -ngx.var.document_uri = nil - ---- in this order of precedence: host name from the request line, or host name from the “Host” request header field, or the server name matching a request ----@type string -ngx.var.host = nil - ---- host name ----@type string -ngx.var.hostname = nil - ---- “on” if connection operates in SSL mode, or an empty string otherwise ----@type string '"on"'|'""' -ngx.var.https = nil - ---- “?” if a request line has arguments, or an empty string otherwise ----@type string -ngx.var.is_args = nil - ---- setting this variable enables response rate limiting; see limit_rate ----@type string -ngx.var.limit_rate = nil - ---- current time in seconds with the milliseconds resolution (1.3.9, 1.2.6) ----@type string -ngx.var.msec = nil - ---- nginx version ----@type string -ngx.var.nginx_version = nil - ---- PID of the worker process ----@type string -ngx.var.pid = nil - ---- “p” if request was pipelined, “.” otherwise (1.3.12, 1.2.7) ----@type string -ngx.var.pipe = nil - ---- client address from the PROXY protocol header (1.5.12) ---- The PROXY protocol must be previously enabled by setting the proxy_protocol parameter in the listen directive. ----@type string -ngx.var.proxy_protocol_addr = nil - ---- client port from the PROXY protocol header (1.11.0) ---- ---- The PROXY protocol must be previously enabled by setting the proxy_protocol parameter in the listen directive. ----@type string -ngx.var.proxy_protocol_port = nil - ---- server address from the PROXY protocol header (1.17.6) ---- ---- The PROXY protocol must be previously enabled by setting the proxy_protocol parameter in the listen directive. ----@type string -ngx.var.proxy_protocol_server_addr = nil - ---- server port from the PROXY protocol header (1.17.6) ---- ---- The PROXY protocol must be previously enabled by setting the proxy_protocol parameter in the listen directive. ----@type string -ngx.var.proxy_protocol_server_port = nil - ---- same as ngx.var.args ----@type string -ngx.var.query_string = nil - ---- an absolute pathname corresponding to the root or alias directive’s value for the current request, with all symbolic links resolved to real paths ----@type string -ngx.var.realpath_root = nil - ---- client address ----@type string -ngx.var.remote_addr = nil - ---- client port ----@type string -ngx.var.remote_port = nil - ---- user name supplied with the Basic authentication ----@type string -ngx.var.remote_user = nil - ---- full original request line ----@type string -ngx.var.request = nil - ---- request body ---- ---- The variable’s value is made available in locations processed by the proxy_pass, fastcgi_pass, uwsgi_pass, and scgi_pass directives when the request body was read to a memory buffer. ----@type string -ngx.var.request_body = nil - ---- name of a temporary file with the request body ---- ---- At the end of processing, the file needs to be removed. ---- To always write the request body to a file, client_body_in_file_only needs to be enabled. ---- When the name of a temporary file is passed in a proxied request or in a request to a FastCGI/uwsgi/SCGI server, passing the request body should be disabled by the proxy_pass_request_body off, fastcgi_pass_request_body off, uwsgi_pass_request_body off, or scgi_pass_request_body off directives, respectively. ----@type string -ngx.var.request_body_file = nil - ---- “OK” if a request has completed, or an empty string otherwise ----@type string -ngx.var.request_completion = nil - ---- file path for the current request, based on the root or alias directives, and the request URI ----@type string -ngx.var.request_filename = nil - ---- unique request identifier generated from 16 random bytes, in hexadecimal (1.11.0) ----@type string -ngx.var.request_id = nil - ---- request length (including request line, header, and request body) (1.3.12, 1.2.7) ----@type string -ngx.var.request_length = nil - ---- request method, usually “GET” or “POST” ----@type string -ngx.var.request_method = nil - ---- request processing time in seconds with a milliseconds resolution (1.3.9, 1.2.6); time elapsed since the first bytes were read from the client ----@type string -ngx.var.request_time = nil - ---- full original request URI (with arguments) ----@type string -ngx.var.request_uri = nil - ---- request scheme, “http” or “https” ----@type string -ngx.var.scheme = nil - ---- an address of the server which accepted a request ---- ---- Computing a value of this variable usually requires one system call. To avoid a system call, the listen directives must specify addresses and use the bind parameter. ----@type string -ngx.var.server_addr = nil - ---- name of the server which accepted a request ----@type string -ngx.var.server_name = nil - ---- port of the server which accepted a request ----@type string -ngx.var.server_port = nil - ---- request protocol, usually “HTTP/1.0”, “HTTP/1.1”, or “HTTP/2.0” ----@type string -ngx.var.server_protocol = nil - ---- response status (1.3.2, 1.2.2) ----@type string -ngx.var.status = nil - ---- local time in the ISO 8601 standard format (1.3.12, 1.2.7) ----@type string -ngx.var.time_iso8601 = nil - ---- local time in the Common Log Format (1.3.12, 1.2.7) ----@type string -ngx.var.time_local = nil - ---- current URI in request, normalized ---- The value of $uri may change during request processing, e.g. when doing internal redirects, or when using index files. ----@type string -ngx.var.uri = nil - ---- Updating query arguments via the NGINX variable `$args` (or `ngx.var.args` in Lua) at runtime is also supported: ---- ---- ```lua ---- ngx.var.args = "a=3&b=42" ---- local args, err = ngx.req.get_uri_args() ---- ``` ---- ---- Here the `args` table will always look like ---- ---- ```lua ---- {a = 3, b = 42} ---- ``` ---- ---- regardless of the actual request query string. ----@type string -ngx.var.args = nil - ---- embedded upstream variables ---- https://nginx.org/en/docs/http/ngx_http_upstream_module.html#variables - ---- IP address and port, or the path to the UNIX-domain socket of the upstream server. ---- If several servers were contacted during request processing, their addresses are separated by commas, e.g. “192.168.1.1:80, 192.168.1.2:80, unix:/tmp/sock”. ---- If an internal redirect from one server group to another happens, initiated by “X-Accel-Redirect” or error_page, then the server addresses from different groups are separated by colons, e.g. “192.168.1.1:80, 192.168.1.2:80, unix:/tmp/sock : 192.168.10.1:80, 192.168.10.2:80”. ---- If a server cannot be selected, the variable keeps the name of the server group. ----@type string -ngx.var.upstream_addr = nil - ---- number of bytes received from an upstream server (1.11.4). Values from several connections are separated by commas and colons like addresses in the $upstream_addr variable. ----@type string -ngx.var.upstream_bytes_received = nil - ---- number of bytes sent to an upstream server (1.15.8). Values from several connections are separated by commas and colons like addresses in the $upstream_addr variable. ----@type string -ngx.var.upstream_bytes_sent = nil - ---- status of accessing a response cache (0.8.3). The status can be either “MISS”, “BYPASS”, “EXPIRED”, “STALE”, “UPDATING”, “REVALIDATED”, or “HIT”. ----@type string -ngx.var.upstream_cache_status = nil - ---- time spent on establishing a connection with the upstream server (1.9.1) --- ---- the time is kept in seconds with millisecond resolution. ---- In case of SSL, includes time spent on handshake. ---- Times of several connections are separated by commas and colons like addresses in the $upstream_addr variable. ----@type string -ngx.var.upstream_connect_time = nil - ---- time spent on receiving the response header from the upstream server (1.7.10) ---- the time is kept in seconds with millisecond resolution. ---- Times of several responses are separated by commas and colons like addresses in the $upstream_addr variable. ----@type string -ngx.var.upstream_header_time = nil - ---- the time the request spent in the upstream queue (1.13.9). ---- the time is kept in seconds with millisecond resolution. ---- Times of several responses are separated by commas and colons like addresses in the $upstream_addr variable. ----@type string -ngx.var.upstream_queue_time = nil - ---- the length of the response obtained from the upstream server (0.7.27). ---- the length is kept in bytes. ---- Lengths of several responses are separated by commas and colons like addresses in the $upstream_addr variable. ----@type string -ngx.var.upstream_response_length = nil - ---- time spent on receiving the response from the upstream server ---- ---- the time is kept in seconds with millisecond resolution. ---- Times of several responses are separated by commas and colons like addresses in the $upstream_addr variable. ----@type string -ngx.var.upstream_response_time = nil - ---- status code of the response obtained from the upstream server. ---- Status codes of several responses are separated by commas and colons like addresses in the $upstream_addr variable. ---- If a server cannot be selected, the variable keeps the 502 (Bad Gateway) status code. ----@type string -ngx.var.upstream_status = nil - - -ngx.req = {} - ---- Returns a boolean indicating whether the current request is an "internal request", i.e., ---- a request initiated from inside the current NGINX server instead of from the client side. ---- ---- Subrequests are all internal requests and so are requests after internal redirects. ---- ----@return boolean -function ngx.req.is_internal() end - ---- Returns the HTTP version number for the current request as a Lua number. ---- ---- Current possible values are 2.0, 1.0, 1.1, and 0.9. Returns `nil` for unrecognized values. ---- ----@return '2.0'|'1.0'|'1.1'|'0.9'|'nil' -function ngx.req.http_version() end - ---- Set the current request's request body using the in-memory data specified by the `data` argument. ---- ---- If the request body has not been read yet, call `ngx.req.read_body` first (or turn on `lua_need_request_body` to force this module to read the request body. This is not recommended however). Additionally, the request body must not have been previously discarded by `ngx.req.discard_body`. ---- ---- Whether the previous request body has been read into memory or buffered into a disk file, it will be freed or the disk file will be cleaned up immediately, respectively. ---- ----@param data any -function ngx.req.set_body_data(data) end - ---- Returns a Lua table holding all the current request POST query arguments (of the MIME type `application/x-www-form-urlencoded`). Call `ngx.req.read_body` to read the request body first or turn on the `lua_need_request_body` directive to avoid errors. ---- ---- ```nginx ---- location = /test { ---- content_by_lua_block { ---- ngx.req.read_body() ---- local args, err = ngx.req.get_post_args() ---- ---- if err == "truncated" then ---- -- one can choose to ignore or reject the current request here ---- end ---- ---- if not args then ---- ngx.say("failed to get post args: ", err) ---- return ---- end ---- for key, val in pairs(args) do ---- if type(val) == "table" then ---- ngx.say(key, ": ", table.concat(val, ", ")) ---- else ---- ngx.say(key, ": ", val) ---- end ---- end ---- } ---- } ---- ``` ---- ---- Then ---- ---- ```bash ---- # Post request with the body 'foo=bar&bar=baz&bar=blah' ---- $ curl --data 'foo=bar&bar=baz&bar=blah' localhost/test ---- ``` ---- ---- will yield the response body like ---- ---- ```bash ---- foo: bar ---- bar: baz, blah ---- ``` ---- ---- Multiple occurrences of an argument key will result in a table value holding all of the values for that key in order. ---- ---- Keys and values will be unescaped according to URI escaping rules. ---- ---- With the settings above, ---- ---- ```bash ---- # POST request with body 'a%20b=1%61+2' ---- $ curl -d 'a%20b=1%61+2' localhost/test ---- ``` ---- ---- will yield: ---- ---- ```bash ---- a b: 1a 2 ---- ``` ---- ---- Arguments without the `=` parts are treated as boolean arguments. `POST /test` with the request body `foo&bar` will yield: ---- ---- ```bash ---- foo: true ---- bar: true ---- ``` ---- ---- That is, they will take Lua boolean values `true`. However, they are different from arguments taking empty string values. `POST /test` with request body `foo=&bar=` will return something like ---- ---- ```bash ---- foo: ---- bar: ---- ``` ---- ---- Empty key arguments are discarded. `POST /test` with body `=hello&=world` will yield empty outputs for instance. ---- ---- Note that a maximum of 100 request arguments are parsed by default (including those with the same name) and that additional request arguments are silently discarded to guard against potential denial of service attacks. When the limit is exceeded, it will return a second value which is the string `"truncated"`. ---- ---- However, the optional `max_args` function argument can be used to override this limit: ---- ---- ```lua ---- local args, err = ngx.req.get_post_args(10) ---- if err == "truncated" then ---- -- one can choose to ignore or reject the current request here ---- end ---- ``` ---- ---- This argument can be set to zero to remove the limit and to process all request arguments received: ---- ---- ```lua ---- local args, err = ngx.req.get_post_args(0) ---- ``` ---- ---- Removing the `max_args` cap is strongly discouraged. ---- ----@param max_args? number ----@return table args ----@return string|'"truncated"' error -function ngx.req.get_post_args(max_args) end - ---- Returns a Lua table holding all the current request URL query arguments. An optional `tab` argument can be used to reuse the table returned by this method. ---- ---- ```nginx ---- location = /test { ---- content_by_lua_block { ---- local args, err = ngx.req.get_uri_args() ---- ---- if err == "truncated" then ---- -- one can choose to ignore or reject the current request here ---- end ---- ---- for key, val in pairs(args) do ---- if type(val) == "table" then ---- ngx.say(key, ": ", table.concat(val, ", ")) ---- else ---- ngx.say(key, ": ", val) ---- end ---- end ---- } ---- } ---- ``` ---- ---- Then `GET /test?foo=bar&bar=baz&bar=blah` will yield the response body ---- ---- ```bash ---- foo: bar ---- bar: baz, blah ---- ``` ---- ---- Multiple occurrences of an argument key will result in a table value holding all the values for that key in order. ---- ---- Keys and values are unescaped according to URI escaping rules. In the settings above, `GET /test?a%20b=1%61+2` will yield: ---- ---- ```bash ---- a b: 1a 2 ---- ``` ---- ---- Arguments without the `=` parts are treated as boolean arguments. `GET /test?foo&bar` will yield: ---- ---- ```bash ---- foo: true ---- bar: true ---- ``` ---- ---- That is, they will take Lua boolean values `true`. However, they are different from arguments taking empty string values. `GET /test?foo=&bar=` will give something like ---- ---- ```bash ---- foo: ---- bar: ---- ``` ---- ---- Empty key arguments are discarded. `GET /test?=hello&=world` will yield an empty output for instance. ---- ---- Updating query arguments via the NGINX variable `$args` (or `ngx.var.args` in Lua) at runtime is also supported: ---- ---- ```lua ---- ngx.var.args = "a=3&b=42" ---- local args, err = ngx.req.get_uri_args() ---- ``` ---- ---- Here the `args` table will always look like ---- ---- ```lua ---- {a = 3, b = 42} ---- ``` ---- ---- regardless of the actual request query string. ---- ---- Note that a maximum of 100 request arguments are parsed by default (including those with the same name) and that additional request arguments are silently discarded to guard against potential denial of service attacks. When the limit is exceeded, it will return a second value which is the string `"truncated"`. ---- ---- However, the optional `max_args` function argument can be used to override this limit: ---- ---- ```lua ---- local args, err = ngx.req.get_uri_args(10) ---- if err == "truncated" then ---- -- one can choose to ignore or reject the current request here ---- end ---- ``` ---- ---- This argument can be set to zero to remove the limit and to process all request arguments received: ---- ---- ```lua ---- local args, err = ngx.req.get_uri_args(0) ---- ``` ---- ---- Removing the `max_args` cap is strongly discouraged. ---- ----@param max_args? number ----@param tab? table ----@return table args ----@return string|'"truncated"' error -function ngx.req.get_uri_args(max_args, tab) end - ---- Rewrite the current request's (parsed) URI by the `uri` argument. The `uri` argument must be a Lua string and cannot be of zero length, or a Lua exception will be thrown. ---- ---- The optional boolean `jump` argument can trigger location rematch (or location jump) as `ngx_http_rewrite_module`'s `rewrite` directive, that is, when `jump` is `true` (default to `false`), this function will never return and it will tell NGINX to try re-searching locations with the new URI value at the later `post-rewrite` phase and jumping to the new location. ---- ---- Location jump will not be triggered otherwise, and only the current request's URI will be modified, which is also the default behavior. This function will return but with no returned values when the `jump` argument is `false` or absent altogether. ---- ---- For example, the following NGINX config snippet ---- ---- ```nginx ---- rewrite ^ /foo last; ---- ``` ---- ---- can be coded in Lua like this: ---- ---- ```lua ---- ngx.req.set_uri("/foo", true) ---- ``` ---- ---- Similarly, NGINX config ---- ---- ```nginx ---- rewrite ^ /foo break; ---- ``` ---- ---- can be coded in Lua as ---- ---- ```lua ---- ngx.req.set_uri("/foo", false) ---- ``` ---- ---- or equivalently, ---- ---- ```lua ---- ngx.req.set_uri("/foo") ---- ``` ---- ---- The `jump` argument can only be set to `true` in `rewrite_by_lua*`. Use of jump in other contexts is prohibited and will throw out a Lua exception. ---- ---- A more sophisticated example involving regex substitutions is as follows ---- ---- ```nginx ---- location /test { ---- rewrite_by_lua_block { ---- local uri = ngx.re.sub(ngx.var.uri, "^/test/(.*)", "/$1", "o") ---- ngx.req.set_uri(uri) ---- } ---- proxy_pass http://my_backend; ---- } ---- ``` ---- ---- which is functionally equivalent to ---- ---- ```nginx ---- location /test { ---- rewrite ^/test/(.*) /$1 break; ---- proxy_pass http://my_backend; ---- } ---- ``` ---- ---- Note: this function throws a Lua error if the `uri` argument ---- contains unsafe characters (control characters). ---- ---- Note that it is not possible to use this interface to rewrite URI arguments and that `ngx.req.set_uri_args` should be used for this instead. For instance, NGINX config ---- ---- ```nginx ---- rewrite ^ /foo?a=3? last; ---- ``` ---- ---- can be coded as ---- ---- ```nginx ---- ngx.req.set_uri_args("a=3") ---- ngx.req.set_uri("/foo", true) ---- ``` ---- ---- or ---- ---- ```nginx ---- ngx.req.set_uri_args({a = 3}) ---- ngx.req.set_uri("/foo", true) ---- ``` ---- ---- An optional boolean `binary` argument allows arbitrary binary URI data. By default, this `binary` argument is false and this function will throw out a Lua error such as the one below when the `uri` argument contains any control characters (ASCII Code 0 ~ 0x08, 0x0A ~ 0x1F and 0x7F). ---- ---- [error] 23430#23430: *1 lua entry thread aborted: runtime error: ---- content_by_lua(nginx.conf:44):3: ngx.req.set_uri unsafe byte "0x00" ---- in "\x00foo" (maybe you want to set the 'binary' argument?) ---- ----@param uri string ----@param jump? boolean ----@param binary? boolean -function ngx.req.set_uri(uri, jump, binary) end - ---- Append new data chunk specified by the `data_chunk` argument onto the existing request body created by the `ngx.req.init_body` call. ---- ---- When the data can no longer be hold in the memory buffer for the request body, then the data will be flushed onto a temporary file just like the standard request body reader in the NGINX core. ---- ---- It is important to always call the `ngx.req.finish_body` after all the data has been appended onto the current request body. ---- ---- This function can be used with `ngx.req.init_body`, `ngx.req.finish_body`, and `ngx.req.socket` to implement efficient input filters in pure Lua (in the context of `rewrite_by_lua*` or `access_by_lua*`), which can be used with other NGINX content handler or upstream modules like `ngx_http_proxy_module` and `ngx_http_fastcgi_module`. ---- ----@param data_chunk any -function ngx.req.append_body(data_chunk) end - ---- Overrides the current request's request method with the `method_id` argument. Currently only numerical `method constants` are supported, like `ngx.HTTP_POST` and `ngx.HTTP_GET`. ---- ---- If the current request is an NGINX subrequest, then the subrequest's method will be overridden. ---- ----@param method_id ngx.http.method -function ngx.req.set_method(method_id) end - ---- Retrieves the current request's request method name. Strings like `"GET"` and `"POST"` are returned instead of numerical `method constants`. ---- ---- If the current request is an NGINX subrequest, then the subrequest's method name will be returned. ---- ----@return string -function ngx.req.get_method() end - ---- Returns a read-only cosocket object that wraps the downstream connection. Only `receive` and `receiveuntil` methods are supported on this object. ---- ---- In case of error, `nil` will be returned as well as a string describing the error. ---- ---- The socket object returned by this method is usually used to read the current request's body in a streaming fashion. Do not turn on the `lua_need_request_body` directive, and do not mix this call with `ngx.req.read_body` and `ngx.req.discard_body`. ---- ---- If any request body data has been pre-read into the NGINX core request header buffer, the resulting cosocket object will take care of this to avoid potential data loss resulting from such pre-reading. ---- Chunked request bodies are not yet supported in this API. ---- ---- An optional boolean `raw` argument can be provided. When this argument is `true`, this function returns a full-duplex cosocket object wrapping around the raw downstream connection socket, upon which you can call the `receive`, `receiveuntil`, and `send` methods. ---- ---- When the `raw` argument is `true`, it is required that no pending data from any previous `ngx.say`, `ngx.print`, or `ngx.send_headers` calls exists. So if you have these downstream output calls previously, you should call `ngx.flush(true)` before calling `ngx.req.socket(true)` to ensure that there is no pending output data. If the request body has not been read yet, then this "raw socket" can also be used to read the request body. ---- ---- You can use the "raw request socket" returned by `ngx.req.socket(true)` to implement fancy protocols like `WebSocket`, or just emit your own raw HTTP response header or body data. You can refer to the `lua-resty-websocket library` for a real world example. ---- ----@param raw? boolean ----@return tcpsock? socket ----@return string? error -function ngx.req.socket(raw) end - ---- Completes the construction process of the new request body created by the `ngx.req.init_body` and `ngx.req.append_body` calls. ---- ---- This function can be used with `ngx.req.init_body`, `ngx.req.append_body`, and `ngx.req.socket` to implement efficient input filters in pure Lua (in the context of `rewrite_by_lua*` or `access_by_lua*`), which can be used with other NGINX content handler or upstream modules like `ngx_http_proxy_module` and `ngx_http_fastcgi_module`. ---- -function ngx.req.finish_body() end - ---- Returns the original raw HTTP protocol header received by the NGINX server. ---- ---- By default, the request line and trailing `CR LF` terminator will also be included. For example, ---- ---- ```lua ---- ngx.print(ngx.req.raw_header()) ---- ``` ---- ---- gives something like this: ---- ---- GET /t HTTP/1.1 ---- Host: localhost ---- Connection: close ---- Foo: bar ---- ---- You can specify the optional ---- `no_request_line` argument as a `true` value to exclude the request line from the result. For example, ---- ---- ```lua ---- ngx.print(ngx.req.raw_header(true)) ---- ``` ---- ---- outputs something like this: ---- ---- Host: localhost ---- Connection: close ---- Foo: bar ---- ---- This method does not work in HTTP/2 requests yet. ---- ----@param no_request_line? boolean ----@return string -function ngx.req.raw_header(no_request_line) end - ---- Returns a floating-point number representing the timestamp (including milliseconds as the decimal part) when the current request was created. ---- ---- The following example emulates the `$request_time` variable value (provided by `ngx_http_log_module`) in pure Lua: ---- ---- ```lua ---- local request_time = ngx.now() - ngx.req.start_time() ---- ``` ---- ----@return number -function ngx.req.start_time() end - ---- Creates a new blank request body for the current request and inializes the buffer for later request body data writing via the `ngx.req.append_body` and `ngx.req.finish_body` APIs. ---- ---- If the `buffer_size` argument is specified, then its value will be used for the size of the memory buffer for body writing with `ngx.req.append_body`. If the argument is omitted, then the value specified by the standard `client_body_buffer_size` directive will be used instead. ---- ---- When the data can no longer be hold in the memory buffer for the request body, then the data will be flushed onto a temporary file just like the standard request body reader in the NGINX core. ---- ---- It is important to always call the `ngx.req.finish_body` after all the data has been appended onto the current request body. Also, when this function is used together with `ngx.req.socket`, it is required to call `ngx.req.socket` *before* this function, or you will get the "request body already exists" error message. ---- ---- The usage of this function is often like this: ---- ---- ```lua ---- ngx.req.init_body(128 * 1024) -- buffer is 128KB ---- for chunk in next_data_chunk() do ---- ngx.req.append_body(chunk) -- each chunk can be 4KB ---- end ---- ngx.req.finish_body() ---- ``` ---- ---- This function can be used with `ngx.req.append_body`, `ngx.req.finish_body`, and `ngx.req.socket` to implement efficient input filters in pure Lua (in the context of `rewrite_by_lua*` or `access_by_lua*`), which can be used with other NGINX content handler or upstream modules like `ngx_http_proxy_module` and `ngx_http_fastcgi_module`. ---- ----@param buffer_size? number -function ngx.req.init_body(buffer_size) end - ---- Set the current request's request body using the in-file data specified by the `file_name` argument. ---- ---- If the request body has not been read yet, call `ngx.req.read_body` first (or turn on `lua_need_request_body` to force this module to read the request body. This is not recommended however). Additionally, the request body must not have been previously discarded by `ngx.req.discard_body`. ---- ---- If the optional `auto_clean` argument is given a `true` value, then this file will be removed at request completion or the next time this function or `ngx.req.set_body_data` are called in the same request. The `auto_clean` is default to `false`. ---- ---- Please ensure that the file specified by the `file_name` argument exists and is readable by an NGINX worker process by setting its permission properly to avoid Lua exception errors. ---- ---- Whether the previous request body has been read into memory or buffered into a disk file, it will be freed or the disk file will be cleaned up immediately, respectively. ---- ----@param file_name string ----@param auto_clean? boolean -function ngx.req.set_body_file(file_name, auto_clean) end - ---- Clears the current request's request header named `header_name`. None of the current request's existing subrequests will be affected but subsequently initiated subrequests will inherit the change by default. ---- ----@param header_name string -function ngx.req.clear_header(header_name) end - ---- Returns a Lua table holding all the current request headers. ---- ---- ```lua ---- local h, err = ngx.req.get_headers() ---- ---- if err == "truncated" then ---- -- one can choose to ignore or reject the current request here ---- end ---- ---- for k, v in pairs(h) do ---- ... ---- end ---- ``` ---- ---- To read an individual header: ---- ---- ```lua ---- ngx.say("Host: ", ngx.req.get_headers()["Host"]) ---- ``` ---- ---- Note that the `ngx.var.HEADER` API call, which uses core `$http_HEADER` variables, may be more preferable for reading individual request headers. ---- ---- For multiple instances of request headers such as: ---- ---- ```bash ---- Foo: foo ---- Foo: bar ---- Foo: baz ---- ``` ---- ---- the value of `ngx.req.get_headers()["Foo"]` will be a Lua (array) table such as: ---- ---- ```lua ---- {"foo", "bar", "baz"} ---- ``` ---- ---- Note that a maximum of 100 request headers are parsed by default (including those with the same name) and that additional request headers are silently discarded to guard against potential denial of service attacks. When the limit is exceeded, it will return a second value which is the string `"truncated"`. ---- ---- However, the optional `max_headers` function argument can be used to override this limit: ---- ---- ```lua ---- local headers, err = ngx.req.get_headers(10) ---- ---- if err == "truncated" then ---- -- one can choose to ignore or reject the current request here ---- end ---- ``` ---- ---- This argument can be set to zero to remove the limit and to process all request headers received: ---- ---- ```lua ---- local headers, err = ngx.req.get_headers(0) ---- ``` ---- ---- Removing the `max_headers` cap is strongly discouraged. ---- ---- All the header names in the Lua table returned are converted to the pure lower-case form by default, unless the `raw` argument is set to `true` (default to `false`). ---- ---- Also, by default, an `__index` metamethod is added to the resulting Lua table and will normalize the keys to a pure lowercase form with all underscores converted to dashes in case of a lookup miss. For example, if a request header `My-Foo-Header` is present, then the following invocations will all pick up the value of this header correctly: ---- ---- ```lua ---- ngx.say(headers.my_foo_header) ---- ngx.say(headers["My-Foo-Header"]) ---- ngx.say(headers["my-foo-header"]) ---- ``` ---- ---- The `__index` metamethod will not be added when the `raw` argument is set to `true`. ---- ----@param max_headers? number ----@param raw? boolean ----@return table headers ----@return string|'"truncated"' error -function ngx.req.get_headers(max_headers, raw) end - ---- Explicitly discard the request body, i.e., read the data on the connection and throw it away immediately (without using the request body by any means). ---- ---- This function is an asynchronous call and returns immediately. ---- ---- If the request body has already been read, this function does nothing and returns immediately. ---- -function ngx.req.discard_body() end - ---- Set the current request's request header named `header_name` to value `header_value`, overriding any existing ones. ---- ---- By default, all the subrequests subsequently initiated by `ngx.location.capture` and `ngx.location.capture_multi` will inherit the new header. ---- ---- Here is an example of setting the `Content-Type` header: ---- ---- ```lua ---- ngx.req.set_header("Content-Type", "text/css") ---- ``` ---- ---- The `header_value` can take an array list of values, ---- for example, ---- ---- ```lua ---- ngx.req.set_header("Foo", {"a", "abc"}) ---- ``` ---- ---- will produce two new request headers: ---- ---- ```bash ---- Foo: a ---- Foo: abc ---- ``` ---- ---- and old `Foo` headers will be overridden if there is any. ---- ---- When the `header_value` argument is `nil`, the request header will be removed. So ---- ---- ```lua ---- ngx.req.set_header("X-Foo", nil) ---- ``` ---- ---- is equivalent to ---- ---- ```lua ---- ngx.req.clear_header("X-Foo") ---- ``` ---- ----@param header_name string ----@param header_value string|string[]|nil -function ngx.req.set_header(header_name, header_value) end - ---- Retrieves in-memory request body data. It returns a Lua string rather than a Lua table holding all the parsed query arguments. Use the `ngx.req.get_post_args` function instead if a Lua table is required. ---- ---- This function returns `nil` if ---- ---- 1. the request body has not been read, ---- 1. the request body has been read into disk temporary files, ---- 1. or the request body has zero size. ---- ---- If the request body has not been read yet, call `ngx.req.read_body` first (or turn on `lua_need_request_body` to force this module to read the request body. This is not recommended however). ---- ---- If the request body has been read into disk files, try calling the `ngx.req.get_body_file` function instead. ---- ---- To force in-memory request bodies, try setting `client_body_buffer_size` to the same size value in `client_max_body_size`. ---- ---- Note that calling this function instead of using `ngx.var.request_body` or `ngx.var.echo_request_body` is more efficient because it can save one dynamic memory allocation and one data copy. ---- ----@return string? -function ngx.req.get_body_data() end - ---- Reads the client request body synchronously without blocking the NGINX event loop. ---- ---- ```lua ---- ngx.req.read_body() ---- local args = ngx.req.get_post_args() ---- ``` ---- ---- If the request body is already read previously by turning on `lua_need_request_body` or by using other modules, then this function does not run and returns immediately. ---- ---- If the request body has already been explicitly discarded, either by the `ngx.req.discard_body` function or other modules, this function does not run and returns immediately. ---- ---- In case of errors, such as connection errors while reading the data, this method will throw out a Lua exception *or* terminate the current request with a 500 status code immediately. ---- ---- The request body data read using this function can be retrieved later via `ngx.req.get_body_data` or, alternatively, the temporary file name for the body data cached to disk using `ngx.req.get_body_file`. This depends on ---- ---- 1. whether the current request body is already larger than the `client_body_buffer_size`, ---- 1. and whether `client_body_in_file_only` has been switched on. ---- ---- In cases where current request may have a request body and the request body data is not required, The `ngx.req.discard_body` function must be used to explicitly discard the request body to avoid breaking things under HTTP 1.1 keepalive or HTTP 1.1 pipelining. ---- -function ngx.req.read_body() end - ---- Retrieves the file name for the in-file request body data. Returns `nil` if the request body has not been read or has been read into memory. ---- ---- The returned file is read only and is usually cleaned up by NGINX's memory pool. It should not be manually modified, renamed, or removed in Lua code. ---- ---- If the request body has not been read yet, call `ngx.req.read_body` first (or turn on `lua_need_request_body` to force this module to read the request body. This is not recommended however). ---- ---- If the request body has been read into memory, try calling the `ngx.req.get_body_data` function instead. ---- ---- To force in-file request bodies, try turning on `client_body_in_file_only`. ---- ----@return string? filename -function ngx.req.get_body_file() end - ---- Rewrite the current request's URI query arguments by the `args` argument. The `args` argument can be either a Lua string, as in ---- ---- ```lua ---- ngx.req.set_uri_args("a=3&b=hello%20world") ---- ``` ---- ---- or a Lua table holding the query arguments' key-value pairs, as in ---- ---- ```lua ---- ngx.req.set_uri_args({ a = 3, b = "hello world" }) ---- ``` ---- ---- where in the latter case, this method will escape argument keys and values according to the URI escaping rule. ---- ---- Multi-value arguments are also supported: ---- ---- ```lua ---- ngx.req.set_uri_args({ a = 3, b = {5, 6} }) ---- ``` ---- ---- which will result in a query string like `a=3&b=5&b=6`. ---- ----@param args string|table -function ngx.req.set_uri_args(args) end - ---- Encode the Lua table to a query args string according to the URI encoded rules. ---- ---- For example, ---- ---- ```lua ---- ngx.encode_args({foo = 3, ["b r"] = "hello world"}) ---- ``` ---- ---- yields ---- ---- foo=3&b%20r=hello%20world ---- ---- The table keys must be Lua strings. ---- ---- Multi-value query args are also supported. Just use a Lua table for the argument's value, for example: ---- ---- ```lua ---- ngx.encode_args({baz = {32, "hello"}}) ---- ``` ---- ---- gives ---- ---- baz=32&baz=hello ---- ---- If the value table is empty and the effect is equivalent to the `nil` value. ---- ---- Boolean argument values are also supported, for instance, ---- ---- ```lua ---- ngx.encode_args({a = true, b = 1}) ---- ``` ---- ---- yields ---- ---- a&b=1 ---- ---- If the argument value is `false`, then the effect is equivalent to the `nil` value. ---- ----@param args table ----@return string encoded -function ngx.encode_args(args) end - ---- Decodes a URI encoded query-string into a Lua table. This is the inverse function of `ngx.encode_args`. ---- ---- The optional `max_args` argument can be used to specify the maximum number of arguments parsed from the `str` argument. By default, a maximum of 100 request arguments are parsed (including those with the same name) and that additional URI arguments are silently discarded to guard against potential denial of service attacks. When the limit is exceeded, it will return a second value which is the string `"truncated"`. ---- ---- This argument can be set to zero to remove the limit and to process all request arguments received: ---- ---- ```lua ---- local args = ngx.decode_args(str, 0) ---- ``` ---- ---- Removing the `max_args` cap is strongly discouraged. ---- ----@param str string ----@param max_args? number ----@return table args ----@return string|'"truncated"' error -function ngx.decode_args(str, max_args) end - -ngx.socket = {} - ----@class udpsock -local udpsock = {} - ---- Attempts to connect a UDP socket object to a remote server or to a datagram unix domain socket file. Because the datagram protocol is actually connection-less, this method does not really establish a "connection", but only just set the name of the remote peer for subsequent read/write operations. ---- ---- Both IP addresses and domain names can be specified as the `host` argument. In case of domain names, this method will use NGINX core's dynamic resolver to parse the domain name without blocking and it is required to configure the `resolver` directive in the `nginx.conf` file like this: ---- ---- ```nginx ---- resolver 8.8.8.8; # use Google's public DNS nameserver ---- ``` ---- ---- If the nameserver returns multiple IP addresses for the host name, this method will pick up one randomly. ---- ---- In case of error, the method returns `nil` followed by a string describing the error. In case of success, the method returns `1`. ---- ---- Here is an example for connecting to a UDP (memcached) server: ---- ---- ```nginx ---- location /test { ---- resolver 8.8.8.8; ---- ---- content_by_lua_block { ---- local sock = ngx.socket.udp() ---- local ok, err = sock:setpeername("my.memcached.server.domain", 11211) ---- if not ok then ---- ngx.say("failed to connect to memcached: ", err) ---- return ---- end ---- ngx.say("successfully connected to memcached!") ---- sock:close() ---- } ---- } ---- ``` ---- ---- Connecting to a datagram unix domain socket file is also possible on Linux: ---- ---- ```lua ---- local sock = ngx.socket.udp() ---- local ok, err = sock:setpeername("unix:/tmp/some-datagram-service.sock") ---- if not ok then ---- ngx.say("failed to connect to the datagram unix domain socket: ", err) ---- return ---- end ---- ``` ---- ---- assuming the datagram service is listening on the unix domain socket file `/tmp/some-datagram-service.sock` and the client socket will use the "autobind" feature on Linux. ---- ---- Calling this method on an already connected socket object will cause the original connection to be closed first. ---- ----@param host string ----@param port number ----@return boolean ok ----@return string? error ----@overload fun(self:udpsock, unix_socket:string):boolean, string? -function udpsock:setpeername(host, port) end - ---- Sends data on the current UDP or datagram unix domain socket object. ---- ---- In case of success, it returns `1`. Otherwise, it returns `nil` and a string describing the error. ---- ---- The input argument `data` can either be a Lua string or a (nested) Lua table holding string fragments. In case of table arguments, this method will copy all the string elements piece by piece to the underlying NGINX socket send buffers, which is usually optimal than doing string concatenation operations on the Lua land. ---- ----@param data string | string[] ----@return boolean ok ----@return string? error -function udpsock:send(data) end - ---- Receives data from the UDP or datagram unix domain socket object with an optional receive buffer size argument, `size`. ---- ---- This method is a synchronous operation and is 100% nonblocking. ---- ---- In case of success, it returns the data received; in case of error, it returns `nil` with a string describing the error. ---- ---- If the `size` argument is specified, then this method will use this size as the receive buffer size. But when this size is greater than `8192`, then `8192` will be used instead. ---- ---- If no argument is specified, then the maximal buffer size, `8192` is assumed. ---- ---- Timeout for the reading operation is controlled by the `lua_socket_read_timeout` config directive and the `settimeout` method. And the latter takes priority. For example: ---- ---- ```lua ---- sock:settimeout(1000) -- one second timeout ---- local data, err = sock:receive() ---- if not data then ---- ngx.say("failed to read a packet: ", err) ---- return ---- end ---- ngx.say("successfully read a packet: ", data) ---- ``` ---- ---- It is important here to call the `settimeout` method *before* calling this method. ---- ----@param size? number ----@return string? data ----@return string? error -function udpsock:receive(size) end - - ---- Closes the current UDP or datagram unix domain socket. It returns the `1` in case of success and returns `nil` with a string describing the error otherwise. ---- ---- Socket objects that have not invoked this method (and associated connections) will be closed when the socket object is released by the Lua GC (Garbage Collector) or the current client HTTP request finishes processing. ---- ----@return boolean ok ----@return string? error -function udpsock:close() end - ---- Set the timeout value in milliseconds for subsequent socket operations (like `receive`). ---- ---- Settings done by this method takes priority over those config directives, like `lua_socket_read_timeout`. ---- ----@param time number -function udpsock:settimeout(time) end - ---- Creates and returns a TCP or stream-oriented unix domain socket object (also known as one type of the "cosocket" objects). The following methods are supported on this object: ---- ---- * `connect` ---- * `sslhandshake` ---- * `send` ---- * `receive` ---- * `close` ---- * `settimeout` ---- * `settimeouts` ---- * `setoption` ---- * `receiveany` ---- * `receiveuntil` ---- * `setkeepalive` ---- * `getreusedtimes` ---- ---- It is intended to be compatible with the TCP API of the `LuaSocket` library but is 100% nonblocking out of the box. ---- ---- The cosocket object created by this API function has exactly the same lifetime as the Lua handler creating it. So never pass the cosocket object to any other Lua handler (including ngx.timer callback functions) and never share the cosocket object between different NGINX requests. ---- ---- For every cosocket object's underlying connection, if you do not ---- explicitly close it (via `close`) or put it back to the connection ---- pool (via `setkeepalive`), then it is automatically closed when one of ---- the following two events happens: ---- ---- * the current request handler completes, or ---- * the Lua cosocket object value gets collected by the Lua GC. ---- ---- Fatal errors in cosocket operations always automatically close the current ---- connection (note that, read timeout error is the only error that is ---- not fatal), and if you call `close` on a closed connection, you will get ---- the "closed" error. ---- ---- The cosocket object here is full-duplex, that is, a reader "light thread" and a writer "light thread" can operate on a single cosocket object simultaneously (both "light threads" must belong to the same Lua handler though, see reasons above). But you cannot have two "light threads" both reading (or writing or connecting) the same cosocket, otherwise you might get an error like "socket busy reading" when calling the methods of the cosocket object. ---- ----@return tcpsock -function ngx.socket.tcp() end - ----@class tcpsock -local tcpsock = {} - ---- Attempts to connect a TCP socket object to a remote server or to a stream unix domain socket file without blocking. ---- ---- Before actually resolving the host name and connecting to the remote backend, this method will always look up the connection pool for matched idle connections created by previous calls of this method (or the `ngx.socket.connect` function). ---- ---- Both IP addresses and domain names can be specified as the `host` argument. In case of domain names, this method will use NGINX core's dynamic resolver to parse the domain name without blocking and it is required to configure the `resolver` directive in the `nginx.conf` file like this: ---- ---- ```nginx ---- resolver 8.8.8.8; # use Google's public DNS nameserver ---- ``` ---- ---- If the nameserver returns multiple IP addresses for the host name, this method will pick up one randomly. ---- ---- In case of error, the method returns `nil` followed by a string describing the error. In case of success, the method returns `1`. ---- ---- Here is an example for connecting to a TCP server: ---- ---- ```nginx ---- location /test { ---- resolver 8.8.8.8; ---- ---- content_by_lua_block { ---- local sock = ngx.socket.tcp() ---- local ok, err = sock:connect("www.google.com", 80) ---- if not ok then ---- ngx.say("failed to connect to google: ", err) ---- return ---- end ---- ngx.say("successfully connected to google!") ---- sock:close() ---- } ---- } ---- ``` ---- ---- Connecting to a Unix Domain Socket file is also possible: ---- ---- ```lua ---- local sock = ngx.socket.tcp() ---- local ok, err = sock:connect("unix:/tmp/memcached.sock") ---- if not ok then ---- ngx.say("failed to connect to the memcached unix domain socket: ", err) ---- return ---- end ---- ``` ---- ---- assuming memcached (or something else) is listening on the unix domain socket file `/tmp/memcached.sock`. ---- ---- Timeout for the connecting operation is controlled by the `lua_socket_connect_timeout` config directive and the `settimeout` method. And the latter takes priority. For example: ---- ---- ```lua ---- local sock = ngx.socket.tcp() ---- sock:settimeout(1000) -- one second timeout ---- local ok, err = sock:connect(host, port) ---- ``` ---- ---- It is important here to call the `settimeout` method *before* calling this method. ---- ---- Calling this method on an already connected socket object will cause the original connection to be closed first. ---- ----@param host string ----@param port number ----@param opts? tcpsock.connect.opts ----@return boolean ok ----@return string? error ----@overload fun(self:tcpsock, unix_socket:string, opts?:tcpsock.connect.opts):boolean, string? -function tcpsock:connect(host, port, opts) end - ---- An optional Lua table can be specified as the last argument to `tcpsock:connect()` ---- ----@class tcpsock.connect.opts : table ---- ---- A custom name for the connection pool being used. If omitted, then the connection pool name will be generated from the string template `":"` or `""`. ----@field pool string ---- ---- The size of the connection pool. If omitted and no `backlog` option was provided, no pool will be created. If omitted but `backlog` was provided, the pool will be created with a default size equal to the value of the `lua_socket_pool_size` directive. The connection pool holds up to `pool_size` alive connections ready to be reused by subsequent calls to `connect`, but note that there is no upper limit to the total number of opened connections outside of the pool. If you need to restrict the total number of opened connections, specify the `backlog` option. When the connection pool would exceed its size limit, the least recently used (kept-alive) connection already in the pool will be closed to make room for the current connection. Note that the cosocket connection pool is per NGINX worker process rather than per NGINX server instance, so the size limit specified here also applies to every single NGINX worker process. Also note that the size of the connection pool cannot be changed once it has been created. ----@field pool_size number ---- ---- Limits the total number of opened connections for this pool. No more connections than `pool_size` can be opened for this pool at any time. If the connection pool is full, subsequent connect operations will be queued into a queue equal to this option's value (the "backlog" queue). If the number of queued connect operations is equal to `backlog`, subsequent connect operations will fail and return `nil` plus the error string `"too many waiting connect operations"`. The queued connect operations will be resumed once the number of connections in the pool is less than `pool_size`. The queued connect operation will abort once they have been queued for more than `connect_timeout`, controlled by `settimeouts`, and will return `nil` plus the error string `"timeout"`. ----@field backlog number - - ---- Does SSL/TLS handshake on the currently established connection. ---- ---- The optional `reused_session` argument can take a former SSL ---- session userdata returned by a previous `sslhandshake` ---- call for exactly the same target. For short-lived connections, reusing SSL ---- sessions can usually speed up the handshake by one order by magnitude but it ---- is not so useful if the connection pool is enabled. This argument defaults to ---- `nil`. If this argument takes the boolean `false` value, no SSL session ---- userdata would return by this call and only a Lua boolean will be returned as ---- the first return value; otherwise the current SSL session will ---- always be returned as the first argument in case of successes. ---- ---- The optional `server_name` argument is used to specify the server ---- name for the new TLS extension Server Name Indication (SNI). Use of SNI can ---- make different servers share the same IP address on the server side. Also, ---- when SSL verification is enabled, this `server_name` argument is ---- also used to validate the server name specified in the server certificate sent from ---- the remote. ---- ---- The optional `ssl_verify` argument takes a Lua boolean value to ---- control whether to perform SSL verification. When set to `true`, the server ---- certificate will be verified according to the CA certificates specified by ---- the `lua_ssl_trusted_certificate` directive. ---- You may also need to adjust the `lua_ssl_verify_depth` ---- directive to control how deep we should follow along the certificate chain. ---- Also, when the `ssl_verify` argument is true and the ---- `server_name` argument is also specified, the latter will be used ---- to validate the server name in the server certificate. ---- ---- The optional `send_status_req` argument takes a boolean that controls whether to send ---- the OCSP status request in the SSL handshake request (which is for requesting OCSP stapling). ---- ---- For connections that have already done SSL/TLS handshake, this method returns ---- immediately. ---- ----@param reused_session? userdata|boolean ----@param server_name? string ----@param ssl_verify? boolean ----@param send_status_req? boolean ----@return userdata|boolean session_or_ok ----@return string? error -function tcpsock:sslhandshake(reused_session, server_name, ssl_verify, send_status_req) end - ---- Set client certificate chain and corresponding private key to the TCP socket object. ---- ---- The certificate chain and private key provided will be used later by the `tcpsock:sslhandshake` method. ---- ---- If both of `cert` and `pkey` are `nil`, this method will clear any existing client certificate and private key that was previously set on the cosocket object ---- ----@param cert ffi.cdata*|nil # a client certificate chain cdata object that will be used while handshaking with remote server. These objects can be created using ngx.ssl.parse_pem_cert function provided by lua-resty-core. Note that specifying the cert option requires corresponding pkey be provided too. ----@param key ffi.cdata*|nil # a private key corresponds to the cert option above. These objects can be created using ngx.ssl.parse_pem_priv_key function provided by lua-resty-core. ----@return boolean ok ----@return string? error -function tcpsock:setclientcert(cert, key) end - - ---- Sends data without blocking on the current TCP or Unix Domain Socket connection. ---- ---- This method is a synchronous operation that will not return until *all* the data has been flushed into the system socket send buffer or an error occurs. ---- ---- In case of success, it returns the total number of bytes that have been sent. Otherwise, it returns `nil` and a string describing the error. ---- ---- The input argument `data` can either be a Lua string or a (nested) Lua table holding string fragments. In case of table arguments, this method will copy all the string elements piece by piece to the underlying NGINX socket send buffers, which is usually optimal than doing string concatenation operations on the Lua land. ---- ---- Timeout for the sending operation is controlled by the `lua_socket_send_timeout` config directive and the `settimeout` method. And the latter takes priority. For example: ---- ---- ```lua ---- sock:settimeout(1000) -- one second timeout ---- local bytes, err = sock:send(request) ---- ``` ---- ---- It is important here to call the `settimeout` method *before* calling this method. ---- ---- In case of any connection errors, this method always automatically closes the current connection. ---- ----@param data string|string[] ----@return number? bytes ----@return string? error -function tcpsock:send(data) end - - ---- Receives data from the connected socket according to the reading pattern or size. ---- ---- This method is a synchronous operation just like the `send` method and is 100% nonblocking. ---- ---- In case of success, it returns the data received; in case of error, it returns `nil` with a string describing the error and the partial data received so far. ---- ---- If a non-number-like string argument is specified, then it is interpreted as a "pattern". The following patterns are supported: ---- ---- * `'*a'`: reads from the socket until the connection is closed. No end-of-line translation is performed; ---- * `'*l'`: reads a line of text from the socket. The line is terminated by a `Line Feed` (LF) character (ASCII 10), optionally preceded by a `Carriage Return` (CR) character (ASCII 13). The CR and LF characters are not included in the returned line. In fact, all CR characters are ignored by the pattern. ---- ---- If no argument is specified, then it is assumed to be the pattern `'*l'`, that is, the line reading pattern. ---- ---- If a number-like argument is specified (including strings that look like numbers), then it is interpreted as a size. This method will not return until it reads exactly this size of data or an error occurs. ---- ---- ---- Timeout for the reading operation is controlled by the `lua_socket_read_timeout` config directive and the `settimeout` method. And the latter takes priority. For example: ---- ---- ```lua ---- sock:settimeout(1000) -- one second timeout ---- local line, err, partial = sock:receive() ---- if not line then ---- ngx.say("failed to read a line: ", err) ---- return ---- end ---- ngx.say("successfully read a line: ", line) ---- ``` ---- ---- It is important here to call the `settimeout` method *before* calling this method. ---- ---- This method does not automatically closes the current connection when the read timeout error happens. For other connection errors, this method always automatically closes the connection. ---- ----@overload fun(self:tcpsock, size:number):string,string,string ---- ----@param pattern? '"*a"'|'"*l"' ----@return string? data ----@return string? error ----@return string? partial -function tcpsock:receive(pattern) end - ---- Returns any data received by the connected socket, at most `max` bytes. ---- ---- This method is a synchronous operation just like the `send` method and is 100% nonblocking. ---- ---- In case of success, it returns the data received; in case of error, it returns `nil` with a string describing the error. ---- ---- If the received data is more than this size, this method will return with exactly this size of data. ---- The remaining data in the underlying receive buffer could be returned in the next reading operation. ---- ---- Timeout for the reading operation is controlled by the `lua_socket_read_timeout` config directive and the `settimeouts` method. And the latter takes priority. For example: ---- ---- ```lua ---- sock:settimeouts(1000, 1000, 1000) -- one second timeout for connect/read/write ---- local data, err = sock:receiveany(10 * 1024) -- read any data, at most 10K ---- if not data then ---- ngx.say("failed to read any data: ", err) ---- return ---- end ---- ngx.say("successfully read: ", data) ---- ``` ---- ---- This method doesn't automatically close the current connection when the read timeout error occurs. For other connection errors, this method always automatically closes the connection. ---- ----@param max integer ----@return string? data ----@return string? error -function tcpsock:receiveany(max) end - - ---- This method returns an iterator Lua function that can be called to read the data stream until it sees the specified pattern or an error occurs. ---- ---- Here is an example for using this method to read a data stream with the boundary sequence `--abcedhb`: ---- ---- ```lua ---- local reader = sock:receiveuntil("\r\n--abcedhb") ---- local data, err, partial = reader() ---- if not data then ---- ngx.say("failed to read the data stream: ", err) ---- end ---- ngx.say("read the data stream: ", data) ---- ``` ---- ---- When called without any argument, the iterator function returns the received data right *before* the specified pattern string in the incoming data stream. So for the example above, if the incoming data stream is `'hello, world! -agentzh\r\n--abcedhb blah blah'`, then the string `'hello, world! -agentzh'` will be returned. ---- ---- In case of error, the iterator function will return `nil` along with a string describing the error and the partial data bytes that have been read so far. ---- ---- The iterator function can be called multiple times and can be mixed safely with other cosocket method calls or other iterator function calls. ---- ---- The iterator function behaves differently (i.e., like a real iterator) when it is called with a `size` argument. That is, it will read that `size` of data on each invocation and will return `nil` at the last invocation (either sees the boundary pattern or meets an error). For the last successful invocation of the iterator function, the `err` return value will be `nil` too. The iterator function will be reset after the last successful invocation that returns `nil` data and `nil` error. Consider the following example: ---- ---- ```lua ---- local reader = sock:receiveuntil("\r\n--abcedhb") ---- ---- while true do ---- local data, err, partial = reader(4) ---- if not data then ---- if err then ---- ngx.say("failed to read the data stream: ", err) ---- break ---- end ---- ---- ngx.say("read done") ---- break ---- end ---- ngx.say("read chunk: [", data, "]") ---- end ---- ``` ---- ---- Then for the incoming data stream `'hello, world! -agentzh\r\n--abcedhb blah blah'`, we shall get the following output from the sample code above: ---- ---- read chunk: [hell] ---- read chunk: [o, w] ---- read chunk: [orld] ---- read chunk: [! -a] ---- read chunk: [gent] ---- read chunk: [zh] ---- read done ---- ---- Note that, the actual data returned *might* be a little longer than the size limit specified by the `size` argument when the boundary pattern has ambiguity for streaming parsing. Near the boundary of the data stream, the data string actually returned could also be shorter than the size limit. ---- ---- Timeout for the iterator function's reading operation is controlled by the `lua_socket_read_timeout` config directive and the `settimeout` method. And the latter takes priority. For example: ---- ---- ```lua ---- local readline = sock:receiveuntil("\r\n") ---- ---- sock:settimeout(1000) -- one second timeout ---- line, err, partial = readline() ---- if not line then ---- ngx.say("failed to read a line: ", err) ---- return ---- end ---- ngx.say("successfully read a line: ", line) ---- ``` ---- ---- It is important here to call the `settimeout` method *before* calling the iterator function (note that the `receiveuntil` call is irrelevant here). ---- ---- This method also takes an optional `options` table argument to control the behavior. The following options are supported: ---- ---- * `inclusive` ---- ---- The `inclusive` takes a boolean value to control whether to include the pattern string in the returned data string. Default to `false`. For example, ---- ---- ```lua ---- local reader = tcpsock:receiveuntil("_END_", { inclusive = true }) ---- local data = reader() ---- ngx.say(data) ---- ``` ---- ---- Then for the input data stream `"hello world _END_ blah blah blah"`, then the example above will output `hello world _END_`, including the pattern string `_END_` itself. ---- ---- This method does not automatically closes the current connection when the read timeout error happens. For other connection errors, this method always automatically closes the connection. ---- ----@alias ngx.socket.tcpsock.iterator fun(size:number|nil):string,string,any ---- ----@overload fun(self:tcpsock, size:number, options:table):ngx.socket.tcpsock.iterator ---- ----@param pattern string ----@param options? table ----@return ngx.socket.tcpsock.iterator -function tcpsock:receiveuntil(pattern, options) end - - ---- Closes the current TCP or stream unix domain socket. It returns the `1` in case of success and returns `nil` with a string describing the error otherwise. ---- ---- Note that there is no need to call this method on socket objects that have invoked the `setkeepalive` method because the socket object is already closed (and the current connection is saved into the built-in connection pool). ---- ---- Socket objects that have not invoked this method (and associated connections) will be closed when the socket object is released by the Lua GC (Garbage Collector) or the current client HTTP request finishes processing. ---- ----@return boolean ok ----@return string? error -function tcpsock:close() end - - ---- Set the timeout value in milliseconds for subsequent socket operations (`connect`, `receive`, and iterators returned from `receiveuntil`). ---- ---- Settings done by this method take priority over those specified via config directives (i.e. `lua_socket_connect_timeout`, `lua_socket_send_timeout`, and `lua_socket_read_timeout`). ---- ---- Note that this method does *not* affect the `lua_socket_keepalive_timeout` setting; the `timeout` argument to the `setkeepalive` method should be used for this purpose instead. ---- ----@param time number -function tcpsock:settimeout(time) end - - ---- Respectively sets the connect, send, and read timeout thresholds (in milliseconds) for subsequent socket ---- operations (`connect`, `send`, `receive`, and iterators returned from `receiveuntil`). ---- ---- Settings done by this method take priority over those specified via config directives (i.e. `lua_socket_connect_timeout`, `lua_socket_send_timeout`, and `lua_socket_read_timeout`). ---- ---- It is recommended to use `settimeouts` instead of `settimeout`. ---- ---- Note that this method does *not* affect the `lua_socket_keepalive_timeout` setting; the `timeout` argument to the `setkeepalive` method should be used for this purpose instead. ---- ----@param connect_timeout number|nil ----@param send_timeout number|nil ----@param read_timeout number|nil -function tcpsock:settimeouts(connect_timeout, send_timeout, read_timeout) end - - ---- This function is added for `LuaSocket` API compatibility and does nothing for now. ---- ---- In case of success, it returns `true`. Otherwise, it returns nil and a string describing the error. ---- ---- The `option` is a string with the option name, and the value depends on the option being set: ---- ---- * `keepalive` ---- ---- Setting this option to true enables sending of keep-alive messages on ---- connection-oriented sockets. Make sure the `connect` function ---- had been called before, for example, ---- ---- ```lua ---- local ok, err = tcpsock:setoption("keepalive", true) ---- if not ok then ---- ngx.say("setoption keepalive failed: ", err) ---- end ---- ``` ---- * `reuseaddr` ---- ---- Enabling this option indicates that the rules used in validating addresses ---- supplied in a call to bind should allow reuse of local addresses. Make sure ---- the `connect` function had been called before, for example, ---- ---- ```lua ---- local ok, err = tcpsock:setoption("reuseaddr", 0) ---- if not ok then ---- ngx.say("setoption reuseaddr failed: ", err) ---- end ---- ``` ---- * `tcp-nodelay` ---- ---- Setting this option to true disables the Nagle's algorithm for the connection. ---- Make sure the `connect` function had been called before, for example, ---- ---- ```lua ---- local ok, err = tcpsock:setoption("tcp-nodelay", true) ---- if not ok then ---- ngx.say("setoption tcp-nodelay failed: ", err) ---- end ---- ``` ---- * `sndbuf` ---- ---- Sets the maximum socket send buffer in bytes. The kernel doubles this value ---- (to allow space for bookkeeping overhead) when it is set using setsockopt(). ---- Make sure the `connect` function had been called before, for example, ---- ---- ```lua ---- local ok, err = tcpsock:setoption("sndbuf", 1024 * 10) ---- if not ok then ---- ngx.say("setoption sndbuf failed: ", err) ---- end ---- ``` ---- * `rcvbuf` ---- ---- Sets the maximum socket receive buffer in bytes. The kernel doubles this value ---- (to allow space for bookkeeping overhead) when it is set using setsockopt. Make ---- sure the `connect` function had been called before, for example, ---- ---- ```lua ---- local ok, err = tcpsock:setoption("rcvbuf", 1024 * 10) ---- if not ok then ---- ngx.say("setoption rcvbuf failed: ", err) ---- end ---- ``` ---- ---- NOTE: Once the option is set, it will become effective until the connection is closed. If you know the connection is from the connection pool and all the in-pool connections already have called the setoption() method with the desired socket option state, then you can just skip calling setoption() again to avoid the overhead of repeated calls, for example, ---- ---- ```lua ---- local count, err = tcpsock:getreusedtimes() ---- if not count then ---- ngx.say("getreusedtimes failed: ", err) ---- return ---- end ---- ---- if count == 0 then ---- local ok, err = tcpsock:setoption("rcvbuf", 1024 * 10) ---- if not ok then ---- ngx.say("setoption rcvbuf failed: ", err) ---- return ---- end ---- end ---- ``` ---- ----@param option tcpsock.setoption.option ----@param value number|boolean ----@return boolean ok ----@return string? error -function tcpsock:setoption(option, value) end - ----@alias tcpsock.setoption.option ----| '"keepalive"' # enable or disable keepalive ----| '"reuseaddr"' # reuse addr options ----| '"tcp-nodelay"' # disables the Nagle's algorithm for the connection. ----| '"sndbuf"' # max send buffer size (in bytes) ----| '"rcvbuf"' # max receive bufer size (in bytes) - - - ---- Puts the current socket's connection immediately into the cosocket built-in connection pool and keep it alive until other `connect` method calls request it or the associated maximal idle timeout is expired. ---- ---- The first optional argument, `timeout`, can be used to specify the maximal idle timeout (in milliseconds) for the current connection. If omitted, the default setting in the `lua_socket_keepalive_timeout` config directive will be used. If the `0` value is given, then the timeout interval is unlimited. ---- ---- The second optional argument `size` is considered deprecated since the `v0.10.14` release of this module, in favor of the `pool_size` option of the `connect` method. ---- Since the `v0.10.14` release, this option will only take effect if the call to `connect` did not already create a connection pool. ---- When this option takes effect (no connection pool was previously created by `connect`), it will specify the size of the connection pool, and create it. ---- If omitted (and no pool was previously created), the default size is the value of the `lua_socket_pool_size` directive. ---- The connection pool holds up to `size` alive connections ready to be reused by subsequent calls to `connect`, but note that there is no upper limit to the total number of opened connections outside of the pool. ---- When the connection pool would exceed its size limit, the least recently used (kept-alive) connection already in the pool will be closed to make room for the current connection. ---- Note that the cosocket connection pool is per NGINX worker process rather than per NGINX server instance, so the size limit specified here also applies to every single NGINX worker process. Also note that the size of the connection pool cannot be changed once it has been created. ---- If you need to restrict the total number of opened connections, specify both the `pool_size` and `backlog` option in the call to `connect`. ---- ---- In case of success, this method returns `1`; otherwise, it returns `nil` and a string describing the error. ---- ---- When the system receive buffer for the current connection has unread data, then this method will return the "connection in dubious state" error message (as the second return value) because the previous session has unread data left behind for the next session and the connection is not safe to be reused. ---- ---- This method also makes the current cosocket object enter the "closed" state, so there is no need to manually call the `close` method on it afterwards. ---- ----@param timeout? number ----@param size? number ----@return boolean ok ----@return string? error -function tcpsock:setkeepalive(timeout, size) end - - ---- This method returns the (successfully) reused times for the current connection. In case of error, it returns `nil` and a string describing the error. ---- ---- If the current connection does not come from the built-in connection pool, then this method always returns `0`, that is, the connection has never been reused (yet). If the connection comes from the connection pool, then the return value is always non-zero. So this method can also be used to determine if the current connection comes from the pool. ---- ----@return number? count ----@return string? error -function tcpsock:getreusedtimes() end - ---- This function is a shortcut for combining `ngx.socket.tcp()` and the `connect()` method call in a single operation. It is actually implemented like this: ---- ---- ```lua ---- local sock = ngx.socket.tcp() ---- local ok, err = sock:connect(...) ---- if not ok then ---- return nil, err ---- end ---- return sock ---- ``` ---- ---- There is no way to use the `settimeout` method to specify connecting timeout for this method and the `lua_socket_connect_timeout` directive must be set at configure time instead. ---- ----@param host string ----@param port? number ----@return tcpsock? socket ----@return string? error -function ngx.socket.connect(host, port) end - ---- Creates and returns a UDP or datagram-oriented unix domain socket object (also known as one type of the "cosocket" objects). The following methods are supported on this object: ---- ---- * `setpeername` ---- * `send` ---- * `receive` ---- * `close` ---- * `settimeout` ---- ---- It is intended to be compatible with the UDP API of the `LuaSocket` library but is 100% nonblocking out of the box. ---- ----@return udpsock -function ngx.socket.udp() end - ---- Just an alias to `ngx.socket.tcp`. If the stream-typed cosocket may also connect to a unix domain ---- socket, then this API name is preferred. ---- -function ngx.socket.stream() end - ---- When this is used in the context of the `set_by_lua*` directives, this table is read-only and holds the input arguments to the config directives: ---- ---- ```lua ---- value = ngx.arg[n] ---- ``` ---- ---- Here is an example ---- ---- ```nginx ---- location /foo { ---- set $a 32; ---- set $b 56; ---- ---- set_by_lua $sum ---- 'return tonumber(ngx.arg[1]) + tonumber(ngx.arg[2])' ---- $a $b; ---- ---- echo $sum; ---- } ---- ``` ---- ---- that writes out `88`, the sum of `32` and `56`. ---- ---- When this table is used in the context of `body_filter_by_lua*`, the first element holds the input data chunk to the output filter code and the second element holds the boolean flag for the "eof" flag indicating the end of the whole output data stream. ---- ---- The data chunk and "eof" flag passed to the downstream NGINX output filters can also be overridden by assigning values directly to the corresponding table elements. When setting `nil` or an empty Lua string value to `ngx.arg[1]`, no data chunk will be passed to the downstream NGINX output filters at all. -ngx.arg = {} - ----@alias ngx.phase.name ----| '"init"' ----| '"init_worker"' ----| '"ssl_cert"' ----| '"ssl_session_fetch"' ----| '"ssl_session_store"' ----| '"set"' ----| '"rewrite"' ----| '"balancer"' ----| '"access"' ----| '"content"' ----| '"header_filter"' ----| '"body_filter"' ----| '"log"' ----| '"timer"' - ---- Retrieves the current running phase name. ---- ----@return ngx.phase.name -function ngx.get_phase() end - - ---- When `status >= 200` (i.e., `ngx.HTTP_OK` and above), it will interrupt the execution of the current request and return status code to NGINX. ---- ---- When `status == 0` (i.e., `ngx.OK`), it will only quit the current phase handler (or the content handler if the `content_by_lua*` directive is used) and continue to run later phases (if any) for the current request. ---- ---- The `status` argument can be `ngx.OK`, `ngx.ERROR`, `ngx.HTTP_NOT_FOUND`, ---- `ngx.HTTP_MOVED_TEMPORARILY`, or other `ngx.HTTP_*` status constants. ---- ---- To return an error page with custom contents, use code snippets like this: ---- ---- ```lua ---- ngx.status = ngx.HTTP_GONE ---- ngx.say("This is our own content") ---- -- to cause quit the whole request rather than the current phase handler ---- ngx.exit(ngx.HTTP_OK) ---- ``` ---- ---- The effect in action: ---- ---- ```bash ---- $ curl -i http://localhost/test ---- HTTP/1.1 410 Gone ---- Server: nginx/1.0.6 ---- Date: Thu, 15 Sep 2011 00:51:48 GMT ---- Content-Type: text/plain ---- Transfer-Encoding: chunked ---- Connection: keep-alive ---- ---- This is our own content ---- ``` ---- ---- Number literals can be used directly as the argument, for instance, ---- ---- ```lua ---- ngx.exit(501) ---- ``` ---- ---- Note that while this method accepts all `ngx.HTTP_*` status constants as input, it only accepts `ngx.OK` and `ngx.ERROR` of the `core constants`. ---- ---- Also note that this method call terminates the processing of the current request and that it is recommended that a coding style that combines this method call with the `return` statement, i.e., `return ngx.exit(...)` be used to reinforce the fact that the request processing is being terminated. ---- ---- When being used in the contexts of `header_filter_by_lua*`, `balancer_by_lua*`, and ---- `ssl_session_store_by_lua*`, `ngx.exit()` is ---- an asynchronous operation and will return immediately. This behavior may change in future and it is recommended that users always use `return` in combination as suggested above. ---- ----@param status ngx.OK|ngx.ERROR|ngx.http.status_code -function ngx.exit(status) end - ---- Issue an `HTTP 301` or `302` redirection to `uri`. ---- ---- Notice: the `uri` should not contains `\r` or `\n`, otherwise, the characters after `\r` or `\n` will be truncated, including the `\r` or `\n` bytes themself. ---- ---- The `uri` argument will be truncated if it contains the ---- `\r` or `\n` characters. The truncated value will contain ---- all characters up to (and excluding) the first occurrence of `\r` or ---- `\n`. ---- ---- The optional `status` parameter specifies the HTTP status code to be used. The following status codes are supported right now: ---- ---- * `301` ---- * `302` (default) ---- * `303` ---- * `307` ---- * `308` ---- ---- It is `302` (`ngx.HTTP_MOVED_TEMPORARILY`) by default. ---- ---- Here is an example assuming the current server name is `localhost` and that it is listening on port 1984: ---- ---- ```lua ---- return ngx.redirect("/foo") ---- ``` ---- ---- which is equivalent to ---- ---- ```lua ---- return ngx.redirect("/foo", ngx.HTTP_MOVED_TEMPORARILY) ---- ``` ---- ---- Redirecting arbitrary external URLs is also supported, for example: ---- ---- ```lua ---- return ngx.redirect("http://www.google.com") ---- ``` ---- ---- We can also use the numerical code directly as the second `status` argument: ---- ---- ```lua ---- return ngx.redirect("/foo", 301) ---- ``` ---- ---- This method is similar to the `rewrite` directive with the `redirect` modifier in the standard ---- `ngx_http_rewrite_module`, for example, this `nginx.conf` snippet ---- ---- ```nginx ---- rewrite ^ /foo? redirect; # nginx config ---- ``` ---- ---- is equivalent to the following Lua code ---- ---- ```lua ---- return ngx.redirect('/foo'); -- Lua code ---- ``` ---- ---- while ---- ---- ```nginx ---- rewrite ^ /foo? permanent; # nginx config ---- ``` ---- ---- is equivalent to ---- ---- ```lua ---- return ngx.redirect('/foo', ngx.HTTP_MOVED_PERMANENTLY) -- Lua code ---- ``` ---- ---- URI arguments can be specified as well, for example: ---- ---- ```lua ---- return ngx.redirect('/foo?a=3&b=4') ---- ``` ---- ---- Note that this method call terminates the processing of the current request and that it *must* be called before `ngx.send_headers` or explicit response body ---- outputs by either `ngx.print` or `ngx.say`. ---- ---- It is recommended that a coding style that combines this method call with the `return` statement, i.e., `return ngx.redirect(...)` be adopted when this method call is used in contexts other than `header_filter_by_lua*` to reinforce the fact that the request processing is being terminated. ---- ----@param uri string ----@param status? 301|302|303|307|308 -function ngx.redirect(uri, status) end - - ---- Registers a user Lua function as the callback which gets called automatically when the client closes the (downstream) connection prematurely. ---- ---- Returns `1` if the callback is registered successfully or returns `nil` and a string describing the error otherwise. ---- ---- All the NGINX APIs for lua can be used in the callback function because the function is run in a special "light thread", just as those "light threads" created by `ngx.thread.spawn`. ---- ---- The callback function can decide what to do with the client abortion event all by itself. For example, it can simply ignore the event by doing nothing and the current Lua request handler will continue executing without interruptions. And the callback function can also decide to terminate everything by calling `ngx.exit`, for example, ---- ---- ```lua ---- local function my_cleanup() ---- -- custom cleanup work goes here, like cancelling a pending DB transaction ---- ---- -- now abort all the "light threads" running in the current request handler ---- ngx.exit(499) ---- end ---- ---- local ok, err = ngx.on_abort(my_cleanup) ---- if not ok then ---- ngx.log(ngx.ERR, "failed to register the on_abort callback: ", err) ---- ngx.exit(500) ---- end ---- ``` ---- ---- When `lua_check_client_abort` is set to `off` (which is the default), then this function call will always return the error message "lua_check_client_abort is off". ---- ---- According to the current implementation, this function can only be called once in a single request handler; subsequent calls will return the error message "duplicate call". ---- ----@param callback fun() ----@return boolean ok ----@return string|'"lua_check_client_abort is off"'|'"duplicate call"' error -function ngx.on_abort(callback) end - - ---- Does an internal redirect to `uri` with `args` and is similar to the `echo_exec` directive of the `echo-nginx-module`. ---- ---- ```lua ---- ngx.exec('/some-location'); ---- ngx.exec('/some-location', 'a=3&b=5&c=6'); ---- ngx.exec('/some-location?a=3&b=5', 'c=6'); ---- ``` ---- ---- The optional second `args` can be used to specify extra URI query arguments, for example: ---- ---- ```lua ---- ngx.exec("/foo", "a=3&b=hello%20world") ---- ``` ---- ---- Alternatively, a Lua table can be passed for the `args` argument for ngx_lua to carry out URI escaping and string concatenation. ---- ---- ```lua ---- ngx.exec("/foo", { a = 3, b = "hello world" }) ---- ``` ---- ---- The result is exactly the same as the previous example. ---- ---- The format for the Lua table passed as the `args` argument is identical to the format used in the `ngx.encode_args` method. ---- ---- Named locations are also supported but the second `args` argument will be ignored if present and the querystring for the new target is inherited from the referring location (if any). ---- ---- `GET /foo/file.php?a=hello` will return "hello" and not "goodbye" in the example below ---- ---- ```nginx ---- location /foo { ---- content_by_lua_block { ---- ngx.exec("@bar", "a=goodbye"); ---- } ---- } ---- ---- location @bar { ---- content_by_lua_block { ---- local args = ngx.req.get_uri_args() ---- for key, val in pairs(args) do ---- if key == "a" then ---- ngx.say(val) ---- end ---- end ---- } ---- } ---- ``` ---- ---- Note that the `ngx.exec` method is different from `ngx.redirect` in that ---- it is purely an internal redirect and that no new external HTTP traffic is involved. ---- ---- Also note that this method call terminates the processing of the current request and that it *must* be called before `ngx.send_headers` or explicit response body ---- outputs by either `ngx.print` or `ngx.say`. ---- ---- It is recommended that a coding style that combines this method call with the `return` statement, i.e., `return ngx.exec(...)` be adopted when this method call is used in contexts other than `header_filter_by_lua*` to reinforce the fact that the request processing is being terminated. ---- ----@param uri string ----@param args? string|table -function ngx.exec(uri, args) end - -ngx.location = {} - ----@class ngx.location.capture.response : table ----@field status integer # response status code ----@field header table # response headers ----@field body string # response body ----@field truncated boolean # truth-y if the response body is truncated. You always need to check the `res.truncated` boolean flag to see if `res.body` contains truncated data. The data truncation here can only be caused by those unrecoverable errors in your subrequests like the cases that the remote end aborts the connection prematurely in the middle of the response body data stream or a read timeout happens when your subrequest is receiving the response body data from the remote. - ---- An optional option table can be fed as the second argument, which supports the options: ---- ----@class ngx.location.capture.options ---- ----@field method ngx.http.method # the subrequest's request method, which only accepts constants like `ngx.HTTP_POST`. ---- ----@field body string # the subrequest's request body (string value only). ---- ----@field args string|table # the subrequest's URI query arguments (both string value and Lua tables are accepted) ----@field ctx table # a Lua table to be the `ngx.ctx` table for the subrequest. It can be the current request's `ngx.ctx` table, which effectively makes the parent and its subrequest to share exactly the same context table. ---- ----@field vars table # a Lua table which holds the values to set the specified NGINX variables in the subrequest as this option's value. ---- ----@field copy_all_vars boolean # whether to copy over all the NGINX variable values of the current request to the subrequest in question. modifications of the NGINX variables in the subrequest will not affect the current (parent) request. ---- ----@field share_all_vars boolean # whether to share all the NGINX variables of the subrequest with the current (parent) request. modifications of the NGINX variables in the subrequest will affect the current (parent) request. Enabling this option may lead to hard-to-debug issues due to bad side-effects and is considered bad and harmful. Only enable this option when you completely know what you are doing. ---- ----@field always_forward_body boolean # when set to true, the current (parent) request's request body will always be forwarded to the subrequest being created if the `body` option is not specified. The request body read by either `ngx.req.read_body()` or `lua_need_request_body on` will be directly forwarded to the subrequest without copying the whole request body data when creating the subrequest (no matter the request body data is buffered in memory buffers or temporary files). By default, this option is `false` and when the `body` option is not specified, the request body of the current (parent) request is only forwarded when the subrequest takes the `PUT` or `POST` request method. - - ----@alias ngx.location.capture.uri string - ----@class ngx.location.capture.arg : table ----@field [1] ngx.location.capture.uri request uri ----@field [2] ngx.location.capture.options? request options - - ---- Issues a synchronous but still non-blocking *NGINX Subrequest* using `uri`. ---- ---- NGINX's subrequests provide a powerful way to make non-blocking internal requests to other locations configured with disk file directory or *any* other NGINX C modules like `ngx_proxy`, `ngx_fastcgi`, `ngx_memc`, ---- `ngx_postgres`, `ngx_drizzle`, and even ngx_lua itself and etc etc etc. ---- ---- Also note that subrequests just mimic the HTTP interface but there is *no* extra HTTP/TCP traffic *nor* IPC involved. Everything works internally, efficiently, on the C level. ---- ---- Subrequests are completely different from HTTP 301/302 redirection (via `ngx.redirect`) and internal redirection (via `ngx.exec`). ---- ---- You should always read the request body (by either calling `ngx.req.read_body` or configuring `lua_need_request_body` on) before initiating a subrequest. ---- ---- This API function (as well as `ngx.location.capture_multi`) always buffers the whole response body of the subrequest in memory. Thus, you should use `cosockets` ---- and streaming processing instead if you have to handle large subrequest responses. ---- ---- Here is a basic example: ---- ---- ```lua ---- res = ngx.location.capture(uri) ---- ``` ---- ---- Returns a Lua table with 4 slots: `res.status`, `res.header`, `res.body`, and `res.truncated`. ---- ---- URI query strings can be concatenated to URI itself, for instance, ---- ---- ```lua ---- res = ngx.location.capture('/foo/bar?a=3&b=4') ---- ``` ---- ---- Named locations like `@foo` are not allowed due to a limitation in ---- the NGINX core. Use normal locations combined with the `internal` directive to ---- prepare internal-only locations. ---- ---- An optional option table can be fed as the second argument. ---- ---- Issuing a POST subrequest, for example, can be done as follows ---- ---- ```lua ---- res = ngx.location.capture( ---- '/foo/bar', ---- { method = ngx.HTTP_POST, body = 'hello, world' } ---- ) ---- ``` ---- ---- See HTTP method constants methods other than POST. ---- The `method` option is `ngx.HTTP_GET` by default. ---- ---- The `args` option can specify extra URI arguments, for instance, ---- ---- ```lua ---- ngx.location.capture('/foo?a=1', ---- { args = { b = 3, c = ':' } } ---- ) ---- ``` ---- ---- is equivalent to ---- ---- ```lua ---- ngx.location.capture('/foo?a=1&b=3&c=%3a') ---- ``` ---- ---- that is, this method will escape argument keys and values according to URI rules and ---- concatenate them together into a complete query string. The format for the Lua table passed as the `args` argument is identical to the format used in the `ngx.encode_args` method. ---- ---- The `args` option can also take plain query strings: ---- ---- ```lua ---- ngx.location.capture('/foo?a=1', ---- { args = 'b=3&c=%3a' } ---- ) ---- ``` ---- ---- This is functionally identical to the previous examples. ---- ---- The `share_all_vars` option controls whether to share NGINX variables among the current request and its subrequests. ---- If this option is set to `true`, then the current request and associated subrequests will share the same NGINX variable scope. Hence, changes to NGINX variables made by a subrequest will affect the current request. ---- ---- Care should be taken in using this option as variable scope sharing can have unexpected side effects. The `args`, `vars`, or `copy_all_vars` options are generally preferable instead. ---- ---- This option is set to `false` by default ---- ---- ```nginx ---- location /other { ---- set $dog "$dog world"; ---- echo "$uri dog: $dog"; ---- } ---- ---- location /lua { ---- set $dog 'hello'; ---- content_by_lua_block { ---- res = ngx.location.capture("/other", ---- { share_all_vars = true }); ---- ---- ngx.print(res.body) ---- ngx.say(ngx.var.uri, ": ", ngx.var.dog) ---- } ---- } ---- ``` ---- ---- Accessing location `/lua` gives ---- ---- /other dog: hello world ---- /lua: hello world ---- ---- The `copy_all_vars` option provides a copy of the parent request's NGINX variables to subrequests when such subrequests are issued. Changes made to these variables by such subrequests will not affect the parent request or any other subrequests sharing the parent request's variables. ---- ---- ```nginx ---- location /other { ---- set $dog "$dog world"; ---- echo "$uri dog: $dog"; ---- } ---- ---- location /lua { ---- set $dog 'hello'; ---- content_by_lua_block { ---- res = ngx.location.capture("/other", ---- { copy_all_vars = true }); ---- ---- ngx.print(res.body) ---- ngx.say(ngx.var.uri, ": ", ngx.var.dog) ---- } ---- } ---- ``` ---- ---- Request `GET /lua` will give the output ---- ---- /other dog: hello world ---- /lua: hello ---- ---- Note that if both `share_all_vars` and `copy_all_vars` are set to true, then `share_all_vars` takes precedence. ---- ---- In addition to the two settings above, it is possible to specify ---- values for variables in the subrequest using the `vars` option. These ---- variables are set after the sharing or copying of variables has been ---- evaluated, and provides a more efficient method of passing specific ---- values to a subrequest over encoding them as URL arguments and ---- unescaping them in the NGINX config file. ---- ---- ```nginx ---- location /other { ---- content_by_lua_block { ---- ngx.say("dog = ", ngx.var.dog) ---- ngx.say("cat = ", ngx.var.cat) ---- } ---- } ---- ---- location /lua { ---- set $dog ''; ---- set $cat ''; ---- content_by_lua_block { ---- res = ngx.location.capture("/other", ---- { vars = { dog = "hello", cat = 32 }}); ---- ---- ngx.print(res.body) ---- } ---- } ---- ``` ---- ---- Accessing `/lua` will yield the output ---- ---- dog = hello ---- cat = 32 ---- ---- The `ctx` option can be used to specify a custom Lua table to serve as the `ngx.ctx` table for the subrequest. ---- ---- ```nginx ---- location /sub { ---- content_by_lua_block { ---- ngx.ctx.foo = "bar"; ---- } ---- } ---- location /lua { ---- content_by_lua_block { ---- local ctx = {} ---- res = ngx.location.capture("/sub", { ctx = ctx }) ---- ---- ngx.say(ctx.foo); ---- ngx.say(ngx.ctx.foo); ---- } ---- } ---- ``` ---- ---- Then request `GET /lua` gives ---- ---- bar ---- nil ---- ---- It is also possible to use this `ctx` option to share the same `ngx.ctx` table between the current (parent) request and the subrequest: ---- ---- ```nginx ---- location /sub { ---- content_by_lua_block { ---- ngx.ctx.foo = "bar"; ---- } ---- } ---- location /lua { ---- content_by_lua_block { ---- res = ngx.location.capture("/sub", { ctx = ngx.ctx }) ---- ngx.say(ngx.ctx.foo); ---- } ---- } ---- ``` ---- ---- Request `GET /lua` yields the output ---- ---- bar ---- ---- Note that subrequests issued by `ngx.location.capture` inherit all the ---- request headers of the current request by default and that this may have unexpected side effects on the ---- subrequest responses. For example, when using the standard `ngx_proxy` module to serve ---- subrequests, an "Accept-Encoding: gzip" header in the main request may result ---- in gzipped responses that cannot be handled properly in Lua code. Original request headers should be ignored by setting ---- `proxy_pass_request_headers` to `off` in subrequest locations. ---- ---- When the `body` option is not specified and the `always_forward_body` option is false (the default value), the `POST` and `PUT` subrequests will inherit the request bodies of the parent request (if any). ---- ---- There is a hard-coded upper limit on the number of concurrent subrequests possible for every main request. In older versions of NGINX, the limit was `50` concurrent subrequests and in more recent versions, NGINX `1.1.x` onwards, this was increased to `200` concurrent subrequests. When this limit is exceeded, the following error message is added to the `error.log` file: ---- ---- [error] 13983#0: *1 subrequests cycle while processing "/uri" ---- ---- The limit can be manually modified if required by editing the definition of the `NGX_HTTP_MAX_SUBREQUESTS` macro in the `nginx/src/http/ngx_http_request.h` file in the NGINX source tree. ---- ---- Please also refer to restrictions on capturing locations configured by subrequest directives of other modules. ---- ----@param uri ngx.location.capture.uri ----@param options? ngx.location.capture.options ----@return ngx.location.capture.response -function ngx.location.capture(uri, options) end - - ---- Just like `ngx.location.capture`, but supports multiple subrequests running in parallel. ---- ---- This function issues several parallel subrequests specified by the input table and returns their results in the same order. For example, ---- ---- ```lua ---- local res1, res2, res3 = ngx.location.capture_multi{ ---- { "/foo", { args = "a=3&b=4" } }, ---- { "/bar" }, ---- { "/baz", { method = ngx.HTTP_POST, body = "hello" } }, ---- } ---- ---- if res1.status == ngx.HTTP_OK then ---- ... ---- end ---- ---- if res2.body == "BLAH" then ---- ... ---- end ---- ``` ---- ---- This function will not return until all the subrequests terminate. ---- The total latency is the longest latency of the individual subrequests rather than the sum. ---- ---- Lua tables can be used for both requests and responses when the number of subrequests to be issued is not known in advance: ---- ---- ```lua ---- -- construct the requests table ---- local reqs = {} ---- table.insert(reqs, { "/mysql" }) ---- table.insert(reqs, { "/postgres" }) ---- table.insert(reqs, { "/redis" }) ---- table.insert(reqs, { "/memcached" }) ---- ---- -- issue all the requests at once and wait until they all return ---- local resps = { ngx.location.capture_multi(reqs) } ---- ---- -- loop over the responses table ---- for i, resp in ipairs(resps) do ---- -- process the response table "resp" ---- end ---- ``` ---- ---- The `ngx.location.capture` function is just a special form ---- of this function. Logically speaking, the `ngx.location.capture` can be implemented like this ---- ---- ```lua ---- ngx.location.capture = function (uri, args) ---- return ngx.location.capture_multi({ {uri, args} }) ---- end ---- ``` ---- ---- Please also refer to restrictions on capturing locations configured by subrequest directives of other modules. ---- ----@param args ngx.location.capture.arg[] ----@return ngx.location.capture.response ... -function ngx.location.capture_multi(args) end - - ---- Set, add to, or clear the current request's `HEADER` response header that is to be sent. ---- ---- Underscores (`_`) in the header names will be replaced by hyphens (`-`) by default. This transformation can be turned off via the `lua_transform_underscores_in_response_headers` directive. ---- ---- The header names are matched case-insensitively. ---- ---- ```lua ---- -- equivalent to ngx.header["Content-Type"] = 'text/plain' ---- ngx.header.content_type = 'text/plain'; ---- ---- ngx.header["X-My-Header"] = 'blah blah'; ---- ``` ---- ---- Multi-value headers can be set this way: ---- ---- ```lua ---- ngx.header['Set-Cookie'] = {'a=32; path=/', 'b=4; path=/'} ---- ``` ---- ---- will yield ---- ---- ```bash ---- Set-Cookie: a=32; path=/ ---- Set-Cookie: b=4; path=/ ---- ``` ---- ---- in the response headers. ---- ---- Only Lua tables are accepted (Only the last element in the table will take effect for standard headers such as `Content-Type` that only accept a single value). ---- ---- ```lua ---- ngx.header.content_type = {'a', 'b'} ---- ``` ---- ---- is equivalent to ---- ---- ```lua ---- ngx.header.content_type = 'b' ---- ``` ---- ---- Setting a slot to `nil` effectively removes it from the response headers: ---- ---- ```lua ---- ngx.header["X-My-Header"] = nil; ---- ``` ---- ---- The same applies to assigning an empty table: ---- ---- ```lua ---- ngx.header["X-My-Header"] = {}; ---- ``` ---- ---- Setting `ngx.header.HEADER` after sending out response headers (either explicitly with `ngx.send_headers` or implicitly with `ngx.print` and similar) will log an error message. ---- ---- Reading `ngx.header.HEADER` will return the value of the response header named `HEADER`. ---- ---- Underscores (`_`) in the header names will also be replaced by dashes (`-`) and the header names will be matched case-insensitively. If the response header is not present at all, `nil` will be returned. ---- ---- This is particularly useful in the context of `header_filter_by_lua*`, for example: ---- ---- ```nginx ---- location /test { ---- set $footer ''; ---- ---- proxy_pass http://some-backend; ---- ---- header_filter_by_lua_block { ---- if ngx.header["X-My-Header"] == "blah" then ---- ngx.var.footer = "some value" ---- end ---- } ---- ---- echo_after_body $footer; ---- } ---- ``` ---- ---- For multi-value headers, all of the values of header will be collected in order and returned as a Lua table. For example, response headers ---- ---- Foo: bar ---- Foo: baz ---- ---- will result in ---- ---- ```lua ---- {"bar", "baz"} ---- ``` ---- ---- to be returned when reading `ngx.header.Foo`. ---- ---- Note that `ngx.header` is not a normal Lua table and as such, it is not possible to iterate through it using the Lua `ipairs` function. ---- ---- Note: `HEADER` and `VALUE` will be truncated if they ---- contain the `\r` or `\n` characters. The truncated values ---- will contain all characters up to (and excluding) the first occurrence of ---- `\r` or `\n`. ---- ---- For reading *request* headers, use the `ngx.req.get_headers` function instead. ---- ----@type table -ngx.header = {} - - ---- Parse the http time string (as returned by `ngx.http_time`) into seconds. Returns the seconds or `nil` if the input string is in bad forms. ---- ---- ```lua ---- local time = ngx.parse_http_time("Thu, 18 Nov 2010 11:27:35 GMT") ---- if time == nil then ---- ... ---- end ---- ``` ---- ----@param str string ----@return number? -function ngx.parse_http_time(str) end - - ---- Returns a formated string can be used as the http header time (for example, being used in `Last-Modified` header). The parameter `sec` is the time stamp in seconds (like those returned from `ngx.time`). ---- ---- ```lua ---- ngx.say(ngx.http_time(1290079655)) ---- -- yields "Thu, 18 Nov 2010 11:27:35 GMT" ---- ``` ---- ----@param sec number ----@return string -function ngx.http_time(sec) end - - ---- Sleeps for the specified seconds without blocking. One can specify time resolution up to 0.001 seconds (i.e., one milliseconds). ---- ---- Behind the scene, this method makes use of the NGINX timers. ---- ---- The `0` time argument can also be specified. ---- ----@param seconds number -function ngx.sleep(seconds) end - ---- Forcibly updates the NGINX current time cache. This call involves a syscall and thus has some overhead, so do not abuse it. ---- -function ngx.update_time() end - ---- Returns a floating-point number for the elapsed time in seconds (including milliseconds as the decimal part) from the epoch for the current time stamp from the NGINX cached time (no syscall involved unlike Lua's date library). ---- ---- You can forcibly update the NGINX time cache by calling `ngx.update_time` first. ---- ----@return number -function ngx.now() end - ---- Returns the current time stamp (in the format `yyyy-mm-dd hh:mm:ss`) of the NGINX cached time (no syscall involved unlike Lua's `os.date` function). ---- ----@return string -function ngx.localtime() end - ---- Returns the current time stamp (in the format `yyyy-mm-dd hh:mm:ss`) of the NGINX cached time (no syscall involved unlike Lua's `os.date` function). ---- ----@return string -function ngx.utctime() end - ---- Returns a formatted string can be used as the cookie expiration time. The parameter `sec` is the time stamp in seconds (like those returned from `ngx.time`). ---- ---- ```lua ---- ngx.say(ngx.cookie_time(1290079655)) ---- -- yields "Thu, 18-Nov-10 11:27:35 GMT" ---- ``` ---- ----@param sec number ----@return string -function ngx.cookie_time(sec) end - ---- Returns current date (in the format `yyyy-mm-dd`) from the NGINX cached time (no syscall involved unlike Lua's date library). ---- ---- This uses the local timezone. ---- ----@return string -function ngx.today() end - ---- Returns the elapsed seconds from the epoch for the current time stamp from the NGINX cached time (no syscall involved unlike Lua's date library). ---- ---- Updates of the NGINX time cache can be forced by calling `ngx.update_time` first. ---- ----@return integer -function ngx.time() end - ---- Log arguments concatenated to error.log with the given logging level. ---- ---- Lua `nil` arguments are accepted and result in literal `"nil"` string while Lua booleans result in literal `"true"` or `"false"` string outputs. And the `ngx.null` constant will yield the `"null"` string output. ---- ---- The `level` argument can take constants like `ngx.ERR` and `ngx.WARN`. ---- ---- There is a hard coded `2048` byte limitation on error message lengths in the NGINX core. This limit includes trailing newlines and leading time stamps. If the message size exceeds this limit, NGINX will truncate the message text accordingly. This limit can be manually modified by editing the `NGX_MAX_ERROR_STR` macro definition in the `src/core/ngx_log.h` file in the NGINX source tree. ---- ----@param level ngx.log.level ----@param ... any -function ngx.log(level, ...) end - - ---- Explicitly specify the end of the response output stream. In the case of HTTP 1.1 chunked encoded output, it will just trigger the NGINX core to send out the "last chunk". ---- ---- When you disable the HTTP 1.1 keep-alive feature for your downstream connections, you can rely on well written HTTP clients to close the connection actively for you when you call this method. This trick can be used do back-ground jobs without letting the HTTP clients to wait on the connection, as in the following example: ---- ---- ```nginx ---- location = /async { ---- keepalive_timeout 0; ---- content_by_lua_block { ---- ngx.say("got the task!") ---- ngx.eof() -- well written HTTP clients will close the connection at this point ---- -- access MySQL, PostgreSQL, Redis, Memcached, and etc here... ---- } ---- } ---- ``` ---- ---- But if you create subrequests to access other locations configured by NGINX upstream modules, then you should configure those upstream modules to ignore client connection abortions if they are not by default. For example, by default the standard `ngx_http_proxy_module` will terminate both the subrequest and the main request as soon as the client closes the connection, so it is important to turn on the `proxy_ignore_client_abort` directive in your location block configured by `ngx_http_proxy_module`://nginx.org/en/docs/http/ngx_http_proxy_module.html): ---- ---- ```nginx ---- proxy_ignore_client_abort on; ---- ``` ---- ---- A better way to do background jobs is to use the `ngx.timer.at` API. ---- ---- Returns `1` on success, or returns `nil` and a string describing the error otherwise. ---- ----@return boolean ok ----@return string? error -function ngx.eof() end - ---- Emits arguments concatenated to the HTTP client (as response body). If response headers have not been sent, this function will send headers out first and then output body data. ---- ---- Returns `1` on success, or returns `nil` and a string describing the error otherwise. ---- ---- Lua `nil` values will output `"nil"` strings and Lua boolean values will output `"true"` and `"false"` literal strings respectively. ---- ---- Nested arrays of strings are permitted and the elements in the arrays will be sent one by one: ---- ---- ```lua ---- local table = { ---- "hello, ", ---- {"world: ", true, " or ", false, ---- {": ", nil}} ---- } ---- ngx.print(table) ---- ``` ---- ---- will yield the output ---- ---- ```bash ---- hello, world: true or false: nil ---- ``` ---- ---- Non-array table arguments will cause a Lua exception to be thrown. ---- ---- The `ngx.null` constant will yield the `"null"` string output. ---- ---- This is an asynchronous call and will return immediately without waiting for all the data to be written into the system send buffer. To run in synchronous mode, call `ngx.flush(true)` after calling `ngx.print`. This can be particularly useful for streaming output. See `ngx.flush` for more details. ---- ---- Please note that both `ngx.print` and `ngx.say` will always invoke the whole NGINX output body filter chain, which is an expensive operation. So be careful when calling either of these two in a tight loop; buffer the data yourself in Lua and save the calls. ---- ----@param ... string|string[] ----@return boolean ok ----@return string? error -function ngx.print(...) end - ---- Just as `ngx.print` but also emit a trailing newline. ---- ----@param ... string|string[] ----@return boolean ok ----@return string? error -function ngx.say(...) end - ---- Explicitly send out the response headers. ---- ---- Returns `1` on success, or returns `nil` and a string describing the error otherwise. ---- ---- Note that there is normally no need to manually send out response headers as ngx_lua will automatically send headers out before content is output with `ngx.say` or `ngx.print` or when `content_by_lua*` exits normally. ---- ----@return boolean ok ----@return string? error -function ngx.send_headers() end - ---- Flushes response output to the client. ---- ---- `ngx.flush` accepts an optional boolean `wait` argument (Default: `false`). When called with the default argument, it issues an asynchronous call (Returns immediately without waiting for output data to be written into the system send buffer). Calling the function with the `wait` argument set to `true` switches to synchronous mode. ---- ---- In synchronous mode, the function will not return until all output data has been written into the system send buffer or until the `send_timeout` setting has expired. Note that using the Lua coroutine mechanism means that this function does not block the NGINX event loop even in the synchronous mode. ---- ---- When `ngx.flush(true)` is called immediately after `ngx.print` or `ngx.say`, it causes the latter functions to run in synchronous mode. This can be particularly useful for streaming output. ---- ---- Note that `ngx.flush` is not functional when in the HTTP 1.0 output buffering mode. See `HTTP 1.0 support`. ---- ---- Returns `1` on success, or returns `nil` and a string describing the error otherwise. ---- ----@param wait? boolean ----@return boolean ok ----@return string? error -function ngx.flush(wait) end - ---- NGINX response methods -ngx.resp = {} - ---- Returns a Lua table holding all the current response headers for the current request. ---- ---- ```lua ---- local h, err = ngx.resp.get_headers() ---- ---- if err == "truncated" then ---- -- one can choose to ignore or reject the current response here ---- end ---- ---- for k, v in pairs(h) do ---- ... ---- end ---- ``` ---- ---- This function has the same signature as `ngx.req.get_headers` except getting response headers instead of request headers. ---- ---- Note that a maximum of 100 response headers are parsed by default (including those with the same name) and that additional response headers are silently discarded to guard against potential denial of service attacks. When the limit is exceeded, it will return a second value which is the string `"truncated"`. ---- ----@param max_headers? number ----@param raw? boolean ----@return table ----@return string|'"truncated"' error -function ngx.resp.get_headers(max_headers, raw) end - ----@alias ngx.thread.arg boolean|number|integer|string|lightuserdata|table - ----**syntax:** *ok, res1, res2, ... = ngx.run_worker_thread(threadpool, module_name, func_name, arg1, arg2, ...)* ---- ----**context:** *rewrite_by_lua*, access_by_lua*, content_by_lua** ---- ----**This API is still experimental and may change in the future without notice.** ---- ----**This API is available only for Linux.** ---- ----Wrap the [nginx worker thread](http://nginx.org/en/docs/dev/development_guide.html#threads) to execute lua function. The caller coroutine would yield until the function returns. ---- ----Only the following ngx_lua APIs could be used in `function_name` function of the `module` module: ---- ----* `ngx.encode_base64` ----* `ngx.decode_base64` ---- ----* `ngx.hmac_sha1` ----* `ngx.encode_args` ----* `ngx.decode_args` ----* `ngx.quote_sql_str` ---- ----* `ngx.re.match` ----* `ngx.re.find` ----* `ngx.re.gmatch` ----* `ngx.re.sub` ----* `ngx.re.gsub` ---- ----* `ngx.crc32_short` ----* `ngx.crc32_long` ----* `ngx.hmac_sha1` ----* `ngx.md5_bin` ----* `ngx.md5` ---- ----* `ngx.config.subsystem` ----* `ngx.config.debug` ----* `ngx.config.prefix` ----* `ngx.config.nginx_version` ----* `ngx.config.nginx_configure` ----* `ngx.config.ngx_lua_version` ---- ---- ----The first argument `threadpool` specifies the Nginx thread pool name defined by [thread_pool](https://nginx.org/en/docs/ngx_core_module.html#thread_pool). ---- ----The second argument `module_name` specifies the lua module name to execute in the worker thread, which would return a lua table. The module must be inside the package path, e.g. ---- ----```nginx ---- ----lua_package_path '/opt/openresty/?.lua;;'; ----``` ---- ----The third argument `func_name` specifies the function field in the module table as the second argument. ---- ----The type of `arg`s must be one of type below: ---- ----* boolean ----* number ----* string ----* nil ----* table (the table may be recursive, and contains members of types above.) ---- ----The `ok` is in boolean type, which indicate the C land error (failed to get thread from thread pool, pcall the module function failed, .etc). If `ok` is `false`, the `res1` is the error string. ---- ----The return values (res1, ...) are returned by invocation of the module function. Normally, the `res1` should be in boolean type, so that the caller could inspect the error. ---- ----This API is useful when you need to execute the below types of tasks: ---- ----* CPU bound task, e.g. do md5 calculation ----* File I/O task ----* Call `os.execute()` or blocking C API via `ffi` ----* Call external Lua library not based on cosocket or nginx ---- ----Example1: do md5 calculation. ---- ----```nginx ---- ----location /calc_md5 { ---- default_type 'text/plain'; ---- ---- content_by_lua_block { ---- local ok, md5_or_err = ngx.run_worker_thread("testpool", "md5", "md5") ---- ngx.say(ok, " : ", md5_or_err) ---- } ---- } ----``` ---- ----`md5.lua` ---- ----```lua ----local function md5() ---- return ngx.md5("hello") ----end ----``` ---- ----Example2: write logs into the log file. ---- ----```nginx ---- ----location /write_log_file { ---- default_type 'text/plain'; ---- ---- content_by_lua_block { ---- local ok, err = ngx.run_worker_thread("testpool", "write_log_file", "log", ngx.var.arg_str) ---- if not ok then ---- ngx.say(ok, " : ", err) ---- return ---- end ---- ngx.say(ok) ---- } ---- } ----``` ---- ----`write_log_file.lua` ---- ----```lua ---- ---- local function log(str) ---- local file, err = io.open("/tmp/tmp.log", "a") ---- if not file then ---- return false, err ---- end ---- file:write(str) ---- file:flush() ---- file:close() ---- return true ---- end ---- return {log=log} ----``` ---- ----@param threadpool string ----@param module_name string ----@param func_name string ----@param arg1? ngx.thread.arg ----@param arg2? ngx.thread.arg ----@param ... ngx.thread.arg ----@return boolean ok ----@return ngx.thread.arg? result_or_error ----@return any ... -function ngx.run_worker_thread(threadpool, module_name, func_name, arg1, arg2, ...) -end - -return ngx diff --git a/meta/3rd/OpenResty/library/ngx/balancer.lua b/meta/3rd/OpenResty/library/ngx/balancer.lua deleted file mode 100644 index 6a103a26..00000000 --- a/meta/3rd/OpenResty/library/ngx/balancer.lua +++ /dev/null @@ -1,118 +0,0 @@ ----@meta -local balancer = { - version = require("resty.core.base").version, -} - ---- Sets the peer address (host and port) for the current backend query (which ---- may be a retry). ---- ---- Domain names in host do not make sense. You need to use OpenResty libraries ---- like lua-resty-dns to obtain IP address(es) from all the domain names before ---- entering the `balancer_by_lua*` handler (for example, you can perform DNS ---- lookups in an earlier phase like `access_by_lua*` and pass the results to the ---- `balancer_by_lua*` handler via `ngx.ctx`. ---- ----@param addr string ----@param port integer ----@return boolean ok ----@return string? error -function balancer.set_current_peer(addr, port) end - - ---- Sets the upstream timeout (connect, send and read) in seconds for the ---- current and any subsequent backend requests (which might be a retry). ---- ---- If you want to inherit the timeout value of the global nginx.conf ---- configuration (like `proxy_connect_timeout`), then just specify the nil value ---- for the corresponding argument (like the `connect_timeout` argument). ---- ---- Zero and negative timeout values are not allowed. ---- ---- You can specify millisecond precision in the timeout values by using floating ---- point numbers like 0.001 (which means 1ms). ---- ---- Note: `send_timeout` and `read_timeout` are controlled by the same config ---- `proxy_timeout` for `ngx_stream_proxy_module`. To keep API compatibility, this ---- function will use `max(send_timeout, read_timeout)` as the value for setting ---- proxy_timeout. ---- ---- Returns `true` when the operation is successful; returns `nil` and a string ---- describing the error otherwise. ---- ---- This only affects the current downstream request. It is not a global change. ---- ---- For the best performance, you should use the OpenResty bundle. ---- ----@param connect_timeout? number ----@param send_timeout? number ----@param read_timeout? number ----@return boolean ok ----@return string? error -function balancer.set_timeouts(connect_timeout, send_timeout, read_timeout) end - ----@alias ngx.balancer.failure ----| '"next"' # Failures due to bad status codes sent from the backend server. The origin's response is same though, which means the backend connection can still be reused for future requests. ----| '"failed"' Fatal errors while communicating to the backend server (like connection timeouts, connection resets, and etc). In this case, the backend connection must be aborted and cannot get reused. - ---- Retrieves the failure details about the previous failed attempt (if any) when ---- the next_upstream retrying mechanism is in action. When there was indeed a ---- failed previous attempt, it returned a string describing that attempt's state ---- name, as well as an integer describing the status code of that attempt. ---- ---- Possible status codes are those HTTP error status codes like 502 and 504. ---- ---- For stream module, `status_code` will always be 0 (`ngx.OK`) and is provided ---- for compatibility reasons. ---- ---- When the current attempt is the first attempt for the current downstream ---- request (which means there is no previous attempts at all), this method ---- always returns a single `nil` value. ---- ----@return ngx.balancer.failure? state_name ----@return integer? status_code -function balancer.get_last_failure() end - ---- Sets the tries performed when the current attempt (which may be a retry) ---- fails (as determined by directives like proxy_next_upstream, depending on ---- what particular nginx uptream module you are currently using). --- ---- Note that the current attempt is excluded in the count number set here. ---- ---- Please note that, the total number of tries in a single downstream request ---- cannot exceed the hard limit configured by directives like ---- `proxy_next_upstream_tries`, depending on what concrete NGINX upstream ---- module you are using. When exceeding this limit, the count value will get ---- reduced to meet the limit and the second return value will be the string ---- "reduced tries due to limit", which is a warning, while the first return ---- value is still a `true` value. ---- ----@param count integer ----@return boolean ok ----@return string? error -function balancer.set_more_tries(count) end - ---- Recreates the request buffer for sending to the upstream server. ---- ---- This is useful, for example if you want to change a request header field ---- to the new upstream server on balancer retries. ---- ---- Normally this does not work because the request buffer is created once ---- during upstream module initialization and won't be regenerated for subsequent ---- retries. However you can use `proxy_set_header My-Header $my_header` and ---- set the `ngx.var.my_header` variable inside the balancer phase. Calling ---- `recreate_request()` after updating a header field will cause the request ---- buffer to be re-generated and the `My-Header` header will thus contain the ---- new value. ---- ---- Warning: because the request buffer has to be recreated and such allocation ---- occurs on the request memory pool, the old buffer has to be thrown away and ---- will only be freed after the request finishes. Do not call this function too ---- often or memory leaks may be noticeable. Even so, a call to this function ---- should be made only if you know the request buffer must be regenerated, ---- instead of unconditionally in each balancer retries. ---- ----@return boolean ok ----@return string? error -function balancer.recreate_request() end - -return balancer \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/ngx/base64.lua b/meta/3rd/OpenResty/library/ngx/base64.lua deleted file mode 100644 index 5f8184d5..00000000 --- a/meta/3rd/OpenResty/library/ngx/base64.lua +++ /dev/null @@ -1,21 +0,0 @@ ----@meta -local base64 = { - version = require("resty.core.base").version, -} - ----Encode input using base64url rules. Returns the encoded string. ----@param s string ----@return string -function base64.encode_base64url(s) end - ----Decode input using base64url rules. Returns the decoded string. ---- ----If the input is not a valid base64url encoded string, decoded will be `nil` ----and err will be a string describing the error. ---- ----@param s string ----@return string? decoded ----@return string? err -function base64.decode_base64url(s) end - -return base64 \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/ngx/errlog.lua b/meta/3rd/OpenResty/library/ngx/errlog.lua deleted file mode 100644 index ace384a0..00000000 --- a/meta/3rd/OpenResty/library/ngx/errlog.lua +++ /dev/null @@ -1,122 +0,0 @@ ----@meta -local errlog = { - version = require("resty.core.base").version, -} - ---- Return the nginx core's error log filter level (defined via the `error_log` configuration directive in nginx.conf) as an integer value. ----@return ngx.log.level -function errlog.get_sys_filter_level() end - - ---- Specifies the filter log level, only to capture and buffer the error logs with a log level no lower than the specified level. ---- ---- If we don't call this API, all of the error logs will be captured by default. ---- ---- In case of error, `nil` will be returned as well as a string describing the error. ---- ---- This API should always work with directive `lua_capture_error_log`. ---- ----@param level ngx.log.level ----@return boolean ok ----@return string? err -function errlog.set_filter_level(level) end - - ---- Fetches the captured nginx error log messages if any in the global data buffer specified by ngx_lua's `lua_capture_error_log` directive. Upon return, this Lua function also removes those messages from that global capturing buffer to make room for future new error log data. ---- ---- In case of error, nil will be returned as well as a string describing the error. ---- ---- The optional max argument is a number that when specified, will prevent `get_logs()` from adding more than max messages to the res array. ---- ----```lua ---- for i = 1, 20 do ---- ngx.log(ngx.ERR, "test") ---- end ---- ---- local errlog = require "ngx.errlog" ---- local res = errlog.get_logs(10) ---- -- the number of messages in the `res` table is 10 and the `res` table ---- -- has 30 elements. ----``` ---- ---- The resulting table has the following structure: ---- ----``` ---- { level1, time1, msg1, level2, time2, msg2, ... } ----``` ---- ---- The levelX values are constants defined below: ---- ---- https://github.com/openresty/lua-nginx-module/#nginx-log-level-constants ---- ---- The timeX values are UNIX timestamps in seconds with millisecond precision. The sub-second part is presented as the decimal part. The time format is exactly the same as the value returned by ngx.now. It is also subject to NGINX core's time caching. ---- ---- The msgX values are the error log message texts. ---- ---- So to traverse this array, the user can use a loop like this: ---- ----```lua ---- ---- for i = 1, #res, 3 do ---- local level = res[i] ---- if not level then ---- break ---- end ---- ---- local time = res[i + 1] ---- local msg = res[i + 2] ---- ---- -- handle the current message with log level in `level`, ---- -- log time in `time`, and log message body in `msg`. ---- end ----``` ---- ---- Specifying max <= 0 disables this behavior, meaning that the number of results won't be limited. ---- ---- The optional 2th argument res can be a user-supplied Lua table to hold the result instead of creating a brand new table. This can avoid unnecessary table dynamic allocations on hot Lua code paths. It is used like this: ---- ----```lua ---- local errlog = require "ngx.errlog" ---- local new_tab = require "table.new" ---- ---- local buffer = new_tab(100 * 3, 0) -- for 100 messages ---- ---- local errlog = require "ngx.errlog" ---- local res, err = errlog.get_logs(0, buffer) ---- if res then ---- -- res is the same table as `buffer` ---- for i = 1, #res, 3 do ---- local level = res[i] ---- if not level then ---- break ---- end ---- local time = res[i + 1] ---- local msg = res[i + 2] ---- ... ---- end ---- end ----``` ---- ---- When provided with a res table, `get_logs()` won't clear the table for performance reasons, but will rather insert a trailing nil value after the last table element. ---- ---- When the trailing nil is not enough for your purpose, you should clear the table yourself before feeding it into the `get_logs()` function. ---- ----@param max number ----@param res? table ----@return table? res ----@return string? err -function errlog.get_logs(max, res) end - ---- Log msg to the error logs with the given logging level. ---- ---- Just like the ngx.log API, the log_level argument can take constants like ngx.ERR and ngx.WARN. Check out Nginx log level constants for details. ---- ---- However, unlike the ngx.log API which accepts variadic arguments, this function only accepts a single string as its second argument msg. ---- ---- This function differs from ngx.log in the way that it will not prefix the written logs with any sort of debug information (such as the caller's file and line number). ----@param level ngx.log.level ----@param msg string -function errlog.raw_log(level, msg) end - - -return errlog \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/ngx/ocsp.lua b/meta/3rd/OpenResty/library/ngx/ocsp.lua deleted file mode 100644 index 79e001f1..00000000 --- a/meta/3rd/OpenResty/library/ngx/ocsp.lua +++ /dev/null @@ -1,61 +0,0 @@ ----@meta -local ocsp = { - version = require("resty.core.base").version, -} - ---- Extracts the OCSP responder URL (like "http://test.com/ocsp/") from the SSL server certificate chain in the DER format. ---- ---- Usually the SSL server certificate chain is originally formatted in PEM. You can use the Lua API provided by the ngx.ssl module to do the PEM to DER conversion. ---- ---- The optional max_len argument specifies the maximum length of OCSP URL allowed. This determines the buffer size; so do not specify an unnecessarily large value here. It defaults to the internal string buffer size used throughout this lua-resty-core library (usually default to 4KB). ---- ---- In case of failures, returns `nil` and a string describing the error. ---- ----@param der_cert_chain string ----@param max_len? number ----@return string? ocsp_url ----@return string? error -function ocsp.get_ocsp_responder_from_der_chain(der_cert_chain, max_len) end - ---- Validates the raw OCSP response data specified by the `ocsp_resp` argument using the SSL server certificate chain in DER format as specified in the `der_cert_chain` argument. ---- ---- Returns true when the validation is successful. ---- ---- In case of failures, returns `nil` and a string describing the failure. The maximum length of the error string is controlled by the optional `max_err_msg` argument (which defaults to the default internal string buffer size used throughout this lua-resty-core library, usually being 4KB). ---- ----@param ocsp_resp string ----@param der_cert_chain string ----@param max_err_msg_len? number ----@return boolean ok ----@return string? error -function ocsp.validate_ocsp_response(ocsp_resp, der_cert_chain, max_err_msg_len) end - ---- Builds an OCSP request from the SSL server certificate chain in the DER format, which can be used to send to the OCSP server for validation. ---- ---- The optional `max_len` argument specifies the maximum length of the OCSP request allowed. This value determines the size of the internal buffer allocated, so do not specify an unnecessarily large value here. It defaults to the internal string buffer size used throughout this lua-resty-core library (usually defaults to 4KB). ---- ---- In case of failures, returns `nil` and a string describing the error. ---- ---- The raw OCSP response data can be used as the request body directly if the POST method is used for the OCSP request. But for GET requests, you need to do base64 encoding and then URL encoding on the data yourself before appending it to the OCSP URL obtained by the `get_ocsp_responder_from_der_chain()` function. ---- ----@param der_cert_chain string ----@param max_len? number ----@return string? ocsp_req ----@return string? error -function ocsp.create_ocsp_request(der_cert_chain, max_len) end - - ---- Sets the OCSP response as the OCSP stapling for the current SSL connection. ---- ---- Returns `true` in case of successes. If the SSL client does not send a "status request" at all, then this method still returns true but also with a string as the warning "no status req". ---- ---- In case of failures, returns `nil` and a string describing the error. ---- ---- The OCSP response is returned from CA's OCSP server. See the `create_ocsp_request()` function for how to create an OCSP request and also validate_ocsp_response for how to validate the OCSP response. ---- ----@param ocsp_resp string ----@return boolean ok ----@return string? error -function ocsp.set_ocsp_status_resp(ocsp_resp) end - -return ocsp \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/ngx/pipe.lua b/meta/3rd/OpenResty/library/ngx/pipe.lua deleted file mode 100644 index c0190e3a..00000000 --- a/meta/3rd/OpenResty/library/ngx/pipe.lua +++ /dev/null @@ -1,312 +0,0 @@ ----@meta -local pipe={} -pipe._gc_ref_c_opt="-c" - -pipe.version = require("resty.core.base").version - ---- Creates and returns a new sub-process instance we can communicate with later. ---- ---- For example: ---- ----```lua ---- local ngx_pipe = require "ngx.pipe" ---- local proc, err = ngx_pipe.spawn({"sh", "-c", "sleep 0.1 && exit 2"}) ---- if not proc then ---- ngx.say(err) ---- return ---- end ----``` ---- ---- In case of failure, this function returns nil and a string describing the error. ---- ---- The sub-process will be killed via SIGKILL if it is still alive when the instance is collected by the garbage collector. ---- ---- Note that args should either be a single level array-like Lua table with string values, or just a single string. ---- ---- Some more examples: ---- ----```lua ---- local proc, err = ngx_pipe.spawn({"ls", "-l"}) ---- ---- local proc, err = ngx_pipe.spawn({"perl", "-e", "print 'hello, wolrd'"}) ---- ----``` ---- ---- If args is specified as a string, it will be executed by the operating system shell, just like os.execute. The above example could thus be rewritten as: ---- ----```lua ---- local ngx_pipe = require "ngx.pipe" ---- local proc, err = ngx_pipe.spawn("sleep 0.1 && exit 2") ---- if not proc then ---- ngx.say(err) ---- return ---- end ----``` ---- ---- In the shell mode, you should be very careful about shell injection attacks when interpolating variables into command string, especially variables from untrusted sources. Please make sure that you escape those variables while assembling the command string. For this reason, it is highly recommended to use the multi-arguments form (args as a table) to specify each command-line argument explicitly. ---- ---- Since by default, Nginx does not pass along the PATH system environment variable, you will need to configure the env PATH directive if you wish for it to be respected during the searching of sub-processes: ---- ----```nginx ---- env PATH; ---- ... ---- content_by_lua_block { ---- local ngx_pipe = require "ngx.pipe" ---- ---- local proc = ngx_pipe.spawn({'ls'}) ---- } ----``` ---- ---- The optional table argument opts can be used to control the behavior of spawned processes. For instance: ---- ----```lua ---- local opts = { ---- merge_stderr = true, ---- buffer_size = 256, ---- environ = {"PATH=/tmp/bin", "CWD=/tmp/work"} ---- } ---- local proc, err = ngx_pipe.spawn({"sh", "-c", ">&2 echo data"}, opts) ---- if not proc then ---- ngx.say(err) ---- return ---- end ----``` ---- ---- ----@param args string[]|string ----@param opts? ngx.pipe.spawn.opts ----@return ngx.pipe.proc? proc ----@return string? error -function pipe.spawn(args, opts) end - - ---- Options for ngx.pipe.spawn() ---- ----@class ngx.pipe.spawn.opts : table ---- ---- when set to true, the output to stderr will be redirected to stdout in the spawned process. This is similar to doing 2>&1 in a shell. ----@field merge_stderr boolean ---- ---- specifies the buffer size used by reading operations, in bytes. The default buffer size is 4096. ----@field buffer_size number ---- ---- specifies environment variables for the spawned process. The value must be a single-level, array-like Lua table with string values. ----@field environ string[] ---- ---- specifies the write timeout threshold, in milliseconds. The default threshold is 10000. If the threshold is 0, the write operation will never time out. ----@field write_timeout number ---- ---- specifies the stdout read timeout threshold, in milliseconds. The default threshold is 10000. If the threshold is 0, the stdout read operation will never time out. ----@field stdout_read_timeout number ---- ---- specifies the stderr read timeout threshold, in milliseconds. The default threshold is 10000. If the threshold is 0, the stderr read operation will never time out. ----@field stderr_read_timeout number ---- ---- specifies the wait timeout threshold, in milliseconds. The default threshold is 10000. If the threshold is 0, the wait operation will never time out. ----@field wait_timeout number - - ----@class ngx.pipe.proc : table -local proc = {} - ---- Respectively sets: the write timeout threshold, stdout read timeout threshold, stderr read timeout threshold, and wait timeout threshold. All timeouts are in milliseconds. ---- ---- The default threshold for each timeout is 10 seconds. ---- ---- If the specified timeout argument is `nil`, the corresponding timeout threshold will not be changed. For example: ---- ----```lua ---- local proc, err = ngx_pipe.spawn({"sleep", "10s"}) ---- ---- -- only change the wait_timeout to 0.1 second. ---- proc:set_timeouts(nil, nil, nil, 100) ---- ---- -- only change the send_timeout to 0.1 second. ---- proc:set_timeouts(100) ----``` ---- ---- If the specified timeout argument is 0, the corresponding operation will never time out. ---- ----@param write_timeout? number ----@param stdout_read_timeout? number ----@param stderr_read_timeout? number ----@param wait_timeout? number -function proc:set_timeouts(write_timeout, stdout_read_timeout, stderr_read_timeout, wait_timeout) end - ---- Waits until the current sub-process exits. ---- ---- It is possible to control how long to wait via set_timeouts. The default timeout is 10 seconds. ---- ---- If process exited with status code zero, the ok return value will be true. ---- ---- If process exited abnormally, the ok return value will be false. ---- ---- The second return value, reason, will be a string. Its values may be: ---- ---- exit: the process exited by calling exit(3), _exit(2), or by returning from main(). In this case, status will be the exit code. ---- signal: the process was terminated by a signal. In this case, status will be the signal number. ---- ---- Note that only one light thread can wait on a process at a time. If another light thread tries to wait on a process, the return values will be `nil` and the error string "pipe busy waiting". ---- ---- If a thread tries to wait an exited process, the return values will be `nil` and the error string "exited". ---- ----@return boolean ok ----@return '"exit"'|'"signal"' reason ----@return number status -function proc:wait() end - - ---- Returns the pid number of the sub-process. ----@return number pid -function proc:pid() end - - ---- Sends a signal to the sub-process. ---- ---- Note that the signum argument should be signal's numerical value. If the specified signum is not a number, an error will be thrown. ---- ---- You should use lua-resty-signal's `signum()` function to convert signal names to signal numbers in order to ensure portability of your application. ---- ---- In case of success, this method returns true. Otherwise, it returns `nil` and a string describing the error. ---- ---- Killing an exited sub-process will return `nil` and the error string "exited". ---- ---- Sending an invalid signal to the process will return `nil` and the error string "invalid signal". ---- ----@param signum integer ----@return boolean ok ----@return string? error -function proc:kill(signum) end - ----Closes the specified direction of the current sub-process. ---- ----The direction argument should be one of these three values: stdin, stdout and stderr. ---- ----In case of success, this method returns true. Otherwise, it returns `nil` and a string describing the error. ---- ----If the `merge_stderr` option is specified in spawn, closing the stderr direction will return `nil` and the error string "merged to stdout". ---- ----Shutting down a direction when a light thread is waiting on it (such as during reading or writing) will abort the light thread and return true. ---- ----Shutting down directions of an exited process will return `nil` and the error string "closed". ---- ----It is fine to shut down the same direction of the same stream multiple times; no side effects are to be expected. ---- ----@param direction '"stdin"'|'"stdout"'|'"stderr"' ----@return boolean ok ----@return string? error -function proc:shutdown(direction) end - ---- Writes data to the current sub-process's stdin stream. ---- ---- The data argument can be a string or a single level array-like Lua table with string values. ---- ---- This method is a synchronous and non-blocking operation that will not return until all the data has been flushed to the sub-process's stdin buffer, or an error occurs. ---- ---- In case of success, it returns the total number of bytes that have been sent. Otherwise, it returns `nil` and a string describing the error. ---- ---- The timeout threshold of this write operation can be controlled by the `set_timeouts` method. The default timeout threshold is 10 seconds. ---- ---- When a timeout occurs, the data may be partially written into the sub-process's stdin buffer and read by the sub-process. ---- ---- Only one light thread is allowed to write to the sub-process at a time. If another light thread tries to write to it, this method will return `nil` and the error string "pipe busy writing". ---- ---- If the write operation is aborted by the shutdown method, it will return `nil` and the error string "aborted". ---- ---- Writing to an exited sub-process will return `nil` and the error string "closed". ---- ----@param data string ----@return integer? nbytes ----@return string? error -function proc:write(data) end - ---- Reads all data from the current sub-process's stderr stream until it is closed. ---- ---- This method is a synchronous and non-blocking operation, just like the write method. ---- ---- The timeout threshold of this reading operation can be controlled by `set_timeouts`. The default timeout is 10 seconds. ---- ---- In case of success, it returns the data received. Otherwise, it returns three values: `nil`, a string describing the error, and, optionally, the partial data received so far. ---- ---- When `merge_stderr` is specified in spawn, calling `stderr_read_all` will return `nil` and the error string "merged to stdout". ---- ---- Only one light thread is allowed to read from a sub-process's stderr or stdout stream at a time. If another thread tries to read from the same stream, this method will return `nil` and the error string "pipe busy reading". ---- ---- If the reading operation is aborted by the shutdown method, it will return `nil` and the error string "aborted". ---- ---- Streams for stdout and stderr are separated, so at most two light threads may be reading from a sub-process at a time (one for each stream). ---- ---- The same way, a light thread may read from a stream while another light thread is writing to the sub-process stdin stream. ---- ---- Reading from an exited process's stream will return `nil` and the error string "closed". ---- ----@return string? data ----@return string? error ----@return string? partial -function proc:stderr_read_all() end - ---- Similar to the `stderr_read_all` method, but reading from the stdout stream of the sub-process. ----@return string? data ----@return string? error ----@return string? partial -function proc:stdout_read_all() end - ---- Reads from stderr like `stderr_read_all`, but only reads a single line of data. ---- ---- When `merge_stderr` is specified in spawn, calling `stderr_read_line` will return `nil` plus the error string "merged to stdout". ---- ---- When the data stream is truncated without a new-line character, it returns 3 values: `nil`, the error string "closed", and the partial data received so far. ---- ---- The line should be terminated by a Line Feed (LF) character (ASCII 10), optionally preceded by a Carriage Return (CR) character (ASCII 13). The CR and LF characters are not included in the returned line data. ----@return string? data ----@return string? error ----@return string? partial -function proc:stderr_read_line() end - ---- Similar to `stderr_read_line`, but reading from the stdout stream of the sub-process. ----@return string? data ----@return string? error ----@return string? partial -function proc:stdout_read_line() end - ---- Reads from stderr like `stderr_read_all`, but only reads the specified number of bytes. ---- ---- If `merge_stderr` is specified in spawn, calling `stderr_read_bytes` will return `nil` plus the error string "merged to stdout". ---- ---- If the data stream is truncated (fewer bytes of data available than requested), this method returns 3 values: `nil`, the error string "closed", and the partial data string received so far. ---- ----@param len number ----@return string? data ----@return string? error ----@return string? partial -function proc:stderr_read_bytes(len) end - ---- Similar to `stderr_read_bytes`, but reading from the stdout stream of the sub-process. ---- ----@param len number ----@return string? data ----@return string? error ----@return string? partial -function proc:stdout_read_bytes(len) end - - ---- Reads from stderr like `stderr_read_all`, but returns immediately when any amount of data is received. ---- ---- At most max bytes are received. ---- ---- If `merge_stderr` is specified in spawn, calling `stderr_read_any` will return `nil` plus the error string "merged to stdout". ---- ---- If the received data is more than `max` bytes, this method will return with exactly `max` bytes of data. The remaining data in the underlying receive buffer can be fetched with a subsequent reading operation. ----@param max number ----@return string? data ----@return string? error -function proc:stderr_read_any(max) end - ---- Similar to `stderr_read_any`, but reading from the stdout stream of the sub-process. ---- ----@param max number ----@return string? data ----@return string? error -function proc:stdout_read_any(max) end - -return pipe \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/ngx/process.lua b/meta/3rd/OpenResty/library/ngx/process.lua deleted file mode 100644 index 3a2e424e..00000000 --- a/meta/3rd/OpenResty/library/ngx/process.lua +++ /dev/null @@ -1,52 +0,0 @@ ----@meta -local process = { - version = require("resty.core.base").version, -} - ---- Returns a number value for the nginx master process's process ID (or PID). ---- ----@return integer? pid -function process.get_master_pid() end - - ---- Enables the privileged agent process in Nginx. ---- ---- The privileged agent process does not listen on any virtual server ports ---- like those worker processes. And it uses the same system account as the ---- nginx master process, which is usually a privileged account like root. ---- ---- The `init_worker_by_lua*` directive handler still runs in the privileged ---- agent process. And one can use the `type()` function provided by this module ---- to check if the current process is a privileged agent. ---- ---- In case of failures, returns `nil` and a string describing the error. ---- ----@param connections integer sets the maximum number of simultaneous connections that can be opened by the privileged agent process. ----@return boolean ok ----@return string? error -function process.enable_privileged_agent(connections) end - - ----@alias ngx.process.type ----| '"master"' # the NGINX master process ----| '"worker"' # an NGINX worker process ----| '"privileged agent"' # the NGINX privileged agent process ----| '"single"' # returned when Nginx is running in the single process mode ----| '"signaller"' # returned when Nginx is running as a signaller process - ---- Returns the type of the current NGINX process. ---- ----@return ngx.process.type type -function process.type() end - - ---- Signals the current NGINX worker process to quit gracefully, after all the ---- timers have expired (in time or expired prematurely). ---- ---- Note that this API function simply sets the nginx global C variable ---- `ngx_quit` to signal the nginx event loop directly. No UNIX signals or IPC ---- are involved here. -function process.signal_graceful_exit() end - - -return process \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/ngx/re.lua b/meta/3rd/OpenResty/library/ngx/re.lua deleted file mode 100644 index 826d9b3d..00000000 --- a/meta/3rd/OpenResty/library/ngx/re.lua +++ /dev/null @@ -1,102 +0,0 @@ ----@meta -local re={} - -re.version = require("resty.core.base").version - ---- Allows changing of regex settings. Currently, it can only change the `jit_stack_size` of the PCRE engine, like so: ---- ----```nginx ---- init_by_lua_block { require "ngx.re".opt("jit_stack_size", 200 * 1024) } ---- ---- server { ---- location /re { ---- content_by_lua_block { ---- -- full regex and string are taken from https://github.com/JuliaLang/julia/issues/8278 ---- local very_long_string = [[71.163.72.113 - - [30/Jul/2014:16:40:55 -0700] ...]] ---- local very_complicated_regex = [[([\d\.]+) ([\w.-]+) ([\w.-]+) (\[.+\]) ...]] ---- local from, to, err = ngx.re.find(very_long_string, very_complicated_regex, "jo") ---- ---- -- with the regular jit_stack_size, we would get the error 'pcre_exec() failed: -27' ---- -- instead, we get a match ---- ngx.print(from .. "-" .. to) -- prints '1-1563' ---- } ---- } ---- } ----``` ---- ---- The `jit_stack_size` cannot be set to a value lower than PCRE's default of 32K. ---- ----@param option string '"jit_stack_size"' ----@param value any -function re.opt(option, value) end - ---- Splits the subject string using the Perl compatible regular expression regex with the optional options. ---- ---- This function returns a Lua (array) table (with integer keys) containing the split values. ---- ---- In case of error, `nil` will be returned as well as a string describing the error. ---- ---- When regex contains a sub-match capturing group, and when such a match is found, the first submatch capture will be inserted in between each split value, like so: ---- ----```lua ---- local ngx_re = require "ngx.re" ---- ---- local res, err = ngx_re.split("a,b,c,d", "(,)") ---- -- res is now {"a", ",", "b", ",", "c", ",", "d"} ----``` ---- ---- When regex is empty string "", the subject will be split into chars, like so: ---- ----```lua ---- local ngx_re = require "ngx.re" ---- ---- local res, err = ngx_re.split("abcd", "") ---- -- res is now {"a", "b", "c", "d"} ----``` ---- ---- The optional max argument is a number that when specified, will prevent `split()` from adding more than max matches to the res array: ---- ----```lua ---- local ngx_re = require "ngx.re" ---- ---- local res, err = ngx_re.split("a,b,c,d", ",", nil, nil, 3) ---- -- res is now {"a", "b", "c,d"} ----``` ---- ---- Specifying max <= 0 disables this behavior, meaning that the number of results won't be limited. ---- ---- The optional 6th argument res can be a table that `split()` will re-use to hold the results instead of creating a new one, which can improve performance in hot code paths. It is used like so: ---- ----```lua ---- local ngx_re = require "ngx.re" ---- ---- local my_table = {"hello world"} ---- ---- local res, err = ngx_re.split("a,b,c,d", ",", nil, nil, nil, my_table) ---- -- res/my_table is now {"a", "b", "c", "d"} ----``` ---- ---- When provided with a res table, `split()` won't clear the table for performance reasons, but will rather insert a trailing `nil` value when the split is completed: ---- ----```lua ---- local ngx_re = require "ngx.re" ---- ---- local my_table = {"W", "X", "Y", "Z"} ---- ---- local res, err = ngx_re.split("a,b", ",", nil, nil, nil, my_table) ---- -- res/my_table is now {"a", "b", nil, "Z"} ----``` ---- ---- When the trailing `nil` is not enough for your purpose, you should clear the table yourself before feeding it into the split function. ---- ----@param subj string ----@param regex string ----@param opts? ngx.re.options ----@param ctx? ngx.re.ctx ----@param max? number ----@param res? string[] ----@return string[]? res ----@return string? error -function re.split(subj, regex, opts, ctx, max, res) end - -return re \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/ngx/req.lua b/meta/3rd/OpenResty/library/ngx/req.lua deleted file mode 100644 index 7bf14494..00000000 --- a/meta/3rd/OpenResty/library/ngx/req.lua +++ /dev/null @@ -1,16 +0,0 @@ ----@meta -local req = {} - -req.version = require("resty.core.base").version - ----This method adds the specified header and its value to the current request. It works similarly as ngx.req.set_header, with the exception that when the header already exists, the specified value(s) will be appended instead of overriden. ---- ----When the specified `header_name` is a builtin header (e.g. User-Agent), this method will override its values. ---- ----The `header_value` argument can either be a string or a non-empty, array-like table. A nil or empty table value will cause this function to throw an error. ---- ----@param header_name string must be a non-empty string. ----@param header_value string|string[] -function req.add_header(header_name, header_value) end - -return req diff --git a/meta/3rd/OpenResty/library/ngx/resp.lua b/meta/3rd/OpenResty/library/ngx/resp.lua deleted file mode 100644 index c2de299a..00000000 --- a/meta/3rd/OpenResty/library/ngx/resp.lua +++ /dev/null @@ -1,23 +0,0 @@ ----@meta -local resp={} - -resp.version = require("resty.core.base").version - ---- This function adds specified header with corresponding value to the response of current request. ---- ---- The `header_value` could be either a string or a table. ---- ---- The ngx.resp.add_header works mostly like: ---- ---- `ngx.header.HEADER` ---- Nginx's `add_header` directive. ---- ---- However, unlike `ngx.header.HEADER`, this method appends new header to the old one instead of overriding it. ---- ---- Unlike `add_header` directive, this method will override the builtin header instead of appending it. ---- ----@param key string ----@param value string|string[] -function resp.add_header(key, value) end - -return resp \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/ngx/semaphore.lua b/meta/3rd/OpenResty/library/ngx/semaphore.lua deleted file mode 100644 index cd5c7586..00000000 --- a/meta/3rd/OpenResty/library/ngx/semaphore.lua +++ /dev/null @@ -1,66 +0,0 @@ ----@meta - ----@class ngx.semaphore ---- sem is the internal c handler ----@field sem userdata -local semaphore = { - version = require("resty.core.base").version, -} - ----Creates and returns a new semaphore instance. ---- ----@param n? integer the number of resources the semaphore will begin with (default 0) ----@return ngx.semaphore? semaphore ----@return string? error -function semaphore.new(n) end - - ---- Returns the number of resources readily available in the sema semaphore ---- instance (if any). ---- ---- When the returned number is negative, it means the number of "light threads" ---- waiting on this semaphore. ---- ----@return integer count -function semaphore:count() end - - ---- Requests a resource from the semaphore instance. ---- ---- Returns `true` immediately when there is resources available for the current ---- running "light thread". Otherwise the current "light thread" will enter the ---- waiting queue and yield execution. The current "light thread" will be ---- automatically waken up and the wait function call will return true when there ---- is resources available for it, or return nil and a string describing the error ---- in case of failure (like "timeout"). ---- ---- The timeout argument specifies the maximum time this function call should ---- wait for (in seconds). ---- ---- When the timeout argument is 0, it means "no wait", that is, when there is ---- no readily available "resources" for the current running "light thread", ---- this wait function call returns immediately nil and the error string "timeout". ---- ---- You can specify millisecond precision in the timeout value by using floating ---- point numbers like 0.001 (which means 1ms). ---- ---- "Light threads" created by different contexts (like request handlers) can ---- wait on the same semaphore instance without problem. ---- ----@param timeout? number ----@return boolean ok ----@return string|'"timeout"' error -function semaphore:wait(timeout) end - - ---- Releases n (default to 1) "resources" to the semaphore instance. ---- ---- This will not yield the current running "light thread". ---- ---- At most n "light threads" will be waken up when the current running "light thread" later yields (or terminates). ---- ----@param n? integer -function semaphore:post(n) end - - -return semaphore \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/ngx/ssl.lua b/meta/3rd/OpenResty/library/ngx/ssl.lua deleted file mode 100644 index 42da031b..00000000 --- a/meta/3rd/OpenResty/library/ngx/ssl.lua +++ /dev/null @@ -1,286 +0,0 @@ ----@meta -local ssl={} - ---- Sets the DER-formatted prviate key for the current SSL connection. ---- ---- Returns true on success, or a nil value and a string describing the error otherwise. ---- ---- Usually, the private keys are encoded in the PEM format. You can either use the priv_key_pem_to_der function to do the PEM to DER conversion or just use the openssl command-line utility offline, like below ---- ---- openssl rsa -in key.pem -outform DER -out key.der ---- ----@param der_priv_key string ----@return boolean ok ----@return string? error -function ssl.set_der_priv_key(der_priv_key) end - - ---- Converts the PEM-formatted SSL private key data into an opaque cdata pointer (for later uses in the set_priv_key function, for example). ---- ---- In case of failures, returns nil and a string describing the error. ---- ---- This function can be called in any context. ---- ----@param pem_priv_key string ----@return ffi.cdata*? priv_key ----@return string? error -function ssl.parse_pem_priv_key(pem_priv_key) end - - ---- Returns the TLS 1.x version number used by the current SSL connection. Returns nil and a string describing the error otherwise. ---- ---- Typical return values are: ---- ---- 0x0300(SSLv3) ---- 0x0301(TLSv1) ---- 0x0302(TLSv1.1) ---- 0x0303(TLSv1.2) ---- 0x0304(TLSv1.3) ---- ---- This function can be called in any context where downstream https is used. ----@return number? version ----@return string? error -function ssl.get_tls1_version() end - - ---- Sets the SSL certificate chain opaque pointer returned by the parse_pem_cert function for the current SSL connection. ---- ---- Returns true on success, or a nil value and a string describing the error otherwise. ---- ---- Note that this set_cert function will run slightly faster, in terms of CPU cycles wasted, than the set_der_cert variant, since the first function uses opaque cdata pointers which do not require any additional conversion needed to be performed by the SSL library during the SSL handshake. ---- ----@param cert_chain ffi.cdata* ----@return boolean ok ----@return string? error -function ssl.set_cert(cert_chain) end - - -ssl.TLS1_VERSION=769 - ---- Sets the SSL private key opaque pointer returned by the parse_pem_priv_key function for the current SSL connection. ---- ---- Returns true on success, or a nil value and a string describing the error otherwise. ---- ---- Note that this set_priv_key function will run slightly faster, in terms of CPU cycles wasted, than the set_der_priv_key variant, since the first function uses opaque cdata pointers which do not require any additional conversion needed to be performed by the SSL library during the SSL handshake. ---- ----@param priv_key ffi.cdata* ----@return boolean ok ----@return string? error -function ssl.set_priv_key(priv_key) end - ---- Returns the raw server address actually accessed by the client in the current SSL connection. ---- ---- The first two return values are strings representing the address data and the address type, respectively. The address values are interpreted differently according to the address type values: ---- ---- unix : The address data is a file path for the UNIX domain socket. ---- inet : The address data is a binary IPv4 address of 4 bytes long. ---- inet6 : The address data is a binary IPv6 address of 16 bytes long. ---- ---- Returns two nil values and a Lua string describing the error. ---- ---- The following code snippet shows how to print out the UNIX domain socket address and the IPv4 address as human-readable strings: ---- ----```lua ---- local ssl = require "ngx.ssl" ---- local byte = string.byte ---- ---- local addr, addrtyp, err = ssl.raw_server_addr() ---- if not addr then ---- ngx.log(ngx.ERR, "failed to fetch raw server addr: ", err) ---- return ---- end ---- ---- if addrtyp == "inet" then -- IPv4 ---- ip = string.format("%d.%d.%d.%d", byte(addr, 1), byte(addr, 2), ---- byte(addr, 3), byte(addr, 4)) ---- print("Using IPv4 address: ", ip) ---- ---- elseif addrtyp == "unix" then -- UNIX ---- print("Using unix socket file ", addr) ---- ---- else -- IPv6 ---- -- leave as an exercise for the readers ---- end ----``` ---- ---- This function can be called in any context where downstream https is used. ---- ----@return string? addr_data ----@return ngx.ssl.addr_type? addr_type ----@return string? error -function ssl.raw_server_addr() end - ----@alias ngx.ssl.addr_type ----| '"unix"' # a file path for the UNIX domain socket. ----| '"inet"' # a binary IPv4 address of 4 bytes long. ----| '"inet6"' # a binary IPv6 address of 16 bytes long. - - ---- Clears any existing SSL certificates and/or private keys set on the current SSL connection. ---- ---- Returns true on success, or a nil value and a string describing the error otherwise. ----@return boolean ok ----@return string? error -function ssl.clear_certs() end - ---- Returns the raw client address of the current SSL connection. ---- ---- The first two return values are strings representing the address data and the address type, respectively. The address values are interpreted differently according to the address type values: ---- ---- unix : The address data is a file path for the UNIX domain socket. ---- inet : The address data is a binary IPv4 address of 4 bytes long. ---- inet6 : The address data is a binary IPv6 address of 16 bytes long. ---- ---- Returns two nil values and a Lua string describing the error. ---- ---- The following code snippet shows how to print out the UNIX domain socket address and the IPv4 address as human-readable strings: ---- ----```lua ---- local ssl = require "ngx.ssl" ---- local byte = string.byte ---- ---- local addr, addrtyp, err = ssl.raw_client_addr() ---- if not addr then ---- ngx.log(ngx.ERR, "failed to fetch raw client addr: ", err) ---- return ---- end ---- ---- if addrtyp == "inet" then -- IPv4 ---- ip = string.format("%d.%d.%d.%d", byte(addr, 1), byte(addr, 2), ---- byte(addr, 3), byte(addr, 4)) ---- print("Client IPv4 address: ", ip) ---- ---- elseif addrtyp == "unix" then -- UNIX ---- print("Client unix socket file ", addr) ---- ---- else -- IPv6 ---- -- leave as an exercise for the readers ---- end ----``` ---- ---- This function can be called in any context where downstream https is used. ---- ----@return string? addr_data ----@return ngx.ssl.addr_type? addr_type ----@return string? error -function ssl.raw_client_addr() end - - ---- Converts the PEM-formated SSL certificate chain data into an opaque cdata pointer (for later uses in the set_cert function, for example). ---- ---- In case of failures, returns nil and a string describing the error. ---- ---- You can always use libraries like lua-resty-lrucache to cache the cdata result. ---- ---- This function can be called in any context. ---- ----@param pem_cert_chain string ----@return ffi.cdata*? cert_chain ----@return string? error -function ssl.parse_pem_cert(pem_cert_chain) end - -ssl.version = require("resty.core.base").version -ssl.TLS1_2_VERSION=771 - ---- Returns the TLS SNI (Server Name Indication) name set by the client. Returns nil when the client does not set it. ---- ---- In case of failures, it returns nil and a string describing the error. ---- ---- Usually we use this SNI name as the domain name (like www.openresty.org) to identify the current web site while loading the corresponding SSL certificate chain and private key for the site. ---- ---- Please note that not all https clients set the SNI name, so when the SNI name is missing from the client handshake request, we use the server IP address accessed by the client to identify the site. See the raw_server_addr method for more details. ---- ---- This function can be called in any context where downstream https is used. ---- ----@return string? server_name ----@return string? error -function ssl.server_name() end - ---- Returns the server port. Returns nil when server dont have a port. ---- ---- In case of failures, it returns nil and a string describing the error. ---- ---- This function can be called in any context where downstream https is used. ---- ----@return number? server_port ----@return string? error -function ssl.server_port() end - - - -ssl.TLS1_1_VERSION=770 -ssl.SSL3_VERSION=768 - ---- Sets the DER-formatted SSL certificate chain data for the current SSL connection. Note that the DER data is directly in the Lua string argument. No external file names are supported here. ---- ---- Returns true on success, or a nil value and a string describing the error otherwise. ---- ---- Note that, the SSL certificate chain is usually encoded in the PEM format. So you need to use the cert_pem_to_der function to do the conversion first. ----@param der_cert_chain string ----@return boolean ok ----@return string? error -function ssl.set_der_cert(der_cert_chain) end - - ---- Returns the TLS 1.x version string used by the current SSL connection. Returns nil and a string describing the error otherwise. ---- ---- If the TLS 1.x version number used by the current SSL connection is not recognized, the return values will be nil and the string "unknown version". ---- ---- Typical return values are: ---- ---- SSLv3 ---- TLSv1 ---- TLSv1.1 ---- TLSv1.2 ---- TLSv1.3 ---- ---- This function can be called in any context where downstream https is used. ---- ----@return string? version ----@return string? error -function ssl.get_tls1_version_str() end - ---- Converts the PEM-formatted SSL private key data into the DER format (for later uses in the set_der_priv_key function, for example). ---- ---- In case of failures, returns nil and a string describing the error. ---- ---- Alternatively, you can do the PEM to DER conversion offline with the openssl command-line utility, like below ---- ---- openssl rsa -in key.pem -outform DER -out key.der ---- ---- This function can be called in any context. ---- ----@param pem_priv_key string ----@return string? der_priv_key ----@return string? error -function ssl.priv_key_pem_to_der(pem_priv_key) end - ---- Converts the PEM-formatted SSL certificate chain data into the DER format (for later uses in the set_der_cert function, for example). ---- ---- In case of failures, returns nil and a string describing the error. ---- ---- It is known that the openssl command-line utility may not convert the whole SSL certificate chain from PEM to DER correctly. So always use this Lua function to do the conversion. You can always use libraries like lua-resty-lrucache and/or ngx_lua APIs like lua_shared_dict to do the caching of the DER-formatted results, for example. ---- ---- This function can be called in any context. ---- ----@param pem_cert_chain string ----@return string? der_cert_chain ----@return string? error -function ssl.cert_pem_to_der(pem_cert_chain) end - - ---- Requires a client certificate during TLS handshake. ---- ---- Returns true on success, or a nil value and a string describing the error otherwise. ---- ---- Note that TLS is not terminated when verification fails. You need to examine Nginx variable $ssl_client_verify later to determine next steps. ---- ---- This function was first added in version 0.1.20. ---- ----@param ca_certs? ffi.cdata* # the CA certificate chain opaque pointer returned by the parse_pem_cert function for the current SSL connection. The list of certificates will be sent to clients. Also, they will be added to trusted store. If omitted, will not send any CA certificate to clients. ----@param depth? number verification depth in the client certificates chain. If omitted, will use the value specified by ssl_verify_depth. ----@return boolean ok ----@return string? error -function ssl.verify_client(ca_certs, depth) end - -return ssl \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/ngx/ssl/clienthello.lua b/meta/3rd/OpenResty/library/ngx/ssl/clienthello.lua deleted file mode 100644 index d2e40665..00000000 --- a/meta/3rd/OpenResty/library/ngx/ssl/clienthello.lua +++ /dev/null @@ -1,102 +0,0 @@ ----@meta -local clienthello = {} - -clienthello.version = require("resty.core.base").version - ----Returns the TLS SNI (Server Name Indication) name set by the client. ---- ----Return `nil` when then the extension does not exist. ---- ----In case of errors, it returns `nil` and a string describing the error. ---- ----Note that the SNI name is gotten from the raw extensions of the client hello message associated with the current downstream SSL connection. ---- ----So this function can only be called in the context of `ssl_client_hello_by_lua*`. ----@return string? host ----@return string? error -function clienthello.get_client_hello_server_name() end - - ---- Returns raw data of arbitrary SSL client hello extension including custom extensions. ---- ---- Returns `nil` if the specified extension type does not exist. ---- ---- In case of errors, it returns `nil` and a string describing the error. ---- ---- Note that the ext is gotten from the raw extensions of the client hello message associated with the current downstream SSL connection. ---- ---- So this function can only be called in the context of `ssl_client_hello_by_lua*`. ---- ---- Example: ---- ---- Gets server name from raw extension data. The `0` in `ssl_clt.get_client_hello_ext(0)` denotes `TLSEXT_TYPE_server_name`, and the `0` in `byte(ext, 3) ~= 0` denotes `TLSEXT_NAMETYPE_host_name`. ---- ---- ```nginx ---- # nginx.conf ---- server { ---- listen 443 ssl; ---- server_name test.com; ---- ssl_client_hello_by_lua_block { ---- local ssl_clt = require "ngx.ssl.clienthello" ---- local byte = string.byte ---- local ext = ssl_clt.get_client_hello_ext(0) ---- if not ext then ---- print("failed to get_client_hello_ext(0)") ---- ngx.exit(ngx.ERROR) ---- end ---- local total_len = string.len(ext) ---- if total_len <= 2 then ---- print("bad SSL Client Hello Extension") ---- ngx.exit(ngx.ERROR) ---- end ---- local len = byte(ext, 1) * 256 + byte(ext, 2) ---- if len + 2 ~= total_len then ---- print("bad SSL Client Hello Extension") ---- ngx.exit(ngx.ERROR) ---- end ---- if byte(ext, 3) ~= 0 then ---- print("bad SSL Client Hello Extension") ---- ngx.exit(ngx.ERROR) ---- end ---- if total_len <= 5 then ---- print("bad SSL Client Hello Extension") ---- ngx.exit(ngx.ERROR) ---- end ---- len = byte(ext, 4) * 256 + byte(ext, 5) ---- if len + 5 > total_len then ---- print("bad SSL Client Hello Extension") ---- ngx.exit(ngx.ERROR) ---- end ---- local name = string.sub(ext, 6, 6 + len -1) ---- ---- print("read SNI name from Lua: ", name) ---- } ---- ssl_certificate test.crt; ---- ssl_certificate_key test.key; ---- } ---- ``` ---- ----@param ext_type number ----@return string? ext -function clienthello.get_client_hello_ext(ext_type) end - - ---- Sets the SSL protocols supported by the current downstream SSL connection. ---- ---- Returns `true` on success, or a `nil` value and a string describing the error otherwise. ---- ---- Considering it is meaningless to set ssl protocols after the protocol is determined, ---- so this function may only be called in the context of `ssl_client_hello_by_lua*`. ---- ---- Example: ---- ```lua ---- ssl_clt.set_protocols({"TLSv1.1", "TLSv1.2", "TLSv1.3"})` ---- ``` ---- ----@param protocols string[] ----@return boolean ok ----@return string? error -function clienthello.set_protocols(protocols) end - - -return clienthello diff --git a/meta/3rd/OpenResty/library/ngx/ssl/session.lua b/meta/3rd/OpenResty/library/ngx/ssl/session.lua deleted file mode 100644 index 7307b00c..00000000 --- a/meta/3rd/OpenResty/library/ngx/ssl/session.lua +++ /dev/null @@ -1,52 +0,0 @@ ----@meta -local session={} - -session.version = require("resty.core.base").version - - ---- Sets the serialized SSL session provided as the argument to the current SSL connection. ---- If the SSL session is successfully set, the current SSL connection can resume the session ---- directly without going through the full SSL handshake process (which is very expensive in terms of CPU time). ---- ---- This API is usually used in the context of `ssl_session_fetch_by_lua*` ---- when a cache hit is found with the current SSL session ID. ---- ---- The serialized SSL session used as the argument should be originally returned by the ---- `get_serialized_session` function. ---- ----@param session string ----@return boolean ok ----@return string? error -function session.set_serialized_session(session) end - ---- Returns the serialized form of the SSL session data of the current SSL connection, in a Lua string. ---- ---- This session can be cached in `lua-resty-lrucache`, `lua_shared_dict`, ---- and/or external data storage services like `memcached` and `redis`. The SSL session ID returned ---- by the `get_session_id` function is usually used as the cache key. ---- ---- The returned SSL session data can later be loaded into other SSL connections using the same ---- session ID via the `set_serialized_session` function. ---- ---- In case of errors, it returns `nil` and a string describing the error. ---- ---- This API function is usually called in the context of `ssl_session_store_by_lua*` ---- where the SSL handshake has just completed. ---- ----@return string? session ----@return string? error -function session.get_serialized_session() end - ---- Fetches the SSL session ID associated with the current downstream SSL connection. ---- The ID is returned as a Lua string. ---- ---- In case of errors, it returns `nil` and a string describing the error. ---- ---- This API function is usually called in the contexts of ---- `ssl_session_store_by_lua*` and `ssl_session_fetch_by_lua*`. ---- ----@return string? id ----@return string? error -function session.get_session_id() end - -return session \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/ngx/upstream.lua b/meta/3rd/OpenResty/library/ngx/upstream.lua deleted file mode 100644 index 7313481c..00000000 --- a/meta/3rd/OpenResty/library/ngx/upstream.lua +++ /dev/null @@ -1,9 +0,0 @@ ----@meta -local upstream={} -function upstream.get_backup_peers() end -function upstream.get_servers() end -function upstream.current_upstream_name() end -function upstream.get_primary_peers() end -function upstream.set_peer_down() end -function upstream.get_upstreams() end -return upstream \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/prometheus.lua b/meta/3rd/OpenResty/library/prometheus.lua deleted file mode 100644 index 88036b81..00000000 --- a/meta/3rd/OpenResty/library/prometheus.lua +++ /dev/null @@ -1,247 +0,0 @@ ----@meta - ----@class PrometheusLib -local PrometheusLib = {} - ----@class PrometheusOptions ----is a table of configuration options that can be provided. -local PrometheusOptions = {} - ----metric name prefix. ----This string will be prepended to metric names on output. -PrometheusOptions.prefix = '' ----Can be used to change the default name of error metric (see ----[Built-in metrics](https://github.com/knyar/nginx-lua-prometheus#built-in-metrics) ----for details). -PrometheusOptions.error_metric_name = '' ----sets per-worker counter sync interval in seconds. ----This sets the boundary on eventual consistency of counter metrics. ----Defaults to `1`. -PrometheusOptions.sync_interval = 0 ----maximum size of a per-metric lookup table maintained by ----each worker to cache full metric names. Defaults to `1000`. ----If you have metrics with extremely high cardinality and lots ----of available RAM, you might want to increase this to avoid ----cache getting flushed too often. ----Decreasing this makes sense if you have a very large number of metrics ----or need to minimize memory usage of this library. -PrometheusOptions.lookup_max_size = 0 - ----Initializes the module. ----This should be called once from the ----[init_worker_by_lua_block](https://github.com/openresty/lua-nginx-module#init_worker_by_lua_block) ----section of nginx configuration. ---- ----Example: ----``` ----init_worker_by_lua_block { ---- prometheus = require("prometheus").init("prometheus_metrics", {sync_interval=3}) ----} ----``` ----@param dict_name string is the name of the nginx shared dictionary which will be used to store all metrics. Defaults to `prometheus_metrics` if not specified. ----@param options? PrometheusOptions is a table of configuration options that can be provided. ----@return Prometheus prometheus Returns a `prometheus` object that should be used to register metrics. -PrometheusLib.init = function(dict_name, options) end - ----@class Prometheus -local Prometheus = {} - ----Registers a counter. ---- ----Should be called once for each gauge from the ----[init_worker_by_lua_block](https://github.com/openresty/lua-nginx-module#init_worker_by_lua_block) ----section. ---- ----Example: ----``` ----init_worker_by_lua_block { ---- prometheus = require("prometheus").init("prometheus_metrics") ---- ---- metric_bytes = prometheus:counter( ---- "nginx_http_request_size_bytes", "Total size of incoming requests") ---- metric_requests = prometheus:counter( ---- "nginx_http_requests_total", "Number of HTTP requests", {"host", "status"}) ----} ----``` ----@param name string is the name of the metric. ----@param description? string is the text description. Optional. ----@param label_names? string[] is an array of label names for the metric. Optional. ----@return PrometheusCounter -function Prometheus:counter(name, description, label_names) end - ----Registers a gauge. ---- ----Should be called once for each gauge from the ----[init_worker_by_lua_block](https://github.com/openresty/lua-nginx-module#init_worker_by_lua_block) ----section. ---- ----Example: ----``` ----init_worker_by_lua_block { ---- prometheus = require("prometheus").init("prometheus_metrics") ---- ---- metric_connections = prometheus:gauge( ---- "nginx_http_connections", "Number of HTTP connections", {"state"}) ----} ----``` ----@param name string is the name of the metric. ----@param description? string is the text description. Optional. ----@param label_names? string[] is an array of label names for the metric. Optional. ----@return PrometheusGauge -function Prometheus:gauge(name, description, label_names) end - ----Registers a histogram. ---- ----Should be called once for each histogram from the ----[init_worker_by_lua_block](https://github.com/openresty/lua-nginx-module#init_worker_by_lua_block) ----section. ---- ----Example: ----``` ----init_worker_by_lua_block { ---- prometheus = require("prometheus").init("prometheus_metrics") ---- ---- metric_latency = prometheus:histogram( ---- "nginx_http_request_duration_seconds", "HTTP request latency", {"host"}) ---- metric_response_sizes = prometheus:histogram( ---- "nginx_http_response_size_bytes", "Size of HTTP responses", nil, ---- {10,100,1000,10000,100000,1000000}) ----} ----``` ----@param name string is the name of the metric. ----@param description? string is the text description. Optional. ----@param label_names? string[] is an array of label names for the metric. Optional. ----@param buckets? number[] is an array of numbers defining bucket boundaries. Optional, defaults to 20 latency buckets covering a range from 5ms to 10s (in seconds). ----@return PrometheusHist -function Prometheus:histogram(name, description, label_names, buckets) end - ----Presents all metrics in a text format compatible with Prometheus. ----This should be called in [content_by_lua_block](https://github.com/openresty/lua-nginx-module#content_by_lua_block) ----to expose the metrics on a separate HTTP page. ---- ----Example: ----``` ----location /metrics { ---- content_by_lua_block { prometheus:collect() } ---- allow 192.168.0.0/16; ---- deny all; ----} ----``` -function Prometheus:collect() end - ----Returns metric data as an array of strings. ----@return string[] -function Prometheus:metric_data() end - ----@class PrometheusCounter -local PrometheusCounter = {} - ----Increments a previously registered counter. ----This is usually called from log_by_lua_block globally or per server/location. ---- ----The number of label values should match the number of label names ----defined when the counter was registered using `prometheus:counter()`. ----No label values should be provided for counters with no labels. ----Non-printable characters will be stripped from label values. ---- ----Example: ----``` ----log_by_lua_block { ---- metric_bytes:inc(tonumber(ngx.var.request_length)) ---- metric_requests:inc(1, {ngx.var.server_name, ngx.var.status}) ----} ----``` ----@param value number is a value that should be added to the counter. Defaults to 1. ----@param label_values? string[] is an array of label values. -function PrometheusCounter:inc(value, label_values) end - ----Delete a previously registered counter. ----This is usually called when you don't need to observe such counter ----(or a metric with specific label values in this counter) any more. ----If this counter has labels, you have to pass `label_values` to delete ----the specific metric of this counter. ----If you want to delete all the metrics of a counter with labels, ----you should call `Counter:reset()`. ---- ----This function will wait for sync_interval before deleting the metric to ----allow all workers to sync their counters. ----@param label_values string[] The number of label values should match the number of label names defined when the counter was registered using `prometheus:counter()`. No label values should be provided for counters with no labels. Non-printable characters will be stripped from label values. -function PrometheusCounter:del(label_values) end - ----Delete all metrics for a previously registered counter. ----If this counter have no labels, it is just the same as `Counter:del()` function. ----If this counter have labels, it will delete all the metrics with different label values. ---- ----This function will wait for `sync_interval` before deleting the metrics to allow all workers to sync their counters. -function PrometheusCounter:reset() end - ----@class PrometheusGauge -local PrometheusGauge = {} - ----Sets the current value of a previously registered gauge. ----This could be called from ----[log_by_lua_block](https://github.com/openresty/lua-nginx-module#log_by_lua_block) ----globally or per server/location to modify a gauge on each request, or from ----[content_by_lua_block](https://github.com/openresty/lua-nginx-module#content_by_lua_block) ----just before `prometheus::collect()` to return a real-time value. ---- ----@param value number is a value that the gauge should be set to. Required. ----@param label_values? string[] is an array of label values. -function PrometheusGauge:set(value, label_values) end - ----Increments a previously registered gauge. ----This is usually called from log_by_lua_block globally or per server/location. ---- ----The number of label values should match the number of label names ----defined when the gauge was registered using `prometheus:gauge()`. ----No label values should be provided for gauge with no labels. ----Non-printable characters will be stripped from label values. ----@param value number is a value that should be added to the gauge. Defaults to 1. ----@param label_values? string[] is an array of label values. -function PrometheusGauge:inc(value, label_values) end - ----Delete a previously registered gauge. ----This is usually called when you don't need to observe such gauge ----(or a metric with specific label values in this gauge) any more. ----If this gauge has labels, you have to pass `label_values` to delete ----the specific metric of this gauge. ----If you want to delete all the metrics of a gauge with labels, ----you should call `Gauge:reset()`. ---- ----This function will wait for sync_interval before deleting the metric to ----allow all workers to sync their counters. ----@param label_values string[] The number of label values should match the number of label names defined when the gauge was registered using `prometheus:gauge()`. No label values should be provided for counters with no labels. Non-printable characters will be stripped from label values. -function PrometheusGauge:del(label_values) end - ----Delete all metrics for a previously registered gauge. ----If this gauge have no labels, it is just the same as `Gauge:del()` function. ----If this gauge have labels, it will delete all the metrics with different ----label values. -function PrometheusGauge:reset() end - ----@class PrometheusHist -local PrometheusHist = {} - ----Records a value in a previously registered histogram. ----Usually called from ----[log_by_lua_block](https://github.com/openresty/lua-nginx-module#log_by_lua_block) ----globally or per server/location. ---- ----Example: ----``` ----log_by_lua_block { ---- metric_latency:observe(tonumber(ngx.var.request_time), {ngx.var.server_name}) ---- metric_response_sizes:observe(tonumber(ngx.var.bytes_sent)) ----} ----``` ----@param value number is a value that should be recorded. Required. ----@param label_values? string[] is an array of label values. -function PrometheusHist:observe(value, label_values) end - ----Delete all metrics for a previously registered histogram. ---- ----This function will wait for `sync_interval` before deleting the ----metrics to allow all workers to sync their counters. -function PrometheusHist:reset() end - -return PrometheusLib diff --git a/meta/3rd/OpenResty/library/resty/aes.lua b/meta/3rd/OpenResty/library/resty/aes.lua deleted file mode 100644 index 7e627ef6..00000000 --- a/meta/3rd/OpenResty/library/resty/aes.lua +++ /dev/null @@ -1,75 +0,0 @@ ----@meta - -local aes={} - ----@alias resty.aes.cipher.name ----| '"ecb"' ----| '"cbc"' ----| '"cfb1"' ----| '"cfb128"' ----| '"cfb8"' ----| '"ctr" ----| '"gcm"' ----| '"ofb"' - ----@alias resty.aes.cipher.size '128'|'192'|'256' - ----@class resty.aes.cipher : table ----@field size resty.aes.cipher.size ----@field cipher resty.aes.cipher.name ----@field method userdata - ----@param size resty.aes.cipher.size # cipher size (default `128`) ----@param cipher? resty.aes.cipher.name # cipher name (default `"cbc"`) ----@return resty.aes.cipher? -function aes.cipher(size, cipher) end - ----@class resty.aes.hash_table : table ----@field iv string ----@field method? fun(key:string):string - ----@class resty.aes.hash_cdata : userdata - ----@type table -aes.hash = {} -aes.hash.sha1={} -aes.hash.md5={} -aes.hash.sha224={} -aes.hash.sha512={} -aes.hash.sha256={} -aes.hash.sha384={} - ----@alias resty.aes.hash resty.aes.hash_cdata|resty.aes.hash_table - ----@param key string encryption key ----@param salt? string if provided, must be exactly 8 characters in length ----@param cipher? resty.aes.cipher (default is 128 CBC) ----@param hash? resty.aes.hash (default is md5) ----@param hash_rounds? number (default: `1`) ----@param iv_len? number ----@param enable_padding? boolean (default: `true`) ---- ----@return resty.aes? ----@return string? error -function aes:new(key, salt, cipher, hash, hash_rounds, iv_len, enable_padding) end - ----@class resty.aes : table -local aes_ctx = {} - ---- Decrypt a string ---- ----@param s string ----@param tag? string ----@return string? decrypted ----@return string? error -function aes_ctx:decrypt(s, tag) end - - ---- Encrypt a string. ---- ----@param s string ----@return string? encrypted ----@return string? error -function aes_ctx:encrypt(s) end - -return aes \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/core.lua b/meta/3rd/OpenResty/library/resty/core.lua deleted file mode 100644 index e143818e..00000000 --- a/meta/3rd/OpenResty/library/resty/core.lua +++ /dev/null @@ -1,4 +0,0 @@ ----@meta -local resty_core={} -resty_core.version = require("resty.core.base").version -return resty_core \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/core/base.lua b/meta/3rd/OpenResty/library/resty/core/base.lua deleted file mode 100644 index d84c3486..00000000 --- a/meta/3rd/OpenResty/library/resty/core/base.lua +++ /dev/null @@ -1,51 +0,0 @@ ----@meta -local resty_core_base = {} - ----@param ... string -function resty_core_base.allows_subsystem(...) end - ----@param t table -function resty_core_base.clear_tab(t) end - ----@return userdata -function resty_core_base.get_errmsg_ptr() end - ----@return userdata -function resty_core_base.get_request() end - ----@return userdata -function resty_core_base.get_size_ptr() end - ----@param size number ----@param must_alloc? boolean ----@return userdata -function resty_core_base.get_string_buf(size, must_alloc) end - ----@return number -function resty_core_base.get_string_buf_size() end - ----@param narr number ----@param nrec number ----@return table -function resty_core_base.new_tab(narr, nrec) end - ----@param tb table ----@param key any ----@return any -function resty_core_base.ref_in_table(tb, key) end - ----@param size number -function resty_core_base.set_string_buf_size(size) end - -resty_core_base.FFI_OK = 0 -resty_core_base.FFI_NO_REQ_CTX = -100 -resty_core_base.FFI_BAD_CONTEXT = -101 -resty_core_base.FFI_ERROR = -1 -resty_core_base.FFI_AGAIN = -2 -resty_core_base.FFI_BUSY = -3 -resty_core_base.FFI_DONE = -4 -resty_core_base.FFI_DECLINED = -5 - -resty_core_base.version = "0.1.23" - -return resty_core_base \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/core/base64.lua b/meta/3rd/OpenResty/library/resty/core/base64.lua deleted file mode 100644 index 21534411..00000000 --- a/meta/3rd/OpenResty/library/resty/core/base64.lua +++ /dev/null @@ -1,4 +0,0 @@ ----@meta -local resty_core_base64={} -resty_core_base64.version = require("resty.core.base").version -return resty_core_base64 \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/core/ctx.lua b/meta/3rd/OpenResty/library/resty/core/ctx.lua deleted file mode 100644 index 7f94db15..00000000 --- a/meta/3rd/OpenResty/library/resty/core/ctx.lua +++ /dev/null @@ -1,9 +0,0 @@ ----@meta -local resty_core_ctx={} -resty_core_ctx._VERSION = require("resty.core.base").version - ----@param ctx? table ----@return table -function resty_core_ctx.get_ctx_table(ctx) end - -return resty_core_ctx \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/core/exit.lua b/meta/3rd/OpenResty/library/resty/core/exit.lua deleted file mode 100644 index 57f08c71..00000000 --- a/meta/3rd/OpenResty/library/resty/core/exit.lua +++ /dev/null @@ -1,4 +0,0 @@ ----@meta -local resty_core_exit={} -resty_core_exit.version = require("resty.core.base").version -return resty_core_exit \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/core/hash.lua b/meta/3rd/OpenResty/library/resty/core/hash.lua deleted file mode 100644 index 54ef2c8a..00000000 --- a/meta/3rd/OpenResty/library/resty/core/hash.lua +++ /dev/null @@ -1,4 +0,0 @@ ----@meta -local resty_core_hash={} -resty_core_hash.version = require("resty.core.base").version -return resty_core_hash \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/core/misc.lua b/meta/3rd/OpenResty/library/resty/core/misc.lua deleted file mode 100644 index bd355c02..00000000 --- a/meta/3rd/OpenResty/library/resty/core/misc.lua +++ /dev/null @@ -1,6 +0,0 @@ ----@meta -local resty_core_misc={} -function resty_core_misc.register_ngx_magic_key_getter() end -function resty_core_misc.register_ngx_magic_key_setter() end -resty_core_misc._VERSION = require("resty.core.base").version -return resty_core_misc \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/core/ndk.lua b/meta/3rd/OpenResty/library/resty/core/ndk.lua deleted file mode 100644 index 6a243329..00000000 --- a/meta/3rd/OpenResty/library/resty/core/ndk.lua +++ /dev/null @@ -1,4 +0,0 @@ ----@meta -local resty_core_ndk={} -resty_core_ndk.version = require("resty.core.base").version -return resty_core_ndk \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/core/phase.lua b/meta/3rd/OpenResty/library/resty/core/phase.lua deleted file mode 100644 index 1ac451c0..00000000 --- a/meta/3rd/OpenResty/library/resty/core/phase.lua +++ /dev/null @@ -1,4 +0,0 @@ ----@meta -local resty_core_phase={} -resty_core_phase.version = require("resty.core.base").version -return resty_core_phase \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/core/regex.lua b/meta/3rd/OpenResty/library/resty/core/regex.lua deleted file mode 100644 index 4876d1de..00000000 --- a/meta/3rd/OpenResty/library/resty/core/regex.lua +++ /dev/null @@ -1,55 +0,0 @@ ----@meta - ----@class resty.core.regex ----@field no_pcre boolean -local regex = {} - ----@param ratio integer -function regex.set_buf_grow_ratio(ratio) end - ----@return boolean is_empty -function regex.is_regex_cache_empty() end - ----@class resty.core.regex.compiled : ffi.cdata* ----@field captures ffi.cdata* ----@field ncaptures integer ----@field name_count integer ----@field name_table ffi.cdata* ----@field name_entry_size integer - ----@param compiled resty.core.regex.compiled ----@param flags integer ----@param res ngx.re.captures -function regex.collect_captures(compiled, flags, res) end - ----@param compiled resty.core.regex.compiled -function regex.destroy_compiled_regex(compiled) end - ----@param re string ----@param opts ngx.re.options ----@return resty.core.regex.compiled? compiled ----@return boolean|string compile_once_or_error ----@return integer? flags -function regex.re_match_compile(re, opts) end - ----@param buf ffi.cdata* ----@param buf_size integer ----@param pos integer ----@param len integer ----@param new_len integer ----@param must_alloc boolean ----@return ffi.cdata* buf ----@return integer buf_size ----@return integer new_len -function regex.check_buf_size(buf, buf_size, pos, len, new_len, must_alloc) end - ----@param re string ----@param opts ngx.re.options ----@param replace? string ----@param func? fun(match:string):string ----@return resty.core.regex.compiled? compiled ----@return boolean|string compile_once_or_error ----@return integer? flags -function regex.re_sub_compile(re, opts, replace, func) end - -return regex \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/core/request.lua b/meta/3rd/OpenResty/library/resty/core/request.lua deleted file mode 100644 index 3b4d81bd..00000000 --- a/meta/3rd/OpenResty/library/resty/core/request.lua +++ /dev/null @@ -1,5 +0,0 @@ ----@meta -local resty_core_request={} -resty_core_request.version = require("resty.core.base").version -function resty_core_request.set_req_header(name, value, override) end -return resty_core_request \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/core/response.lua b/meta/3rd/OpenResty/library/resty/core/response.lua deleted file mode 100644 index a3a4d4d7..00000000 --- a/meta/3rd/OpenResty/library/resty/core/response.lua +++ /dev/null @@ -1,5 +0,0 @@ ----@meta -local resty_core_response={} -function resty_core_response.set_resp_header() end -resty_core_response.version = require("resty.core.base").version -return resty_core_response \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/core/shdict.lua b/meta/3rd/OpenResty/library/resty/core/shdict.lua deleted file mode 100644 index 054a9dc5..00000000 --- a/meta/3rd/OpenResty/library/resty/core/shdict.lua +++ /dev/null @@ -1,4 +0,0 @@ ----@meta -local resty_core_shdict={} -resty_core_shdict.version = require("resty.core.base").version -return resty_core_shdict \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/core/time.lua b/meta/3rd/OpenResty/library/resty/core/time.lua deleted file mode 100644 index 30f89b1e..00000000 --- a/meta/3rd/OpenResty/library/resty/core/time.lua +++ /dev/null @@ -1,4 +0,0 @@ ----@meta -local resty_core_time={} -resty_core_time.version = require("resty.core.base").version -return resty_core_time \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/core/uri.lua b/meta/3rd/OpenResty/library/resty/core/uri.lua deleted file mode 100644 index 3e2c3e51..00000000 --- a/meta/3rd/OpenResty/library/resty/core/uri.lua +++ /dev/null @@ -1,4 +0,0 @@ ----@meta -local resty_core_uri={} -resty_core_uri.version = require("resty.core.base").version -return resty_core_uri \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/core/utils.lua b/meta/3rd/OpenResty/library/resty/core/utils.lua deleted file mode 100644 index 8070a33b..00000000 --- a/meta/3rd/OpenResty/library/resty/core/utils.lua +++ /dev/null @@ -1,10 +0,0 @@ ----@meta -local resty_core_utils={} - ----@param str string ----@param find string ----@param replace string ----@return string -function resty_core_utils.str_replace_char(str, find, replace) end -resty_core_utils.version = require("resty.core.base").version -return resty_core_utils \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/core/var.lua b/meta/3rd/OpenResty/library/resty/core/var.lua deleted file mode 100644 index df884ff9..00000000 --- a/meta/3rd/OpenResty/library/resty/core/var.lua +++ /dev/null @@ -1,4 +0,0 @@ ----@meta -local resty_core_var={} -resty_core_var.version = require("resty.core.base").version -return resty_core_var \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/core/worker.lua b/meta/3rd/OpenResty/library/resty/core/worker.lua deleted file mode 100644 index 92a8351c..00000000 --- a/meta/3rd/OpenResty/library/resty/core/worker.lua +++ /dev/null @@ -1,4 +0,0 @@ ----@meta -local resty_core_worker={} -resty_core_worker._VERSION = require("resty.core.base").version -return resty_core_worker \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/dns/resolver.lua b/meta/3rd/OpenResty/library/resty/dns/resolver.lua deleted file mode 100644 index 1ddc1b5b..00000000 --- a/meta/3rd/OpenResty/library/resty/dns/resolver.lua +++ /dev/null @@ -1,424 +0,0 @@ ----@meta - ---- ---- lua-resty-dns - Lua DNS resolver for the ngx_lua based on the cosocket API ---- ---- https://github.com/openresty/lua-resty-dns ---- ----# Description ---- ---- This Lua library provides a DNS resolver for the ngx_lua nginx module: ---- ---- https://github.com/openresty/lua-nginx-module/#readme ---- ---- This Lua library takes advantage of ngx_lua's cosocket API, which ensures ---- 100% nonblocking behavior. ---- ---- Note that at least [ngx_lua 0.5.12](https://github.com/openresty/lua-nginx-module/tags) or [OpenResty 1.2.1.11](http://openresty.org/#Download) is required. ---- ---- Also, the [bit library](http://bitop.luajit.org/) is also required. If you're using LuaJIT 2.0 with ngx_lua, then the `bit` library is already available by default. ---- ---- Note that, this library is bundled and enabled by default in the [OpenResty bundle](http://openresty.org/). ---- ---- IMPORTANT: to be able to generate unique ids, the random generator must be properly seeded using `math.randomseed` prior to using this module. ---- ----# Automatic Error Logging ---- ---- By default, the underlying [ngx_lua](https://github.com/openresty/lua-nginx-module/#readme) module does error logging when socket errors happen. If you are already doing proper error handling in your own Lua code, then you are recommended to disable this automatic error logging by turning off [ngx_lua](https://github.com/openresty/lua-nginx-module/#readme)'s [lua_socket_log_errors](https://github.com/openresty/lua-nginx-module/#lua_socket_log_errors) directive, that is: ---- ----```nginx ---- lua_socket_log_errors off; ----``` ---- ----# Limitations ---- ---- * This library cannot be used in code contexts like `set_by_lua*`, `log_by_lua*`, and `header_filter_by_lua*` where the ngx_lua cosocket API is not available. ---- * The `resty.dns.resolver` object instance cannot be stored in a Lua variable at the Lua module level, because it will then be shared by all the concurrent requests handled by the same nginx worker process (see https://github.com/openresty/lua-nginx-module/#data-sharing-within-an-nginx-worker ) and result in bad race conditions when concurrent requests are trying to use the same `resty.dns.resolver` instance. You should always initiate `resty.dns.resolver` objects in function local variables or in the `ngx.ctx` table. These places all have their own data copies for each request. ---- ----@class resty.dns.resolver ----@field _VERSION string ---- ---- undocumented/private fields--use at your own risk ---- ----@field cur integer ----@field socks udpsock[] ----@field tcp_sock tcpsock ----@field servers resty.dns.resolver.nameserver_tuple[] ----@field retrans integer ----@field no_recurse boolean -local resolver = {} - - ---- The `A` resource record type, equal to the decimal number 1. ----@class resty.dns.resolver.TYPE_A -resolver.TYPE_A = 1 - ---- The `NS` resource record type, equal to the decimal number `2`. ----@class resty.dns.resolver.TYPE_NS -resolver.TYPE_NS = 2 - ---- The `CNAME` resource record type, equal to the decimal number `5`. ----@class resty.dns.resolver.TYPE_CNAME -resolver.TYPE_CNAME = 5 - ---- The `SOA` resource record type, equal to the decimal number `6`. ----@class resty.dns.resolver.TYPE_SOA -resolver.TYPE_SOA = 6 - ---- The `PTR` resource record type, equal to the decimal number `12`. ----@class resty.dns.resolver.TYPE_PTR -resolver.TYPE_PTR = 12 - ---- The `MX` resource record type, equal to the decimal number `15`. ----@class resty.dns.resolver.TYPE_MX -resolver.TYPE_MX = 15 - ---- The `TXT` resource record type, equal to the decimal number `16`. ----@class resty.dns.resolver.TYPE_TXT -resolver.TYPE_TXT = 16 - ---- The `AAAA` resource record type, equal to the decimal number `28`. ----@class resty.dns.resolver.TYPE_AAAA -resolver.TYPE_AAAA = 28 - ---- The `SRV` resource record type, equal to the decimal number `33`. ---- ---- See RFC 2782 for details. ----@class resty.dns.resolver.TYPE_SRV -resolver.TYPE_SRV = 33 - ---- The `SPF` resource record type, equal to the decimal number `99`. ---- ---- See RFC 4408 for details. ----@class resty.dns.resolver.TYPE_SPF -resolver.TYPE_SPF = 99 - - ----@alias resty.dns.resolver.TYPE integer ----| `resolver.TYPE_A` # A ----| 1 # A ----| `resolver.TYPE_NS` # NS ----| 2 # NS ----| `resolver.TYPE_CNAME` # CNAME ----| 5 # CNAME ----| `resolver.TYPE_SOA` # SOA ----| 6 # SOA ----| `resolver.TYPE_PTR` # PTR ----| 12 # PTR ----| `resolver.TYPE_MX` # MX ----| 15 # MX ----| `resolver.TYPE_TXT` # TXT ----| 16 # TXT ----| `resolver.TYPE_AAAA` # AAAA ----| 28 # AAAA ----| `resolver.TYPE_SRV` # SRV ----| 33 # SRV ----| `resolver.TYPE_SPF` # SPF ----| 99 # SPF - - ----@alias resty.dns.resolver.CLASS integer ----| `resolver.CLASS_IN` ----| 1 - ---- The `Internet` resource record type ----@class resty.dns.resolver.CLASS_IN -resolver.CLASS_IN = 1 - - ----@alias resty.dns.resolver.SECTION integer ----| `resolver.SECTION_AN` # Answer section ----| 1 # Answer section ----| `resolver.SECTION_NS` # Authority section ----| 2 # Authority section ----| `resolver.SECTION_AR` # Additional section ----| 3 # Additional section - - ---- Identifier of the `Answer` section in the DNS response. ----@class resty.dns.resolver.SECTION_AN -resolver.SECTION_AN = 1 - - ---- Identifier of the `Authority` section in the DNS response. ----@class resty.dns.resolver.SECTION_NS -resolver.SECTION_NS = 2 - - ---- Identifier of the `Additional` section in the DNS response. ----@class resty.dns.resolver.SECTION_AR -resolver.SECTION_AR = 3 - - ----@alias resty.dns.resolver.ERRCODE integer ----| 1 # format error ----| 2 # server failure ----| 3 # name error ----| 4 # not implemented ----| 5 # refused - - ----@alias resty.dns.resolver.ERRSTR ----| "format error" # errcode 1 ----| "server failure" # errcode 2 ----| "name error" # errcode 3 ----| "not implemented" # errcode 4 ----| "refused" # errcode 5 ----| "unknown" # errcode unknown - - ---- Creates a dns.resolver object. ---- ---- On error, returns `nil` and an error string. ---- ----@param opts resty.dns.resolver.new.opts ----@return resty.dns.resolver? resolver ----@return string? error -function resolver:new(opts) end - - ----@class resty.dns.resolver.nameserver_tuple ----@field [1] string # hostname or addr ----@field [2] integer # port number - ----@alias resty.dns.resolver.nameserver ----| string ----| resty.dns.resolver.nameserver_tuple - - ---- Options for `resty.dns.resolver:new()` ---- ----@class resty.dns.resolver.new.opts : table ---- ----@field nameservers resty.dns.resolver.nameserver[] # a list of nameservers to be used. Each nameserver entry can be either a single hostname string or a table holding both the hostname string and the port number. The nameserver is picked up by a simple round-robin algorithm for each `query` method call. This option is required. ---- ----@field retrans? number # (default: `5`) the total number of times of retransmitting the DNS request when receiving a DNS response times out according to the `timeout` setting. When trying to retransmit the query, the next nameserver according to the round-robin algorithm will be picked up. ---- ----@field timeout? number # (default: `2000`) the time in milliseconds for waiting for the response for a single attempt of request transmission. note that this is ''not'' the maximal total waiting time before giving up, the maximal total waiting time can be calculated by the expression `timeout x retrans`. The `timeout` setting can also be changed by calling the `set_timeout` method. ---- ----@field no_recurse? boolean # (default: `false`) a boolean flag controls whether to disable the "recursion desired" (RD) flag in the UDP request. ---- ----@field no_random? boolean # (default: `false`) a boolean flag controls whether to randomly pick the nameserver to query first, if `true` will always start with the first nameserver listed. - - ---- Performs a DNS standard query. ---- ---- The query is sent to the nameservers specified by the `new` method, and ---- ---- Returns all the answer records in an array-like Lua table. ---- ---- In case of errors, it will return nil and a string describing the error instead. ---- ---- If the server returns a non-zero error code, the fields `errcode` and `errstr` will be set accordingly in the Lua table returned. ---- ---- The optional parameter `tries` can be provided as an empty table, and will be returned as a third result. The table will be an array with the error message for each (if any) failed try. ---- ---- When data truncation happens, the resolver will automatically retry using the TCP transport mode to query the current nameserver. All TCP connections are short lived. ---- ----@param qname string ----@param opts? resty.dns.resolver.query.opts ----@param tries? string[] ----@return resty.dns.resolver.query.answer[] results ----@return string? error ----@return string[]? tries -function resolver:query(qname, opts, tries) end - - ----@class resty.dns.resolver.answer : table ---- ----@field name string # The resource record name. ---- ----@field type resty.dns.resolver.TYPE # The current resource record type, possible values are 1 (TYPE_A), 5 (TYPE_CNAME), 28 (TYPE_AAAA), and any other values allowed by RFC 1035. ---- ----@field section resty.dns.resolver.SECTION # The identifier of the section that the current answer record belongs to. Possible values are 1 (SECTION_AN), 2 (SECTION_NS), and 3 (SECTION_AR). ---- ----@field ttl number # The time-to-live (TTL) value in seconds for the current resource record. ---- ----@field class resty.dns.resolver.CLASS # The current resource record class, possible values are 1 (CLASS_IN) or any other values allowed by RFC 1035. ---- ----@field rdata string # The raw resource data (RDATA) for resource records that are not recognized. ---- ----@field errcode? resty.dns.resolver.ERRCODE # Error code returned by the DNS server ---- ----@field errstr? resty.dns.resolver.ERRSTR # Error string returned by the DNS server - - ---- A-type answer ---- ----@class resty.dns.resolver.answer.A : resty.dns.resolver.answer ---- ----@field address string # The IPv4 address. - ---- AAAA-type answer ---- ----@class resty.dns.resolver.answer.AAAA : resty.dns.resolver.answer ---- ----@field address string # The IPv6 address. Successive 16-bit zero groups in IPv6 addresses will not be compressed by default, if you want that, you need to call the compress_ipv6_addr static method instead. - - ---- CNAME-type answer ---- ----@class resty.dns.resolver.answer.CNAME : resty.dns.resolver.answer ---- ----@field cname? string # The (decoded) record data value for CNAME resource records. - - ---- MX-type answer ---- ----@class resty.dns.resolver.answer.MX : resty.dns.resolver.answer ---- ----@field preference integer # The preference integer number for MX resource records. ---- ----@field exchange? string # The exchange domain name for MX resource records. - - ---- SRV-type answer ---- ----@class resty.dns.resolver.answer.SRV : resty.dns.resolver.answer ---- ----@field priority number ---- ----@field weight number ---- ----@field port integer ---- ----@field target string - - ---- NS-type answer ---- ----@class resty.dns.resolver.answer.NS : resty.dns.resolver.answer ---- ----@field nsdname string # A domain-name which specifies a host which should be authoritative for the specified class and domain. Usually present for NS type records. ---- - - ---- TXT-type answer ---- ----@class resty.dns.resolver.answer.TXT : resty.dns.resolver.answer ---- ----@field txt? string|string[] # The record value for TXT records. When there is only one character string in this record, then this field takes a single Lua string. Otherwise this field takes a Lua table holding all the strings. - - ---- SPF-type answer ---- ----@class resty.dns.resolver.answer.SPF : resty.dns.resolver.answer ---- ----@field spf? string|string[] # The record value for SPF records. When there is only one character string in this record, then this field takes a single Lua string. Otherwise this field takes a Lua table holding all the strings. - - ---- PTR-type answer ---- ----@class resty.dns.resolver.answer.PTR : resty.dns.resolver.answer ---- ----@field ptrdname string # The record value for PTR records. - - ---- SOA-type answer ---- ----@class resty.dns.resolver.answer.SOA : resty.dns.resolver.answer ---- ----@field serial integer # SOA serial ----@field refresh integer # SOA refresh ----@field retry integer # SOA retry ----@field expire integer # SOA expire ----@field minimum integer # SOA minimum - - ----@alias resty.dns.resolver.query.answer ----| resty.dns.resolver.answer ----| resty.dns.resolver.answer.A ----| resty.dns.resolver.answer.AAAA ----| resty.dns.resolver.answer.CNAME ----| resty.dns.resolver.answer.MX ----| resty.dns.resolver.answer.NS ----| resty.dns.resolver.answer.PTR ----| resty.dns.resolver.answer.SOA ----| resty.dns.resolver.answer.SPF ----| resty.dns.resolver.answer.SRV ----| resty.dns.resolver.answer.TXT - - ---- Options for `resty.dns.resolver:query()` ---- ----@class resty.dns.resolver.query.opts : table ---- ----@field qtype? resty.dns.resolver.TYPE # (default: `1`) The type of the question. Possible values are 1 (TYPE_A), 5 (TYPE_CNAME), 28 (TYPE_AAAA), or any other QTYPE value specified by RFC 1035 and RFC 3596. ---- ----@field authority_section? boolean # (default: `false`) When `true`, the answers return value includes the `Authority` section of the DNS response. ---- ----@field additional_section? boolean # (default: `false`) When `true`, the answers return value includes the `Additional` section of the DNS response. - - ---- Just like the query method, but enforce the TCP transport mode instead of UDP. ---- ---- All TCP connections are short lived. ---- ----@param qname string ----@param opts? resty.dns.resolver.query.opts ----@return resty.dns.resolver.query.answer[] results ----@return string? error -function resolver:tcp_query(qname, opts) end - - ---- Performs a PTR lookup for both IPv4 and IPv6 addresses. ---- ---- This function is basically a wrapper for the query command which uses the `arpa_str` function to convert the IP address on the fly. ---- ----@param addr string ----@return resty.dns.resolver.query.answer[] results ----@return string? error -function resolver:reverse_query(addr) end - - ---- Overrides the current timeout setting for all nameserver peers. ---- ----@param timeout number # timeout in milliseconds -function resolver:set_timeout(timeout) end - ---- Compresses the successive 16-bit zero groups in the textual format of the IPv6 address. ---- ---- For example, the following will yield `FF01::101` in the new_addr return value: ---- ----```lua ---- local resolver = require "resty.dns.resolver" ---- local compress = resolver.compress_ipv6_addr ---- local new_addr = compress("FF01:0:0:0:0:0:0:101") ----``` ---- ----@param addr string ----@return string compressed -function resolver.compress_ipv6_addr(addr) end - ---- Expands the successive 16-bit zero groups in the textual format of the IPv6 address. ---- ---- For example, the following will yield `FF01:0:0:0:0:0:0:101` in the new_addr return value: ---- ----```lua ---- local resolver = require "resty.dns.resolver" ---- local expand = resolver.expand_ipv6_addr ---- local new_addr = expand("FF01::101") ----``` ---- ----@param addr string ----@return string expanded -function resolver.expand_ipv6_addr(addr) end - ---- Generates the reverse domain name for PTR lookups for both IPv4 and IPv6 addresses. ---- ---- Compressed IPv6 addresses will be automatically expanded. ---- ---- For example, the following will yield `4.3.2.1.in-addr.arpa` for `ptr4` and `1.0.1.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.1.0.F.F.ip6.arpa` for `ptr6`: ---- ----```lua ---- local resolver = require "resty.dns.resolver" ---- local ptr4 = resolver.arpa_str("1.2.3.4") ---- local ptr6 = resolver.arpa_str("FF01::101") ----``` ---- ----@param addr string ----@return string -function resolver.arpa_str(addr) end - - -return resolver \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/limit/conn.lua b/meta/3rd/OpenResty/library/resty/limit/conn.lua deleted file mode 100644 index e68c3356..00000000 --- a/meta/3rd/OpenResty/library/resty/limit/conn.lua +++ /dev/null @@ -1,11 +0,0 @@ ----@meta -resty_limit_conn={} -function resty_limit_conn.set_conn(self, conn) end -function resty_limit_conn.uncommit(self, key) end -function resty_limit_conn.is_committed(self) end -function resty_limit_conn.new(dict_name, max, burst, default_conn_delay) end -function resty_limit_conn.set_burst(self, burst) end -function resty_limit_conn.leaving(self, key, req_latency) end -function resty_limit_conn.incoming(self, key, commit) end -resty_limit_conn._VERSION="0.06" -return resty_limit_conn \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/limit/count.lua b/meta/3rd/OpenResty/library/resty/limit/count.lua deleted file mode 100644 index 9c05c45c..00000000 --- a/meta/3rd/OpenResty/library/resty/limit/count.lua +++ /dev/null @@ -1,7 +0,0 @@ ----@meta -resty_limit_count={} -function resty_limit_count.uncommit(self, key) end -function resty_limit_count.incoming(self, key, commit) end -resty_limit_count._VERSION="0.06" -function resty_limit_count.new(dict_name, limit, window) end -return resty_limit_count \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/limit/req.lua b/meta/3rd/OpenResty/library/resty/limit/req.lua deleted file mode 100644 index f75269c8..00000000 --- a/meta/3rd/OpenResty/library/resty/limit/req.lua +++ /dev/null @@ -1,9 +0,0 @@ ----@meta -resty_limit_req={} -function resty_limit_req.set_rate(self, rate) end -function resty_limit_req.uncommit(self, key) end -function resty_limit_req.set_burst(self, burst) end -function resty_limit_req.new(dict_name, rate, burst) end -function resty_limit_req.incoming(self, key, commit) end -resty_limit_req._VERSION="0.06" -return resty_limit_req \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/limit/traffic.lua b/meta/3rd/OpenResty/library/resty/limit/traffic.lua deleted file mode 100644 index f3e53e16..00000000 --- a/meta/3rd/OpenResty/library/resty/limit/traffic.lua +++ /dev/null @@ -1,5 +0,0 @@ ----@meta -resty_limit_traffic={} -resty_limit_traffic._VERSION="0.06" -function resty_limit_traffic.combine(limiters, keys, states) end -return resty_limit_traffic \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/lock.lua b/meta/3rd/OpenResty/library/resty/lock.lua deleted file mode 100644 index e5543597..00000000 --- a/meta/3rd/OpenResty/library/resty/lock.lua +++ /dev/null @@ -1,127 +0,0 @@ ----@meta - ---- lua-resty-lock ---- ---- https://github.com/openresty/lua-resty-lock ---- ----@class resty.lock : table -local lock = { - _VERSION = "0.08", -} - - ----@class resty.lock.opts : table ---- ---- Specifies expiration time (in seconds) for the lock entry in the shared memory ---- dictionary. You can specify up to 0.001 seconds. Default to 30 (seconds). Even ---- if the invoker does not call unlock or the object holding the lock is not GC'd, ---- the lock will be released after this time. So deadlock won't happen even when the ---- worker process holding the lock crashes. ----@field exptime number ---- ---- Specifies the maximal waiting time (in seconds) for the lock method calls on ---- the current object instance. You can specify up to 0.001 seconds. Default to 5 ---- (seconds). This option value cannot be bigger than `exptime`. This timeout is ---- to prevent a lock method call from waiting forever. You can specify 0 to make ---- the lock method return immediately without waiting if it cannot acquire the ---- lock right away. ----@field timeout number ---- ---- Specifies the initial step (in seconds) of sleeping when waiting for the lock. ---- Default to 0.001 (seconds). When the lock method is waiting on a busy lock, it ---- sleeps by steps. The step size is increased by a ratio (specified by the ratio ---- option) until reaching the step size limit (specified by the max_step option). ----@field step number ---- ---- Specifies the step increasing ratio. Default to 2, that is, the step size ---- doubles at each waiting iteration. ----@field ratio number ---- ---- Specifies the maximal step size (i.e., sleep interval, in seconds) allowed. ---- See also the step and ratio options). Default to 0.5 (seconds). ----@field max_step number - - ---- Creates a new lock object instance by specifying the shared dictionary name ---- (created by `lua_shared_dict`) and an optional options table `opts`. ---- ----@param dict_name string ----@param opts? resty.lock.opts ----@return resty.lock? lock ----@return string? err -function lock.new(_, dict_name, opts) end - ---- Tries to lock a key across all the Nginx worker processes in the current ---- NGINX server instance. Different keys are different locks. ---- ---- The length of the key string must not be larger than 65535 bytes. ---- ---- Returns the waiting time (in seconds) if the lock is successfully acquired. ---- Otherwise returns `nil` and a string describing the error. ---- ---- The waiting time is not from the wallclock, but rather is from simply adding ---- up all the waiting "steps". A nonzero elapsed return value indicates that ---- someone else has just hold this lock. But a zero return value cannot gurantee ---- that no one else has just acquired and released the lock. ---- ---- When this method is waiting on fetching the lock, no operating system threads ---- will be blocked and the current Lua "light thread" will be automatically yielded ---- behind the scene. ---- ---- It is strongly recommended to always call the unlock() method to actively ---- release the lock as soon as possible. ---- ---- If the `unlock()` method is never called after this method call, the lock ---- will get released when ---- ---- The current `resty.lock` object instance is collected automatically by the Lua GC. ---- OR ---- The exptime for the lock entry is reached. ---- ---- Common errors for this method call is ---- ---- "timeout" : The timeout threshold specified by the timeout option of the new method is exceeded. ---- "locked" : The current `resty.lock` object instance is already holding a lock (not necessarily of the same key). ---- ---- Other possible errors are from ngx_lua's shared dictionary API. ---- ---- It is required to create different `resty.lock` instances for multiple ---- simultaneous locks (i.e., those around different keys). ---- ----@param key string ----@return number? elapsed ----@return string? error -function lock:lock(key) end - ---- Releases the lock held by the current `resty.lock` object instance. ---- ---- Returns 1 on success. Returns `nil` and a string describing the error otherwise. ---- ---- If you call unlock when no lock is currently held, the error "unlocked" will ---- be returned. ---- ----@return boolean ok ----@return string? error -function lock:unlock() end - ---- Sets the TTL of the lock held by the current `resty.lock` object instance. ---- This will reset the timeout of the lock to timeout seconds if it is given, ---- otherwise the timeout provided while calling new will be used. ---- ---- Note that the timeout supplied inside this function is independent from the ---- timeout provided while calling new. Calling `expire()` will not change the ---- timeout value specified inside new and subsequent `expire(nil)` call will ---- still use the timeout number from new. ---- ---- Returns true on success. Returns `nil` and a string describing the error ---- otherwise. ---- ---- If you call expire when no lock is currently held, the error "unlocked" will ---- be returned. ---- ----@param timeout? number ----@return boolean ok ----@return string? error -function lock:expire(timeout) end - -return lock \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/lrucache.lua b/meta/3rd/OpenResty/library/resty/lrucache.lua deleted file mode 100644 index c7e675b9..00000000 --- a/meta/3rd/OpenResty/library/resty/lrucache.lua +++ /dev/null @@ -1,115 +0,0 @@ ----@meta - ----@class resty.lrucache : table -local lrucache = { - _VERSION = "0.11", -} - ---- User flags value associated with the item to be stored. ---- ---- It can be retrieved later with the item. The user flags are stored as an ---- unsigned 32-bit integer internally, and thus must be specified as a Lua ---- number. If not specified, flags will have a default value of 0. This ---- argument was added in the v0.10 release. ---- ----@alias resty.lrucache.flags integer - ---- Creates a new cache instance. ---- ---- Upon failure, returns nil and a string describing the error. ---- ----@param max_items number specifies the maximal number of items this cache can hold. ----@return resty.lrucache? cache ----@return string? error -function lrucache.new(max_items) end - - ---- Sets a key with a value and an expiration time. ---- ---- When the cache is full, the cache will automatically evict the least ---- recently used item. ---- ---- ----@param key string ----@param value any ----@param ttl? number Expiration time, in seconds. If omitted, the value never expires. ----@param flags? resty.lrucache.flags -function lrucache:set(key, value, ttl, flags) end - - ---- Fetches a value with the key. ---- ---- If the key does not exist in the cache or has already expired, `nil` will ---- be returned. ---- ---- Starting from v0.03, the stale data is also returned as the second return ---- value if available. ---- ----@param key string ----@return any? data ----@return any? stale_data ----@return resty.lrucache.flags? integer -function lrucache:get(key) end - - ---- Removes an item specified by the key from the cache. ---- ----@param key string -function lrucache:delete(key) end - - ---- Returns the number of items currently stored in the cache, including expired ---- items if any. ---- ---- The returned count value will always be greater or equal to 0 and smaller ---- than or equal to the size argument given to cache:new. ---- ---- This method was added in the v0.10 release. ---- ----@return integer -function lrucache:count() end - - ---- Returns the maximum number of items the cache can hold. ---- ---- The return value is the same as the size argument given to ---- `resty.lrucache.new()` when the cache was created. ---- ---- This method was added in the v0.10 release. ---- ----@return integer -function lrucache:capacity() end - - ---- Fetch the list of keys currently inside the cache, up to `max_count`. ---- ---- The keys will be ordered in MRU fashion (Most-Recently-Used keys first). ---- ---- This function returns a Lua (array) table (with integer keys) containing ---- the keys. ---- ---- When `max_count` is `nil` or `0`, all keys (if any) will be returned. ---- ---- When provided with a `res` table argument, this function will not allocate a ---- table and will instead insert the keys in `res`, along with a trailing `nil` ---- value. ---- ---- This method was added in the v0.10 release. ---- ----@param max_count? integer ----@param res? table ----@return table keys -function lrucache:get_keys(max_count, res) end - - ---- Flushes all the existing data (if any) in the current cache instance. ---- ---- This is an O(1) operation and should be much faster than creating a brand ---- new cache instance. ---- ---- Note however that the `flush_all()` method of `resty.lrucache.pureffi` is any ---- O(n) operation. -function lrucache:flush_all() end - - -return lrucache \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/lrucache/pureffi.lua b/meta/3rd/OpenResty/library/resty/lrucache/pureffi.lua deleted file mode 100644 index af5e9821..00000000 --- a/meta/3rd/OpenResty/library/resty/lrucache/pureffi.lua +++ /dev/null @@ -1,18 +0,0 @@ ----@meta - ----@class resty.lrucache.pureffi : resty.lrucache -local lrucache_pureffi = { - _VERSION = "0.11", -} - ---- Creates a new cache instance. ---- ---- Upon failure, returns nil and a string describing the error. ---- ----@param max_items number specifies the maximal number of items this cache can hold. ----@param load_factor? number designates the "load factor" of the FFI-based hash-table used internally by `resty.lrucache.pureffi`; the default value is 0.5 (i.e. 50%); if the load factor is specified, it will be clamped to the range of [0.1, 1] (i.e. if load factor is greater than 1, it will be saturated to 1; likewise, if load-factor is smaller than 0.1, it will be clamped to 0.1). ----@return resty.lrucache.pureffi? cache ----@return string? error -function lrucache_pureffi.new(max_items, load_factor) end - -return lrucache_pureffi \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/md5.lua b/meta/3rd/OpenResty/library/resty/md5.lua deleted file mode 100644 index de82b49e..00000000 --- a/meta/3rd/OpenResty/library/resty/md5.lua +++ /dev/null @@ -1,16 +0,0 @@ ----@meta - ----@class resty.md5 : resty.string.checksum -local md5={} - ---- Create a new md5 checksum object. ----@return resty.md5 -function md5:new() end - ---- Add a string to the md5 checksum data ----@param s string ----@param len? number Optional length (defaults to the length of `s`) ----@return boolean ok -function md5:update(s, len) end - -return md5 \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/memcached.lua b/meta/3rd/OpenResty/library/resty/memcached.lua deleted file mode 100644 index 79092d4c..00000000 --- a/meta/3rd/OpenResty/library/resty/memcached.lua +++ /dev/null @@ -1,27 +0,0 @@ ----@meta -resty_memcached={} -function resty_memcached.cas(self, key, value, cas_uniq, exptime, flags) end -function resty_memcached.new(self, opts) end -function resty_memcached.append(self, ...) end -function resty_memcached.gets(self, key) end -function resty_memcached.quit(self) end -function resty_memcached.get_reused_times(self) end -function resty_memcached.close(self) end -function resty_memcached.touch(self, key, exptime) end -function resty_memcached.replace(self, ...) end -function resty_memcached.delete(self, key) end -function resty_memcached.version(self) end -function resty_memcached.set(self, ...) end -function resty_memcached.stats(self, args) end -function resty_memcached.flush_all(self, time) end -function resty_memcached.add(self, ...) end -function resty_memcached.set_timeout(self, timeout) end -function resty_memcached.incr(self, key, value) end -function resty_memcached.set_keepalive(self, ...) end -function resty_memcached.connect(self, ...) end -function resty_memcached.prepend(self, ...) end -function resty_memcached.decr(self, key, value) end -function resty_memcached.verbosity(self, level) end -resty_memcached._VERSION="0.13" -function resty_memcached.get(self, key) end -return resty_memcached \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/mysql.lua b/meta/3rd/OpenResty/library/resty/mysql.lua deleted file mode 100644 index 540d5d00..00000000 --- a/meta/3rd/OpenResty/library/resty/mysql.lua +++ /dev/null @@ -1,15 +0,0 @@ ----@meta -resty_mysql={} -function resty_mysql.read_result() end -function resty_mysql.new(self) end -function resty_mysql.connect(self, opts) end -function resty_mysql.server_ver(self) end -function resty_mysql.send_query() end -function resty_mysql.set_keepalive(self, ...) end -function resty_mysql.set_compact_arrays(self, value) end -function resty_mysql.query(self, query, est_nrows) end -function resty_mysql.set_timeout(self, timeout) end -function resty_mysql.close(self) end -resty_mysql._VERSION="0.21" -function resty_mysql.get_reused_times(self) end -return resty_mysql \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/random.lua b/meta/3rd/OpenResty/library/resty/random.lua deleted file mode 100644 index c71dae05..00000000 --- a/meta/3rd/OpenResty/library/resty/random.lua +++ /dev/null @@ -1,10 +0,0 @@ ----@meta -local random={} - ---- Generate random bytes. ----@param len integer ----@param strong boolean ----@return string -function random.bytes(len, strong) end - -return random \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/redis.lua b/meta/3rd/OpenResty/library/resty/redis.lua deleted file mode 100644 index 6238f338..00000000 --- a/meta/3rd/OpenResty/library/resty/redis.lua +++ /dev/null @@ -1,57 +0,0 @@ ----@meta -resty_redis={} -function resty_redis.lrange() end -function resty_redis.new(self) end -function resty_redis.hset() end -function resty_redis.hexists() end -function resty_redis.punsubscribe() end -function resty_redis.incr() end -function resty_redis.lindex() end -function resty_redis.read_reply(self) end -function resty_redis.sismember() end -function resty_redis.set() end -function resty_redis.unsubscribe() end -function resty_redis.linsert() end -function resty_redis.zrem() end -function resty_redis.add_commands(...) end -function resty_redis.array_to_hash(self, t) end -function resty_redis.mset() end -function resty_redis.commit_pipeline(self) end -function resty_redis.zrange() end -function resty_redis.auth() end -function resty_redis.cancel_pipeline(self) end -resty_redis._VERSION="0.27" -function resty_redis.eval() end -function resty_redis.expire() end -function resty_redis.sdiff() end -function resty_redis.sinter() end -function resty_redis.hmset(self, hashname, ...) end -function resty_redis.zrank() end -function resty_redis.psubscribe() end -function resty_redis.sunion() end -function resty_redis.sadd() end -function resty_redis.srem() end -function resty_redis.script() end -function resty_redis.lpush() end -function resty_redis.init_pipeline(self, n) end -function resty_redis.zincrby() end -function resty_redis.get_reused_times(self) end -function resty_redis.zrangebyscore() end -function resty_redis.zadd() end -function resty_redis.subscribe() end -function resty_redis.hdel() end -function resty_redis.hget() end -function resty_redis.sort() end -function resty_redis.smembers() end -function resty_redis.connect(self, ...) end -function resty_redis.hmget() end -function resty_redis.set_timeout(self, timeout) end -function resty_redis.mget() end -function resty_redis.set_keepalive(self, ...) end -function resty_redis.llen() end -function resty_redis.del() end -function resty_redis.decr() end -function resty_redis.lpop() end -function resty_redis.close() end -function resty_redis.get() end -return resty_redis \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/sha.lua b/meta/3rd/OpenResty/library/resty/sha.lua deleted file mode 100644 index 716d0bd1..00000000 --- a/meta/3rd/OpenResty/library/resty/sha.lua +++ /dev/null @@ -1,4 +0,0 @@ ----@meta -local resty_sha={} -resty_sha._VERSION = require("resty.string")._VERSION -return resty_sha \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/sha1.lua b/meta/3rd/OpenResty/library/resty/sha1.lua deleted file mode 100644 index 85d5ace1..00000000 --- a/meta/3rd/OpenResty/library/resty/sha1.lua +++ /dev/null @@ -1,10 +0,0 @@ ----@meta - ----@class resty.sha1 : resty.string.checksum -local sha1={} - ---- Create a new sha1 checksum object. ----@return resty.sha1 -function sha1:new() end - -return sha1 \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/sha224.lua b/meta/3rd/OpenResty/library/resty/sha224.lua deleted file mode 100644 index b45f55cb..00000000 --- a/meta/3rd/OpenResty/library/resty/sha224.lua +++ /dev/null @@ -1,10 +0,0 @@ ----@meta - ----@class resty.sha244 : resty.string.checksum -local sha224={} - ---- Create a new sha244 checksum object. ----@return resty.sha244 -function sha224:new() end - -return sha224 \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/sha256.lua b/meta/3rd/OpenResty/library/resty/sha256.lua deleted file mode 100644 index 29e00eeb..00000000 --- a/meta/3rd/OpenResty/library/resty/sha256.lua +++ /dev/null @@ -1,10 +0,0 @@ ----@meta - ----@class resty.sha256 : resty.string.checksum -local sha256={} - ---- Create a new sha256 checksum object. ----@return resty.sha256 -function sha256:new() end - -return sha256 \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/sha384.lua b/meta/3rd/OpenResty/library/resty/sha384.lua deleted file mode 100644 index f0e6e7b3..00000000 --- a/meta/3rd/OpenResty/library/resty/sha384.lua +++ /dev/null @@ -1,10 +0,0 @@ ----@meta - ----@class resty.sha384 : resty.string.checksum -local sha384={} - ---- Create a new sha384 checksum object. ----@return resty.sha384 -function sha384:new() end - -return sha384 \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/sha512.lua b/meta/3rd/OpenResty/library/resty/sha512.lua deleted file mode 100644 index afa1e946..00000000 --- a/meta/3rd/OpenResty/library/resty/sha512.lua +++ /dev/null @@ -1,10 +0,0 @@ ----@meta - ----@class resty.sha512 : resty.string.checksum -local sha512={} - ---- Create a new sha512 checksum object. ----@return resty.sha512 -function sha512:new() end - -return sha512 \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/shell.lua b/meta/3rd/OpenResty/library/resty/shell.lua deleted file mode 100644 index be2d41ea..00000000 --- a/meta/3rd/OpenResty/library/resty/shell.lua +++ /dev/null @@ -1,62 +0,0 @@ ----@meta - -local shell = { - version = 0.03, -} - - ---- Runs a shell command, `cmd`, with an optional stdin. ---- ---- The `cmd` argument can either be a single string value (e.g. `"echo 'hello, ---- world'"`) or an array-like Lua table (e.g. `{"echo", "hello, world"}`). The ---- former is equivalent to `{"/bin/sh", "-c", "echo 'hello, world'"}`, but simpler ---- and slightly faster. ---- ---- When the `stdin` argument is `nil` or `""`, the stdin device will immediately ---- be closed. ---- ---- The `timeout` argument specifies the timeout threshold (in ms) for ---- stderr/stdout reading timeout, stdin writing timeout, and process waiting ---- timeout. The default is 10 seconds as per https://github.com/openresty/lua-resty-core/blob/master/lib/ngx/pipe.md#set_timeouts ---- ---- The `max_size` argument specifies the maximum size allowed for each output ---- data stream of stdout and stderr. When exceeding the limit, the `run()` ---- function will immediately stop reading any more data from the stream and return ---- an error string in the `reason` return value: `"failed to read stdout: too much ---- data"`. ---- ---- Upon terminating successfully (with a zero exit status), `ok` will be `true`, ---- `reason` will be `"exit"`, and `status` will hold the sub-process exit status. ---- ---- Upon terminating abnormally (non-zero exit status), `ok` will be `false`, ---- `reason` will be `"exit"`, and `status` will hold the sub-process exit status. ---- ---- Upon exceeding a timeout threshold or any other unexpected error, `ok` will be ---- `nil`, and `reason` will be a string describing the error. ---- ---- When a timeout threshold is exceeded, the sub-process will be terminated as ---- such: ---- ---- 1. first, by receiving a `SIGTERM` signal from this library, ---- 2. then, after 1ms, by receiving a `SIGKILL` signal from this library. ---- ---- Note that child processes of the sub-process (if any) will not be terminated. ---- You may need to terminate these processes yourself. ---- ---- When the sub-process is terminated by a UNIX signal, the `reason` return value ---- will be `"signal"` and the `status` return value will hold the signal number. ---- ----@param cmd string|string[] ----@param stdin? string ----@param timeout? number ----@param max_size? number ---- ----@return boolean ok ----@return string? stdout ----@return string? stderr ----@return string|'"exit"'|'"signal"' reason ----@return number? status -function shell.run(cmd, stdin, timeout, max_size) end - - -return shell \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/signal.lua b/meta/3rd/OpenResty/library/resty/signal.lua deleted file mode 100644 index a7e42d42..00000000 --- a/meta/3rd/OpenResty/library/resty/signal.lua +++ /dev/null @@ -1,74 +0,0 @@ ----@meta - -local signal = { - version = 0.03, -} - - ----@alias resty.signal.name ----| "NONE" # SIG_NONE ----| "HUP" # SIG_HUP ----| "INT" # SIG_INT ----| "QUIT" # SIG_QUIT ----| "ILL" # SIG_ILL ----| "TRAP" # SIG_TRAP ----| "ABRT" # SIG_ABRT ----| "BUS" # SIG_BUS ----| "FPE" # SIG_FPE ----| "KILL" # SIG_KILL ----| "USR1" # SIG_USR1 ----| "SEGV" # SIG_SEGV ----| "USR2" # SIG_USR2 ----| "PIPE" # SIG_PIPE ----| "ALRM" # SIG_ALRM ----| "TERM" # SIG_TERM ----| "CHLD" # SIG_CHLD ----| "CONT" # SIG_CONT ----| "STOP" # SIG_STOP ----| "TSTP" # SIG_TSTP ----| "TTIN" # SIG_TTIN ----| "TTOU" # SIG_TTOU ----| "URG" # SIG_URG ----| "XCPU" # SIG_XCPU ----| "XFSZ" # SIG_XFSZ ----| "VTALRM" # SIG_VTALRM ----| "PROF" # SIG_PROF ----| "WINCH" # SIG_WINCH ----| "IO" # SIG_IO ----| "PWR" # SIG_PWR ----| "EMT" # SIG_EMT ----| "SYS" # SIG_SYS ----| "INFO" # SIG_INFO - - ----@alias resty.signal.signal ----| resty.signal.name ----| integer ----| string - - ---- --- Sends a signal with its name string or number value to the process of the specified pid. --- --- All signal names accepted by signum are supported, like HUP, KILL, and TERM. --- --- Signal numbers are also supported when specifying nonportable system-specific signals is desired. --- ----@param pid number ----@param signal_name_or_num resty.signal.signal ---- ----@return boolean ok ----@return string? error -function signal.kill(pid, signal_name_or_num) end - - ---- --- Maps the signal name specified to the system-specific signal number. --- Returns `nil` if the signal name is not known. --- ----@param name string|resty.signal.name ----@return integer|nil -function signal.signum(name) end - - -return signal \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/string.lua b/meta/3rd/OpenResty/library/resty/string.lua deleted file mode 100644 index e9852da8..00000000 --- a/meta/3rd/OpenResty/library/resty/string.lua +++ /dev/null @@ -1,75 +0,0 @@ ----@meta - ---- OpenResty string functions. ---- https://github.com/openresty/lua-resty-string -local str = { - _VERSION = "0.14", -} - - ---- Encode byte string in hexidecimal. ---- ---- This is most useful for retrieving a printable string from a checksum ---- result. ---- ---- Usage: ---- ----```lua ---- local str = require "resty.string" ---- local md5 = require "resty.md5" ---- ---- local sum = md5:new() ---- sum:update("hello") ---- sum:update("goodbye") ---- local digest = sum:final() ---- print(str.to_hex(digest)) --> 441add4718519b71e42d329a834d6d5e ----``` ----@param s string ----@return string hex -function str.to_hex(s) end - ---- Convert an ASCII string to an integer. ---- ---- If the string is not numeric, `-1` is returned. ---- ---- Usage: ---- ----```lua ---- local str = require "resty.string" ---- print(str.atoi("250")) --> 250 ---- print(str.atoi("abc")) --> -1 ----``` ---- ----@param s string ----@return number -function str.atoi(s) end - - ---- A lua-resty-string checksum object. ----@class resty.string.checksum : table -local checksum = { - _VERSION = str._VERSION, -} - ---- Create a new checksum object. ----@return resty.string.checksum? -function checksum:new() end - ---- Add a string to the checksum data. ---- ---- This can be called multiple times. ---- ----@param s string ----@return boolean ok -function checksum:update(s) end - ---- Calculate the final checksum. ----@return string? digest -function checksum:final() end - ---- Reset the checksum object. ----@return boolean ok -function checksum:reset() end - - -return str \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/upload.lua b/meta/3rd/OpenResty/library/resty/upload.lua deleted file mode 100644 index 505bf766..00000000 --- a/meta/3rd/OpenResty/library/resty/upload.lua +++ /dev/null @@ -1,7 +0,0 @@ ----@meta -resty_upload={} -function resty_upload.read(self) end -function resty_upload.set_timeout(self, timeout) end -resty_upload._VERSION="0.10" -function resty_upload.new(self, chunk_size, max_line_size) end -return resty_upload \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/upstream/healthcheck.lua b/meta/3rd/OpenResty/library/resty/upstream/healthcheck.lua deleted file mode 100644 index 824dc183..00000000 --- a/meta/3rd/OpenResty/library/resty/upstream/healthcheck.lua +++ /dev/null @@ -1,6 +0,0 @@ ----@meta -resty_upstream_healthcheck={} -function resty_upstream_healthcheck.status_page() end -resty_upstream_healthcheck._VERSION="0.05" -function resty_upstream_healthcheck.spawn_checker(opts) end -return resty_upstream_healthcheck \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/websocket/client.lua b/meta/3rd/OpenResty/library/resty/websocket/client.lua deleted file mode 100644 index 12615483..00000000 --- a/meta/3rd/OpenResty/library/resty/websocket/client.lua +++ /dev/null @@ -1,63 +0,0 @@ ----@meta - ----@class resty.websocket.client : resty.websocket -local client = { - _VERSION = "0.09" -} - ----Instantiates a WebSocket client object. ---- ----In case of error, it returns nil and a string describing the error. ---- ----An optional options table can be specified. ---- ----@param opts? resty.websocket.new.opts ----@return resty.websocket.client? client ----@return string? error -function client:new(opts) end - ----Connects to the remote WebSocket service port and performs the websocket ----handshake process on the client side. ---- ----Before actually resolving the host name and connecting to the remote backend, ----this method will always look up the connection pool for matched idle ----connections created by previous calls of this method. ---- ----@param url string ----@param opts? resty.websocket.client.connect.opts ----@return boolean ok ----@return string? error -function client:connect(uri, opts) end - ---- Puts the current WebSocket connection immediately into the ngx_lua cosocket connection pool. ---- ---- You can specify the max idle timeout (in ms) when the connection is in the pool and the maximal size of the pool every nginx worker process. ---- ---- In case of success, returns 1. In case of errors, returns nil with a string describing the error. ---- ---- Only call this method in the place you would have called the close method instead. Calling this method will immediately turn the current WebSocket object into the closed state. Any subsequent operations other than connect() on the current object will return the closed error. ----- ----@param max_idle_timeout number ----@param pool_size integer ----@return boolean ok ----@return string? error -function client:set_keepalive(max_idle_timeout, pool_size) end - ----Closes the current WebSocket connection. ---- ----If no close frame is sent yet, then the close frame will be automatically sent. ---- ----@return boolean ok ----@return string? error -function client:close() end - ----@class resty.websocket.client.connect.opts : table ---- ----@field protocols string|string[] subprotocol(s) used for the current WebSocket session ----@field origin string the value of the Origin request header ----@field pool string custom name for the connection pool being used. If omitted, then the connection pool name will be generated from the string template :. ----@field ssl_verify boolean whether to perform SSL certificate verification during the SSL handshake if the wss:// scheme is used. ----@field headers string[] custom headers to be sent in the handshake request. The table is expected to contain strings in the format {"a-header: a header value", "another-header: another header value"}. - - -return client \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/websocket/protocol.lua b/meta/3rd/OpenResty/library/resty/websocket/protocol.lua deleted file mode 100644 index 23591928..00000000 --- a/meta/3rd/OpenResty/library/resty/websocket/protocol.lua +++ /dev/null @@ -1,173 +0,0 @@ ----@meta - ----@class resty.websocket.protocol -local protocol = { - _VERSION = "0.09", -} - ---- websocket object ---- https://github.com/openresty/lua-resty-websocket ---- ----@class resty.websocket : table ----@field sock tcpsock ----@field fatal boolean ----@field max_payload_len number ----@field send_masked boolean -local websocket = {} - ----@param ms integer sets the timeout delay (in milliseconds) for the network-related operations -function websocket:set_timeout(ms) end - ----Sends the text argument out as an unfragmented data frame of the text type. ---- ----Returns the number of bytes that have actually been sent on the TCP level. ---- ----In case of errors, returns nil and a string describing the error. ---- ----@param text string ----@return integer? bytes ----@return string? error -function websocket:send_text(text) end - ----Sends the data argument out as an unfragmented data frame of the binary type. ---- ----Returns the number of bytes that have actually been sent on the TCP level. ---- ----In case of errors, returns nil and a string describing the error. ---- ----@param data string ----@return integer? bytes ----@return string? error -function websocket:send_binary(data) end - ----Sends out a ping frame with an optional message specified by the msg argument. ----Returns the number of bytes that have actually been sent on the TCP level. ---- ----In case of errors, returns nil and a string describing the error. ---- ----Note that this method does not wait for a pong frame from the remote end. ---- ----@param msg? string ----@return integer? bytes ----@return string? error -function websocket:send_ping(msg) end - ----Sends out a pong frame with an optional message specified by the msg argument. ----Returns the number of bytes that have actually been sent on the TCP level. ---- ----In case of errors, returns nil and a string describing the error. ----@param msg? string ----@return integer? bytes ----@return string? error -function websocket:send_pong(msg) end - ----Sends out a close frame with an optional status code and a message. ---- ----In case of errors, returns nil and a string describing the error. ---- ----For a list of valid status code, see the following document: ---- ----http://tools.ietf.org/html/rfc6455#section-7.4.1 ---- ----Note that this method does not wait for a close frame from the remote end. ----@param code? integer ----@param msg? string ----@return integer? bytes ----@return string? error -function websocket:send_close(code, msg) end - ----Sends out a raw websocket frame by specifying the fin field (boolean value), the opcode, and the payload. ---- ----For a list of valid opcode, see ---- ----http://tools.ietf.org/html/rfc6455#section-5.2 ---- ----In case of errors, returns nil and a string describing the error. ---- ----To control the maximal payload length allowed, you can pass the max_payload_len option to the new constructor. ---- ----To control whether to send masked frames, you can pass true to the send_masked option in the new constructor method. By default, unmasked frames are sent. ----@param fin boolean ----@param opcode resty.websocket.protocol.opcode ----@param payload string ----@return integer? bytes ----@return string? error -function websocket:send_frame(fin, opcode, payload) end - ----Receives a WebSocket frame from the wire. ---- ----In case of an error, returns two nil values and a string describing the error. ---- ----The second return value is always the frame type, which could be one of continuation, text, binary, close, ping, pong, or nil (for unknown types). ---- ----For close frames, returns 3 values: the extra status message (which could be an empty string), the string "close", and a Lua number for the status code (if any). For possible closing status codes, see ---- ----http://tools.ietf.org/html/rfc6455#section-7.4.1 ---- ----For other types of frames, just returns the payload and the type. ---- ----For fragmented frames, the err return value is the Lua string "again". ---- ----@return string? data ----@return resty.websocket.protocol.type? typ ----@return string|integer? error_or_status_code -function websocket:recv_frame() end - ----@class resty.websocket.new.opts : table ----@field max_payload_len integer maximal length of payload allowed when sending and receiving WebSocket frames ----@field send_masked boolean whether to send out masked WebSocket frames ----@field timeout integer network timeout threshold in milliseconds - - ---- Websocket op code ---- ---- Defines the interpretation of the payload data. ---- ---- See RFC 6455 section 5.2 ---- ----@alias resty.websocket.protocol.opcode ----| '0x0' # continuation ----| '0x1' # text ----| '0x2' # binary ----| '0x8' # close ----| '0x9' # ping ----| '0xa' # pong - ----@alias resty.websocket.protocol.type ----| '"continuation"' ----| '"text"' ----| '"binary"' ----| '"close"' ----| '"ping"' ----| '"pong"' - ---- Builds a raw WebSocket frame. ----@param fin boolean ----@param opcode resty.websocket.protocol.opcode ----@param payload_len integer ----@param payload string ----@param masking boolean ----@return string -function protocol.build_frame(fin, opcode, payload_len, payload, masking) end - ---- Sends a raw WebSocket frame. ----@param sock tcpsock ----@param fin boolean ----@param opcode resty.websocket.protocol.opcode ----@param payload string ----@param max_payload_len interger ----@param masking boolean ----@return bytes? number ----@return string? error -function protocol.send_frame(sock, fin, opcode, payload, max_payload_len, masking) end - ---- Receives a WebSocket frame from the wire. ----@param sock tcpsock ----@param max_payload_len interger ----@param force_masking boolean ----@return string? data ----@return resty.websocket.protocol.type? typ ----@return string? error -function protocol.recv_frame(sock, max_payload_len, force_masking) end - -return protocol \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/resty/websocket/server.lua b/meta/3rd/OpenResty/library/resty/websocket/server.lua deleted file mode 100644 index c8f502a2..00000000 --- a/meta/3rd/OpenResty/library/resty/websocket/server.lua +++ /dev/null @@ -1,16 +0,0 @@ ----@meta - ----@class resty.websocket.server : resty.websocket -local server = { - _VERSION = "0.09" -} - ----Performs the websocket handshake process on the server side and returns a WebSocket server object. ---- ----In case of error, it returns nil and a string describing the error. ----@param opts? resty.websocket.new.opts ----@return resty.websocket.server? server ----@return string? error -function server:new(opts) end - -return server \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/table/clone.lua b/meta/3rd/OpenResty/library/table/clone.lua deleted file mode 100644 index ff2ce870..00000000 --- a/meta/3rd/OpenResty/library/table/clone.lua +++ /dev/null @@ -1,25 +0,0 @@ ----@meta - ---- Returns a shallow copy of the given Lua table. ---- ---- This API can be JIT compiled. ---- ---- Usage: ---- ---- ```lua ---- local clone = require "table.clone" ---- ---- local x = {x=12, y={5, 6, 7}} ---- local y = clone(x) ---- ``` ---- ---- **Note:** We observe 7% over-all speedup in the edgelang-fan compiler's ---- compiling speed whose Lua is generated by the fanlang compiler. ---- ---- **Note bis:** Deep cloning is planned to be supported by adding `true` as a second argument. ---- ----@param t table ----@return table -local function clone(t) end - -return clone diff --git a/meta/3rd/OpenResty/library/table/isarray.lua b/meta/3rd/OpenResty/library/table/isarray.lua deleted file mode 100644 index f2ee3c72..00000000 --- a/meta/3rd/OpenResty/library/table/isarray.lua +++ /dev/null @@ -1,23 +0,0 @@ ----@meta - ---- Returns `true` when the given Lua table is a pure array-like Lua table, or ---- `false` otherwise. ---- ---- Empty Lua tables are treated as arrays. ---- ---- This API can be JIT compiled. ---- ---- Usage: ---- ---- ```lua ---- local isarray = require "table.isarray" ---- ---- print(isarray{"a", true, 3.14}) -- true ---- print(isarray{dog = 3}) -- false ---- print(isarray{}) -- true ---- ``` ----@param t table ----@return boolean -local function isarray(t) end - -return isarray diff --git a/meta/3rd/OpenResty/library/table/isempty.lua b/meta/3rd/OpenResty/library/table/isempty.lua deleted file mode 100644 index b1cef6fb..00000000 --- a/meta/3rd/OpenResty/library/table/isempty.lua +++ /dev/null @@ -1,22 +0,0 @@ ----@meta - ---- Returns `true` when the given Lua table contains neither non-nil array elements nor non-nil key-value pairs, or `false` otherwise. ---- ---- This API can be JIT compiled. ---- Usage: ---- ---- ```lua ---- local isempty = require "table.isempty" ---- ---- print(isempty({})) -- true ---- print(isempty({nil, dog = nil})) -- true ---- print(isempty({"a", "b"})) -- false ---- print(isempty({nil, 3})) -- false ---- print(isempty({cat = 3})) -- false ---- ``` ---- ----@param t table ----@return boolean -local function isempty(t) end - -return isempty diff --git a/meta/3rd/OpenResty/library/table/nkeys.lua b/meta/3rd/OpenResty/library/table/nkeys.lua deleted file mode 100644 index 41a42d6a..00000000 --- a/meta/3rd/OpenResty/library/table/nkeys.lua +++ /dev/null @@ -1,23 +0,0 @@ ----@meta - ---- Returns the total number of elements in a given Lua table (i.e. from both the ---- array and hash parts combined). ---- ---- This API can be JIT compiled. ---- ---- Usage: ---- ---- ```lua ---- local nkeys = require "table.nkeys" ---- ---- print(nkeys({})) -- 0 ---- print(nkeys({ "a", nil, "b" })) -- 2 ---- print(nkeys({ dog = 3, cat = 4, bird = nil })) -- 2 ---- print(nkeys({ "a", dog = 3, cat = 4 })) -- 3 ---- ``` ---- ----@param t table ----@return integer -local function nkeys(t) end - -return nkeys diff --git a/meta/3rd/OpenResty/library/tablepool.lua b/meta/3rd/OpenResty/library/tablepool.lua deleted file mode 100644 index db47f3e7..00000000 --- a/meta/3rd/OpenResty/library/tablepool.lua +++ /dev/null @@ -1,29 +0,0 @@ ----@meta -local tablepool = {} - ---- Releases the already used Lua table, `tb`, into the table pool named `pool_name`. If the specified table pool does not exist, create it right away. ---- ---- The caller must *not* continue using the released Lua table, `tb`, after this call. Otherwise random data corruption is expected. ---- ---- The optional `no_clear` parameter specifies whether to clear the contents in the Lua table `tb` before putting it into the pool. Defaults to `false`, that is, always clearing the Lua table. ---- ---- If you always initialize all the elements in the Lua table and always use the exactly same number of elements in the Lua table, then you can set this argument to `true` to avoid the overhead of explicit table clearing. ---- ---- According to the current implementation, for maximum 200 Lua tables can be cached in an individual pool. We may make this configurable in the future. If the specified table pool already exceeds its size limit, then the `tb` table is subject to garbage collection. This behavior is to avoid potential memory leak due to unbalanced `fetch` and `release` method calls. ---- ----@param pool_name string ----@param tb table ----@param no_clear? boolean -function tablepool.release(pool_name, tb, no_clear) end - ---- Fetches a (free) Lua table from the table pool of the specified name `pool_name`. ---- ---- If the pool does not exist or the pool is empty, simply create a Lua table whose array part has `narr` elements and whose hash table part has `nrec` elements. ---- ----@param pool_name string ----@param narr number size of the array-like part of the table ----@param nrec number size of the hash-like part of the table ----@return table -function tablepool.fetch(pool_name, narr, nrec) end - -return tablepool \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/thread/exdata.lua b/meta/3rd/OpenResty/library/thread/exdata.lua deleted file mode 100644 index 22573d84..00000000 --- a/meta/3rd/OpenResty/library/thread/exdata.lua +++ /dev/null @@ -1,43 +0,0 @@ ----@meta - ---- **syntax:** *exdata = th_exdata(data?)* ---- ---- This API allows for embedding user data into a thread (`lua_State`). ---- ---- The retrieved `exdata` value on the Lua land is represented as a cdata object ---- of the ctype `void*`. ---- ---- As of this version, retrieving the `exdata` (i.e. `th_exdata()` without any ---- argument) can be JIT compiled. ---- ---- Usage: ---- ---- ```lua ---- local th_exdata = require "thread.exdata" ---- ---- th_exdata(0xdeadbeefLL) -- set the exdata of the current Lua thread ---- local exdata = th_exdata() -- fetch the exdata of the current Lua thread ---- ``` ---- ---- Also available are the following public C API functions for manipulating ---- `exdata` on the C land: ---- ---- ```C ---- void lua_setexdata(lua_State *L, void *exdata); ---- void *lua_getexdata(lua_State *L); ---- ``` ---- ---- The `exdata` pointer is initialized to `NULL` when the main thread is created. ---- Any child Lua thread will inherit its parent's `exdata`, but still can override ---- it. ---- ---- **Note:** This API will not be available if LuaJIT is compiled with ---- `-DLUAJIT_DISABLE_FFI`. ---- ---- **Note bis:** This API is used internally by the OpenResty core, and it is ---- strongly discouraged to use it yourself in the context of OpenResty. ----@param data? any ----@return any? data -local function exdata(data) end - -return exdata \ No newline at end of file diff --git a/meta/3rd/OpenResty/library/thread/exdata2.lua b/meta/3rd/OpenResty/library/thread/exdata2.lua deleted file mode 100644 index 0387849d..00000000 --- a/meta/3rd/OpenResty/library/thread/exdata2.lua +++ /dev/null @@ -1,8 +0,0 @@ ----@meta - ---- Similar to `thread.exdata` but for a 2nd separate user data as a pointer value. ----@param data? any ----@return any? data -local function exdata2(data) end - -return exdata2 diff --git a/meta/3rd/OpenResty/library/toComment.lua b/meta/3rd/OpenResty/library/toComment.lua deleted file mode 100644 index 32a4d758..00000000 --- a/meta/3rd/OpenResty/library/toComment.lua +++ /dev/null @@ -1,3 +0,0 @@ ----@meta -toComment={} -return toComment \ No newline at end of file -- cgit v1.2.3 From 70f10b1d1588ece527b8450b194f01caf94138ed Mon Sep 17 00:00:00 2001 From: carsakiller Date: Fri, 27 Oct 2023 20:42:06 -0400 Subject: refactor: replace bee with LuaCATS submodule --- meta/3rd/bee | 1 + meta/3rd/bee/config.json | 4 - meta/3rd/bee/library/bee/filesystem.lua | 240 -------------------------------- meta/3rd/bee/library/bee/platform.lua | 62 --------- meta/3rd/bee/library/bee/subprocess.lua | 99 ------------- meta/3rd/bee/library/bee/thread.lua | 62 --------- 6 files changed, 1 insertion(+), 467 deletions(-) create mode 160000 meta/3rd/bee delete mode 100644 meta/3rd/bee/config.json delete mode 100644 meta/3rd/bee/library/bee/filesystem.lua delete mode 100644 meta/3rd/bee/library/bee/platform.lua delete mode 100644 meta/3rd/bee/library/bee/subprocess.lua delete mode 100644 meta/3rd/bee/library/bee/thread.lua (limited to 'meta') diff --git a/meta/3rd/bee b/meta/3rd/bee new file mode 160000 index 00000000..c0bc5349 --- /dev/null +++ b/meta/3rd/bee @@ -0,0 +1 @@ +Subproject commit c0bc5349e5fa741d7ad8d6d5c7624a54dcfd9ebe diff --git a/meta/3rd/bee/config.json b/meta/3rd/bee/config.json deleted file mode 100644 index 0dce5817..00000000 --- a/meta/3rd/bee/config.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name" : "bee", - "words" : [ "require[%s%(\"']+bee%.%w+[%)\"']" ] -} diff --git a/meta/3rd/bee/library/bee/filesystem.lua b/meta/3rd/bee/library/bee/filesystem.lua deleted file mode 100644 index 7cd4dcbb..00000000 --- a/meta/3rd/bee/library/bee/filesystem.lua +++ /dev/null @@ -1,240 +0,0 @@ ----@meta - -local m = {} - ----@enum bee.filesystem.copy_options -local copy_options = { - none = 0, - skip_existing = 1, - overwrite_existing = 2, - update_existing = 4, - recursive = 8, - copy_symlinks = 16, - skip_symlinks = 32, - directories_only = 64, - create_symlinks = 128, - create_hard_links = 256, - __in_recursive_copy = 512, -} - ----@alias bee.filesystem.path_arg string|bee.filesystem.path - ----@class bee.filesystem.path ----@operator div(any):bee.filesystem.path ----@operator concat(any):bee.filesystem.path -local path = {} - ----@return string -function path:string() -end - ----@return bee.filesystem.path -function path:filename() -end - ----@return bee.filesystem.path -function path:parent_path() -end - ----@return bee.filesystem.path -function path:stem() -end - ----@return bee.filesystem.path -function path:extension() -end - ----@return boolean -function path:is_absolute() -end - ----@return boolean -function path:is_relative() -end - ----@return bee.filesystem.path -function path:remove_filename() -end - ----@param filename bee.filesystem.path_arg ----@return bee.filesystem.path -function path:replace_filename(filename) -end - ----@param extension bee.filesystem.path_arg ----@return bee.filesystem.path -function path:replace_extension(extension) -end - ----@param path bee.filesystem.path_arg ----@return boolean -function path:equal_extension(path) -end - ----@return bee.filesystem.path -function path:lexically_normal() -end - ----@class bee.filesystem.file_status -local file_status = {} - ----@alias bee.filesystem.file_type ----| "'none'" ----| "'not_found'" ----| "'regular'" ----| "'directory'" ----| "'symlink'" ----| "'block'" ----| "'character'" ----| "'fifo'" ----| "'socket'" ----| "'junction'" ----| "'unknown'" - ----@return bee.filesystem.file_type -function file_status:type() -end - ----@return boolean -function file_status:exists() -end - ----@return boolean -function file_status:is_directory() -end - ----@return boolean -function file_status:is_regular_file() -end - ----@class bee.filesystem.directory_entry -local directory_entry = {} - ----@return bee.filesystem.path -function directory_entry:path() -end - ----@return bee.filesystem.file_status -function directory_entry:status() -end - ----@return bee.filesystem.file_status -function directory_entry:symlink_status() -end - ----@return bee.filesystem.file_type -function directory_entry:type() -end - ----@return boolean -function directory_entry:exists() -end - ----@return boolean -function directory_entry:is_directory() -end - ----@return boolean -function directory_entry:is_regular_file() -end - ----@return bee.filesystem.path -function m.path(path) -end - ----@return bee.filesystem.file_status -function m.status(path) -end - ----@return bee.filesystem.file_status -function m.symlink_status(path) -end - ----@return boolean -function m.exists(path) -end - ----@return boolean -function m.is_directory(path) -end - ----@return boolean -function m.is_regular_file(path) -end - -function m.create_directory(path) -end - -function m.create_directories(path) -end - -function m.rename(from, to) -end - -function m.remove(path) -end - -function m.remove_all(path) -end - ----@return bee.filesystem.path -function m.current_path() -end - ----@param options bee.filesystem.copy_options -function m.copy(from, to, options) -end - ----@param options bee.filesystem.copy_options -function m.copy_file(from, to, options) -end - -function m.absolute(path) -end - -function m.canonical(path) -end - -function m.relative(path) -end - -function m.last_write_time(path) -end - -function m.permissions(path) -end - -function m.create_symlink(target, link) -end - -function m.create_directory_symlink(target, link) -end - -function m.create_hard_link(target, link) -end - ----@return bee.filesystem.path -function m.temp_directory_path() -end - ----@return fun(table: bee.filesystem.path[]): bee.filesystem.path -function m.pairs(path) -end - ----@return bee.filesystem.path -function m.exe_path() -end - ----@return bee.filesystem.path -function m.dll_path() -end - ----@return bee.file -function m.filelock(path) -end - ----@return bee.filesystem.path -function m.fullpath(path) -end - -return m diff --git a/meta/3rd/bee/library/bee/platform.lua b/meta/3rd/bee/library/bee/platform.lua deleted file mode 100644 index f380a9bf..00000000 --- a/meta/3rd/bee/library/bee/platform.lua +++ /dev/null @@ -1,62 +0,0 @@ ----@meta - ----@alias bee.platform.os ----| '"windows"' ----| '"android"' ----| '"linux"' ----| '"netbsd"' ----| '"freebsd"' ----| '"openbsd"' ----| '"ios"' ----| '"macos"' ----| '"unknown"' - ----@alias bee.platform.OS ----| '"Windows"' ----| '"Android"' ----| '"Linux"' ----| '"NetBSD"' ----| '"FreeBSD"' ----| '"OpenBSD"' ----| '"iOS"' ----| '"macOS"' ----| '"unknown"' - ----@alias bee.platform.arch ----| '"x86"' ----| '"x86_64"' ----| '"arm"' ----| '"arm64"' ----| '"riscv"' ----| '"unknown"' - ----@alias bee.platform.compiler ----| '"clang"' ----| '"gcc"' ----| '"msvc"' ----| '"unknown"' - ----@alias bee.platform.crt ----| '"msvc"' ----| '"bionic"' ----| '"libstdc++"' ----| '"libc++"' ----| '"unknown"' - -local m = { - ---@type bee.platform.os - os = "unknown", - ---@type bee.platform.OS - OS = "unknown", - ---@type bee.platform.compiler - Compiler = "clang", - CompilerVersion = "", - CRTVersion = "", - ---@type bee.platform.crt - CRT = "msvc", - ---@type bee.platform.arch - Arch = "x86", - DEBUG = false, -} - -return m diff --git a/meta/3rd/bee/library/bee/subprocess.lua b/meta/3rd/bee/library/bee/subprocess.lua deleted file mode 100644 index 0c979729..00000000 --- a/meta/3rd/bee/library/bee/subprocess.lua +++ /dev/null @@ -1,99 +0,0 @@ ----@meta - ----@class bee.file:lightuserdata -local file = {} - ----@alias bee.file.readmode integer|"'a'" - ----@param mode bee.file.readmode ----@return string -function file:read(mode) -end - ----@param buf number|integer|string -function file:write(buf) -end - ----@return fun():string -function file:lines() -end - -function file:flush() -end - -function file:close() -end - ----@param mode "'no'"|"'full'"|"'line'" -function file:setvbuf(mode) -end - ----@class bee.process ----@field stderr bee.file? ----@field stdout bee.file? ----@field stdin bee.file? -local process = {} - ----@return integer exit_code -function process:wait() -end - ----@return boolean success -function process:kill() -end - ----@return integer process_id -function process:get_id() -end - ----@return boolean is_running -function process:is_running() -end - ----@return boolean success -function process:resume() -end - ----@return any native_handle -function process:native_handle() -end - ----@class bee.subprocess -local m = {} - ----@alias bee.bee.subprocess.spawn_io_arg boolean|file*|bee.file|"'stderr'"|"'stdout'" - ----@class bee.subprocess.spawn.options : string[] ----@field stdin bee.bee.subprocess.spawn_io_arg? ----@field stdout bee.bee.subprocess.spawn_io_arg? ----@field stderr bee.bee.subprocess.spawn_io_arg? ----@field env table? ----@field suspended boolean? ----@field detached boolean? - ----@param options bee.subprocess.spawn.options ----@return bee.process process -function m.spawn(options) -end - ----@param file file*|bee.file ----@return integer offset ----@return string? error_message -function m.peek(file) -end - -function m.filemode() -end - ----@param name string ----@param value string ----@return boolean success ----@return string? error_message -function m.setenv(name, value) -end - ----@return integer current_process_id -function m.get_id() -end - -return m diff --git a/meta/3rd/bee/library/bee/thread.lua b/meta/3rd/bee/library/bee/thread.lua deleted file mode 100644 index 9e005ea4..00000000 --- a/meta/3rd/bee/library/bee/thread.lua +++ /dev/null @@ -1,62 +0,0 @@ ----@meta - ----@class bee.rpc:lightuserdata - ----@class bee.thread_obj:lightuserdata - ----@class bee.channel -local channel = {} - -function channel:push(...) -end - ----@return boolean ok ----@return ... -function channel:pop() -end - ----@return ... -function channel:bpop() -end - ----@class bee.thread -local m = {} - -function m.sleep(sec) -end - ----@return bee.thread_obj -function m.thread(source, params) -end - -function m.newchannel(name) -end - ----@return bee.channel -function m.channel(name) -end - -function m.reset() -end - ----@param th bee.thread_obj -function m.wait(th) -end - -function m.setname(name) -end - ----@return bee.rpc -function m.rpc_create() -end - -function m.rpc_wait(rpc) -end - -function m.rpc_return(rpc) -end - -function m.preload_module() -end - -return m -- cgit v1.2.3 From 1536fa32dc84f386663035ab5d51db6af2cff5e8 Mon Sep 17 00:00:00 2001 From: carsakiller Date: Fri, 27 Oct 2023 20:42:06 -0400 Subject: refactor: replace busted with LuaCATS submodule --- meta/3rd/busted | 1 + meta/3rd/busted/config.json | 7 - meta/3rd/busted/library/busted.lua | 298 ------------------------------------- 3 files changed, 1 insertion(+), 305 deletions(-) create mode 160000 meta/3rd/busted delete mode 100644 meta/3rd/busted/config.json delete mode 100644 meta/3rd/busted/library/busted.lua (limited to 'meta') diff --git a/meta/3rd/busted b/meta/3rd/busted new file mode 160000 index 00000000..5ed85d0e --- /dev/null +++ b/meta/3rd/busted @@ -0,0 +1 @@ +Subproject commit 5ed85d0e016a5eb5eca097aa52905eedf1b180f1 diff --git a/meta/3rd/busted/config.json b/meta/3rd/busted/config.json deleted file mode 100644 index d91b2627..00000000 --- a/meta/3rd/busted/config.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "settings": { - "Lua.workspace.library": [ - "${3rd}/luassert/library" - ] - } -} diff --git a/meta/3rd/busted/library/busted.lua b/meta/3rd/busted/library/busted.lua deleted file mode 100644 index 10c06d60..00000000 --- a/meta/3rd/busted/library/busted.lua +++ /dev/null @@ -1,298 +0,0 @@ ----@meta - -assert = require("luassert") -spy = require("luassert.spy") -stub = require("luassert.stub") -mock = require("luassert.mock") - ----Undocumented feature with unknown purpose. ----@param filename string -function file(filename) end - ----Mark a test as placeholder. ---- ----This will not fail or pass, it will simply be marked as "pending". ----@param name string ----@param block fun() -function pending(name, block) end - ----Define the start of an asynchronous test. ---- ----Call `done()` at the end of your test to complete it. ---- ----## Example ----``` ----it("Makes an http request", function() ---- async() ---- http.get("https://github.com", function() ---- print("Got Website!") ---- done() ---- end) ----end) ----``` -function async() end - ----Mark the end of an asynchronous test. ---- ----Should be paired with a call to `async()`. -function done() end - ----Used to define a set of tests. Can be nested to define sub-tests. ---- ----## Example ----``` ----describe("Test Item Class", function() ---- it("Creates an item", function() ---- --... ---- end) ---- describe("Test Tags", function() ---- it("Creates a tag", function() ---- --... ---- end) ---- end) ----end) ----``` ----@param name string ----@param block fun() -function describe(name, block) end - -context = describe - ----Functions like `describe()` except it exposes the test's environment to ----outer contexts ---- ----## Example ----``` ----describe("Test exposing", function() ---- expose("Exposes a value", function() ---- _G.myValue = 10 ---- end) ---- ----end) ---- ----describe("Another test in the same file", function() ---- assert.are.equal(10, myValue) ----end) ----``` ----@param name string ----@param block fun() -function expose(name, block) end - ----Functions like `describe()` except it insulates the test's environment to ----only this context. ---- ----This is the default behaviour of `describe()`. ---- ----## Example ----``` ----describe("Test exposing", function() ---- insulate("Insulates a value", function() ---- _G.myValue = 10 ---- end) ---- ----end) ---- ----describe("Another test in the same file", function() ---- assert.is.Nil(myValue) ----end) ----``` ----@param name string ----@param block fun() -function insulate(name, block) end - ----Randomize tests nested in this block. ---- ----## Example ----``` ----describe("A randomized test", function() ---- randomize() ---- it("My order is random", function() end) ---- it("My order is also random", function() end) ----end) ----``` -function randomize() end - ----Define a test that will pass, fail, or error. ---- ----You can also use `spec()` and `test()` as aliases. ---- ----## Example ----``` ----describe("Test something", function() ---- it("Runs a test", function() ---- assert.is.True(10 == 10) ---- end) ----end) ----``` ----@param name string ----@param block fun() -function it(name, block) end - -spec = it -test = it - ----Define a function to run before each child test, this includes tests nested ----in a child describe block. ---- ----## Example ----``` ----describe("Test Array Class", function() ---- local a ---- local b ---- ---- before_each(function() ---- a = Array.new(1, 2, 3, 4) ---- b = Array.new(11, 12, 13, 14) ---- end) ---- ---- it("Assures instance is an Array", function() ---- assert.True(Array.isArray(a)) ---- assert.True(Array.isArray(b)) ---- end) ---- ---- describe("Nested tests", function() ---- it("Also runs before_each", function() ---- assert.are.same( ---- { 1, 2, 3, 4, 11, 12, 13, 14 }, ---- a:concat(b)) ---- end) ---- end) ----end) ----``` ----@param block fun() -function before_each(block) end - ----Define a function to run after each child test, this includes tests nested ----in a child describe block. ---- ----## Example ----``` ----describe("Test saving", function() ---- local game ---- ---- after_each(function() ---- game.save.reset() ---- end) ---- ---- it("Creates game", function() ---- game = game.new() ---- game.save.save() ---- end) ---- ---- describe("Saves metadata", function() ---- it("Saves objects", function() ---- game = game.new() ---- game.save.save() ---- assert.is_not.Nil(game.save.objects) ---- end) ---- end) ----end) ----``` ----@param block fun() -function after_each(block) end - ----Runs first in a context block before any tests. ---- ----Will always run even if there are no child tests to run. If you don't want ----them to run regardless, you can use `lazy_setup()` or use the `--lazy` flag ----when running. ---- ----## Example ----``` ----describe("Test something", function() ---- local helper ---- ---- setup(function() ---- helper = require("helper") ---- end) ---- ---- it("Can use helper", function() ---- assert.is_not.Nil(helper) ---- end) ----end) ----``` ----@param block fun() -function setup(block) end - -strict_setup = setup - ----Runs first in a context block before any tests. Only runs if there are child ----tests to run. ---- ----## Example ----``` ----describe("Test something", function() ---- local helper ---- ---- -- Will not run because there are no tests ---- lazy_setup(function() ---- helper = require("helper") ---- end) ---- ----end) ----``` ----@param block fun() -function lazy_setup(block) end - ----Runs last in a context block after all tests. ---- ----Will run ever if no tests were run in this context. If you don't want this ----to run regardless, you can use `lazy_teardown()` or use the `--lazy` flag ----when running. ---- ----## Example ----``` ----describe("Remove persistent value", function() ---- local persist ---- ---- it("Sets a persistent value", function() ---- persist = "hello" ---- end) ---- ---- teardown(function() ---- persist = nil ---- end) ---- ----end) ----``` ----@param block fun() -function teardown(block) end - -strict_teardown = teardown - ----Runs last in a context block after all tests. ---- ----Will only run if tests were run in this context. ---- ----## Example ----``` ----describe("Remove persistent value", function() ---- local persist ---- ---- -- Will not run because no tests were run ---- lazy_teardown(function() ---- persist = nil ---- end) ---- ----end) ----``` ----@param block fun() -function lazy_teardown(block) end - ----Runs last in a context block regardless of test outcome ---- ----## Example ----``` ----it("Read File Contents",function() ---- local f = io.open("file", "r") ---- ---- -- always close file after test ---- finally(function() ---- f:close() ---- end) ---- ---- -- do stuff with f ----end) ----``` ----@param block fun() -function finally(block) end -- cgit v1.2.3 From d288cd1e6d0bb9fd4c05e6afa3e26bb7e0658839 Mon Sep 17 00:00:00 2001 From: carsakiller Date: Fri, 27 Oct 2023 20:42:06 -0400 Subject: refactor: replace Cocos4.0 with LuaCATS submodule --- meta/3rd/Cocos4.0 | 1 + meta/3rd/Cocos4.0/config.json | 7 - meta/3rd/Cocos4.0/library/cc/Action.lua | 84 --- meta/3rd/Cocos4.0/library/cc/ActionCamera.lua | 47 -- meta/3rd/Cocos4.0/library/cc/ActionEase.lua | 29 - meta/3rd/Cocos4.0/library/cc/ActionFloat.lua | 46 -- meta/3rd/Cocos4.0/library/cc/ActionInstant.lua | 30 - meta/3rd/Cocos4.0/library/cc/ActionInterval.lua | 43 -- meta/3rd/Cocos4.0/library/cc/ActionManager.lua | 124 ---- meta/3rd/Cocos4.0/library/cc/ActionTween.lua | 47 -- meta/3rd/Cocos4.0/library/cc/AmbientLight.lua | 21 - meta/3rd/Cocos4.0/library/cc/Animate.lua | 52 -- meta/3rd/Cocos4.0/library/cc/Animate3D.lua | 109 --- meta/3rd/Cocos4.0/library/cc/Animation.lua | 110 --- meta/3rd/Cocos4.0/library/cc/Animation3D.lua | 29 - meta/3rd/Cocos4.0/library/cc/AnimationCache.lua | 61 -- meta/3rd/Cocos4.0/library/cc/AnimationFrame.lua | 58 -- meta/3rd/Cocos4.0/library/cc/Application.lua | 38 - meta/3rd/Cocos4.0/library/cc/AssetsManager.lua | 61 -- meta/3rd/Cocos4.0/library/cc/AssetsManagerEx.lua | 63 -- meta/3rd/Cocos4.0/library/cc/AsyncTaskPool.lua | 31 - meta/3rd/Cocos4.0/library/cc/AtlasNode.lua | 98 --- meta/3rd/Cocos4.0/library/cc/AttachNode.lua | 32 - meta/3rd/Cocos4.0/library/cc/AudioEngine.lua | 151 ---- meta/3rd/Cocos4.0/library/cc/AudioProfile.lua | 13 - meta/3rd/Cocos4.0/library/cc/AutoPolygon.lua | 16 - meta/3rd/Cocos4.0/library/cc/BaseLight.lua | 34 - meta/3rd/Cocos4.0/library/cc/BezierBy.lua | 32 - meta/3rd/Cocos4.0/library/cc/BezierTo.lua | 27 - meta/3rd/Cocos4.0/library/cc/BillBoard.lua | 41 -- meta/3rd/Cocos4.0/library/cc/Blink.lua | 43 -- meta/3rd/Cocos4.0/library/cc/Bundle3D.lua | 59 -- meta/3rd/Cocos4.0/library/cc/CSLoader.lua | 68 -- meta/3rd/Cocos4.0/library/cc/CallFunc.lua | 25 - meta/3rd/Cocos4.0/library/cc/Camera.lua | 166 ----- .../Cocos4.0/library/cc/CameraBackgroundBrush.lua | 59 -- .../library/cc/CameraBackgroundColorBrush.lua | 36 - .../library/cc/CameraBackgroundDepthBrush.lua | 34 - .../library/cc/CameraBackgroundSkyBoxBrush.lua | 52 -- meta/3rd/Cocos4.0/library/cc/CardinalSplineBy.lua | 26 - meta/3rd/Cocos4.0/library/cc/CardinalSplineTo.lua | 45 -- meta/3rd/Cocos4.0/library/cc/CatmullRomBy.lua | 22 - meta/3rd/Cocos4.0/library/cc/CatmullRomTo.lua | 22 - meta/3rd/Cocos4.0/library/cc/ClippingNode.lua | 77 -- .../Cocos4.0/library/cc/ClippingRectangleNode.lua | 38 - meta/3rd/Cocos4.0/library/cc/Component.lua | 46 -- meta/3rd/Cocos4.0/library/cc/ComponentLua.lua | 24 - meta/3rd/Cocos4.0/library/cc/Console.lua | 40 - meta/3rd/Cocos4.0/library/cc/Control.lua | 94 --- meta/3rd/Cocos4.0/library/cc/ControlButton.lua | 263 ------- .../Cocos4.0/library/cc/ControlColourPicker.lua | 58 -- meta/3rd/Cocos4.0/library/cc/ControlHuePicker.lua | 67 -- .../Cocos4.0/library/cc/ControlPotentiometer.lua | 116 --- .../cc/ControlSaturationBrightnessPicker.lua | 47 -- meta/3rd/Cocos4.0/library/cc/ControlSlider.lua | 109 --- meta/3rd/Cocos4.0/library/cc/ControlStepper.lua | 111 --- meta/3rd/Cocos4.0/library/cc/ControlSwitch.lua | 73 -- meta/3rd/Cocos4.0/library/cc/Controller.lua | 56 -- meta/3rd/Cocos4.0/library/cc/DelayTime.lua | 28 - meta/3rd/Cocos4.0/library/cc/Device.lua | 34 - meta/3rd/Cocos4.0/library/cc/DirectionLight.lua | 34 - meta/3rd/Cocos4.0/library/cc/Director.lua | 309 -------- meta/3rd/Cocos4.0/library/cc/DrawNode.lua | 185 ----- meta/3rd/Cocos4.0/library/cc/EaseBackIn.lua | 26 - meta/3rd/Cocos4.0/library/cc/EaseBackInOut.lua | 26 - meta/3rd/Cocos4.0/library/cc/EaseBackOut.lua | 26 - meta/3rd/Cocos4.0/library/cc/EaseBezierAction.lua | 35 - meta/3rd/Cocos4.0/library/cc/EaseBounce.lua | 8 - meta/3rd/Cocos4.0/library/cc/EaseBounceIn.lua | 26 - meta/3rd/Cocos4.0/library/cc/EaseBounceInOut.lua | 26 - meta/3rd/Cocos4.0/library/cc/EaseBounceOut.lua | 26 - .../3rd/Cocos4.0/library/cc/EaseCircleActionIn.lua | 26 - .../Cocos4.0/library/cc/EaseCircleActionInOut.lua | 26 - .../Cocos4.0/library/cc/EaseCircleActionOut.lua | 26 - meta/3rd/Cocos4.0/library/cc/EaseCubicActionIn.lua | 26 - .../Cocos4.0/library/cc/EaseCubicActionInOut.lua | 26 - .../3rd/Cocos4.0/library/cc/EaseCubicActionOut.lua | 26 - meta/3rd/Cocos4.0/library/cc/EaseElastic.lua | 26 - meta/3rd/Cocos4.0/library/cc/EaseElasticIn.lua | 27 - meta/3rd/Cocos4.0/library/cc/EaseElasticInOut.lua | 27 - meta/3rd/Cocos4.0/library/cc/EaseElasticOut.lua | 27 - meta/3rd/Cocos4.0/library/cc/EaseExponentialIn.lua | 26 - .../Cocos4.0/library/cc/EaseExponentialInOut.lua | 26 - .../3rd/Cocos4.0/library/cc/EaseExponentialOut.lua | 26 - meta/3rd/Cocos4.0/library/cc/EaseIn.lua | 27 - meta/3rd/Cocos4.0/library/cc/EaseInOut.lua | 27 - meta/3rd/Cocos4.0/library/cc/EaseOut.lua | 27 - .../Cocos4.0/library/cc/EaseQuadraticActionIn.lua | 26 - .../library/cc/EaseQuadraticActionInOut.lua | 26 - .../Cocos4.0/library/cc/EaseQuadraticActionOut.lua | 26 - .../Cocos4.0/library/cc/EaseQuarticActionIn.lua | 26 - .../Cocos4.0/library/cc/EaseQuarticActionInOut.lua | 26 - .../Cocos4.0/library/cc/EaseQuarticActionOut.lua | 26 - .../Cocos4.0/library/cc/EaseQuinticActionIn.lua | 26 - .../Cocos4.0/library/cc/EaseQuinticActionInOut.lua | 26 - .../Cocos4.0/library/cc/EaseQuinticActionOut.lua | 26 - meta/3rd/Cocos4.0/library/cc/EaseRateAction.lua | 31 - meta/3rd/Cocos4.0/library/cc/EaseSineIn.lua | 26 - meta/3rd/Cocos4.0/library/cc/EaseSineInOut.lua | 26 - meta/3rd/Cocos4.0/library/cc/EaseSineOut.lua | 26 - meta/3rd/Cocos4.0/library/cc/Event.lua | 30 - meta/3rd/Cocos4.0/library/cc/EventAcceleration.lua | 8 - .../Cocos4.0/library/cc/EventAssetsManagerEx.lua | 45 -- meta/3rd/Cocos4.0/library/cc/EventController.lua | 40 - meta/3rd/Cocos4.0/library/cc/EventCustom.lua | 19 - meta/3rd/Cocos4.0/library/cc/EventDispatcher.lua | 114 --- meta/3rd/Cocos4.0/library/cc/EventFocus.lua | 17 - meta/3rd/Cocos4.0/library/cc/EventKeyboard.lua | 17 - meta/3rd/Cocos4.0/library/cc/EventListener.lua | 29 - .../library/cc/EventListenerAcceleration.lua | 22 - .../library/cc/EventListenerAssetsManagerEx.lua | 23 - .../library/cc/EventListenerController.lua | 19 - .../Cocos4.0/library/cc/EventListenerCustom.lua | 18 - .../3rd/Cocos4.0/library/cc/EventListenerFocus.lua | 21 - .../Cocos4.0/library/cc/EventListenerKeyboard.lua | 21 - .../3rd/Cocos4.0/library/cc/EventListenerMouse.lua | 21 - .../library/cc/EventListenerPhysicsContact.lua | 19 - .../cc/EventListenerPhysicsContactWithBodies.lua | 22 - .../cc/EventListenerPhysicsContactWithGroup.lua | 21 - .../cc/EventListenerPhysicsContactWithShapes.lua | 22 - .../library/cc/EventListenerTouchAllAtOnce.lua | 21 - .../library/cc/EventListenerTouchOneByOne.lua | 30 - meta/3rd/Cocos4.0/library/cc/EventMouse.lua | 91 --- meta/3rd/Cocos4.0/library/cc/EventTouch.lua | 22 - meta/3rd/Cocos4.0/library/cc/FadeIn.lua | 32 - meta/3rd/Cocos4.0/library/cc/FadeOut.lua | 31 - meta/3rd/Cocos4.0/library/cc/FadeOutBLTiles.lua | 28 - meta/3rd/Cocos4.0/library/cc/FadeOutDownTiles.lua | 28 - meta/3rd/Cocos4.0/library/cc/FadeOutTRTiles.lua | 52 -- meta/3rd/Cocos4.0/library/cc/FadeOutUpTiles.lua | 33 - meta/3rd/Cocos4.0/library/cc/FadeTo.lua | 40 - meta/3rd/Cocos4.0/library/cc/FastTMXLayer.lua | 135 ---- meta/3rd/Cocos4.0/library/cc/FastTMXTiledMap.lua | 90 --- meta/3rd/Cocos4.0/library/cc/FileUtils.lua | 343 --------- meta/3rd/Cocos4.0/library/cc/FiniteTimeAction.lua | 24 - meta/3rd/Cocos4.0/library/cc/FlipX.lua | 32 - meta/3rd/Cocos4.0/library/cc/FlipX3D.lua | 39 - meta/3rd/Cocos4.0/library/cc/FlipY.lua | 32 - meta/3rd/Cocos4.0/library/cc/FlipY3D.lua | 25 - meta/3rd/Cocos4.0/library/cc/Follow.lua | 88 --- meta/3rd/Cocos4.0/library/cc/GLView.lua | 187 ----- meta/3rd/Cocos4.0/library/cc/GLViewImpl.lua | 33 - meta/3rd/Cocos4.0/library/cc/Grid3D.lua | 46 -- meta/3rd/Cocos4.0/library/cc/Grid3DAction.lua | 19 - meta/3rd/Cocos4.0/library/cc/GridAction.lua | 31 - meta/3rd/Cocos4.0/library/cc/GridBase.lua | 89 --- meta/3rd/Cocos4.0/library/cc/Hide.lua | 26 - meta/3rd/Cocos4.0/library/cc/Image.lua | 73 -- meta/3rd/Cocos4.0/library/cc/JumpBy.lua | 46 -- meta/3rd/Cocos4.0/library/cc/JumpTiles3D.lua | 61 -- meta/3rd/Cocos4.0/library/cc/JumpTo.lua | 42 -- meta/3rd/Cocos4.0/library/cc/Label.lua | 400 ---------- meta/3rd/Cocos4.0/library/cc/LabelAtlas.lua | 45 -- meta/3rd/Cocos4.0/library/cc/Layer.lua | 22 - meta/3rd/Cocos4.0/library/cc/LayerColor.lua | 70 -- meta/3rd/Cocos4.0/library/cc/LayerGradient.lua | 89 --- meta/3rd/Cocos4.0/library/cc/LayerMultiplex.lua | 40 - .../Cocos4.0/library/cc/LayerRadialGradient.lua | 103 --- meta/3rd/Cocos4.0/library/cc/Lens3D.lua | 66 -- meta/3rd/Cocos4.0/library/cc/Liquid.lua | 61 -- meta/3rd/Cocos4.0/library/cc/Manifest.lua | 30 - meta/3rd/Cocos4.0/library/cc/Material.lua | 81 --- meta/3rd/Cocos4.0/library/cc/Menu.lua | 71 -- meta/3rd/Cocos4.0/library/cc/MenuItem.lua | 37 - meta/3rd/Cocos4.0/library/cc/MenuItemAtlasFont.lua | 21 - meta/3rd/Cocos4.0/library/cc/MenuItemFont.lua | 57 -- meta/3rd/Cocos4.0/library/cc/MenuItemImage.lua | 34 - meta/3rd/Cocos4.0/library/cc/MenuItemLabel.lua | 51 -- meta/3rd/Cocos4.0/library/cc/MenuItemSprite.lua | 51 -- meta/3rd/Cocos4.0/library/cc/MenuItemToggle.lua | 50 -- meta/3rd/Cocos4.0/library/cc/Mesh.lua | 85 --- meta/3rd/Cocos4.0/library/cc/MotionStreak.lua | 124 ---- meta/3rd/Cocos4.0/library/cc/MotionStreak3D.lua | 146 ---- meta/3rd/Cocos4.0/library/cc/MoveBy.lua | 38 - meta/3rd/Cocos4.0/library/cc/MoveTo.lua | 34 - meta/3rd/Cocos4.0/library/cc/NavMesh.lua | 50 -- meta/3rd/Cocos4.0/library/cc/NavMeshAgent.lua | 125 ---- meta/3rd/Cocos4.0/library/cc/NavMeshObstacle.lua | 52 -- meta/3rd/Cocos4.0/library/cc/Node.lua | 805 --------------------- meta/3rd/Cocos4.0/library/cc/NodeGrid.lua | 46 -- meta/3rd/Cocos4.0/library/cc/OrbitCamera.lua | 51 -- .../3rd/Cocos4.0/library/cc/PUParticleSystem3D.lua | 195 ----- meta/3rd/Cocos4.0/library/cc/PageTurn3D.lua | 27 - meta/3rd/Cocos4.0/library/cc/ParallaxNode.lua | 52 -- meta/3rd/Cocos4.0/library/cc/ParticleBatchNode.lua | 119 --- meta/3rd/Cocos4.0/library/cc/ParticleData.lua | 27 - meta/3rd/Cocos4.0/library/cc/ParticleExplosion.lua | 30 - meta/3rd/Cocos4.0/library/cc/ParticleFire.lua | 30 - meta/3rd/Cocos4.0/library/cc/ParticleFireworks.lua | 30 - meta/3rd/Cocos4.0/library/cc/ParticleFlower.lua | 30 - meta/3rd/Cocos4.0/library/cc/ParticleGalaxy.lua | 30 - meta/3rd/Cocos4.0/library/cc/ParticleMeteor.lua | 30 - meta/3rd/Cocos4.0/library/cc/ParticleRain.lua | 30 - meta/3rd/Cocos4.0/library/cc/ParticleSmoke.lua | 30 - meta/3rd/Cocos4.0/library/cc/ParticleSnow.lua | 30 - meta/3rd/Cocos4.0/library/cc/ParticleSpiral.lua | 30 - meta/3rd/Cocos4.0/library/cc/ParticleSun.lua | 30 - meta/3rd/Cocos4.0/library/cc/ParticleSystem.lua | 529 -------------- meta/3rd/Cocos4.0/library/cc/ParticleSystem3D.lua | 90 --- .../3rd/Cocos4.0/library/cc/ParticleSystemQuad.lua | 55 -- meta/3rd/Cocos4.0/library/cc/Pass.lua | 141 ---- .../library/cc/Physics3D6DofConstraint.lua | 61 -- .../3rd/Cocos4.0/library/cc/Physics3DComponent.lua | 49 -- .../library/cc/Physics3DConeTwistConstraint.lua | 92 --- .../Cocos4.0/library/cc/Physics3DConstraint.lua | 49 -- .../library/cc/Physics3DHingeConstraint.lua | 103 --- meta/3rd/Cocos4.0/library/cc/Physics3DObject.lua | 42 -- .../library/cc/Physics3DPointToPointConstraint.lua | 42 -- .../3rd/Cocos4.0/library/cc/Physics3DRigidBody.lua | 204 ------ meta/3rd/Cocos4.0/library/cc/Physics3DShape.lua | 67 -- .../library/cc/Physics3DSliderConstraint.lua | 248 ------- meta/3rd/Cocos4.0/library/cc/Physics3DWorld.lua | 66 -- meta/3rd/Cocos4.0/library/cc/PhysicsBody.lua | 338 --------- meta/3rd/Cocos4.0/library/cc/PhysicsContact.lua | 24 - .../library/cc/PhysicsContactPostSolve.lua | 18 - .../Cocos4.0/library/cc/PhysicsContactPreSolve.lua | 33 - meta/3rd/Cocos4.0/library/cc/PhysicsJoint.lua | 51 -- .../Cocos4.0/library/cc/PhysicsJointDistance.lua | 31 - meta/3rd/Cocos4.0/library/cc/PhysicsJointFixed.lua | 22 - meta/3rd/Cocos4.0/library/cc/PhysicsJointGear.lua | 38 - .../3rd/Cocos4.0/library/cc/PhysicsJointGroove.lua | 47 -- meta/3rd/Cocos4.0/library/cc/PhysicsJointLimit.lua | 50 -- meta/3rd/Cocos4.0/library/cc/PhysicsJointMotor.lua | 29 - meta/3rd/Cocos4.0/library/cc/PhysicsJointPin.lua | 20 - .../Cocos4.0/library/cc/PhysicsJointRatchet.lua | 45 -- .../library/cc/PhysicsJointRotaryLimit.lua | 34 - .../library/cc/PhysicsJointRotarySpring.lua | 45 -- .../3rd/Cocos4.0/library/cc/PhysicsJointSpring.lua | 63 -- meta/3rd/Cocos4.0/library/cc/PhysicsShape.lua | 158 ---- meta/3rd/Cocos4.0/library/cc/PhysicsShapeBox.lua | 28 - .../3rd/Cocos4.0/library/cc/PhysicsShapeCircle.lua | 47 -- .../Cocos4.0/library/cc/PhysicsShapeEdgeBox.lua | 25 - .../Cocos4.0/library/cc/PhysicsShapeEdgeChain.lua | 17 - .../library/cc/PhysicsShapeEdgePolygon.lua | 17 - .../library/cc/PhysicsShapeEdgeSegment.lua | 33 - .../Cocos4.0/library/cc/PhysicsShapePolygon.lua | 27 - meta/3rd/Cocos4.0/library/cc/PhysicsSprite3D.lua | 25 - meta/3rd/Cocos4.0/library/cc/PhysicsWorld.lua | 150 ---- meta/3rd/Cocos4.0/library/cc/Place.lua | 32 - meta/3rd/Cocos4.0/library/cc/PointLight.lua | 32 - meta/3rd/Cocos4.0/library/cc/PolygonInfo.lua | 63 -- meta/3rd/Cocos4.0/library/cc/ProgressFromTo.lua | 46 -- meta/3rd/Cocos4.0/library/cc/ProgressTimer.lua | 110 --- meta/3rd/Cocos4.0/library/cc/ProgressTo.lua | 42 -- meta/3rd/Cocos4.0/library/cc/Properties.lua | 229 ------ meta/3rd/Cocos4.0/library/cc/ProtectedNode.lua | 99 --- meta/3rd/Cocos4.0/library/cc/Ref.lua | 28 - meta/3rd/Cocos4.0/library/cc/RemoveSelf.lua | 31 - meta/3rd/Cocos4.0/library/cc/RenderState.lua | 18 - meta/3rd/Cocos4.0/library/cc/RenderTexture.lua | 169 ----- meta/3rd/Cocos4.0/library/cc/Renderer.lua | 254 ------- meta/3rd/Cocos4.0/library/cc/Repeat.lua | 54 -- meta/3rd/Cocos4.0/library/cc/RepeatForever.lua | 48 -- meta/3rd/Cocos4.0/library/cc/ReuseGrid.lua | 34 - meta/3rd/Cocos4.0/library/cc/Ripple3D.lua | 78 -- meta/3rd/Cocos4.0/library/cc/RotateBy.lua | 42 -- meta/3rd/Cocos4.0/library/cc/RotateTo.lua | 41 -- meta/3rd/Cocos4.0/library/cc/ScaleBy.lua | 31 - meta/3rd/Cocos4.0/library/cc/ScaleTo.lua | 44 -- meta/3rd/Cocos4.0/library/cc/Scene.lua | 75 -- meta/3rd/Cocos4.0/library/cc/Scheduler.lua | 33 - meta/3rd/Cocos4.0/library/cc/Sequence.lua | 41 -- meta/3rd/Cocos4.0/library/cc/ShaderCache.lua | 30 - meta/3rd/Cocos4.0/library/cc/Shaky3D.lua | 43 -- meta/3rd/Cocos4.0/library/cc/ShakyTiles3D.lua | 43 -- meta/3rd/Cocos4.0/library/cc/ShatteredTiles3D.lua | 43 -- meta/3rd/Cocos4.0/library/cc/Show.lua | 26 - meta/3rd/Cocos4.0/library/cc/ShuffleTiles.lua | 47 -- meta/3rd/Cocos4.0/library/cc/Skeleton3D.lua | 44 -- meta/3rd/Cocos4.0/library/cc/SkewBy.lua | 38 - meta/3rd/Cocos4.0/library/cc/SkewTo.lua | 42 -- meta/3rd/Cocos4.0/library/cc/Skybox.lua | 47 -- meta/3rd/Cocos4.0/library/cc/Spawn.lua | 38 - meta/3rd/Cocos4.0/library/cc/Speed.lua | 63 -- meta/3rd/Cocos4.0/library/cc/SplitCols.lua | 39 - meta/3rd/Cocos4.0/library/cc/SplitRows.lua | 39 - meta/3rd/Cocos4.0/library/cc/SpotLight.lua | 73 -- meta/3rd/Cocos4.0/library/cc/Sprite.lua | 340 --------- meta/3rd/Cocos4.0/library/cc/Sprite3D.lua | 121 ---- meta/3rd/Cocos4.0/library/cc/Sprite3DCache.lua | 25 - meta/3rd/Cocos4.0/library/cc/Sprite3DMaterial.lua | 38 - meta/3rd/Cocos4.0/library/cc/SpriteBatchNode.lua | 191 ----- meta/3rd/Cocos4.0/library/cc/SpriteFrame.lua | 156 ---- meta/3rd/Cocos4.0/library/cc/SpriteFrameCache.lua | 109 --- meta/3rd/Cocos4.0/library/cc/StopGrid.lua | 26 - meta/3rd/Cocos4.0/library/cc/TMXLayer.lua | 144 ---- meta/3rd/Cocos4.0/library/cc/TMXLayerInfo.lua | 19 - meta/3rd/Cocos4.0/library/cc/TMXMapInfo.lua | 164 ----- meta/3rd/Cocos4.0/library/cc/TMXObjectGroup.lua | 61 -- meta/3rd/Cocos4.0/library/cc/TMXTiledMap.lua | 109 --- meta/3rd/Cocos4.0/library/cc/TMXTilesetInfo.lua | 16 - meta/3rd/Cocos4.0/library/cc/TableView.lua | 84 --- meta/3rd/Cocos4.0/library/cc/TableViewCell.lua | 25 - meta/3rd/Cocos4.0/library/cc/TargetedAction.lua | 51 -- meta/3rd/Cocos4.0/library/cc/Technique.lua | 44 -- meta/3rd/Cocos4.0/library/cc/Terrain.lua | 111 --- meta/3rd/Cocos4.0/library/cc/Texture2D.lua | 154 ---- meta/3rd/Cocos4.0/library/cc/TextureCache.lua | 101 --- meta/3rd/Cocos4.0/library/cc/TextureCube.lua | 39 - meta/3rd/Cocos4.0/library/cc/TileMapAtlas.lua | 42 -- meta/3rd/Cocos4.0/library/cc/TiledGrid3D.lua | 28 - meta/3rd/Cocos4.0/library/cc/TiledGrid3DAction.lua | 15 - meta/3rd/Cocos4.0/library/cc/Timer.lua | 35 - meta/3rd/Cocos4.0/library/cc/TintBy.lua | 45 -- meta/3rd/Cocos4.0/library/cc/TintTo.lua | 41 -- meta/3rd/Cocos4.0/library/cc/ToggleVisibility.lua | 26 - meta/3rd/Cocos4.0/library/cc/Touch.lua | 64 -- .../Cocos4.0/library/cc/TransitionCrossFade.lua | 26 - .../Cocos4.0/library/cc/TransitionEaseScene.lua | 16 - meta/3rd/Cocos4.0/library/cc/TransitionFade.lua | 26 - meta/3rd/Cocos4.0/library/cc/TransitionFadeBL.lua | 24 - .../3rd/Cocos4.0/library/cc/TransitionFadeDown.lua | 24 - meta/3rd/Cocos4.0/library/cc/TransitionFadeTR.lua | 36 - meta/3rd/Cocos4.0/library/cc/TransitionFadeUp.lua | 24 - .../Cocos4.0/library/cc/TransitionFlipAngular.lua | 19 - meta/3rd/Cocos4.0/library/cc/TransitionFlipX.lua | 19 - meta/3rd/Cocos4.0/library/cc/TransitionFlipY.lua | 19 - .../3rd/Cocos4.0/library/cc/TransitionJumpZoom.lua | 20 - meta/3rd/Cocos4.0/library/cc/TransitionMoveInB.lua | 20 - meta/3rd/Cocos4.0/library/cc/TransitionMoveInL.lua | 28 - meta/3rd/Cocos4.0/library/cc/TransitionMoveInR.lua | 20 - meta/3rd/Cocos4.0/library/cc/TransitionMoveInT.lua | 20 - .../3rd/Cocos4.0/library/cc/TransitionPageTurn.lua | 48 -- .../3rd/Cocos4.0/library/cc/TransitionProgress.lua | 20 - .../library/cc/TransitionProgressHorizontal.lua | 20 - .../library/cc/TransitionProgressInOut.lua | 20 - .../library/cc/TransitionProgressOutIn.lua | 20 - .../library/cc/TransitionProgressRadialCCW.lua | 20 - .../library/cc/TransitionProgressRadialCW.lua | 20 - .../library/cc/TransitionProgressVertical.lua | 20 - .../3rd/Cocos4.0/library/cc/TransitionRotoZoom.lua | 20 - meta/3rd/Cocos4.0/library/cc/TransitionScene.lua | 46 -- .../library/cc/TransitionSceneOriented.lua | 28 - .../Cocos4.0/library/cc/TransitionShrinkGrow.lua | 24 - .../3rd/Cocos4.0/library/cc/TransitionSlideInB.lua | 23 - .../3rd/Cocos4.0/library/cc/TransitionSlideInL.lua | 28 - .../3rd/Cocos4.0/library/cc/TransitionSlideInR.lua | 23 - .../3rd/Cocos4.0/library/cc/TransitionSlideInT.lua | 23 - .../Cocos4.0/library/cc/TransitionSplitCols.lua | 34 - .../Cocos4.0/library/cc/TransitionSplitRows.lua | 23 - .../Cocos4.0/library/cc/TransitionTurnOffTiles.lua | 30 - .../library/cc/TransitionZoomFlipAngular.lua | 19 - .../Cocos4.0/library/cc/TransitionZoomFlipX.lua | 19 - .../Cocos4.0/library/cc/TransitionZoomFlipY.lua | 19 - meta/3rd/Cocos4.0/library/cc/TurnOffTiles.lua | 50 -- meta/3rd/Cocos4.0/library/cc/Twirl.lua | 74 -- meta/3rd/Cocos4.0/library/cc/UserDefault.lua | 101 --- meta/3rd/Cocos4.0/library/cc/Waves.lua | 69 -- meta/3rd/Cocos4.0/library/cc/Waves3D.lua | 61 -- meta/3rd/Cocos4.0/library/cc/WavesTiles3D.lua | 61 -- meta/3rd/Cocos4.0/library/ccb/Program.lua | 54 -- meta/3rd/Cocos4.0/library/ccb/ProgramState.lua | 43 -- meta/3rd/Cocos4.0/library/ccb/Texture2DBackend.lua | 73 -- meta/3rd/Cocos4.0/library/ccb/TextureBackend.lua | 51 -- .../Cocos4.0/library/ccb/TextureCubemapBackend.lua | 16 - meta/3rd/Cocos4.0/library/ccb/VertexLayout.lua | 42 -- meta/3rd/Cocos4.0/library/ccs/ActionFadeFrame.lua | 27 - meta/3rd/Cocos4.0/library/ccs/ActionFrame.lua | 59 -- meta/3rd/Cocos4.0/library/ccs/ActionManagerEx.lua | 48 -- meta/3rd/Cocos4.0/library/ccs/ActionMoveFrame.lua | 27 - meta/3rd/Cocos4.0/library/ccs/ActionObject.lua | 85 --- .../Cocos4.0/library/ccs/ActionRotationFrame.lua | 27 - meta/3rd/Cocos4.0/library/ccs/ActionScaleFrame.lua | 36 - meta/3rd/Cocos4.0/library/ccs/ActionTimeline.lua | 165 ----- .../Cocos4.0/library/ccs/ActionTimelineCache.lua | 56 -- .../Cocos4.0/library/ccs/ActionTimelineData.lua | 27 - .../Cocos4.0/library/ccs/ActionTimelineNode.lua | 39 - meta/3rd/Cocos4.0/library/ccs/ActionTintFrame.lua | 27 - meta/3rd/Cocos4.0/library/ccs/AlphaFrame.lua | 25 - meta/3rd/Cocos4.0/library/ccs/AnchorPointFrame.lua | 25 - meta/3rd/Cocos4.0/library/ccs/AnimationData.lua | 26 - meta/3rd/Cocos4.0/library/ccs/Armature.lua | 139 ---- .../3rd/Cocos4.0/library/ccs/ArmatureAnimation.lua | 103 --- meta/3rd/Cocos4.0/library/ccs/ArmatureData.lua | 26 - .../Cocos4.0/library/ccs/ArmatureDataManager.lua | 104 --- .../Cocos4.0/library/ccs/ArmatureDisplayData.lua | 15 - meta/3rd/Cocos4.0/library/ccs/BaseData.lua | 22 - meta/3rd/Cocos4.0/library/ccs/BatchNode.lua | 33 - meta/3rd/Cocos4.0/library/ccs/BlendFuncFrame.lua | 25 - meta/3rd/Cocos4.0/library/ccs/Bone.lua | 167 ----- meta/3rd/Cocos4.0/library/ccs/BoneData.lua | 26 - meta/3rd/Cocos4.0/library/ccs/BoneNode.lua | 132 ---- meta/3rd/Cocos4.0/library/ccs/ColorFrame.lua | 25 - meta/3rd/Cocos4.0/library/ccs/ComAttribute.lua | 66 -- meta/3rd/Cocos4.0/library/ccs/ComAudio.lua | 134 ---- meta/3rd/Cocos4.0/library/ccs/ComController.lua | 33 - meta/3rd/Cocos4.0/library/ccs/ComExtensionData.lua | 43 -- meta/3rd/Cocos4.0/library/ccs/ComRender.lua | 37 - meta/3rd/Cocos4.0/library/ccs/ContourData.lua | 22 - meta/3rd/Cocos4.0/library/ccs/DisplayData.lua | 23 - meta/3rd/Cocos4.0/library/ccs/DisplayManager.lua | 92 --- meta/3rd/Cocos4.0/library/ccs/EventFrame.lua | 32 - meta/3rd/Cocos4.0/library/ccs/Frame.lua | 61 -- meta/3rd/Cocos4.0/library/ccs/FrameData.lua | 19 - meta/3rd/Cocos4.0/library/ccs/GUIReader.lua | 34 - meta/3rd/Cocos4.0/library/ccs/InnerActionFrame.lua | 54 -- meta/3rd/Cocos4.0/library/ccs/MovementBoneData.lua | 26 - meta/3rd/Cocos4.0/library/ccs/MovementData.lua | 23 - .../Cocos4.0/library/ccs/ParticleDisplayData.lua | 15 - meta/3rd/Cocos4.0/library/ccs/PlayableFrame.lua | 25 - meta/3rd/Cocos4.0/library/ccs/PositionFrame.lua | 39 - meta/3rd/Cocos4.0/library/ccs/RotationFrame.lua | 25 - .../3rd/Cocos4.0/library/ccs/RotationSkewFrame.lua | 18 - meta/3rd/Cocos4.0/library/ccs/ScaleFrame.lua | 36 - meta/3rd/Cocos4.0/library/ccs/SceneReader.lua | 35 - meta/3rd/Cocos4.0/library/ccs/SkeletonNode.lua | 40 - meta/3rd/Cocos4.0/library/ccs/SkewFrame.lua | 32 - meta/3rd/Cocos4.0/library/ccs/Skin.lua | 57 -- .../3rd/Cocos4.0/library/ccs/SpriteDisplayData.lua | 19 - meta/3rd/Cocos4.0/library/ccs/TextureData.lua | 26 - meta/3rd/Cocos4.0/library/ccs/TextureFrame.lua | 29 - meta/3rd/Cocos4.0/library/ccs/Timeline.lua | 63 -- meta/3rd/Cocos4.0/library/ccs/Tween.lua | 58 -- meta/3rd/Cocos4.0/library/ccs/VisibleFrame.lua | 25 - meta/3rd/Cocos4.0/library/ccs/ZOrderFrame.lua | 25 - .../Cocos4.0/library/ccui/AbstractCheckButton.lua | 133 ---- meta/3rd/Cocos4.0/library/ccui/Button.lua | 226 ------ meta/3rd/Cocos4.0/library/ccui/CheckBox.lua | 35 - meta/3rd/Cocos4.0/library/ccui/EditBox.lua | 323 --------- meta/3rd/Cocos4.0/library/ccui/HBox.lua | 26 - meta/3rd/Cocos4.0/library/ccui/Helper.lua | 73 -- meta/3rd/Cocos4.0/library/ccui/ImageView.lua | 92 --- meta/3rd/Cocos4.0/library/ccui/Layout.lua | 220 ------ meta/3rd/Cocos4.0/library/ccui/LayoutComponent.lua | 251 ------- meta/3rd/Cocos4.0/library/ccui/LayoutParameter.lua | 35 - .../library/ccui/LinearLayoutParameter.lua | 35 - meta/3rd/Cocos4.0/library/ccui/ListView.lua | 305 -------- meta/3rd/Cocos4.0/library/ccui/LoadingBar.lua | 87 --- meta/3rd/Cocos4.0/library/ccui/PageView.lua | 180 ----- meta/3rd/Cocos4.0/library/ccui/RadioButton.lua | 35 - .../3rd/Cocos4.0/library/ccui/RadioButtonGroup.lua | 73 -- meta/3rd/Cocos4.0/library/ccui/RelativeBox.lua | 26 - .../library/ccui/RelativeLayoutParameter.lua | 53 -- meta/3rd/Cocos4.0/library/ccui/RichElement.lua | 32 - .../library/ccui/RichElementCustomNode.lua | 38 - .../3rd/Cocos4.0/library/ccui/RichElementImage.lua | 58 -- .../Cocos4.0/library/ccui/RichElementNewLine.lua | 24 - meta/3rd/Cocos4.0/library/ccui/RichElementText.lua | 78 -- meta/3rd/Cocos4.0/library/ccui/RichText.lua | 211 ------ meta/3rd/Cocos4.0/library/ccui/Scale9Sprite.lua | 225 ------ meta/3rd/Cocos4.0/library/ccui/ScrollView.lua | 378 ---------- meta/3rd/Cocos4.0/library/ccui/Slider.lua | 191 ----- meta/3rd/Cocos4.0/library/ccui/TabControl.lua | 104 --- meta/3rd/Cocos4.0/library/ccui/TabHeader.lua | 65 -- meta/3rd/Cocos4.0/library/ccui/Text.lua | 206 ------ meta/3rd/Cocos4.0/library/ccui/TextAtlas.lua | 68 -- meta/3rd/Cocos4.0/library/ccui/TextBMFont.lua | 55 -- meta/3rd/Cocos4.0/library/ccui/TextField.lua | 248 ------- meta/3rd/Cocos4.0/library/ccui/VBox.lua | 26 - meta/3rd/Cocos4.0/library/ccui/VideoPlayer.lua | 114 --- meta/3rd/Cocos4.0/library/ccui/WebView.lua | 93 --- meta/3rd/Cocos4.0/library/ccui/Widget.lua | 399 ---------- meta/3rd/Cocos4.0/library/global.lua | 216 ------ meta/3rd/Cocos4.0/library/sp/SkeletonAnimation.lua | 114 --- meta/3rd/Cocos4.0/library/sp/SkeletonRenderer.lua | 129 ---- 455 files changed, 1 insertion(+), 28717 deletions(-) create mode 160000 meta/3rd/Cocos4.0 delete mode 100644 meta/3rd/Cocos4.0/config.json delete mode 100644 meta/3rd/Cocos4.0/library/cc/Action.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ActionCamera.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ActionEase.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ActionFloat.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ActionInstant.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ActionInterval.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ActionManager.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ActionTween.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/AmbientLight.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Animate.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Animate3D.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Animation.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Animation3D.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/AnimationCache.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/AnimationFrame.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Application.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/AssetsManager.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/AssetsManagerEx.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/AsyncTaskPool.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/AtlasNode.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/AttachNode.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/AudioEngine.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/AudioProfile.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/AutoPolygon.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/BaseLight.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/BezierBy.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/BezierTo.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/BillBoard.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Blink.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Bundle3D.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/CSLoader.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/CallFunc.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Camera.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/CameraBackgroundBrush.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/CameraBackgroundColorBrush.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/CameraBackgroundDepthBrush.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/CameraBackgroundSkyBoxBrush.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/CardinalSplineBy.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/CardinalSplineTo.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/CatmullRomBy.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/CatmullRomTo.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ClippingNode.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ClippingRectangleNode.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Component.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ComponentLua.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Console.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Control.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ControlButton.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ControlColourPicker.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ControlHuePicker.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ControlPotentiometer.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ControlSaturationBrightnessPicker.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ControlSlider.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ControlStepper.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ControlSwitch.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Controller.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/DelayTime.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Device.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/DirectionLight.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Director.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/DrawNode.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EaseBackIn.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EaseBackInOut.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EaseBackOut.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EaseBezierAction.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EaseBounce.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EaseBounceIn.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EaseBounceInOut.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EaseBounceOut.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EaseCircleActionIn.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EaseCircleActionInOut.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EaseCircleActionOut.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EaseCubicActionIn.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EaseCubicActionInOut.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EaseCubicActionOut.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EaseElastic.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EaseElasticIn.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EaseElasticInOut.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EaseElasticOut.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EaseExponentialIn.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EaseExponentialInOut.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EaseExponentialOut.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EaseIn.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EaseInOut.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EaseOut.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EaseQuadraticActionIn.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EaseQuadraticActionInOut.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EaseQuadraticActionOut.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EaseQuarticActionIn.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EaseQuarticActionInOut.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EaseQuarticActionOut.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EaseQuinticActionIn.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EaseQuinticActionInOut.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EaseQuinticActionOut.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EaseRateAction.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EaseSineIn.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EaseSineInOut.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EaseSineOut.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Event.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EventAcceleration.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EventAssetsManagerEx.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EventController.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EventCustom.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EventDispatcher.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EventFocus.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EventKeyboard.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EventListener.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EventListenerAcceleration.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EventListenerAssetsManagerEx.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EventListenerController.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EventListenerCustom.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EventListenerFocus.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EventListenerKeyboard.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EventListenerMouse.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EventListenerPhysicsContact.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EventListenerPhysicsContactWithBodies.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EventListenerPhysicsContactWithGroup.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EventListenerPhysicsContactWithShapes.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EventListenerTouchAllAtOnce.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EventListenerTouchOneByOne.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EventMouse.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/EventTouch.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/FadeIn.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/FadeOut.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/FadeOutBLTiles.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/FadeOutDownTiles.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/FadeOutTRTiles.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/FadeOutUpTiles.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/FadeTo.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/FastTMXLayer.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/FastTMXTiledMap.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/FileUtils.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/FiniteTimeAction.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/FlipX.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/FlipX3D.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/FlipY.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/FlipY3D.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Follow.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/GLView.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/GLViewImpl.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Grid3D.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Grid3DAction.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/GridAction.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/GridBase.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Hide.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Image.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/JumpBy.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/JumpTiles3D.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/JumpTo.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Label.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/LabelAtlas.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Layer.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/LayerColor.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/LayerGradient.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/LayerMultiplex.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/LayerRadialGradient.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Lens3D.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Liquid.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Manifest.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Material.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Menu.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/MenuItem.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/MenuItemAtlasFont.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/MenuItemFont.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/MenuItemImage.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/MenuItemLabel.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/MenuItemSprite.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/MenuItemToggle.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Mesh.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/MotionStreak.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/MotionStreak3D.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/MoveBy.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/MoveTo.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/NavMesh.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/NavMeshAgent.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/NavMeshObstacle.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Node.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/NodeGrid.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/OrbitCamera.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/PUParticleSystem3D.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/PageTurn3D.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ParallaxNode.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ParticleBatchNode.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ParticleData.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ParticleExplosion.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ParticleFire.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ParticleFireworks.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ParticleFlower.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ParticleGalaxy.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ParticleMeteor.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ParticleRain.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ParticleSmoke.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ParticleSnow.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ParticleSpiral.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ParticleSun.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ParticleSystem.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ParticleSystem3D.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ParticleSystemQuad.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Pass.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Physics3D6DofConstraint.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Physics3DComponent.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Physics3DConeTwistConstraint.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Physics3DConstraint.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Physics3DHingeConstraint.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Physics3DObject.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Physics3DPointToPointConstraint.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Physics3DRigidBody.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Physics3DShape.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Physics3DSliderConstraint.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Physics3DWorld.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/PhysicsBody.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/PhysicsContact.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/PhysicsContactPostSolve.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/PhysicsContactPreSolve.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/PhysicsJoint.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/PhysicsJointDistance.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/PhysicsJointFixed.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/PhysicsJointGear.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/PhysicsJointGroove.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/PhysicsJointLimit.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/PhysicsJointMotor.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/PhysicsJointPin.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/PhysicsJointRatchet.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/PhysicsJointRotaryLimit.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/PhysicsJointRotarySpring.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/PhysicsJointSpring.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/PhysicsShape.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/PhysicsShapeBox.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/PhysicsShapeCircle.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/PhysicsShapeEdgeBox.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/PhysicsShapeEdgeChain.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/PhysicsShapeEdgePolygon.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/PhysicsShapeEdgeSegment.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/PhysicsShapePolygon.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/PhysicsSprite3D.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/PhysicsWorld.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Place.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/PointLight.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/PolygonInfo.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ProgressFromTo.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ProgressTimer.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ProgressTo.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Properties.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ProtectedNode.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Ref.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/RemoveSelf.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/RenderState.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/RenderTexture.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Renderer.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Repeat.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/RepeatForever.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ReuseGrid.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Ripple3D.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/RotateBy.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/RotateTo.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ScaleBy.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ScaleTo.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Scene.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Scheduler.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Sequence.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ShaderCache.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Shaky3D.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ShakyTiles3D.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ShatteredTiles3D.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Show.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ShuffleTiles.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Skeleton3D.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/SkewBy.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/SkewTo.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Skybox.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Spawn.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Speed.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/SplitCols.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/SplitRows.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/SpotLight.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Sprite.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Sprite3D.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Sprite3DCache.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Sprite3DMaterial.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/SpriteBatchNode.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/SpriteFrame.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/SpriteFrameCache.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/StopGrid.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TMXLayer.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TMXLayerInfo.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TMXMapInfo.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TMXObjectGroup.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TMXTiledMap.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TMXTilesetInfo.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TableView.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TableViewCell.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TargetedAction.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Technique.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Terrain.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Texture2D.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TextureCache.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TextureCube.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TileMapAtlas.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TiledGrid3D.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TiledGrid3DAction.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Timer.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TintBy.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TintTo.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/ToggleVisibility.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Touch.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TransitionCrossFade.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TransitionEaseScene.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TransitionFade.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TransitionFadeBL.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TransitionFadeDown.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TransitionFadeTR.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TransitionFadeUp.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TransitionFlipAngular.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TransitionFlipX.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TransitionFlipY.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TransitionJumpZoom.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TransitionMoveInB.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TransitionMoveInL.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TransitionMoveInR.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TransitionMoveInT.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TransitionPageTurn.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TransitionProgress.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TransitionProgressHorizontal.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TransitionProgressInOut.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TransitionProgressOutIn.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TransitionProgressRadialCCW.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TransitionProgressRadialCW.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TransitionProgressVertical.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TransitionRotoZoom.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TransitionScene.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TransitionSceneOriented.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TransitionShrinkGrow.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TransitionSlideInB.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TransitionSlideInL.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TransitionSlideInR.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TransitionSlideInT.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TransitionSplitCols.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TransitionSplitRows.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TransitionTurnOffTiles.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TransitionZoomFlipAngular.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TransitionZoomFlipX.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TransitionZoomFlipY.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/TurnOffTiles.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Twirl.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/UserDefault.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Waves.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/Waves3D.lua delete mode 100644 meta/3rd/Cocos4.0/library/cc/WavesTiles3D.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccb/Program.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccb/ProgramState.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccb/Texture2DBackend.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccb/TextureBackend.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccb/TextureCubemapBackend.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccb/VertexLayout.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/ActionFadeFrame.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/ActionFrame.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/ActionManagerEx.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/ActionMoveFrame.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/ActionObject.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/ActionRotationFrame.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/ActionScaleFrame.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/ActionTimeline.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/ActionTimelineCache.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/ActionTimelineData.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/ActionTimelineNode.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/ActionTintFrame.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/AlphaFrame.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/AnchorPointFrame.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/AnimationData.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/Armature.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/ArmatureAnimation.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/ArmatureData.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/ArmatureDataManager.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/ArmatureDisplayData.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/BaseData.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/BatchNode.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/BlendFuncFrame.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/Bone.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/BoneData.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/BoneNode.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/ColorFrame.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/ComAttribute.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/ComAudio.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/ComController.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/ComExtensionData.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/ComRender.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/ContourData.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/DisplayData.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/DisplayManager.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/EventFrame.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/Frame.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/FrameData.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/GUIReader.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/InnerActionFrame.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/MovementBoneData.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/MovementData.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/ParticleDisplayData.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/PlayableFrame.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/PositionFrame.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/RotationFrame.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/RotationSkewFrame.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/ScaleFrame.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/SceneReader.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/SkeletonNode.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/SkewFrame.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/Skin.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/SpriteDisplayData.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/TextureData.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/TextureFrame.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/Timeline.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/Tween.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/VisibleFrame.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccs/ZOrderFrame.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccui/AbstractCheckButton.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccui/Button.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccui/CheckBox.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccui/EditBox.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccui/HBox.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccui/Helper.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccui/ImageView.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccui/Layout.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccui/LayoutComponent.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccui/LayoutParameter.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccui/LinearLayoutParameter.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccui/ListView.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccui/LoadingBar.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccui/PageView.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccui/RadioButton.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccui/RadioButtonGroup.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccui/RelativeBox.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccui/RelativeLayoutParameter.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccui/RichElement.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccui/RichElementCustomNode.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccui/RichElementImage.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccui/RichElementNewLine.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccui/RichElementText.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccui/RichText.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccui/Scale9Sprite.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccui/ScrollView.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccui/Slider.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccui/TabControl.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccui/TabHeader.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccui/Text.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccui/TextAtlas.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccui/TextBMFont.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccui/TextField.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccui/VBox.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccui/VideoPlayer.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccui/WebView.lua delete mode 100644 meta/3rd/Cocos4.0/library/ccui/Widget.lua delete mode 100644 meta/3rd/Cocos4.0/library/global.lua delete mode 100644 meta/3rd/Cocos4.0/library/sp/SkeletonAnimation.lua delete mode 100644 meta/3rd/Cocos4.0/library/sp/SkeletonRenderer.lua (limited to 'meta') diff --git a/meta/3rd/Cocos4.0 b/meta/3rd/Cocos4.0 new file mode 160000 index 00000000..c0b2259e --- /dev/null +++ b/meta/3rd/Cocos4.0 @@ -0,0 +1 @@ +Subproject commit c0b2259e0d367561fd4563ae114b029b4dfe3a8f diff --git a/meta/3rd/Cocos4.0/config.json b/meta/3rd/Cocos4.0/config.json deleted file mode 100644 index a967b6ff..00000000 --- a/meta/3rd/Cocos4.0/config.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "Cocos", - "files": ["cocos"], - "settings": { - "Lua.runtime.version": "LuaJIT" - } -} diff --git a/meta/3rd/Cocos4.0/library/cc/Action.lua b/meta/3rd/Cocos4.0/library/cc/Action.lua deleted file mode 100644 index 3c41651f..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Action.lua +++ /dev/null @@ -1,84 +0,0 @@ ----@meta - ----@class cc.Action :cc.Ref -local Action={ } -cc.Action=Action - - - - ----* Called before the action start. It will also set the target.
----* param target A certain target. ----@param target cc.Node ----@return self -function Action:startWithTarget (target) end ----* Set the original target, since target can be nil.
----* Is the target that were used to run the action. Unless you are doing something complex, like ActionManager, you should NOT call this method.
----* The target is 'assigned', it is not 'retained'.
----* since v0.8.2
----* param originalTarget Is 'assigned', it is not 'retained'. ----@param originalTarget cc.Node ----@return self -function Action:setOriginalTarget (originalTarget) end ----* Returns a clone of action.
----* return A clone action. ----@return self -function Action:clone () end ----* Return a original Target.
----* return A original Target. ----@return cc.Node -function Action:getOriginalTarget () end ----* Called after the action has finished. It will set the 'target' to nil.
----* IMPORTANT: You should never call "Action::stop()" manually. Instead, use: "target->stopAction(action);". ----@return self -function Action:stop () end ----* Called once per frame. time a value between 0 and 1.
----* For example:
----* - 0 Means that the action just started.
----* - 0.5 Means that the action is in the middle.
----* - 1 Means that the action is over.
----* param time A value between 0 and 1. ----@param time float ----@return self -function Action:update (time) end ----* Return certain target.
----* return A certain target. ----@return cc.Node -function Action:getTarget () end ----* Returns a flag field that is used to group the actions easily.
----* return A tag. ----@return unsigned_int -function Action:getFlags () end ----* Called every frame with it's delta time, dt in seconds. DON'T override unless you know what you are doing.
----* param dt In seconds. ----@param dt float ----@return self -function Action:step (dt) end ----* Changes the tag that is used to identify the action easily.
----* param tag Used to identify the action easily. ----@param tag int ----@return self -function Action:setTag (tag) end ----* Changes the flag field that is used to group the actions easily.
----* param flags Used to group the actions easily. ----@param flags unsigned_int ----@return self -function Action:setFlags (flags) end ----* Returns a tag that is used to identify the action easily.
----* return A tag. ----@return int -function Action:getTag () end ----* The action will modify the target properties.
----* param target A certain target. ----@param target cc.Node ----@return self -function Action:setTarget (target) end ----* Return true if the action has finished.
----* return Is true if the action has finished. ----@return boolean -function Action:isDone () end ----* Returns a new action that performs the exact reverse of the action.
----* return A new action that performs the exact reverse of the action.
----* js NA ----@return self -function Action:reverse () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ActionCamera.lua b/meta/3rd/Cocos4.0/library/cc/ActionCamera.lua deleted file mode 100644 index 2333d79d..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ActionCamera.lua +++ /dev/null @@ -1,47 +0,0 @@ ----@meta - ----@class cc.ActionCamera :cc.ActionInterval -local ActionCamera={ } -cc.ActionCamera=ActionCamera - - - - ----@overload fun(float:float,float:float,float:float):self ----@overload fun(float0:vec3_table):self ----@param x float ----@param y float ----@param z float ----@return self -function ActionCamera:setEye (x,y,z) end ----* ----@return vec3_table -function ActionCamera:getEye () end ----* ----@param up vec3_table ----@return self -function ActionCamera:setUp (up) end ----* ----@return vec3_table -function ActionCamera:getCenter () end ----* ----@param center vec3_table ----@return self -function ActionCamera:setCenter (center) end ----* ----@return vec3_table -function ActionCamera:getUp () end ----* ----@param target cc.Node ----@return self -function ActionCamera:startWithTarget (target) end ----* ----@return self -function ActionCamera:clone () end ----* ----@return self -function ActionCamera:reverse () end ----* js ctor
----* lua new ----@return self -function ActionCamera:ActionCamera () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ActionEase.lua b/meta/3rd/Cocos4.0/library/cc/ActionEase.lua deleted file mode 100644 index e07b8924..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ActionEase.lua +++ /dev/null @@ -1,29 +0,0 @@ ----@meta - ----@class cc.ActionEase :cc.ActionInterval -local ActionEase={ } -cc.ActionEase=ActionEase - - - - ----* brief Initializes the action.
----* return Return true when the initialization success, otherwise return false. ----@param action cc.ActionInterval ----@return boolean -function ActionEase:initWithAction (action) end ----* brief Get the pointer of the inner action.
----* return The pointer of the inner action. ----@return cc.ActionInterval -function ActionEase:getInnerAction () end ----* ----@param target cc.Node ----@return self -function ActionEase:startWithTarget (target) end ----* ----@return self -function ActionEase:stop () end ----* ----@param time float ----@return self -function ActionEase:update (time) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ActionFloat.lua b/meta/3rd/Cocos4.0/library/cc/ActionFloat.lua deleted file mode 100644 index 861e1805..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ActionFloat.lua +++ /dev/null @@ -1,46 +0,0 @@ ----@meta - ----@class cc.ActionFloat :cc.ActionInterval -local ActionFloat={ } -cc.ActionFloat=ActionFloat - - - - ----* ----@param duration float ----@param from float ----@param to float ----@param callback function ----@return boolean -function ActionFloat:initWithDuration (duration,from,to,callback) end ----* Creates FloatAction with specified duration, from value, to value and callback to report back
----* results
----* param duration of the action
----* param from value to start from
----* param to value to be at the end of the action
----* param callback to report back result
----* return An autoreleased ActionFloat object ----@param duration float ----@param from float ----@param to float ----@param callback function ----@return self -function ActionFloat:create (duration,from,to,callback) end ----* Overridden ActionInterval methods ----@param target cc.Node ----@return self -function ActionFloat:startWithTarget (target) end ----* ----@return self -function ActionFloat:clone () end ----* ----@param delta float ----@return self -function ActionFloat:update (delta) end ----* ----@return self -function ActionFloat:reverse () end ----* ----@return self -function ActionFloat:ActionFloat () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ActionInstant.lua b/meta/3rd/Cocos4.0/library/cc/ActionInstant.lua deleted file mode 100644 index 6c523c62..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ActionInstant.lua +++ /dev/null @@ -1,30 +0,0 @@ ----@meta - ----@class cc.ActionInstant :cc.FiniteTimeAction -local ActionInstant={ } -cc.ActionInstant=ActionInstant - - - - ----* ----@param target cc.Node ----@return self -function ActionInstant:startWithTarget (target) end ----* ----@return self -function ActionInstant:reverse () end ----* ----@return self -function ActionInstant:clone () end ----* param time In seconds. ----@param time float ----@return self -function ActionInstant:update (time) end ----* param dt In seconds. ----@param dt float ----@return self -function ActionInstant:step (dt) end ----* ----@return boolean -function ActionInstant:isDone () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ActionInterval.lua b/meta/3rd/Cocos4.0/library/cc/ActionInterval.lua deleted file mode 100644 index feea7eef..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ActionInterval.lua +++ /dev/null @@ -1,43 +0,0 @@ ----@meta - ----@class cc.ActionInterval :cc.FiniteTimeAction -local ActionInterval={ } -cc.ActionInterval=ActionInterval - - - - ----* Gets the amplitude rate, extension in GridAction
----* return The amplitude rate. ----@return float -function ActionInterval:getAmplitudeRate () end ----* initializes the action ----@param d float ----@return boolean -function ActionInterval:initWithDuration (d) end ----* Sets the amplitude rate, extension in GridAction
----* param amp The amplitude rate. ----@param amp float ----@return self -function ActionInterval:setAmplitudeRate (amp) end ----* How many seconds had elapsed since the actions started to run.
----* return The seconds had elapsed since the actions started to run. ----@return float -function ActionInterval:getElapsed () end ----* ----@param target cc.Node ----@return self -function ActionInterval:startWithTarget (target) end ----* param dt in seconds ----@param dt float ----@return self -function ActionInterval:step (dt) end ----* ----@return self -function ActionInterval:clone () end ----* ----@return self -function ActionInterval:reverse () end ----* ----@return boolean -function ActionInterval:isDone () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ActionManager.lua b/meta/3rd/Cocos4.0/library/cc/ActionManager.lua deleted file mode 100644 index 12a08c48..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ActionManager.lua +++ /dev/null @@ -1,124 +0,0 @@ ----@meta - ----@class cc.ActionManager :cc.Ref -local ActionManager={ } -cc.ActionManager=ActionManager - - - - ----* Gets an action given its tag an a target.
----* param tag The action's tag.
----* param target A certain target.
----* return The Action the with the given tag. ----@param tag int ----@param target cc.Node ----@return cc.Action -function ActionManager:getActionByTag (tag,target) end ----* Removes an action given its tag and the target.
----* param tag The action's tag.
----* param target A certain target. ----@param tag int ----@param target cc.Node ----@return self -function ActionManager:removeActionByTag (tag,target) end ----* Removes all actions matching at least one bit in flags and the target.
----* param flags The flag field to match the actions' flags based on bitwise AND.
----* param target A certain target.
----* js NA ----@param flags unsigned_int ----@param target cc.Node ----@return self -function ActionManager:removeActionsByFlags (flags,target) end ----* Removes all actions from all the targets. ----@return self -function ActionManager:removeAllActions () end ----* Adds an action with a target.
----* If the target is already present, then the action will be added to the existing target.
----* If the target is not present, a new instance of this target will be created either paused or not, and the action will be added to the newly created target.
----* When the target is paused, the queued actions won't be 'ticked'.
----* param action A certain action.
----* param target The target which need to be added an action.
----* param paused Is the target paused or not. ----@param action cc.Action ----@param target cc.Node ----@param paused boolean ----@return self -function ActionManager:addAction (action,target,paused) end ----* Resumes the target. All queued actions will be resumed.
----* param target A certain target. ----@param target cc.Node ----@return self -function ActionManager:resumeTarget (target) end ----* Returns the numbers of actions that are running in all targets.
----* return The numbers of actions that are running in all target.
----* js NA ----@return int -function ActionManager:getNumberOfRunningActions () end ----* Pauses the target: all running actions and newly added actions will be paused.
----* param target A certain target. ----@param target cc.Node ----@return self -function ActionManager:pauseTarget (target) end ----* Returns the numbers of actions that are running in a certain target.
----* Composable actions are counted as 1 action. Example:
----* - If you are running 1 Sequence of 7 actions, it will return 1.
----* - If you are running 7 Sequences of 2 actions, it will return 7.
----* param target A certain target.
----* return The numbers of actions that are running in a certain target.
----* js NA ----@param target cc.Node ----@return int -function ActionManager:getNumberOfRunningActionsInTarget (target) end ----* Removes all actions from a certain target.
----* All the actions that belongs to the target will be removed.
----* param target A certain target. ----@param target cc.Node ----@return self -function ActionManager:removeAllActionsFromTarget (target) end ----* Resume a set of targets (convenience function to reverse a pauseAllRunningActions call).
----* param targetsToResume A set of targets need to be resumed. ----@param targetsToResume array_table ----@return self -function ActionManager:resumeTargets (targetsToResume) end ----* Removes an action given an action reference.
----* param action A certain target. ----@param action cc.Action ----@return self -function ActionManager:removeAction (action) end ----* Pauses all running actions, returning a list of targets whose actions were paused.
----* return A list of targets whose actions were paused. ----@return array_table -function ActionManager:pauseAllRunningActions () end ----* Main loop of ActionManager.
----* param dt In seconds. ----@param dt float ----@return self -function ActionManager:update (dt) end ----* Removes all actions given its tag and the target.
----* param tag The actions' tag.
----* param target A certain target.
----* js NA ----@param tag int ----@param target cc.Node ----@return self -function ActionManager:removeAllActionsByTag (tag,target) end ----* Returns the numbers of actions that are running in a
----* certain target with a specific tag.
----* Like getNumberOfRunningActionsInTarget Composable actions
----* are counted as 1 action. Example:
----* - If you are running 1 Sequence of 7 actions, it will return 1.
----* - If you are running 7 Sequences of 2 actions, it will return 7.
----* param target A certain target.
----* param tag Tag that will be searched.
----* return The numbers of actions that are running in a certain target
----* with a specific tag.
----* see getNumberOfRunningActionsInTarget
----* js NA ----@param target cc.Node ----@param tag int ----@return unsigned_int -function ActionManager:getNumberOfRunningActionsInTargetByTag (target,tag) end ----* js ctor ----@return self -function ActionManager:ActionManager () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ActionTween.lua b/meta/3rd/Cocos4.0/library/cc/ActionTween.lua deleted file mode 100644 index 8ee28f6e..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ActionTween.lua +++ /dev/null @@ -1,47 +0,0 @@ ----@meta - ----@class cc.ActionTween :cc.ActionInterval -local ActionTween={ } -cc.ActionTween=ActionTween - - - - ----* brief Initializes the action with the property name (key), and the from and to parameters.
----* param duration The duration of the ActionTween. It's a value in seconds.
----* param key The key of property which should be updated.
----* param from The value of the specified property when the action begin.
----* param to The value of the specified property when the action end.
----* return If the initialization success, return true; otherwise, return false. ----@param duration float ----@param key string ----@param from float ----@param to float ----@return boolean -function ActionTween:initWithDuration (duration,key,from,to) end ----* brief Create and initializes the action with the property name (key), and the from and to parameters.
----* param duration The duration of the ActionTween. It's a value in seconds.
----* param key The key of property which should be updated.
----* param from The value of the specified property when the action begin.
----* param to The value of the specified property when the action end.
----* return If the creation success, return a pointer of ActionTween; otherwise, return nil. ----@param duration float ----@param key string ----@param from float ----@param to float ----@return self -function ActionTween:create (duration,key,from,to) end ----* ----@param target cc.Node ----@return self -function ActionTween:startWithTarget (target) end ----* ----@return self -function ActionTween:clone () end ----* ----@param dt float ----@return self -function ActionTween:update (dt) end ----* ----@return self -function ActionTween:reverse () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/AmbientLight.lua b/meta/3rd/Cocos4.0/library/cc/AmbientLight.lua deleted file mode 100644 index b607f61f..00000000 --- a/meta/3rd/Cocos4.0/library/cc/AmbientLight.lua +++ /dev/null @@ -1,21 +0,0 @@ ----@meta - ----@class cc.AmbientLight :cc.BaseLight -local AmbientLight={ } -cc.AmbientLight=AmbientLight - - - - ----* Creates a ambient light.
----* param color The light's color.
----* return The new ambient light. ----@param color color3b_table ----@return self -function AmbientLight:create (color) end ----* ----@return int -function AmbientLight:getLightType () end ----* ----@return self -function AmbientLight:AmbientLight () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Animate.lua b/meta/3rd/Cocos4.0/library/cc/Animate.lua deleted file mode 100644 index a57e8045..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Animate.lua +++ /dev/null @@ -1,52 +0,0 @@ ----@meta - ----@class cc.Animate :cc.ActionInterval -local Animate={ } -cc.Animate=Animate - - - - ----* initializes the action with an Animation and will restore the original frame when the animation is over ----@param animation cc.Animation ----@return boolean -function Animate:initWithAnimation (animation) end ----@overload fun():self ----@overload fun():self ----@return cc.Animation -function Animate:getAnimation () end ----* Gets the index of sprite frame currently displayed.
----* return int the index of sprite frame currently displayed. ----@return int -function Animate:getCurrentFrameIndex () end ----* Sets the Animation object to be animated
----* param animation certain animation. ----@param animation cc.Animation ----@return self -function Animate:setAnimation (animation) end ----* Creates the action with an Animation and will restore the original frame when the animation is over.
----* param animation A certain animation.
----* return An autoreleased Animate object. ----@param animation cc.Animation ----@return self -function Animate:create (animation) end ----* ----@param target cc.Node ----@return self -function Animate:startWithTarget (target) end ----* ----@return self -function Animate:clone () end ----* ----@return self -function Animate:stop () end ----* ----@return self -function Animate:reverse () end ----* param t In seconds. ----@param t float ----@return self -function Animate:update (t) end ----* ----@return self -function Animate:Animate () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Animate3D.lua b/meta/3rd/Cocos4.0/library/cc/Animate3D.lua deleted file mode 100644 index ec8b2cfd..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Animate3D.lua +++ /dev/null @@ -1,109 +0,0 @@ ----@meta - ----@class cc.Animate3D :cc.ActionInterval -local Animate3D={ } -cc.Animate3D=Animate3D - - - - ----* ----@param keyFrame int ----@param userInfo map_table ----@return self -function Animate3D:setKeyFrameUserInfo (keyFrame,userInfo) end ----* get & set speed, negative speed means playing reverse ----@return float -function Animate3D:getSpeed () end ----* set animate quality ----@param quality int ----@return self -function Animate3D:setQuality (quality) end ----* ----@param weight float ----@return self -function Animate3D:setWeight (weight) end ----* ----@return self -function Animate3D:removeFromMap () end ----* ----@param animation cc.Animation3D ----@param startFrame int ----@param endFrame int ----@param frameRate float ----@return boolean -function Animate3D:initWithFrames (animation,startFrame,endFrame,frameRate) end ----* ----@return float -function Animate3D:getOriginInterval () end ----* ----@param speed float ----@return self -function Animate3D:setSpeed (speed) end ----@overload fun(cc.Animation3D:cc.Animation3D,float:float,float:float):self ----@overload fun(cc.Animation3D:cc.Animation3D):self ----@param animation cc.Animation3D ----@param fromTime float ----@param duration float ----@return boolean -function Animate3D:init (animation,fromTime,duration) end ----* get & set origin interval ----@param interval float ----@return self -function Animate3D:setOriginInterval (interval) end ----* get & set blend weight, weight must positive ----@return float -function Animate3D:getWeight () end ----* get animate quality ----@return int -function Animate3D:getQuality () end ----@overload fun(cc.Animation3D:cc.Animation3D,float:float,float:float):self ----@overload fun(cc.Animation3D:cc.Animation3D):self ----@param animation cc.Animation3D ----@param fromTime float ----@param duration float ----@return self -function Animate3D:create (animation,fromTime,duration) end ----* get animate transition time between 3d animations ----@return float -function Animate3D:getTransitionTime () end ----* create Animate3D by frame section, [startFrame, endFrame)
----* param animation used to generate animate3D
----* param startFrame
----* param endFrame
----* param frameRate default is 30 per second
----* return Animate3D created using animate ----@param animation cc.Animation3D ----@param startFrame int ----@param endFrame int ----@param frameRate float ----@return self -function Animate3D:createWithFrames (animation,startFrame,endFrame,frameRate) end ----* set animate transition time between 3d animations ----@param transTime float ----@return self -function Animate3D:setTransitionTime (transTime) end ----* ----@param target cc.Node ----@return self -function Animate3D:startWithTarget (target) end ----* ----@return self -function Animate3D:reverse () end ----* ----@return self -function Animate3D:clone () end ----* ----@return self -function Animate3D:stop () end ----* ----@param t float ----@return self -function Animate3D:update (t) end ----* ----@param dt float ----@return self -function Animate3D:step (dt) end ----* ----@return self -function Animate3D:Animate3D () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Animation.lua b/meta/3rd/Cocos4.0/library/cc/Animation.lua deleted file mode 100644 index 1f3624a6..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Animation.lua +++ /dev/null @@ -1,110 +0,0 @@ ----@meta - ----@class cc.Animation :cc.Ref -local Animation={ } -cc.Animation=Animation - - - - ----* Gets the times the animation is going to loop. 0 means animation is not animated. 1, animation is executed one time, ...
----* return The times the animation is going to loop. ----@return unsigned_int -function Animation:getLoops () end ----* Adds a SpriteFrame to a Animation.
----* param frame The frame will be added with one "delay unit". ----@param frame cc.SpriteFrame ----@return self -function Animation:addSpriteFrame (frame) end ----* Sets whether to restore the original frame when animation finishes.
----* param restoreOriginalFrame Whether to restore the original frame when animation finishes. ----@param restoreOriginalFrame boolean ----@return self -function Animation:setRestoreOriginalFrame (restoreOriginalFrame) end ----* ----@return self -function Animation:clone () end ----* Gets the duration in seconds of the whole animation. It is the result of totalDelayUnits * delayPerUnit.
----* return Result of totalDelayUnits * delayPerUnit. ----@return float -function Animation:getDuration () end ----* Initializes a Animation with AnimationFrame.
----* since v2.0 ----@param arrayOfAnimationFrameNames array_table ----@param delayPerUnit float ----@param loops unsigned_int ----@return boolean -function Animation:initWithAnimationFrames (arrayOfAnimationFrameNames,delayPerUnit,loops) end ----* Initializes a Animation. ----@return boolean -function Animation:init () end ----* Sets the array of AnimationFrames.
----* param frames The array of AnimationFrames. ----@param frames array_table ----@return self -function Animation:setFrames (frames) end ----* Gets the array of AnimationFrames.
----* return The array of AnimationFrames. ----@return array_table -function Animation:getFrames () end ----* Sets the times the animation is going to loop. 0 means animation is not animated. 1, animation is executed one time, ...
----* param loops The times the animation is going to loop. ----@param loops unsigned_int ----@return self -function Animation:setLoops (loops) end ----* Sets the delay in seconds of the "delay unit".
----* param delayPerUnit The delay in seconds of the "delay unit". ----@param delayPerUnit float ----@return self -function Animation:setDelayPerUnit (delayPerUnit) end ----* Adds a frame with an image filename. Internally it will create a SpriteFrame and it will add it.
----* The frame will be added with one "delay unit".
----* Added to facilitate the migration from v0.8 to v0.9.
----* param filename The path of SpriteFrame. ----@param filename string ----@return self -function Animation:addSpriteFrameWithFile (filename) end ----* Gets the total Delay units of the Animation.
----* return The total Delay units of the Animation. ----@return float -function Animation:getTotalDelayUnits () end ----* Gets the delay in seconds of the "delay unit".
----* return The delay in seconds of the "delay unit". ----@return float -function Animation:getDelayPerUnit () end ----* Initializes a Animation with frames and a delay between frames.
----* since v0.99.5 ----@param arrayOfSpriteFrameNames array_table ----@param delay float ----@param loops unsigned_int ----@return boolean -function Animation:initWithSpriteFrames (arrayOfSpriteFrameNames,delay,loops) end ----* Checks whether to restore the original frame when animation finishes.
----* return Restore the original frame when animation finishes. ----@return boolean -function Animation:getRestoreOriginalFrame () end ----* Adds a frame with a texture and a rect. Internally it will create a SpriteFrame and it will add it.
----* The frame will be added with one "delay unit".
----* Added to facilitate the migration from v0.8 to v0.9.
----* param pobTexture A frame with a texture.
----* param rect The Texture of rect. ----@param pobTexture cc.Texture2D ----@param rect rect_table ----@return self -function Animation:addSpriteFrameWithTexture (pobTexture,rect) end ----@overload fun(array_table:array_table,float:float,unsigned_int:unsigned_int):self ----@overload fun():self ----@param arrayOfAnimationFrameNames array_table ----@param delayPerUnit float ----@param loops unsigned_int ----@return self -function Animation:create (arrayOfAnimationFrameNames,delayPerUnit,loops) end ----* ----@param arrayOfSpriteFrameNames array_table ----@param delay float ----@param loops unsigned_int ----@return self -function Animation:createWithSpriteFrames (arrayOfSpriteFrameNames,delay,loops) end ----* ----@return self -function Animation:Animation () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Animation3D.lua b/meta/3rd/Cocos4.0/library/cc/Animation3D.lua deleted file mode 100644 index 1cae2328..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Animation3D.lua +++ /dev/null @@ -1,29 +0,0 @@ ----@meta - ----@class cc.Animation3D :cc.Ref -local Animation3D={ } -cc.Animation3D=Animation3D - - - - ----* init Animation3D with file name and animation name ----@param filename string ----@param animationName string ----@return boolean -function Animation3D:initWithFile (filename,animationName) end ----* init Animation3D from bundle data ----@param data cc.Animation3DData ----@return boolean -function Animation3D:init (data) end ----* get duration ----@return float -function Animation3D:getDuration () end ----* read all animation or only the animation with given animationName? animationName == "" read the first. ----@param filename string ----@param animationName string ----@return self -function Animation3D:create (filename,animationName) end ----* ----@return self -function Animation3D:Animation3D () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/AnimationCache.lua b/meta/3rd/Cocos4.0/library/cc/AnimationCache.lua deleted file mode 100644 index 14469d9e..00000000 --- a/meta/3rd/Cocos4.0/library/cc/AnimationCache.lua +++ /dev/null @@ -1,61 +0,0 @@ ----@meta - ----@class cc.AnimationCache :cc.Ref -local AnimationCache={ } -cc.AnimationCache=AnimationCache - - - - ----* Returns a Animation that was previously added.
----* If the name is not found it will return nil.
----* You should retain the returned copy if you are going to use it.
----* return A Animation that was previously added. If the name is not found it will return nil. ----@param name string ----@return cc.Animation -function AnimationCache:getAnimation (name) end ----* Adds a Animation with a name.
----* param animation An animation.
----* param name The name of animation. ----@param animation cc.Animation ----@param name string ----@return self -function AnimationCache:addAnimation (animation,name) end ----* ----@return boolean -function AnimationCache:init () end ----* Adds an animation from an NSDictionary.
----* Make sure that the frames were previously loaded in the SpriteFrameCache.
----* param dictionary An NSDictionary.
----* param plist The path of the relative file,it use to find the plist path for load SpriteFrames.
----* since v1.1
----* js NA ----@param dictionary map_table ----@param plist string ----@return self -function AnimationCache:addAnimationsWithDictionary (dictionary,plist) end ----* Deletes a Animation from the cache.
----* param name The name of animation. ----@param name string ----@return self -function AnimationCache:removeAnimation (name) end ----* Adds an animation from a plist file.
----* Make sure that the frames were previously loaded in the SpriteFrameCache.
----* since v1.1
----* js addAnimations
----* lua addAnimations
----* param plist An animation from a plist file. ----@param plist string ----@return self -function AnimationCache:addAnimationsWithFile (plist) end ----* Purges the cache. It releases all the Animation objects and the shared instance.
----* js NA ----@return self -function AnimationCache:destroyInstance () end ----* Returns the shared instance of the Animation cache
----* js NA ----@return self -function AnimationCache:getInstance () end ----* js ctor ----@return self -function AnimationCache:AnimationCache () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/AnimationFrame.lua b/meta/3rd/Cocos4.0/library/cc/AnimationFrame.lua deleted file mode 100644 index be1a8e8b..00000000 --- a/meta/3rd/Cocos4.0/library/cc/AnimationFrame.lua +++ /dev/null @@ -1,58 +0,0 @@ ----@meta - ----@class cc.AnimationFrame :cc.Ref -local AnimationFrame={ } -cc.AnimationFrame=AnimationFrame - - - - ----* Set the SpriteFrame.
----* param frame A SpriteFrame will be used. ----@param frame cc.SpriteFrame ----@return self -function AnimationFrame:setSpriteFrame (frame) end ----@overload fun():self ----@overload fun():self ----@return map_table -function AnimationFrame:getUserInfo () end ----* Sets the units of time the frame takes.
----* param delayUnits The units of time the frame takes. ----@param delayUnits float ----@return self -function AnimationFrame:setDelayUnits (delayUnits) end ----* ----@return self -function AnimationFrame:clone () end ----* Return a SpriteFrameName to be used.
----* return a SpriteFrameName to be used. ----@return cc.SpriteFrame -function AnimationFrame:getSpriteFrame () end ----* Gets the units of time the frame takes.
----* return The units of time the frame takes. ----@return float -function AnimationFrame:getDelayUnits () end ----* Sets user information.
----* param userInfo A dictionary as UserInfo. ----@param userInfo map_table ----@return self -function AnimationFrame:setUserInfo (userInfo) end ----* initializes the animation frame with a spriteframe, number of delay units and a notification user info ----@param spriteFrame cc.SpriteFrame ----@param delayUnits float ----@param userInfo map_table ----@return boolean -function AnimationFrame:initWithSpriteFrame (spriteFrame,delayUnits,userInfo) end ----* Creates the animation frame with a spriteframe, number of delay units and a notification user info.
----* param spriteFrame The animation frame with a spriteframe.
----* param delayUnits Number of delay units.
----* param userInfo A notification user info.
----* since 3.0 ----@param spriteFrame cc.SpriteFrame ----@param delayUnits float ----@param userInfo map_table ----@return self -function AnimationFrame:create (spriteFrame,delayUnits,userInfo) end ----* js ctor ----@return self -function AnimationFrame:AnimationFrame () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Application.lua b/meta/3rd/Cocos4.0/library/cc/Application.lua deleted file mode 100644 index 507e9f91..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Application.lua +++ /dev/null @@ -1,38 +0,0 @@ ----@meta - ----@class cc.Application -local Application={ } -cc.Application=Application - - - - ----* brief Get target platform ----@return int -function Application:getTargetPlatform () end ----* brief Get current language config
----* return Current language config ----@return int -function Application:getCurrentLanguage () end ----* brief Get current language iso 639-1 code
----* return Current language iso 639-1 code ----@return char -function Application:getCurrentLanguageCode () end ----* brief Open url in default browser
----* param String with url to open.
----* return true if the resource located by the URL was successfully opened; otherwise false. ----@param url string ----@return boolean -function Application:openURL (url) end ----* brief Get application version. ----@return string -function Application:getVersion () end ----* brief Callback by Director to limit FPS.
----* param interval The time, expressed in seconds, between current frame and next. ----@param interval float ----@return self -function Application:setAnimationInterval (interval) end ----* brief Get current application instance.
----* return Current application instance pointer. ----@return self -function Application:getInstance () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/AssetsManager.lua b/meta/3rd/Cocos4.0/library/cc/AssetsManager.lua deleted file mode 100644 index 3bef0d79..00000000 --- a/meta/3rd/Cocos4.0/library/cc/AssetsManager.lua +++ /dev/null @@ -1,61 +0,0 @@ ----@meta - ----@class cc.AssetsManager :cc.Node -local AssetsManager={ } -cc.AssetsManager=AssetsManager - - - - ----* ----@param storagePath char ----@return self -function AssetsManager:setStoragePath (storagePath) end ----* ----@param packageUrl char ----@return self -function AssetsManager:setPackageUrl (packageUrl) end ----* ----@return boolean -function AssetsManager:checkUpdate () end ----* ----@return char -function AssetsManager:getStoragePath () end ----* ----@return self -function AssetsManager:update () end ----* @brief Sets connection time out in seconds ----@param timeout unsigned_int ----@return self -function AssetsManager:setConnectionTimeout (timeout) end ----* ----@param versionFileUrl char ----@return self -function AssetsManager:setVersionFileUrl (versionFileUrl) end ----* ----@return char -function AssetsManager:getPackageUrl () end ----* @brief Gets connection time out in seconds ----@return unsigned_int -function AssetsManager:getConnectionTimeout () end ----* ----@return string -function AssetsManager:getVersion () end ----* ----@return char -function AssetsManager:getVersionFileUrl () end ----* ----@return self -function AssetsManager:deleteVersion () end ----* ----@param packageUrl char ----@param versionFileUrl char ----@param storagePath char ----@param errorCallback function ----@param progressCallback function ----@param successCallback function ----@return self -function AssetsManager:create (packageUrl,versionFileUrl,storagePath,errorCallback,progressCallback,successCallback) end ----* ----@return self -function AssetsManager:AssetsManager () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/AssetsManagerEx.lua b/meta/3rd/Cocos4.0/library/cc/AssetsManagerEx.lua deleted file mode 100644 index 8830fa4f..00000000 --- a/meta/3rd/Cocos4.0/library/cc/AssetsManagerEx.lua +++ /dev/null @@ -1,63 +0,0 @@ ----@meta - ----@class cc.AssetsManagerEx :cc.Ref -local AssetsManagerEx={ } -cc.AssetsManagerEx=AssetsManagerEx - - - - ----* @brief Gets the current update state. ----@return int -function AssetsManagerEx:getState () end ----* @brief Function for retrieving the max concurrent task count ----@return int -function AssetsManagerEx:getMaxConcurrentTask () end ----* @brief Check out if there is a new version of manifest.
----* You may use this method before updating, then let user determine whether
----* he wants to update resources. ----@return self -function AssetsManagerEx:checkUpdate () end ----* @brief Set the verification function for checking whether downloaded asset is correct, e.g. using md5 verification
----* param callback The verify callback function ----@param callback function ----@return self -function AssetsManagerEx:setVerifyCallback (callback) end ----* @brief Gets storage path. ----@return string -function AssetsManagerEx:getStoragePath () end ----* @brief Update with the current local manifest. ----@return self -function AssetsManagerEx:update () end ----* @brief Set the handle function for comparing manifests versions
----* param handle The compare function ----@param handle function ----@return self -function AssetsManagerEx:setVersionCompareHandle (handle) end ----* @brief Function for setting the max concurrent task count ----@param max int ----@return self -function AssetsManagerEx:setMaxConcurrentTask (max) end ----* @brief Function for retrieving the local manifest object ----@return cc.Manifest -function AssetsManagerEx:getLocalManifest () end ----* @brief Function for retrieving the remote manifest object ----@return cc.Manifest -function AssetsManagerEx:getRemoteManifest () end ----* @brief Reupdate all failed assets under the current AssetsManagerEx context ----@return self -function AssetsManagerEx:downloadFailedAssets () end ----* @brief Create function for creating a new AssetsManagerEx
----* param manifestUrl The url for the local manifest file
----* param storagePath The storage path for downloaded assets
----* warning The cached manifest in your storage path have higher priority and will be searched first,
----* only if it doesn't exist, AssetsManagerEx will use the given manifestUrl. ----@param manifestUrl string ----@param storagePath string ----@return self -function AssetsManagerEx:create (manifestUrl,storagePath) end ----* ----@param manifestUrl string ----@param storagePath string ----@return self -function AssetsManagerEx:AssetsManagerEx (manifestUrl,storagePath) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/AsyncTaskPool.lua b/meta/3rd/Cocos4.0/library/cc/AsyncTaskPool.lua deleted file mode 100644 index 9fc6c67d..00000000 --- a/meta/3rd/Cocos4.0/library/cc/AsyncTaskPool.lua +++ /dev/null @@ -1,31 +0,0 @@ ----@meta - ----@class cc.AsyncTaskPool -local AsyncTaskPool={ } -cc.AsyncTaskPool=AsyncTaskPool - - - - ----@overload fun(int:int,function:function):self ----@overload fun(int:int,function:function,void:void,function:function):self ----@param type int ----@param callback function ----@param callbackParam void ----@param task function ----@return self -function AsyncTaskPool:enqueue (type,callback,callbackParam,task) end ----* Stop tasks.
----* param type Task type you want to stop. ----@param type int ----@return self -function AsyncTaskPool:stopTasks (type) end ----* Destroys the async task pool. ----@return self -function AsyncTaskPool:destroyInstance () end ----* Returns the shared instance of the async task pool. ----@return self -function AsyncTaskPool:getInstance () end ----* ----@return self -function AsyncTaskPool:AsyncTaskPool () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/AtlasNode.lua b/meta/3rd/Cocos4.0/library/cc/AtlasNode.lua deleted file mode 100644 index 914e3baf..00000000 --- a/meta/3rd/Cocos4.0/library/cc/AtlasNode.lua +++ /dev/null @@ -1,98 +0,0 @@ ----@meta - ----@class cc.AtlasNode :cc.Node@all parent class: Node,TextureProtocol -local AtlasNode={ } -cc.AtlasNode=AtlasNode - - - - ----* lua NA ----@return cc.BlendFunc -function AtlasNode:getBlendFunc () end ----* Initializes an AtlasNode with an Atlas file the width and height of each item and the quantity of items to render ----@param tile string ----@param tileWidth int ----@param tileHeight int ----@param itemsToRender int ----@return boolean -function AtlasNode:initWithTileFile (tile,tileWidth,tileHeight,itemsToRender) end ----* code
----* When this function bound into js or lua,the parameter will be changed
----* In js: var setBlendFunc(var src, var dst)
----* endcode
----* lua NA ----@param blendFunc cc.BlendFunc ----@return self -function AtlasNode:setBlendFunc (blendFunc) end ----* Set an buffer manager of the texture vertex. ----@param textureAtlas cc.TextureAtlas ----@return self -function AtlasNode:setTextureAtlas (textureAtlas) end ----* ----@return cc.Texture2D -function AtlasNode:getTexture () end ----* Return the buffer manager of the texture vertex.
----* return Return A TextureAtlas. ----@return cc.TextureAtlas -function AtlasNode:getTextureAtlas () end ----* updates the Atlas (indexed vertex array).
----* Shall be overridden in subclasses. ----@return self -function AtlasNode:updateAtlasValues () end ----* ----@param texture cc.Texture2D ----@return self -function AtlasNode:setTexture (texture) end ----* Initializes an AtlasNode with a texture the width and height of each item measured in points and the quantity of items to render ----@param texture cc.Texture2D ----@param tileWidth int ----@param tileHeight int ----@param itemsToRender int ----@return boolean -function AtlasNode:initWithTexture (texture,tileWidth,tileHeight,itemsToRender) end ----* ----@return unsigned_int -function AtlasNode:getQuadsToDraw () end ----* ----@param quadsToDraw int ----@return self -function AtlasNode:setQuadsToDraw (quadsToDraw) end ----* creates a AtlasNode with an Atlas file the width and height of each item and the quantity of items to render.
----* param filename The path of Atlas file.
----* param tileWidth The width of the item.
----* param tileHeight The height of the item.
----* param itemsToRender The quantity of items to render. ----@param filename string ----@param tileWidth int ----@param tileHeight int ----@param itemsToRender int ----@return self -function AtlasNode:create (filename,tileWidth,tileHeight,itemsToRender) end ----* ----@param renderer cc.Renderer ----@param transform mat4_table ----@param flags unsigned_int ----@return self -function AtlasNode:draw (renderer,transform,flags) end ----* ----@return boolean -function AtlasNode:isOpacityModifyRGB () end ----* ----@param color color3b_table ----@return self -function AtlasNode:setColor (color) end ----* ----@return color3b_table -function AtlasNode:getColor () end ----* ----@param isOpacityModifyRGB boolean ----@return self -function AtlasNode:setOpacityModifyRGB (isOpacityModifyRGB) end ----* ----@param opacity unsigned_char ----@return self -function AtlasNode:setOpacity (opacity) end ----* ----@return self -function AtlasNode:AtlasNode () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/AttachNode.lua b/meta/3rd/Cocos4.0/library/cc/AttachNode.lua deleted file mode 100644 index 185931a8..00000000 --- a/meta/3rd/Cocos4.0/library/cc/AttachNode.lua +++ /dev/null @@ -1,32 +0,0 @@ ----@meta - ----@class cc.AttachNode :cc.Node -local AttachNode={ } -cc.AttachNode=AttachNode - - - - ----* creates an AttachNode
----* param attachBone The bone to which the AttachNode is going to attach, the attacheBone must be a bone of the AttachNode's parent ----@param attachBone cc.Bone3D ----@return self -function AttachNode:create (attachBone) end ----* ----@param renderer cc.Renderer ----@param parentTransform mat4_table ----@param parentFlags unsigned_int ----@return self -function AttachNode:visit (renderer,parentTransform,parentFlags) end ----* ----@return mat4_table -function AttachNode:getWorldToNodeTransform () end ----* ----@return mat4_table -function AttachNode:getNodeToWorldTransform () end ----* ----@return mat4_table -function AttachNode:getNodeToParentTransform () end ----* ----@return self -function AttachNode:AttachNode () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/AudioEngine.lua b/meta/3rd/Cocos4.0/library/cc/AudioEngine.lua deleted file mode 100644 index a43c9e2b..00000000 --- a/meta/3rd/Cocos4.0/library/cc/AudioEngine.lua +++ /dev/null @@ -1,151 +0,0 @@ ----@meta - ----@class cc.AudioEngine -local AudioEngine={ } -cc.AudioEngine=AudioEngine - - - - ----* ----@return boolean -function AudioEngine:lazyInit () end ----* Sets the current playback position of an audio instance.
----* param audioID An audioID returned by the play2d function.
----* param sec The offset in seconds from the start to seek to.
----* return ----@param audioID int ----@param sec float ----@return boolean -function AudioEngine:setCurrentTime (audioID,sec) end ----* Gets the volume value of an audio instance.
----* param audioID An audioID returned by the play2d function.
----* return Volume value (range from 0.0 to 1.0). ----@param audioID int ----@return float -function AudioEngine:getVolume (audioID) end ----* Uncache the audio data from internal buffer.
----* AudioEngine cache audio data on ios,mac, and win32 platform.
----* warning This can lead to stop related audio first.
----* param filePath Audio file path. ----@param filePath string ----@return self -function AudioEngine:uncache (filePath) end ----* Resume all suspended audio instances. ----@return self -function AudioEngine:resumeAll () end ----* Stop all audio instances. ----@return self -function AudioEngine:stopAll () end ----* Pause an audio instance.
----* param audioID An audioID returned by the play2d function. ----@param audioID int ----@return self -function AudioEngine:pause (audioID) end ----* Gets the maximum number of simultaneous audio instance of AudioEngine. ----@return int -function AudioEngine:getMaxAudioInstance () end ----* Check whether AudioEngine is enabled. ----@return boolean -function AudioEngine:isEnabled () end ----* Gets the current playback position of an audio instance.
----* param audioID An audioID returned by the play2d function.
----* return The current playback position of an audio instance. ----@param audioID int ----@return float -function AudioEngine:getCurrentTime (audioID) end ----* Sets the maximum number of simultaneous audio instance for AudioEngine.
----* param maxInstances The maximum number of simultaneous audio instance. ----@param maxInstances int ----@return boolean -function AudioEngine:setMaxAudioInstance (maxInstances) end ----* Checks whether an audio instance is loop.
----* param audioID An audioID returned by the play2d function.
----* return Whether or not an audio instance is loop. ----@param audioID int ----@return boolean -function AudioEngine:isLoop (audioID) end ----* Pause all playing audio instances. ----@return self -function AudioEngine:pauseAll () end ----* Uncache all audio data from internal buffer.
----* warning All audio will be stopped first. ----@return self -function AudioEngine:uncacheAll () end ----* Sets volume for an audio instance.
----* param audioID An audioID returned by the play2d function.
----* param volume Volume value (range from 0.0 to 1.0). ----@param audioID int ----@param volume float ----@return self -function AudioEngine:setVolume (audioID,volume) end ----@overload fun(string:string,function:function):self ----@overload fun(string:string):self ----@param filePath string ----@param callback function ----@return self -function AudioEngine:preload (filePath,callback) end ----* Whether to enable playing audios
----* note If it's disabled, current playing audios will be stopped and the later 'preload', 'play2d' methods will take no effects. ----@param isEnabled boolean ----@return self -function AudioEngine:setEnabled (isEnabled) end ----* Play 2d sound.
----* param filePath The path of an audio file.
----* param loop Whether audio instance loop or not.
----* param volume Volume value (range from 0.0 to 1.0).
----* param profile A profile for audio instance. When profile is not specified, default profile will be used.
----* return An audio ID. It allows you to dynamically change the behavior of an audio instance on the fly.
----* see `AudioProfile` ----@param filePath string ----@param loop boolean ----@param volume float ----@param profile cc.AudioProfile ----@return int -function AudioEngine:play2d (filePath,loop,volume,profile) end ----* Returns the state of an audio instance.
----* param audioID An audioID returned by the play2d function.
----* return The status of an audio instance. ----@param audioID int ----@return int -function AudioEngine:getState (audioID) end ----* Resume an audio instance.
----* param audioID An audioID returned by the play2d function. ----@param audioID int ----@return self -function AudioEngine:resume (audioID) end ----* Stop an audio instance.
----* param audioID An audioID returned by the play2d function. ----@param audioID int ----@return self -function AudioEngine:stop (audioID) end ----* Release objects relating to AudioEngine.
----* warning It must be called before the application exit.
----* lua endToLua ----@return self -function AudioEngine:endToLua () end ----* Gets the duration of an audio instance.
----* param audioID An audioID returned by the play2d function.
----* return The duration of an audio instance. ----@param audioID int ----@return float -function AudioEngine:getDuration (audioID) end ----* Sets whether an audio instance loop or not.
----* param audioID An audioID returned by the play2d function.
----* param loop Whether audio instance loop or not. ----@param audioID int ----@param loop boolean ----@return self -function AudioEngine:setLoop (audioID,loop) end ----* Gets the default profile of audio instances.
----* return The default profile of audio instances. ----@return cc.AudioProfile -function AudioEngine:getDefaultProfile () end ----@overload fun(int0:string):self ----@overload fun(int:int):self ----@param audioID int ----@return cc.AudioProfile -function AudioEngine:getProfile (audioID) end ----* Gets playing audio count. ----@return int -function AudioEngine:getPlayingAudioCount () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/AudioProfile.lua b/meta/3rd/Cocos4.0/library/cc/AudioProfile.lua deleted file mode 100644 index d2503ccd..00000000 --- a/meta/3rd/Cocos4.0/library/cc/AudioProfile.lua +++ /dev/null @@ -1,13 +0,0 @@ ----@meta - ----@class cc.AudioProfile -local AudioProfile={ } -cc.AudioProfile=AudioProfile - - - - ----* Default constructor
----* lua new ----@return self -function AudioProfile:AudioProfile () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/AutoPolygon.lua b/meta/3rd/Cocos4.0/library/cc/AutoPolygon.lua deleted file mode 100644 index 6aa221dd..00000000 --- a/meta/3rd/Cocos4.0/library/cc/AutoPolygon.lua +++ /dev/null @@ -1,16 +0,0 @@ ----@meta - ----@class cc.AutoPolygon -local AutoPolygon={ } -cc.AutoPolygon=AutoPolygon - - - - ----* create an AutoPolygon and initialize it with an image file
----* the image must be a 32bit PNG for current version 3.7
----* param filename a path to image file, e.g., "scene1/monster.png".
----* return an AutoPolygon object; ----@param filename string ----@return self -function AutoPolygon:AutoPolygon (filename) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/BaseLight.lua b/meta/3rd/Cocos4.0/library/cc/BaseLight.lua deleted file mode 100644 index 0f0a12fe..00000000 --- a/meta/3rd/Cocos4.0/library/cc/BaseLight.lua +++ /dev/null @@ -1,34 +0,0 @@ ----@meta - ----@class cc.BaseLight :cc.Node -local BaseLight={ } -cc.BaseLight=BaseLight - - - - ----* light enabled getter and setter. ----@param enabled boolean ----@return self -function BaseLight:setEnabled (enabled) end ----* intensity getter and setter ----@return float -function BaseLight:getIntensity () end ----* ----@return boolean -function BaseLight:isEnabled () end ----* Get the light type,light type MUST be one of LightType::DIRECTIONAL ,
----* LightType::POINT, LightType::SPOT, LightType::AMBIENT. ----@return int -function BaseLight:getLightType () end ----* ----@param flag int ----@return self -function BaseLight:setLightFlag (flag) end ----* ----@param intensity float ----@return self -function BaseLight:setIntensity (intensity) end ----* light flag getter and setter ----@return int -function BaseLight:getLightFlag () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/BezierBy.lua b/meta/3rd/Cocos4.0/library/cc/BezierBy.lua deleted file mode 100644 index b717eb3b..00000000 --- a/meta/3rd/Cocos4.0/library/cc/BezierBy.lua +++ /dev/null @@ -1,32 +0,0 @@ ----@meta - ----@class cc.BezierBy :cc.ActionInterval -local BezierBy={ } -cc.BezierBy=BezierBy - - - - ----* initializes the action with a duration and a bezier configuration
----* param t in seconds ----@param t float ----@param c cc._ccBezierConfig ----@return boolean -function BezierBy:initWithDuration (t,c) end ----* ----@param target cc.Node ----@return self -function BezierBy:startWithTarget (target) end ----* ----@return self -function BezierBy:clone () end ----* ----@return self -function BezierBy:reverse () end ----* param time In seconds. ----@param time float ----@return self -function BezierBy:update (time) end ----* ----@return self -function BezierBy:BezierBy () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/BezierTo.lua b/meta/3rd/Cocos4.0/library/cc/BezierTo.lua deleted file mode 100644 index 5ff279ea..00000000 --- a/meta/3rd/Cocos4.0/library/cc/BezierTo.lua +++ /dev/null @@ -1,27 +0,0 @@ ----@meta - ----@class cc.BezierTo :cc.BezierBy -local BezierTo={ } -cc.BezierTo=BezierTo - - - - ----* param t In seconds. ----@param t float ----@param c cc._ccBezierConfig ----@return boolean -function BezierTo:initWithDuration (t,c) end ----* ----@param target cc.Node ----@return self -function BezierTo:startWithTarget (target) end ----* ----@return self -function BezierTo:clone () end ----* ----@return self -function BezierTo:reverse () end ----* ----@return self -function BezierTo:BezierTo () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/BillBoard.lua b/meta/3rd/Cocos4.0/library/cc/BillBoard.lua deleted file mode 100644 index 6f4f2ef4..00000000 --- a/meta/3rd/Cocos4.0/library/cc/BillBoard.lua +++ /dev/null @@ -1,41 +0,0 @@ ----@meta - ----@class cc.BillBoard :cc.Sprite -local BillBoard={ } -cc.BillBoard=BillBoard - - - - ----* Get the billboard rotation mode. ----@return int -function BillBoard:getMode () end ----* Set the billboard rotation mode. ----@param mode int ----@return self -function BillBoard:setMode (mode) end ----@overload fun(string:string,rect_table1:int):self ----@overload fun(string0:int):self ----@overload fun(string:string,rect_table:rect_table,int:int):self ----@param filename string ----@param rect rect_table ----@param mode int ----@return self -function BillBoard:create (filename,rect,mode) end ----* Creates a BillBoard with a Texture2D object.
----* After creation, the rect will be the size of the texture, and the offset will be (0,0).
----* param texture A pointer to a Texture2D object.
----* return An autoreleased BillBoard object ----@param texture cc.Texture2D ----@param mode int ----@return self -function BillBoard:createWithTexture (texture,mode) end ----* update billboard's transform and turn it towards camera ----@param renderer cc.Renderer ----@param parentTransform mat4_table ----@param parentFlags unsigned_int ----@return self -function BillBoard:visit (renderer,parentTransform,parentFlags) end ----* ----@return self -function BillBoard:BillBoard () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Blink.lua b/meta/3rd/Cocos4.0/library/cc/Blink.lua deleted file mode 100644 index 8b90aede..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Blink.lua +++ /dev/null @@ -1,43 +0,0 @@ ----@meta - ----@class cc.Blink :cc.ActionInterval -local Blink={ } -cc.Blink=Blink - - - - ----* initializes the action
----* param duration in seconds ----@param duration float ----@param blinks int ----@return boolean -function Blink:initWithDuration (duration,blinks) end ----* Creates the action.
----* param duration Duration time, in seconds.
----* param blinks Blink times.
----* return An autoreleased Blink object. ----@param duration float ----@param blinks int ----@return self -function Blink:create (duration,blinks) end ----* ----@param target cc.Node ----@return self -function Blink:startWithTarget (target) end ----* ----@return self -function Blink:clone () end ----* ----@return self -function Blink:stop () end ----* ----@return self -function Blink:reverse () end ----* param time In seconds. ----@param time float ----@return self -function Blink:update (time) end ----* ----@return self -function Blink:Blink () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Bundle3D.lua b/meta/3rd/Cocos4.0/library/cc/Bundle3D.lua deleted file mode 100644 index 918a6770..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Bundle3D.lua +++ /dev/null @@ -1,59 +0,0 @@ ----@meta - ----@class cc.Bundle3D -local Bundle3D={ } -cc.Bundle3D=Bundle3D - - - - ----* load a file. You must load a file first, then call loadMeshData, loadSkinData, and so on
----* param path File to be loaded
----* return result of load ----@param path string ----@return boolean -function Bundle3D:load (path) end ----* load skin data from bundle
----* param id The ID of the skin, load the first Skin in the bundle if it is empty ----@param id string ----@param skindata cc.SkinData ----@return boolean -function Bundle3D:loadSkinData (id,skindata) end ----* ----@return self -function Bundle3D:clear () end ----* ----@param materialdatas cc.MaterialDatas ----@return boolean -function Bundle3D:loadMaterials (materialdatas) end ----* ----@param nodedatas cc.NodeDatas ----@return boolean -function Bundle3D:loadNodes (nodedatas) end ----* load material data from bundle
----* param id The ID of the animation, load the first animation in the bundle if it is empty ----@param id string ----@param animationdata cc.Animation3DData ----@return boolean -function Bundle3D:loadAnimationData (id,animationdata) end ----* get define data type
----* param str The type in string ----@param str string ----@return int -function Bundle3D:parseSamplerAddressMode (str) end ----* ----@param bundle cc.Bundle3D ----@return self -function Bundle3D:destroyBundle (bundle) end ----* create a new bundle, destroy it when finish using it ----@return self -function Bundle3D:createBundle () end ----* get define data type
----* param str The type in string ----@param str string ----@param size int ----@return int -function Bundle3D:parseGLDataType (str,size) end ----* ----@return self -function Bundle3D:Bundle3D () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/CSLoader.lua b/meta/3rd/Cocos4.0/library/cc/CSLoader.lua deleted file mode 100644 index ae7c4138..00000000 --- a/meta/3rd/Cocos4.0/library/cc/CSLoader.lua +++ /dev/null @@ -1,68 +0,0 @@ ----@meta - ----@class cc.CSLoader -local CSLoader={ } -cc.CSLoader=CSLoader - - - - ----* ----@param filename string ----@return cc.Node -function CSLoader:createNodeFromJson (filename) end ----* ----@param filename string ----@return cc.Node -function CSLoader:createNodeWithFlatBuffersFile (filename) end ----* ----@param fileName string ----@return cc.Node -function CSLoader:loadNodeWithFile (fileName) end ----* ----@param callbackName string ----@param callbackType string ----@param sender ccui.Widget ----@param handler cc.Node ----@return boolean -function CSLoader:bindCallback (callbackName,callbackType,sender,handler) end ----* ----@param jsonPath string ----@return self -function CSLoader:setJsonPath (jsonPath) end ----* ----@return self -function CSLoader:init () end ----* ----@param content string ----@return cc.Node -function CSLoader:loadNodeWithContent (content) end ----* ----@return boolean -function CSLoader:isRecordJsonPath () end ----* ----@return string -function CSLoader:getJsonPath () end ----* ----@param record boolean ----@return self -function CSLoader:setRecordJsonPath (record) end ----* ----@param filename string ----@return cc.Node -function CSLoader:createNodeWithFlatBuffersForSimulator (filename) end ----* ----@return self -function CSLoader:destroyInstance () end ----@overload fun(string:string,function:function):self ----@overload fun(string:string):self ----@param filename string ----@param callback function ----@return cc.Node -function CSLoader:createNodeWithVisibleSize (filename,callback) end ----* ----@return self -function CSLoader:getInstance () end ----* ----@return self -function CSLoader:CSLoader () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/CallFunc.lua b/meta/3rd/Cocos4.0/library/cc/CallFunc.lua deleted file mode 100644 index 07c43c84..00000000 --- a/meta/3rd/Cocos4.0/library/cc/CallFunc.lua +++ /dev/null @@ -1,25 +0,0 @@ ----@meta - ----@class cc.CallFunc :cc.ActionInstant -local CallFunc={ } -cc.CallFunc=CallFunc - - - - ----* Executes the callback. ----@return self -function CallFunc:execute () end ----* ----@return self -function CallFunc:clone () end ----* param time In seconds. ----@param time float ----@return self -function CallFunc:update (time) end ----* ----@return self -function CallFunc:reverse () end ----* ----@return self -function CallFunc:CallFunc () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Camera.lua b/meta/3rd/Cocos4.0/library/cc/Camera.lua deleted file mode 100644 index e2403576..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Camera.lua +++ /dev/null @@ -1,166 +0,0 @@ ----@meta - ----@class cc.Camera :cc.Node -local Camera={ } -cc.Camera=Camera - - - - ----* get depth, camera with larger depth is drawn on top of camera with smaller depth, the depth of camera with CameraFlag::DEFAULT is 0, user defined camera is -1 by default ----@return char -function Camera:getDepth () end ----* get view projection matrix ----@return mat4_table -function Camera:getViewProjectionMatrix () end ----* ----@return self -function Camera:applyViewport () end ----* set the background brush. See CameraBackgroundBrush for more information.
----* param clearBrush Brush used to clear the background ----@param clearBrush cc.CameraBackgroundBrush ----@return self -function Camera:setBackgroundBrush (clearBrush) end ----* Make Camera looks at target
----* param target The target camera is point at
----* param up The up vector, usually it's Y axis ----@param target vec3_table ----@param up vec3_table ----@return self -function Camera:lookAt (target,up) end ----* Apply the FBO, RenderTargets and viewport. ----@return self -function Camera:apply () end ----* Get clear brush ----@return cc.CameraBackgroundBrush -function Camera:getBackgroundBrush () end ----* Gets the camera's projection matrix.
----* return The camera projection matrix. ----@return mat4_table -function Camera:getProjectionMatrix () end ----* ----@return boolean -function Camera:isBrushValid () end ----* Get object depth towards camera ----@param transform mat4_table ----@return float -function Camera:getDepthInView (transform) end ----* Before rendering scene with this camera, the background need to be cleared. It clears the depth buffer with max depth by default. Use setBackgroundBrush to modify the default behavior ----@return self -function Camera:clearBackground () end ----* set additional matrix for the projection matrix, it multiplies mat to projection matrix when called, used by WP8 ----@param mat mat4_table ----@return self -function Camera:setAdditionalProjection (mat) end ----* init camera ----@return boolean -function Camera:initDefault () end ----* get & set Camera flag ----@return int -function Camera:getCameraFlag () end ----* Gets the type of camera.
----* return The camera type. ----@return int -function Camera:getType () end ----* ----@param zoomX float ----@param zoomY float ----@param nearPlane float ----@param farPlane float ----@return boolean -function Camera:initOrthographic (zoomX,zoomY,nearPlane,farPlane) end ----* get rendered order ----@return int -function Camera:getRenderOrder () end ----* Is this aabb visible in frustum ----@param aabb cc.AABB ----@return boolean -function Camera:isVisibleInFrustum (aabb) end ----* set depth, camera with larger depth is drawn on top of camera with smaller depth, the depth of camera with CameraFlag::DEFAULT is 0, user defined camera is -1 by default ----@param depth char ----@return self -function Camera:setDepth (depth) end ----* Set the scene,this method shall not be invoke manually ----@param scene cc.Scene ----@return self -function Camera:setScene (scene) end ----* ----@param src vec3_table ----@return vec2_table -function Camera:projectGL (src) end ----* Gets the camera's view matrix.
----* return The camera view matrix. ----@return mat4_table -function Camera:getViewMatrix () end ----* Get the frustum's near plane. ----@return float -function Camera:getNearPlane () end ----* ----@param src vec3_table ----@return vec2_table -function Camera:project (src) end ----* ----@param flag int ----@return self -function Camera:setCameraFlag (flag) end ----* Get the frustum's far plane. ----@return float -function Camera:getFarPlane () end ----* Whether or not the viewprojection matrix was updated since the last frame.
----* return True if the viewprojection matrix was updated since the last frame. ----@return boolean -function Camera:isViewProjectionUpdated () end ----* ----@param fieldOfView float ----@param aspectRatio float ----@param nearPlane float ----@param farPlane float ----@return boolean -function Camera:initPerspective (fieldOfView,aspectRatio,nearPlane,farPlane) end ----* Creates an orthographic camera.
----* param zoomX The zoom factor along the X-axis of the orthographic projection (the width of the ortho projection).
----* param zoomY The zoom factor along the Y-axis of the orthographic projection (the height of the ortho projection).
----* param nearPlane The near plane distance.
----* param farPlane The far plane distance. ----@param zoomX float ----@param zoomY float ----@param nearPlane float ----@param farPlane float ----@return self -function Camera:createOrthographic (zoomX,zoomY,nearPlane,farPlane) end ----* Get the visiting camera , the visiting camera shall be set on Scene::render ----@return self -function Camera:getVisitingCamera () end ----* create default camera, the camera type depends on Director::getProjection, the depth of the default camera is 0 ----@return self -function Camera:create () end ----* Creates a perspective camera.
----* param fieldOfView The field of view for the perspective camera (normally in the range of 40-60 degrees).
----* param aspectRatio The aspect ratio of the camera (normally the width of the viewport divided by the height of the viewport).
----* param nearPlane The near plane distance.
----* param farPlane The far plane distance. ----@param fieldOfView float ----@param aspectRatio float ----@param nearPlane float ----@param farPlane float ----@return self -function Camera:createPerspective (fieldOfView,aspectRatio,nearPlane,farPlane) end ----* ----@return cc.Viewport -function Camera:getDefaultViewport () end ----* ----@param vp cc.Viewport ----@return self -function Camera:setDefaultViewport (vp) end ----* Get the default camera of the current running scene. ----@return self -function Camera:getDefaultCamera () end ----* ----@param renderer cc.Renderer ----@param parentTransform mat4_table ----@param parentFlags unsigned_int ----@return self -function Camera:visit (renderer,parentTransform,parentFlags) end ----* ----@return self -function Camera:Camera () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/CameraBackgroundBrush.lua b/meta/3rd/Cocos4.0/library/cc/CameraBackgroundBrush.lua deleted file mode 100644 index 77d38214..00000000 --- a/meta/3rd/Cocos4.0/library/cc/CameraBackgroundBrush.lua +++ /dev/null @@ -1,59 +0,0 @@ ----@meta - ----@class cc.CameraBackgroundBrush :cc.Ref -local CameraBackgroundBrush={ } -cc.CameraBackgroundBrush=CameraBackgroundBrush - - - - ----* get brush type
----* return BrushType ----@return int -function CameraBackgroundBrush:getBrushType () end ----* draw the background ----@param a cc.Camer ----@return self -function CameraBackgroundBrush:drawBackground (a) end ----* ----@return boolean -function CameraBackgroundBrush:init () end ----* ----@return boolean -function CameraBackgroundBrush:isValid () end ----* Creates a Skybox brush with 6 textures.
----* param positive_x texture for the right side of the texture cube face.
----* param negative_x texture for the up side of the texture cube face.
----* param positive_y texture for the top side of the texture cube face
----* param negative_y texture for the bottom side of the texture cube face
----* param positive_z texture for the forward side of the texture cube face.
----* param negative_z texture for the rear side of the texture cube face.
----* return A new brush inited with given parameters. ----@param positive_x string ----@param negative_x string ----@param positive_y string ----@param negative_y string ----@param positive_z string ----@param negative_z string ----@return cc.CameraBackgroundSkyBoxBrush -function CameraBackgroundBrush:createSkyboxBrush (positive_x,negative_x,positive_y,negative_y,positive_z,negative_z) end ----* Creates a color brush
----* param color Color of brush
----* param depth Depth used to clear depth buffer
----* return Created brush ----@param color color4f_table ----@param depth float ----@return cc.CameraBackgroundColorBrush -function CameraBackgroundBrush:createColorBrush (color,depth) end ----* Creates a none brush, it does nothing when clear the background
----* return Created brush. ----@return self -function CameraBackgroundBrush:createNoneBrush () end ----* Creates a depth brush, which clears depth buffer with a given depth.
----* param depth Depth used to clear depth buffer
----* return Created brush ----@return cc.CameraBackgroundDepthBrush -function CameraBackgroundBrush:createDepthBrush () end ----* ----@return self -function CameraBackgroundBrush:CameraBackgroundBrush () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/CameraBackgroundColorBrush.lua b/meta/3rd/Cocos4.0/library/cc/CameraBackgroundColorBrush.lua deleted file mode 100644 index 541f7d01..00000000 --- a/meta/3rd/Cocos4.0/library/cc/CameraBackgroundColorBrush.lua +++ /dev/null @@ -1,36 +0,0 @@ ----@meta - ----@class cc.CameraBackgroundColorBrush :cc.CameraBackgroundDepthBrush -local CameraBackgroundColorBrush={ } -cc.CameraBackgroundColorBrush=CameraBackgroundColorBrush - - - - ----* Set clear color
----* param color Color used to clear the color buffer ----@param color color4f_table ----@return self -function CameraBackgroundColorBrush:setColor (color) end ----* Create a color brush
----* param color Color used to clear the color buffer
----* param depth Depth used to clear the depth buffer
----* return Created brush ----@param color color4f_table ----@param depth float ----@return self -function CameraBackgroundColorBrush:create (color,depth) end ----* Get brush type. Should be BrushType::COLOR
----* return brush type ----@return int -function CameraBackgroundColorBrush:getBrushType () end ----* Draw background ----@param camera cc.Camera ----@return self -function CameraBackgroundColorBrush:drawBackground (camera) end ----* ----@return boolean -function CameraBackgroundColorBrush:init () end ----* ----@return self -function CameraBackgroundColorBrush:CameraBackgroundColorBrush () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/CameraBackgroundDepthBrush.lua b/meta/3rd/Cocos4.0/library/cc/CameraBackgroundDepthBrush.lua deleted file mode 100644 index 79ec5b3e..00000000 --- a/meta/3rd/Cocos4.0/library/cc/CameraBackgroundDepthBrush.lua +++ /dev/null @@ -1,34 +0,0 @@ ----@meta - ----@class cc.CameraBackgroundDepthBrush :cc.CameraBackgroundBrush -local CameraBackgroundDepthBrush={ } -cc.CameraBackgroundDepthBrush=CameraBackgroundDepthBrush - - - - ----* Set depth
----* param depth Depth used to clear depth buffer ----@param depth float ----@return self -function CameraBackgroundDepthBrush:setDepth (depth) end ----* Create a depth brush
----* param depth Depth used to clear the depth buffer
----* return Created brush ----@param depth float ----@return self -function CameraBackgroundDepthBrush:create (depth) end ----* Get brush type. Should be BrushType::DEPTH
----* return brush type ----@return int -function CameraBackgroundDepthBrush:getBrushType () end ----* Draw background ----@param camera cc.Camera ----@return self -function CameraBackgroundDepthBrush:drawBackground (camera) end ----* ----@return boolean -function CameraBackgroundDepthBrush:init () end ----* ----@return self -function CameraBackgroundDepthBrush:CameraBackgroundDepthBrush () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/CameraBackgroundSkyBoxBrush.lua b/meta/3rd/Cocos4.0/library/cc/CameraBackgroundSkyBoxBrush.lua deleted file mode 100644 index 59e531d0..00000000 --- a/meta/3rd/Cocos4.0/library/cc/CameraBackgroundSkyBoxBrush.lua +++ /dev/null @@ -1,52 +0,0 @@ ----@meta - ----@class cc.CameraBackgroundSkyBoxBrush :cc.CameraBackgroundBrush -local CameraBackgroundSkyBoxBrush={ } -cc.CameraBackgroundSkyBoxBrush=CameraBackgroundSkyBoxBrush - - - - ----* ----@param valid boolean ----@return self -function CameraBackgroundSkyBoxBrush:setTextureValid (valid) end ----* Set skybox texture
----* param texture Skybox texture ----@param texture cc.TextureCube ----@return self -function CameraBackgroundSkyBoxBrush:setTexture (texture) end ----* ----@param actived boolean ----@return self -function CameraBackgroundSkyBoxBrush:setActived (actived) end ----* ----@return boolean -function CameraBackgroundSkyBoxBrush:isActived () end ----@overload fun():self ----@overload fun(string:string,string:string,string:string,string:string,string:string,string:string):self ----@param positive_x string ----@param negative_x string ----@param positive_y string ----@param negative_y string ----@param positive_z string ----@param negative_z string ----@return self -function CameraBackgroundSkyBoxBrush:create (positive_x,negative_x,positive_y,negative_y,positive_z,negative_z) end ----* Get brush type. Should be BrushType::SKYBOX
----* return brush type ----@return int -function CameraBackgroundSkyBoxBrush:getBrushType () end ----* Draw background ----@param camera cc.Camera ----@return self -function CameraBackgroundSkyBoxBrush:drawBackground (camera) end ----* init Skybox. ----@return boolean -function CameraBackgroundSkyBoxBrush:init () end ----* ----@return boolean -function CameraBackgroundSkyBoxBrush:isValid () end ----* ----@return self -function CameraBackgroundSkyBoxBrush:CameraBackgroundSkyBoxBrush () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/CardinalSplineBy.lua b/meta/3rd/Cocos4.0/library/cc/CardinalSplineBy.lua deleted file mode 100644 index 03359cb9..00000000 --- a/meta/3rd/Cocos4.0/library/cc/CardinalSplineBy.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class cc.CardinalSplineBy :cc.CardinalSplineTo -local CardinalSplineBy={ } -cc.CardinalSplineBy=CardinalSplineBy - - - - ----* ----@param target cc.Node ----@return self -function CardinalSplineBy:startWithTarget (target) end ----* ----@return self -function CardinalSplineBy:clone () end ----* ----@param newPos vec2_table ----@return self -function CardinalSplineBy:updatePosition (newPos) end ----* ----@return self -function CardinalSplineBy:reverse () end ----* ----@return self -function CardinalSplineBy:CardinalSplineBy () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/CardinalSplineTo.lua b/meta/3rd/Cocos4.0/library/cc/CardinalSplineTo.lua deleted file mode 100644 index f9f92d4e..00000000 --- a/meta/3rd/Cocos4.0/library/cc/CardinalSplineTo.lua +++ /dev/null @@ -1,45 +0,0 @@ ----@meta - ----@class cc.CardinalSplineTo :cc.ActionInterval -local CardinalSplineTo={ } -cc.CardinalSplineTo=CardinalSplineTo - - - - ----* Return a PointArray.
----* return A PointArray. ----@return point_table -function CardinalSplineTo:getPoints () end ----* It will update the target position and change the _previousPosition to newPos
----* param newPos The new position. ----@param newPos vec2_table ----@return self -function CardinalSplineTo:updatePosition (newPos) end ----* Initializes the action with a duration and an array of points.
----* param duration In seconds.
----* param points An PointArray.
----* param tension Goodness of fit. ----@param duration float ----@param points point_table ----@param tension float ----@return boolean -function CardinalSplineTo:initWithDuration (duration,points,tension) end ----* ----@param target cc.Node ----@return self -function CardinalSplineTo:startWithTarget (target) end ----* ----@return self -function CardinalSplineTo:clone () end ----* ----@return self -function CardinalSplineTo:reverse () end ----* param time In seconds. ----@param time float ----@return self -function CardinalSplineTo:update (time) end ----* js ctor
----* lua NA ----@return self -function CardinalSplineTo:CardinalSplineTo () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/CatmullRomBy.lua b/meta/3rd/Cocos4.0/library/cc/CatmullRomBy.lua deleted file mode 100644 index 89314338..00000000 --- a/meta/3rd/Cocos4.0/library/cc/CatmullRomBy.lua +++ /dev/null @@ -1,22 +0,0 @@ ----@meta - ----@class cc.CatmullRomBy :cc.CardinalSplineBy -local CatmullRomBy={ } -cc.CatmullRomBy=CatmullRomBy - - - - ----* Initializes the action with a duration and an array of points.
----* param dt In seconds.
----* param points An PointArray. ----@param dt float ----@param points point_table ----@return boolean -function CatmullRomBy:initWithDuration (dt,points) end ----* ----@return self -function CatmullRomBy:clone () end ----* ----@return self -function CatmullRomBy:reverse () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/CatmullRomTo.lua b/meta/3rd/Cocos4.0/library/cc/CatmullRomTo.lua deleted file mode 100644 index 88e53310..00000000 --- a/meta/3rd/Cocos4.0/library/cc/CatmullRomTo.lua +++ /dev/null @@ -1,22 +0,0 @@ ----@meta - ----@class cc.CatmullRomTo :cc.CardinalSplineTo -local CatmullRomTo={ } -cc.CatmullRomTo=CatmullRomTo - - - - ----* Initializes the action with a duration and an array of points.
----* param dt In seconds.
----* param points An PointArray. ----@param dt float ----@param points point_table ----@return boolean -function CatmullRomTo:initWithDuration (dt,points) end ----* ----@return self -function CatmullRomTo:clone () end ----* ----@return self -function CatmullRomTo:reverse () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ClippingNode.lua b/meta/3rd/Cocos4.0/library/cc/ClippingNode.lua deleted file mode 100644 index b21396a2..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ClippingNode.lua +++ /dev/null @@ -1,77 +0,0 @@ ----@meta - ----@class cc.ClippingNode :cc.Node -local ClippingNode={ } -cc.ClippingNode=ClippingNode - - - - ----* If stencil has no children it will not be drawn.
----* If you have custom stencil-based node with stencil drawing mechanics other then children-based,
----* then this method should return true every time you wish stencil to be visited.
----* By default returns true if has any children attached.
----* return If you have custom stencil-based node with stencil drawing mechanics other then children-based,
----* then this method should return true every time you wish stencil to be visited.
----* By default returns true if has any children attached.
----* js NA ----@return boolean -function ClippingNode:hasContent () end ----* Set the ClippingNode whether or not invert.
----* param inverted A bool Type,to set the ClippingNode whether or not invert. ----@param inverted boolean ----@return self -function ClippingNode:setInverted (inverted) end ----* Set the Node to use as a stencil to do the clipping.
----* param stencil The Node to use as a stencil to do the clipping. ----@param stencil cc.Node ----@return self -function ClippingNode:setStencil (stencil) end ----* The alpha threshold.
----* The content is drawn only where the stencil have pixel with alpha greater than the alphaThreshold.
----* Should be a float between 0 and 1.
----* This default to 1 (so alpha test is disabled).
----* return The alpha threshold value,Should be a float between 0 and 1. ----@return float -function ClippingNode:getAlphaThreshold () end ----* Initializes a clipping node with an other node as its stencil.
----* The stencil node will be retained, and its parent will be set to this clipping node. ----@param stencil cc.Node ----@return boolean -function ClippingNode:init (stencil) end ----* The Node to use as a stencil to do the clipping.
----* The stencil node will be retained.
----* This default to nil.
----* return The stencil node. ----@return cc.Node -function ClippingNode:getStencil () end ----* Set the alpha threshold.
----* param alphaThreshold The alpha threshold. ----@param alphaThreshold float ----@return self -function ClippingNode:setAlphaThreshold (alphaThreshold) end ----* Inverted. If this is set to true,
----* the stencil is inverted, so the content is drawn where the stencil is NOT drawn.
----* This default to false.
----* return If the clippingNode is Inverted, it will be return true. ----@return boolean -function ClippingNode:isInverted () end ----@overload fun(cc.Node:cc.Node):self ----@overload fun():self ----@param stencil cc.Node ----@return self -function ClippingNode:create (stencil) end ----* ----@param mask unsigned short ----@param applyChildren boolean ----@return self -function ClippingNode:setCameraMask (mask,applyChildren) end ----* ----@param renderer cc.Renderer ----@param parentTransform mat4_table ----@param parentFlags unsigned_int ----@return self -function ClippingNode:visit (renderer,parentTransform,parentFlags) end ----* Initializes a clipping node without a stencil. ----@return boolean -function ClippingNode:init () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ClippingRectangleNode.lua b/meta/3rd/Cocos4.0/library/cc/ClippingRectangleNode.lua deleted file mode 100644 index 0f15c0cb..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ClippingRectangleNode.lua +++ /dev/null @@ -1,38 +0,0 @@ ----@meta - ----@class cc.ClippingRectangleNode :cc.Node -local ClippingRectangleNode={ } -cc.ClippingRectangleNode=ClippingRectangleNode - - - - ----* brief Get whether the clipping is enabled or not.
----* return Whether the clipping is enabled or not. Default is true. ----@return boolean -function ClippingRectangleNode:isClippingEnabled () end ----* brief Enable/Disable the clipping.
----* param enabled Pass true to enable clipping. Pass false to disable clipping. ----@param enabled boolean ----@return self -function ClippingRectangleNode:setClippingEnabled (enabled) end ----* brief Get the clipping rectangle.
----* return The clipping rectangle. ----@return rect_table -function ClippingRectangleNode:getClippingRegion () end ----* brief Set the clipping rectangle.
----* param clippingRegion Specify the clipping rectangle. ----@param clippingRegion rect_table ----@return self -function ClippingRectangleNode:setClippingRegion (clippingRegion) end ----@overload fun():self ----@overload fun(rect_table:rect_table):self ----@param clippingRegion rect_table ----@return self -function ClippingRectangleNode:create (clippingRegion) end ----* ----@param renderer cc.Renderer ----@param parentTransform mat4_table ----@param parentFlags unsigned_int ----@return self -function ClippingRectangleNode:visit (renderer,parentTransform,parentFlags) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Component.lua b/meta/3rd/Cocos4.0/library/cc/Component.lua deleted file mode 100644 index feed6e83..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Component.lua +++ /dev/null @@ -1,46 +0,0 @@ ----@meta - ----@class cc.Component :cc.Ref -local Component={ } -cc.Component=Component - - - - ----* ----@param enabled boolean ----@return self -function Component:setEnabled (enabled) end ----* ----@return self -function Component:onRemove () end ----* ----@param name string ----@return self -function Component:setName (name) end ----* ----@return boolean -function Component:isEnabled () end ----* ----@param delta float ----@return self -function Component:update (delta) end ----* ----@return cc.Node -function Component:getOwner () end ----* ----@return boolean -function Component:init () end ----* ----@param owner cc.Node ----@return self -function Component:setOwner (owner) end ----* ----@return string -function Component:getName () end ----* ----@return self -function Component:onAdd () end ----* ----@return self -function Component:create () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ComponentLua.lua b/meta/3rd/Cocos4.0/library/cc/ComponentLua.lua deleted file mode 100644 index 7abc184b..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ComponentLua.lua +++ /dev/null @@ -1,24 +0,0 @@ ----@meta - ----@class cc.ComponentLua :cc.Component -local ComponentLua={ } -cc.ComponentLua=ComponentLua - - - - ----* This function is used to be invoked from lua side to get the corresponding script object of this component. ----@return void -function ComponentLua:getScriptObject () end ----* ----@param dt float ----@return self -function ComponentLua:update (dt) end ----* ----@param scriptFileName string ----@return self -function ComponentLua:create (scriptFileName) end ----* ----@param scriptFileName string ----@return self -function ComponentLua:ComponentLua (scriptFileName) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Console.lua b/meta/3rd/Cocos4.0/library/cc/Console.lua deleted file mode 100644 index 14bb7c0a..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Console.lua +++ /dev/null @@ -1,40 +0,0 @@ ----@meta - ----@class cc.Console :cc.Ref -local Console={ } -cc.Console=Console - - - - ----* starts listening to specified TCP port ----@param port int ----@return boolean -function Console:listenOnTCP (port) end ----* log something in the console ----@param buf char ----@return self -function Console:log (buf) end ----* delete custom command ----@param cmdName string ----@return self -function Console:delCommand (cmdName) end ----* stops the Console. 'stop' will be called at destruction time as well ----@return self -function Console:stop () end ----* starts listening to specified file descriptor ----@param fd int ----@return boolean -function Console:listenOnFileDescriptor (fd) end ----* ----@param var char ----@return self -function Console:setCommandSeparator (var) end ----* set bind address
----* address : 127.0.0.1 ----@param address string ----@return self -function Console:setBindAddress (address) end ----* Checks whether the server for console is bound with ipv6 address ----@return boolean -function Console:isIpv6Server () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Control.lua b/meta/3rd/Cocos4.0/library/cc/Control.lua deleted file mode 100644 index 3e86c06b..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Control.lua +++ /dev/null @@ -1,94 +0,0 @@ ----@meta - ----@class cc.Control :cc.Layer -local Control={ } -cc.Control=Control - - - - ----* Tells whether the control is enabled. ----@param bEnabled boolean ----@return self -function Control:setEnabled (bEnabled) end ----* ----@return int -function Control:getState () end ----* Sends action messages for the given control events.
----* param controlEvents A bitmask whose set flags specify the control events for
----* which action messages are sent. See "CCControlEvent" for bitmask constants. ----@param controlEvents int ----@return self -function Control:sendActionsForControlEvents (controlEvents) end ----* A Boolean value that determines the control selected state. ----@param bSelected boolean ----@return self -function Control:setSelected (bSelected) end ----* ----@return boolean -function Control:isEnabled () end ----* Updates the control layout using its current internal state. ----@return self -function Control:needsLayout () end ----* ----@return boolean -function Control:hasVisibleParents () end ----* ----@return boolean -function Control:isSelected () end ----* Returns a boolean value that indicates whether a touch is inside the bounds
----* of the receiver. The given touch must be relative to the world.
----* param touch A Touch object that represents a touch.
----* return Whether a touch is inside the receiver's rect. ----@param touch cc.Touch ----@return boolean -function Control:isTouchInside (touch) end ----* A Boolean value that determines whether the control is highlighted. ----@param bHighlighted boolean ----@return self -function Control:setHighlighted (bHighlighted) end ----* Returns a point corresponding to the touch location converted into the
----* control space coordinates.
----* param touch A Touch object that represents a touch. ----@param touch cc.Touch ----@return vec2_table -function Control:getTouchLocation (touch) end ----* ----@return boolean -function Control:isHighlighted () end ----* Creates a Control object ----@return self -function Control:create () end ----* ----@param touch cc.Touch ----@param event cc.Event ----@return self -function Control:onTouchMoved (touch,event) end ----* ----@return boolean -function Control:isOpacityModifyRGB () end ----* ----@param bOpacityModifyRGB boolean ----@return self -function Control:setOpacityModifyRGB (bOpacityModifyRGB) end ----* ----@param touch cc.Touch ----@param event cc.Event ----@return self -function Control:onTouchCancelled (touch,event) end ----* ----@return boolean -function Control:init () end ----* ----@param touch cc.Touch ----@param event cc.Event ----@return self -function Control:onTouchEnded (touch,event) end ----* ----@param touch cc.Touch ----@param event cc.Event ----@return boolean -function Control:onTouchBegan (touch,event) end ----* js ctor ----@return self -function Control:Control () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ControlButton.lua b/meta/3rd/Cocos4.0/library/cc/ControlButton.lua deleted file mode 100644 index 81e70b39..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ControlButton.lua +++ /dev/null @@ -1,263 +0,0 @@ ----@meta - ----@class cc.ControlButton :cc.Control -local ControlButton={ } -cc.ControlButton=ControlButton - - - - ----* ----@return boolean -function ControlButton:isPushed () end ----* Sets the title label to use for the specified state.
----* If a property is not specified for a state, the default is to use
----* the ButtonStateNormal value.
----* param label The title label to use for the specified state.
----* param state The state that uses the specified title. The values are described
----* in "CCControlState". ----@param label cc.Node ----@param state int ----@return self -function ControlButton:setTitleLabelForState (label,state) end ----* ----@param adjustBackgroundImage boolean ----@return self -function ControlButton:setAdjustBackgroundImage (adjustBackgroundImage) end ----* Sets the title string to use for the specified state.
----* If a property is not specified for a state, the default is to use
----* the ButtonStateNormal value.
----* param title The title string to use for the specified state.
----* param state The state that uses the specified title. The values are described
----* in "CCControlState". ----@param title string ----@param state int ----@return self -function ControlButton:setTitleForState (title,state) end ----* ----@param var vec2_table ----@return self -function ControlButton:setLabelAnchorPoint (var) end ----* ----@return vec2_table -function ControlButton:getLabelAnchorPoint () end ----* ----@param sprite ccui.Scale9Sprite ----@return boolean -function ControlButton:initWithBackgroundSprite (sprite) end ----* ----@param state int ----@return float -function ControlButton:getTitleTTFSizeForState (state) end ----* ----@param fntFile string ----@param state int ----@return self -function ControlButton:setTitleTTFForState (fntFile,state) end ----* ----@param size float ----@param state int ----@return self -function ControlButton:setTitleTTFSizeForState (size,state) end ----* ----@param var cc.Node ----@return self -function ControlButton:setTitleLabel (var) end ----* ----@param var size_table ----@return self -function ControlButton:setPreferredSize (var) end ----* ----@return color3b_table -function ControlButton:getCurrentTitleColor () end ----* ----@param var boolean ----@return self -function ControlButton:setZoomOnTouchDown (var) end ----* ----@param var ccui.Scale9Sprite ----@return self -function ControlButton:setBackgroundSprite (var) end ----* Returns the background sprite used for a state.
----* param state The state that uses the background sprite. Possible values are
----* described in "CCControlState". ----@param state int ----@return ccui.Scale9Sprite -function ControlButton:getBackgroundSpriteForState (state) end ----* ----@return int -function ControlButton:getHorizontalOrigin () end ----* ----@param title string ----@param fontName string ----@param fontSize float ----@return boolean -function ControlButton:initWithTitleAndFontNameAndFontSize (title,fontName,fontSize) end ----* Sets the font of the label, changes the label to a BMFont if necessary.
----* param fntFile The name of the font to change to
----* param state The state that uses the specified fntFile. The values are described
----* in "CCControlState". ----@param fntFile string ----@param state int ----@return self -function ControlButton:setTitleBMFontForState (fntFile,state) end ----* ----@return float -function ControlButton:getScaleRatio () end ----* ----@param state int ----@return string -function ControlButton:getTitleTTFForState (state) end ----* ----@return ccui.Scale9Sprite -function ControlButton:getBackgroundSprite () end ----* Returns the title color used for a state.
----* param state The state that uses the specified color. The values are described
----* in "CCControlState".
----* return The color of the title for the specified state. ----@param state int ----@return color3b_table -function ControlButton:getTitleColorForState (state) end ----* Sets the color of the title to use for the specified state.
----* param color The color of the title to use for the specified state.
----* param state The state that uses the specified color. The values are described
----* in "CCControlState". ----@param color color3b_table ----@param state int ----@return self -function ControlButton:setTitleColorForState (color,state) end ----* Adjust the background image. YES by default. If the property is set to NO, the
----* background will use the preferred size of the background image. ----@return boolean -function ControlButton:doesAdjustBackgroundImage () end ----* Sets the background spriteFrame to use for the specified button state.
----* param spriteFrame The background spriteFrame to use for the specified state.
----* param state The state that uses the specified image. The values are described
----* in "CCControlState". ----@param spriteFrame cc.SpriteFrame ----@param state int ----@return self -function ControlButton:setBackgroundSpriteFrameForState (spriteFrame,state) end ----* Sets the background sprite to use for the specified button state.
----* param sprite The background sprite to use for the specified state.
----* param state The state that uses the specified image. The values are described
----* in "CCControlState". ----@param sprite ccui.Scale9Sprite ----@param state int ----@return self -function ControlButton:setBackgroundSpriteForState (sprite,state) end ----* ----@param var float ----@return self -function ControlButton:setScaleRatio (var) end ----* ----@param state int ----@return string -function ControlButton:getTitleBMFontForState (state) end ----* ----@return cc.Node -function ControlButton:getTitleLabel () end ----* ----@return size_table -function ControlButton:getPreferredSize () end ----* ----@return int -function ControlButton:getVerticalMargin () end ----* Returns the title label used for a state.
----* param state The state that uses the title label. Possible values are described
----* in "CCControlState". ----@param state int ----@return cc.Node -function ControlButton:getTitleLabelForState (state) end ----* ----@param marginH int ----@param marginV int ----@return self -function ControlButton:setMargins (marginH,marginV) end ----@overload fun():self ----@overload fun():self ----@return string -function ControlButton:getCurrentTitle () end ----* ----@param label cc.Node ----@param backgroundSprite ccui.Scale9Sprite ----@param adjustBackGroundSize boolean ----@return boolean -function ControlButton:initWithLabelAndBackgroundSprite (label,backgroundSprite,adjustBackGroundSize) end ----* ----@return boolean -function ControlButton:getZoomOnTouchDown () end ----* Returns the title used for a state.
----* param state The state that uses the title. Possible values are described in
----* "CCControlState".
----* return The title for the specified state. ----@param state int ----@return string -function ControlButton:getTitleForState (state) end ----@overload fun(cc.Node0:ccui.Scale9Sprite):self ----@overload fun():self ----@overload fun(cc.Node:cc.Node,ccui.Scale9Sprite:ccui.Scale9Sprite):self ----@overload fun(cc.Node0:string,ccui.Scale9Sprite1:string,boolean2:float):self ----@overload fun(cc.Node:cc.Node,ccui.Scale9Sprite:ccui.Scale9Sprite,boolean:boolean):self ----@param label cc.Node ----@param backgroundSprite ccui.Scale9Sprite ----@param adjustBackGroundSize boolean ----@return self -function ControlButton:create (label,backgroundSprite,adjustBackGroundSize) end ----* ----@param enabled boolean ----@return self -function ControlButton:setEnabled (enabled) end ----* ----@param touch cc.Touch ----@param event cc.Event ----@return self -function ControlButton:onTouchEnded (touch,event) end ----* ----@param e color3b_tabl ----@return self -function ControlButton:setColor (e) end ----* ----@param touch cc.Touch ----@param event cc.Event ----@return self -function ControlButton:onTouchMoved (touch,event) end ----* ----@param enabled boolean ----@return self -function ControlButton:setSelected (enabled) end ----* ----@param touch cc.Touch ----@param event cc.Event ----@return self -function ControlButton:onTouchCancelled (touch,event) end ----* ----@return self -function ControlButton:needsLayout () end ----* ----@param touch cc.Touch ----@param event cc.Event ----@return boolean -function ControlButton:onTouchBegan (touch,event) end ----* ----@param parentOpacity unsigned_char ----@return self -function ControlButton:updateDisplayedOpacity (parentOpacity) end ----* ----@return boolean -function ControlButton:init () end ----* ----@param enabled boolean ----@return self -function ControlButton:setHighlighted (enabled) end ----* ----@param parentColor color3b_table ----@return self -function ControlButton:updateDisplayedColor (parentColor) end ----* ----@param var unsigned_char ----@return self -function ControlButton:setOpacity (var) end ----* js ctor ----@return self -function ControlButton:ControlButton () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ControlColourPicker.lua b/meta/3rd/Cocos4.0/library/cc/ControlColourPicker.lua deleted file mode 100644 index d3690c6c..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ControlColourPicker.lua +++ /dev/null @@ -1,58 +0,0 @@ ----@meta - ----@class cc.ControlColourPicker :cc.Control -local ControlColourPicker={ } -cc.ControlColourPicker=ControlColourPicker - - - - ----* ----@param sender cc.Ref ----@param controlEvent int ----@return self -function ControlColourPicker:hueSliderValueChanged (sender,controlEvent) end ----* ----@return cc.ControlHuePicker -function ControlColourPicker:getHuePicker () end ----* ----@return cc.ControlSaturationBrightnessPicker -function ControlColourPicker:getcolourPicker () end ----* ----@param var cc.Sprite ----@return self -function ControlColourPicker:setBackground (var) end ----* ----@param var cc.ControlSaturationBrightnessPicker ----@return self -function ControlColourPicker:setcolourPicker (var) end ----* ----@param sender cc.Ref ----@param controlEvent int ----@return self -function ControlColourPicker:colourSliderValueChanged (sender,controlEvent) end ----* ----@param var cc.ControlHuePicker ----@return self -function ControlColourPicker:setHuePicker (var) end ----* ----@return cc.Sprite -function ControlColourPicker:getBackground () end ----* ----@return self -function ControlColourPicker:create () end ----* ----@param bEnabled boolean ----@return self -function ControlColourPicker:setEnabled (bEnabled) end ----* ----@return boolean -function ControlColourPicker:init () end ----* ----@param colorValue color3b_table ----@return self -function ControlColourPicker:setColor (colorValue) end ----* js ctor
----* lua new ----@return self -function ControlColourPicker:ControlColourPicker () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ControlHuePicker.lua b/meta/3rd/Cocos4.0/library/cc/ControlHuePicker.lua deleted file mode 100644 index 8b4451d3..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ControlHuePicker.lua +++ /dev/null @@ -1,67 +0,0 @@ ----@meta - ----@class cc.ControlHuePicker :cc.Control -local ControlHuePicker={ } -cc.ControlHuePicker=ControlHuePicker - - - - ----* ----@param target cc.Node ----@param pos vec2_table ----@return boolean -function ControlHuePicker:initWithTargetAndPos (target,pos) end ----* ----@param val float ----@return self -function ControlHuePicker:setHue (val) end ----* ----@return vec2_table -function ControlHuePicker:getStartPos () end ----* ----@return float -function ControlHuePicker:getHue () end ----* ----@return cc.Sprite -function ControlHuePicker:getSlider () end ----* ----@param var cc.Sprite ----@return self -function ControlHuePicker:setBackground (var) end ----* ----@param val float ----@return self -function ControlHuePicker:setHuePercentage (val) end ----* ----@return cc.Sprite -function ControlHuePicker:getBackground () end ----* ----@return float -function ControlHuePicker:getHuePercentage () end ----* ----@param var cc.Sprite ----@return self -function ControlHuePicker:setSlider (var) end ----* ----@param target cc.Node ----@param pos vec2_table ----@return self -function ControlHuePicker:create (target,pos) end ----* ----@param enabled boolean ----@return self -function ControlHuePicker:setEnabled (enabled) end ----* ----@param pTouch cc.Touch ----@param pEvent cc.Event ----@return self -function ControlHuePicker:onTouchMoved (pTouch,pEvent) end ----* ----@param touch cc.Touch ----@param pEvent cc.Event ----@return boolean -function ControlHuePicker:onTouchBegan (touch,pEvent) end ----* js ctor ----@return self -function ControlHuePicker:ControlHuePicker () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ControlPotentiometer.lua b/meta/3rd/Cocos4.0/library/cc/ControlPotentiometer.lua deleted file mode 100644 index 21dcac5e..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ControlPotentiometer.lua +++ /dev/null @@ -1,116 +0,0 @@ ----@meta - ----@class cc.ControlPotentiometer :cc.Control -local ControlPotentiometer={ } -cc.ControlPotentiometer=ControlPotentiometer - - - - ----* ----@param var vec2_table ----@return self -function ControlPotentiometer:setPreviousLocation (var) end ----* ----@param value float ----@return self -function ControlPotentiometer:setValue (value) end ----* ----@return cc.ProgressTimer -function ControlPotentiometer:getProgressTimer () end ----* ----@return float -function ControlPotentiometer:getMaximumValue () end ----* Returns the angle in degree between line1 and line2. ----@param beginLineA vec2_table ----@param endLineA vec2_table ----@param beginLineB vec2_table ----@param endLineB vec2_table ----@return float -function ControlPotentiometer:angleInDegreesBetweenLineFromPoint_toPoint_toLineFromPoint_toPoint (beginLineA,endLineA,beginLineB,endLineB) end ----* Factorize the event dispatch into these methods. ----@param location vec2_table ----@return self -function ControlPotentiometer:potentiometerBegan (location) end ----* ----@param maximumValue float ----@return self -function ControlPotentiometer:setMaximumValue (maximumValue) end ----* ----@return float -function ControlPotentiometer:getMinimumValue () end ----* ----@param var cc.Sprite ----@return self -function ControlPotentiometer:setThumbSprite (var) end ----* ----@return float -function ControlPotentiometer:getValue () end ----* Returns the distance between the point1 and point2. ----@param point1 vec2_table ----@param point2 vec2_table ----@return float -function ControlPotentiometer:distanceBetweenPointAndPoint (point1,point2) end ----* ----@param location vec2_table ----@return self -function ControlPotentiometer:potentiometerEnded (location) end ----* ----@return vec2_table -function ControlPotentiometer:getPreviousLocation () end ----* ----@param var cc.ProgressTimer ----@return self -function ControlPotentiometer:setProgressTimer (var) end ----* ----@param minimumValue float ----@return self -function ControlPotentiometer:setMinimumValue (minimumValue) end ----* ----@return cc.Sprite -function ControlPotentiometer:getThumbSprite () end ----* Initializes a potentiometer with a track sprite and a progress bar.
----* param trackSprite Sprite, that is used as a background.
----* param progressTimer ProgressTimer, that is used as a progress bar. ----@param trackSprite cc.Sprite ----@param progressTimer cc.ProgressTimer ----@param thumbSprite cc.Sprite ----@return boolean -function ControlPotentiometer:initWithTrackSprite_ProgressTimer_ThumbSprite (trackSprite,progressTimer,thumbSprite) end ----* ----@param location vec2_table ----@return self -function ControlPotentiometer:potentiometerMoved (location) end ----* Creates potentiometer with a track filename and a progress filename. ----@param backgroundFile char ----@param progressFile char ----@param thumbFile char ----@return self -function ControlPotentiometer:create (backgroundFile,progressFile,thumbFile) end ----* ----@param touch cc.Touch ----@return boolean -function ControlPotentiometer:isTouchInside (touch) end ----* ----@param enabled boolean ----@return self -function ControlPotentiometer:setEnabled (enabled) end ----* ----@param pTouch cc.Touch ----@param pEvent cc.Event ----@return self -function ControlPotentiometer:onTouchMoved (pTouch,pEvent) end ----* ----@param pTouch cc.Touch ----@param pEvent cc.Event ----@return self -function ControlPotentiometer:onTouchEnded (pTouch,pEvent) end ----* ----@param pTouch cc.Touch ----@param pEvent cc.Event ----@return boolean -function ControlPotentiometer:onTouchBegan (pTouch,pEvent) end ----* js ctor
----* lua new ----@return self -function ControlPotentiometer:ControlPotentiometer () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ControlSaturationBrightnessPicker.lua b/meta/3rd/Cocos4.0/library/cc/ControlSaturationBrightnessPicker.lua deleted file mode 100644 index 27b931ba..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ControlSaturationBrightnessPicker.lua +++ /dev/null @@ -1,47 +0,0 @@ ----@meta - ----@class cc.ControlSaturationBrightnessPicker :cc.Control -local ControlSaturationBrightnessPicker={ } -cc.ControlSaturationBrightnessPicker=ControlSaturationBrightnessPicker - - - - ----* ----@return cc.Sprite -function ControlSaturationBrightnessPicker:getShadow () end ----* ----@param target cc.Node ----@param pos vec2_table ----@return boolean -function ControlSaturationBrightnessPicker:initWithTargetAndPos (target,pos) end ----* ----@return vec2_table -function ControlSaturationBrightnessPicker:getStartPos () end ----* ----@return cc.Sprite -function ControlSaturationBrightnessPicker:getOverlay () end ----* ----@return cc.Sprite -function ControlSaturationBrightnessPicker:getSlider () end ----* ----@return cc.Sprite -function ControlSaturationBrightnessPicker:getBackground () end ----* ----@return float -function ControlSaturationBrightnessPicker:getSaturation () end ----* ----@return float -function ControlSaturationBrightnessPicker:getBrightness () end ----* ----@param target cc.Node ----@param pos vec2_table ----@return self -function ControlSaturationBrightnessPicker:create (target,pos) end ----* ----@param enabled boolean ----@return self -function ControlSaturationBrightnessPicker:setEnabled (enabled) end ----* js ctor ----@return self -function ControlSaturationBrightnessPicker:ControlSaturationBrightnessPicker () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ControlSlider.lua b/meta/3rd/Cocos4.0/library/cc/ControlSlider.lua deleted file mode 100644 index 071954e7..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ControlSlider.lua +++ /dev/null @@ -1,109 +0,0 @@ ----@meta - ----@class cc.ControlSlider :cc.Control -local ControlSlider={ } -cc.ControlSlider=ControlSlider - - - - ----* ----@return float -function ControlSlider:getMaximumAllowedValue () end ----@overload fun(cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite):self ----@overload fun(cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite):self ----@param backgroundSprite cc.Sprite ----@param progressSprite cc.Sprite ----@param thumbSprite cc.Sprite ----@param selectedThumbSprite cc.Sprite ----@return boolean -function ControlSlider:initWithSprites (backgroundSprite,progressSprite,thumbSprite,selectedThumbSprite) end ----* ----@return float -function ControlSlider:getMinimumAllowedValue () end ----* ----@return float -function ControlSlider:getMaximumValue () end ----* ----@return cc.Sprite -function ControlSlider:getSelectedThumbSprite () end ----* ----@param var cc.Sprite ----@return self -function ControlSlider:setProgressSprite (var) end ----* ----@param val float ----@return self -function ControlSlider:setMaximumValue (val) end ----* ----@return float -function ControlSlider:getMinimumValue () end ----* ----@param var cc.Sprite ----@return self -function ControlSlider:setThumbSprite (var) end ----* ----@return float -function ControlSlider:getValue () end ----* ----@return cc.Sprite -function ControlSlider:getBackgroundSprite () end ----* ----@return cc.Sprite -function ControlSlider:getThumbSprite () end ----* ----@param val float ----@return self -function ControlSlider:setValue (val) end ----* ----@param touch cc.Touch ----@return vec2_table -function ControlSlider:locationFromTouch (touch) end ----* ----@param val float ----@return self -function ControlSlider:setMinimumValue (val) end ----* ----@param var float ----@return self -function ControlSlider:setMinimumAllowedValue (var) end ----* ----@return cc.Sprite -function ControlSlider:getProgressSprite () end ----* ----@param var cc.Sprite ----@return self -function ControlSlider:setSelectedThumbSprite (var) end ----* ----@param var cc.Sprite ----@return self -function ControlSlider:setBackgroundSprite (var) end ----* ----@param var float ----@return self -function ControlSlider:setMaximumAllowedValue (var) end ----@overload fun(cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite):self ----@overload fun(cc.Sprite0:char,cc.Sprite1:char,cc.Sprite2:char):self ----@overload fun(cc.Sprite0:char,cc.Sprite1:char,cc.Sprite2:char,cc.Sprite3:char):self ----@overload fun(cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite):self ----@param backgroundSprite cc.Sprite ----@param pogressSprite cc.Sprite ----@param thumbSprite cc.Sprite ----@param selectedThumbSprite cc.Sprite ----@return self -function ControlSlider:create (backgroundSprite,pogressSprite,thumbSprite,selectedThumbSprite) end ----* ----@param touch cc.Touch ----@return boolean -function ControlSlider:isTouchInside (touch) end ----* ----@param enabled boolean ----@return self -function ControlSlider:setEnabled (enabled) end ----* ----@return self -function ControlSlider:needsLayout () end ----* js ctor
----* lua new ----@return self -function ControlSlider:ControlSlider () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ControlStepper.lua b/meta/3rd/Cocos4.0/library/cc/ControlStepper.lua deleted file mode 100644 index ef7a6dc2..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ControlStepper.lua +++ /dev/null @@ -1,111 +0,0 @@ ----@meta - ----@class cc.ControlStepper :cc.Control -local ControlStepper={ } -cc.ControlStepper=ControlStepper - - - - ----* ----@return cc.Sprite -function ControlStepper:getMinusSprite () end ----* ----@param value double ----@return self -function ControlStepper:setValue (value) end ----* ----@param stepValue double ----@return self -function ControlStepper:setStepValue (stepValue) end ----* ----@param minusSprite cc.Sprite ----@param plusSprite cc.Sprite ----@return boolean -function ControlStepper:initWithMinusSpriteAndPlusSprite (minusSprite,plusSprite) end ----* Set the numeric value of the stepper. If send is true, the Control::EventType::VALUE_CHANGED is sent. ----@param value double ----@param send boolean ----@return self -function ControlStepper:setValueWithSendingEvent (value,send) end ----* ----@param maximumValue double ----@return self -function ControlStepper:setMaximumValue (maximumValue) end ----* ----@return cc.Label -function ControlStepper:getMinusLabel () end ----* ----@return cc.Label -function ControlStepper:getPlusLabel () end ----* ----@param wraps boolean ----@return self -function ControlStepper:setWraps (wraps) end ----* ----@param var cc.Label ----@return self -function ControlStepper:setMinusLabel (var) end ----* Start the autorepeat increment/decrement. ----@return self -function ControlStepper:startAutorepeat () end ----* Update the layout of the stepper with the given touch location. ----@param location vec2_table ----@return self -function ControlStepper:updateLayoutUsingTouchLocation (location) end ----* ----@return boolean -function ControlStepper:isContinuous () end ----* Stop the autorepeat. ----@return self -function ControlStepper:stopAutorepeat () end ----* ----@param minimumValue double ----@return self -function ControlStepper:setMinimumValue (minimumValue) end ----* ----@param var cc.Label ----@return self -function ControlStepper:setPlusLabel (var) end ----* ----@return double -function ControlStepper:getValue () end ----* ----@return cc.Sprite -function ControlStepper:getPlusSprite () end ----* ----@param var cc.Sprite ----@return self -function ControlStepper:setPlusSprite (var) end ----* ----@param var cc.Sprite ----@return self -function ControlStepper:setMinusSprite (var) end ----* ----@param minusSprite cc.Sprite ----@param plusSprite cc.Sprite ----@return self -function ControlStepper:create (minusSprite,plusSprite) end ----* ----@param pTouch cc.Touch ----@param pEvent cc.Event ----@return self -function ControlStepper:onTouchMoved (pTouch,pEvent) end ----* ----@param pTouch cc.Touch ----@param pEvent cc.Event ----@return self -function ControlStepper:onTouchEnded (pTouch,pEvent) end ----* ----@param dt float ----@return self -function ControlStepper:update (dt) end ----* ----@param pTouch cc.Touch ----@param pEvent cc.Event ----@return boolean -function ControlStepper:onTouchBegan (pTouch,pEvent) end ----* js ctor
----* lua new ----@return self -function ControlStepper:ControlStepper () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ControlSwitch.lua b/meta/3rd/Cocos4.0/library/cc/ControlSwitch.lua deleted file mode 100644 index 28b927e7..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ControlSwitch.lua +++ /dev/null @@ -1,73 +0,0 @@ ----@meta - ----@class cc.ControlSwitch :cc.Control -local ControlSwitch={ } -cc.ControlSwitch=ControlSwitch - - - - ----@overload fun(boolean:boolean):self ----@overload fun(boolean:boolean,boolean:boolean):self ----@param isOn boolean ----@param animated boolean ----@return self -function ControlSwitch:setOn (isOn,animated) end ----* ----@param touch cc.Touch ----@return vec2_table -function ControlSwitch:locationFromTouch (touch) end ----* ----@return boolean -function ControlSwitch:isOn () end ----@overload fun(cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite,cc.Label:cc.Label,cc.Label:cc.Label):self ----@overload fun(cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite):self ----@param maskSprite cc.Sprite ----@param onSprite cc.Sprite ----@param offSprite cc.Sprite ----@param thumbSprite cc.Sprite ----@param onLabel cc.Label ----@param offLabel cc.Label ----@return boolean -function ControlSwitch:initWithMaskSprite (maskSprite,onSprite,offSprite,thumbSprite,onLabel,offLabel) end ----* ----@return boolean -function ControlSwitch:hasMoved () end ----@overload fun(cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite):self ----@overload fun(cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite,cc.Sprite:cc.Sprite,cc.Label:cc.Label,cc.Label:cc.Label):self ----@param maskSprite cc.Sprite ----@param onSprite cc.Sprite ----@param offSprite cc.Sprite ----@param thumbSprite cc.Sprite ----@param onLabel cc.Label ----@param offLabel cc.Label ----@return self -function ControlSwitch:create (maskSprite,onSprite,offSprite,thumbSprite,onLabel,offLabel) end ----* ----@param enabled boolean ----@return self -function ControlSwitch:setEnabled (enabled) end ----* ----@param pTouch cc.Touch ----@param pEvent cc.Event ----@return self -function ControlSwitch:onTouchMoved (pTouch,pEvent) end ----* ----@param pTouch cc.Touch ----@param pEvent cc.Event ----@return self -function ControlSwitch:onTouchEnded (pTouch,pEvent) end ----* ----@param pTouch cc.Touch ----@param pEvent cc.Event ----@return self -function ControlSwitch:onTouchCancelled (pTouch,pEvent) end ----* ----@param pTouch cc.Touch ----@param pEvent cc.Event ----@return boolean -function ControlSwitch:onTouchBegan (pTouch,pEvent) end ----* js ctor
----* lua new ----@return self -function ControlSwitch:ControlSwitch () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Controller.lua b/meta/3rd/Cocos4.0/library/cc/Controller.lua deleted file mode 100644 index 6ed4b19c..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Controller.lua +++ /dev/null @@ -1,56 +0,0 @@ ----@meta - ----@class cc.Controller -local Controller={ } -cc.Controller=Controller - - - - ----* Activate receives key event from external key. e.g. back,menu.
----* Controller receives only standard key which contained within enum Key by default.
----* warning The API only work on the android platform for support diversified game controller.
----* param externalKeyCode External key code.
----* param receive True if external key event on this controller should be receive, false otherwise. ----@param externalKeyCode int ----@param receive boolean ----@return self -function Controller:receiveExternalKeyEvent (externalKeyCode,receive) end ----* Gets the name of this Controller object. ----@return string -function Controller:getDeviceName () end ----* Indicates whether the Controller is connected. ----@return boolean -function Controller:isConnected () end ----* Gets the Controller id. ----@return int -function Controller:getDeviceId () end ----* Changes the tag that is used to identify the controller easily.
----* param tag A integer that identifies the controller. ----@param tag int ----@return self -function Controller:setTag (tag) end ----* Returns a tag that is used to identify the controller easily.
----* return An integer that identifies the controller. ----@return int -function Controller:getTag () end ----* Start discovering new controllers.
----* warning The API has an empty implementation on Android. ----@return self -function Controller:startDiscoveryController () end ----* Stop the discovery process.
----* warning The API has an empty implementation on Android. ----@return self -function Controller:stopDiscoveryController () end ----* Gets a Controller object with device ID.
----* param deviceId A unique identifier to find the controller.
----* return A Controller object. ----@param deviceId int ----@return self -function Controller:getControllerByDeviceId (deviceId) end ----* Gets a Controller object with tag.
----* param tag An identifier to find the controller.
----* return A Controller object. ----@param tag int ----@return self -function Controller:getControllerByTag (tag) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/DelayTime.lua b/meta/3rd/Cocos4.0/library/cc/DelayTime.lua deleted file mode 100644 index fd9e5d28..00000000 --- a/meta/3rd/Cocos4.0/library/cc/DelayTime.lua +++ /dev/null @@ -1,28 +0,0 @@ ----@meta - ----@class cc.DelayTime :cc.ActionInterval -local DelayTime={ } -cc.DelayTime=DelayTime - - - - ----* Creates the action.
----* param d Duration time, in seconds.
----* return An autoreleased DelayTime object. ----@param d float ----@return self -function DelayTime:create (d) end ----* ----@return self -function DelayTime:clone () end ----* param time In seconds. ----@param time float ----@return self -function DelayTime:update (time) end ----* ----@return self -function DelayTime:reverse () end ----* ----@return self -function DelayTime:DelayTime () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Device.lua b/meta/3rd/Cocos4.0/library/cc/Device.lua deleted file mode 100644 index 2458b36e..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Device.lua +++ /dev/null @@ -1,34 +0,0 @@ ----@meta - ----@class cc.Device -local Device={ } -cc.Device=Device - - - - ----* To enable or disable accelerometer. ----@param isEnabled boolean ----@return self -function Device:setAccelerometerEnabled (isEnabled) end ----* Sets the interval of accelerometer. ----@param interval float ----@return self -function Device:setAccelerometerInterval (interval) end ----* Controls whether the screen should remain on.
----* param keepScreenOn One flag indicating that the screen should remain on. ----@param keepScreenOn boolean ----@return self -function Device:setKeepScreenOn (keepScreenOn) end ----* Vibrate for the specified amount of time.
----* If vibrate is not supported, then invoking this method has no effect.
----* Some platforms limit to a maximum duration of 5 seconds.
----* Duration is ignored on iOS due to API limitations.
----* param duration The duration in seconds. ----@param duration float ----@return self -function Device:vibrate (duration) end ----* Gets the DPI of device
----* return The DPI of device. ----@return int -function Device:getDPI () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/DirectionLight.lua b/meta/3rd/Cocos4.0/library/cc/DirectionLight.lua deleted file mode 100644 index e47abc2c..00000000 --- a/meta/3rd/Cocos4.0/library/cc/DirectionLight.lua +++ /dev/null @@ -1,34 +0,0 @@ ----@meta - ----@class cc.DirectionLight :cc.BaseLight -local DirectionLight={ } -cc.DirectionLight=DirectionLight - - - - ----* Returns the Direction in parent. ----@return vec3_table -function DirectionLight:getDirection () end ----* Returns direction in world. ----@return vec3_table -function DirectionLight:getDirectionInWorld () end ----* Sets the Direction in parent.
----* param dir The Direction in parent. ----@param dir vec3_table ----@return self -function DirectionLight:setDirection (dir) end ----* Creates a direction light.
----* param direction The light's direction
----* param color The light's color.
----* return The new direction light. ----@param direction vec3_table ----@param color color3b_table ----@return self -function DirectionLight:create (direction,color) end ----* ----@return int -function DirectionLight:getLightType () end ----* ----@return self -function DirectionLight:DirectionLight () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Director.lua b/meta/3rd/Cocos4.0/library/cc/Director.lua deleted file mode 100644 index 24593ac5..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Director.lua +++ /dev/null @@ -1,309 +0,0 @@ ----@meta - ----@class cc.Director -local Director={ } -cc.Director=Director - - - - ----* Pauses the running scene.
----* The running scene will be _drawed_ but all scheduled timers will be paused.
----* While paused, the draw rate will be 4 FPS to reduce CPU consumption. ----@return self -function Director:pause () end ----* Sets the EventDispatcher associated with this director.
----* since v3.0
----* js NA ----@param dispatcher cc.EventDispatcher ----@return self -function Director:setEventDispatcher (dispatcher) end ----* The size in pixels of the surface. It could be different than the screen size.
----* High-res devices might have a higher surface size than the screen size.
----* Only available when compiled using SDK >= 4.0.
----* since v0.99.4 ----@param scaleFactor float ----@return self -function Director:setContentScaleFactor (scaleFactor) end ----* ----@return float -function Director:getDeltaTime () end ----* Gets content scale factor.
----* see Director::setContentScaleFactor() ----@return float -function Director:getContentScaleFactor () end ----* Returns the size of the OpenGL view in pixels. ----@return size_table -function Director:getWinSizeInPixels () end ----* Returns safe area rectangle of the OpenGL view in points. ----@return rect_table -function Director:getSafeAreaRect () end ----* Sets the OpenGL default values.
----* It will enable alpha blending, disable depth test.
----* js NA ----@return self -function Director:setGLDefaultValues () end ----* Sets the ActionManager associated with this director.
----* since v2.0 ----@param actionManager cc.ActionManager ----@return self -function Director:setActionManager (actionManager) end ----* Pops out all scenes from the stack until the root scene in the queue.
----* This scene will replace the running one.
----* Internally it will call `popToSceneStackLevel(1)`. ----@return self -function Director:popToRootScene () end ----* Adds a matrix to the top of specified type of matrix stack.
----* param type Matrix type.
----* param mat The matrix that to be added.
----* js NA ----@param type int ----@param mat mat4_table ----@return self -function Director:loadMatrix (type,mat) end ----* This object will be visited after the main scene is visited.
----* This object MUST implement the "visit" function.
----* Useful to hook a notification object, like Notifications (http:github.com/manucorporat/CCNotifications)
----* since v0.99.5 ----@return cc.Node -function Director:getNotificationNode () end ----* Returns the size of the OpenGL view in points. ----@return size_table -function Director:getWinSize () end ----* ----@return cc.TextureCache -function Director:getTextureCache () end ----* Whether or not the replaced scene will receive the cleanup message.
----* If the new scene is pushed, then the old scene won't receive the "cleanup" message.
----* If the new scene replaces the old one, the it will receive the "cleanup" message.
----* since v0.99.0 ----@return boolean -function Director:isSendCleanupToScene () end ----* Returns visible origin coordinate of the OpenGL view in points. ----@return vec2_table -function Director:getVisibleOrigin () end ----@overload fun(float:float):self ----@overload fun():self ----@param dt float ----@return self -function Director:mainLoop (dt) end ----* Gets Frame Rate.
----* js NA ----@return float -function Director:getFrameRate () end ----* Get seconds per frame. ----@return float -function Director:getSecondsPerFrame () end ----* Clear all types of matrix stack, and add identity matrix to these matrix stacks.
----* js NA ----@return self -function Director:resetMatrixStack () end ----* Converts an OpenGL coordinate to a screen coordinate.
----* Useful to convert node points to window points for calls such as glScissor. ----@param point vec2_table ----@return vec2_table -function Director:convertToUI (point) end ----* Clones a specified type matrix and put it to the top of specified type of matrix stack.
----* js NA ----@param type int ----@return self -function Director:pushMatrix (type) end ----* Sets the default values based on the Configuration info. ----@return self -function Director:setDefaultValues () end ----* ----@return boolean -function Director:init () end ----* Sets the Scheduler associated with this director.
----* since v2.0 ----@param scheduler cc.Scheduler ----@return self -function Director:setScheduler (scheduler) end ----* Gets the top matrix of specified type of matrix stack.
----* js NA ----@param type int ----@return mat4_table -function Director:getMatrix (type) end ----* returns whether or not the Director is in a valid state ----@return boolean -function Director:isValid () end ----* The main loop is triggered again.
----* Call this function only if [stopAnimation] was called earlier.
----* warning Don't call this function to start the main loop. To run the main loop call runWithScene. ----@return self -function Director:startAnimation () end ----* Returns the Renderer associated with this director.
----* since v3.0 ----@return cc.Renderer -function Director:getRenderer () end ----* Get the GLView.
----* lua NA ----@return cc.GLView -function Director:getOpenGLView () end ----* Gets current running Scene. Director can only run one Scene at a time. ----@return cc.Scene -function Director:getRunningScene () end ----* Sets the glViewport. ----@return self -function Director:setViewport () end ----* Stops the animation. Nothing will be drawn. The main loop won't be triggered anymore.
----* If you don't want to pause your animation call [pause] instead. ----@return self -function Director:stopAnimation () end ----* Pops out all scenes from the stack until it reaches `level`.
----* If level is 0, it will end the director.
----* If level is 1, it will pop all scenes until it reaches to root scene.
----* If level is <= than the current stack level, it won't do anything. ----@param level int ----@return self -function Director:popToSceneStackLevel (level) end ----* Resumes the paused scene.
----* The scheduled timers will be activated again.
----* The "delta time" will be 0 (as if the game wasn't paused). ----@return self -function Director:resume () end ----* Whether or not `_nextDeltaTimeZero` is set to 0. ----@return boolean -function Director:isNextDeltaTimeZero () end ----* Sets clear values for the color buffers,
----* value range of each element is [0.0, 1.0].
----* js NA ----@param clearColor color4f_table ----@return self -function Director:setClearColor (clearColor) end ----* Ends the execution, releases the running scene.
----* lua endToLua ----@return self -function Director:endToLua () end ----* Sets the GLView.
----* lua NA ----@param openGLView cc.GLView ----@return self -function Director:setOpenGLView (openGLView) end ----* Converts a screen coordinate to an OpenGL coordinate.
----* Useful to convert (multi) touch coordinates to the current layout (portrait or landscape). ----@param point vec2_table ----@return vec2_table -function Director:convertToGL (point) end ----* Removes all cocos2d cached data.
----* It will purge the TextureCache, SpriteFrameCache, LabelBMFont cache
----* since v0.99.3 ----@return self -function Director:purgeCachedData () end ----* How many frames were called since the director started ----@return unsigned_int -function Director:getTotalFrames () end ----* Enters the Director's main loop with the given Scene.
----* Call it to run only your FIRST scene.
----* Don't call it if there is already a running scene.
----* It will call pushScene: and then it will call startAnimation
----* js NA ----@param scene cc.Scene ----@return self -function Director:runWithScene (scene) end ----* Sets the notification node.
----* see Director::getNotificationNode() ----@param node cc.Node ----@return self -function Director:setNotificationNode (node) end ----* Draw the scene.
----* This method is called every frame. Don't call it manually. ----@return self -function Director:drawScene () end ----* ----@return self -function Director:restart () end ----* Pops out a scene from the stack.
----* This scene will replace the running one.
----* The running scene will be deleted. If there are no more scenes in the stack the execution is terminated.
----* ONLY call it if there is a running scene. ----@return self -function Director:popScene () end ----* Adds an identity matrix to the top of specified type of matrix stack.
----* js NA ----@param type int ----@return self -function Director:loadIdentityMatrix (type) end ----* Whether or not displaying the FPS on the bottom-left corner of the screen. ----@return boolean -function Director:isDisplayStats () end ----* Sets OpenGL projection. ----@param projection int ----@return self -function Director:setProjection (projection) end ----* Returns the Console associated with this director.
----* since v3.0
----* js NA ----@return cc.Console -function Director:getConsole () end ----* Multiplies a matrix to the top of specified type of matrix stack.
----* param type Matrix type.
----* param mat The matrix that to be multiplied.
----* js NA ----@param type int ----@param mat mat4_table ----@return self -function Director:multiplyMatrix (type,mat) end ----* Gets the distance between camera and near clipping frame.
----* It is correct for default camera that near clipping frame is same as the screen. ----@return float -function Director:getZEye () end ----* Sets the delta time between current frame and next frame is 0.
----* This value will be used in Schedule, and will affect all functions that are using frame delta time, such as Actions.
----* This value will take effect only one time. ----@param nextDeltaTimeZero boolean ----@return self -function Director:setNextDeltaTimeZero (nextDeltaTimeZero) end ----* Pops the top matrix of the specified type of matrix stack.
----* js NA ----@param type int ----@return self -function Director:popMatrix (type) end ----* Returns visible size of the OpenGL view in points.
----* The value is equal to `Director::getWinSize()` if don't invoke `GLView::setDesignResolutionSize()`. ----@return size_table -function Director:getVisibleSize () end ----* Gets the Scheduler associated with this director.
----* since v2.0 ----@return cc.Scheduler -function Director:getScheduler () end ----* Suspends the execution of the running scene, pushing it on the stack of suspended scenes.
----* The new scene will be executed.
----* Try to avoid big stacks of pushed scenes to reduce memory allocation.
----* ONLY call it if there is a running scene. ----@param scene cc.Scene ----@return self -function Director:pushScene (scene) end ----* Gets the FPS value. ----@return float -function Director:getAnimationInterval () end ----* Whether or not the Director is paused. ----@return boolean -function Director:isPaused () end ----* Display the FPS on the bottom-left corner of the screen. ----@param displayStats boolean ----@return self -function Director:setDisplayStats (displayStats) end ----* Gets the EventDispatcher associated with this director.
----* since v3.0
----* js NA ----@return cc.EventDispatcher -function Director:getEventDispatcher () end ----* Replaces the running scene with a new one. The running scene is terminated.
----* ONLY call it if there is a running scene.
----* js NA ----@param scene cc.Scene ----@return self -function Director:replaceScene (scene) end ----* Sets the FPS value. FPS = 1/interval. ----@param interval float ----@return self -function Director:setAnimationInterval (interval) end ----* Gets the ActionManager associated with this director.
----* since v2.0 ----@return cc.ActionManager -function Director:getActionManager () end ----* Returns a shared instance of the director.
----* js _getInstance ----@return self -function Director:getInstance () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/DrawNode.lua b/meta/3rd/Cocos4.0/library/cc/DrawNode.lua deleted file mode 100644 index b8c419d6..00000000 --- a/meta/3rd/Cocos4.0/library/cc/DrawNode.lua +++ /dev/null @@ -1,185 +0,0 @@ ----@meta - ----@class cc.DrawNode :cc.Node -local DrawNode={ } -cc.DrawNode=DrawNode - - - - ----* Draw an line from origin to destination with color.
----* param origin The line origin.
----* param destination The line destination.
----* param color The line color.
----* js NA ----@param origin vec2_table ----@param destination vec2_table ----@param color color4f_table ----@return self -function DrawNode:drawLine (origin,destination,color) end ----* When isolated is set, the position of the node is no longer affected by parent nodes.
----* Which means it will be drawn just like a root node. ----@param isolated boolean ----@return self -function DrawNode:setIsolated (isolated) end ----@overload fun(vec2_table:vec2_table,vec2_table:vec2_table,vec2_table:vec2_table,vec2_table:vec2_table,color4f_table:color4f_table):self ----@overload fun(vec2_table:vec2_table,vec2_table:vec2_table,vec2_table2:color4f_table):self ----@param p1 vec2_table ----@param p2 vec2_table ----@param p3 vec2_table ----@param p4 vec2_table ----@param color color4f_table ----@return self -function DrawNode:drawRect (p1,p2,p3,p4,color) end ----@overload fun(vec2_table:vec2_table,float:float,float:float,unsigned_int:unsigned_int,float4:color4f_table):self ----@overload fun(vec2_table:vec2_table,float:float,float:float,unsigned_int:unsigned_int,float:float,float:float,color4f_table:color4f_table):self ----@param center vec2_table ----@param radius float ----@param angle float ----@param segments unsigned_int ----@param scaleX float ----@param scaleY float ----@param color color4f_table ----@return self -function DrawNode:drawSolidCircle (center,radius,angle,segments,scaleX,scaleY,color) end ----* ----@param lineWidth float ----@return self -function DrawNode:setLineWidth (lineWidth) end ----* draw a dot at a position, with a given radius and color.
----* param pos The dot center.
----* param radius The dot radius.
----* param color The dot color. ----@param pos vec2_table ----@param radius float ----@param color color4f_table ----@return self -function DrawNode:drawDot (pos,radius,color) end ----* draw a segment with a radius and color.
----* param from The segment origin.
----* param to The segment destination.
----* param radius The segment radius.
----* param color The segment color. ----@param from vec2_table ----@param to vec2_table ----@param radius float ----@param color color4f_table ----@return self -function DrawNode:drawSegment (from,to,radius,color) end ----* Get the color mixed mode.
----* lua NA ----@return cc.BlendFunc -function DrawNode:getBlendFunc () end ----@overload fun(vec2_table:vec2_table,float:float,float:float,unsigned_int:unsigned_int,boolean:boolean,float5:color4f_table):self ----@overload fun(vec2_table:vec2_table,float:float,float:float,unsigned_int:unsigned_int,boolean:boolean,float:float,float:float,color4f_table:color4f_table):self ----@param center vec2_table ----@param radius float ----@param angle float ----@param segments unsigned_int ----@param drawLineToCenter boolean ----@param scaleX float ----@param scaleY float ----@param color color4f_table ----@return self -function DrawNode:drawCircle (center,radius,angle,segments,drawLineToCenter,scaleX,scaleY,color) end ----* Draws a quad bezier path.
----* param origin The origin of the bezier path.
----* param control The control of the bezier path.
----* param destination The destination of the bezier path.
----* param segments The number of segments.
----* param color Set the quad bezier color. ----@param origin vec2_table ----@param control vec2_table ----@param destination vec2_table ----@param segments unsigned_int ----@param color color4f_table ----@return self -function DrawNode:drawQuadBezier (origin,control,destination,segments,color) end ----* draw a triangle with color.
----* param p1 The triangle vertex point.
----* param p2 The triangle vertex point.
----* param p3 The triangle vertex point.
----* param color The triangle color.
----* js NA ----@param p1 vec2_table ----@param p2 vec2_table ----@param p3 vec2_table ----@param color color4f_table ----@return self -function DrawNode:drawTriangle (p1,p2,p3,color) end ----* Set the color mixed mode.
----* code
----* When this function bound into js or lua,the parameter will be changed
----* In js: var setBlendFunc(var src, var dst)
----* endcode
----* lua NA ----@param blendFunc cc.BlendFunc ----@return self -function DrawNode:setBlendFunc (blendFunc) end ----* Clear the geometry in the node's buffer. ----@return self -function DrawNode:clear () end ----* Draws a solid rectangle given the origin and destination point measured in points.
----* The origin and the destination can not have the same x and y coordinate.
----* param origin The rectangle origin.
----* param destination The rectangle destination.
----* param color The rectangle color.
----* js NA ----@param origin vec2_table ----@param destination vec2_table ----@param color color4f_table ----@return self -function DrawNode:drawSolidRect (origin,destination,color) end ----* ----@return float -function DrawNode:getLineWidth () end ----* Draw a point.
----* param point A Vec2 used to point.
----* param pointSize The point size.
----* param color The point color.
----* js NA ----@param point vec2_table ----@param pointSize float ----@param color color4f_table ----@return self -function DrawNode:drawPoint (point,pointSize,color) end ----* ----@return boolean -function DrawNode:isIsolated () end ----* Draw a cubic bezier curve with color and number of segments
----* param origin The origin of the bezier path.
----* param control1 The first control of the bezier path.
----* param control2 The second control of the bezier path.
----* param destination The destination of the bezier path.
----* param segments The number of segments.
----* param color Set the cubic bezier color. ----@param origin vec2_table ----@param control1 vec2_table ----@param control2 vec2_table ----@param destination vec2_table ----@param segments unsigned_int ----@param color color4f_table ----@return self -function DrawNode:drawCubicBezier (origin,control1,control2,destination,segments,color) end ----* creates and initialize a DrawNode node.
----* return Return an autorelease object. ----@return self -function DrawNode:create () end ----* ----@param renderer cc.Renderer ----@param transform mat4_table ----@param flags unsigned_int ----@return self -function DrawNode:draw (renderer,transform,flags) end ----* ----@param renderer cc.Renderer ----@param parentTransform mat4_table ----@param parentFlags unsigned_int ----@return self -function DrawNode:visit (renderer,parentTransform,parentFlags) end ----* ----@return boolean -function DrawNode:init () end ----* ----@return self -function DrawNode:DrawNode () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EaseBackIn.lua b/meta/3rd/Cocos4.0/library/cc/EaseBackIn.lua deleted file mode 100644 index 9f9543e5..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EaseBackIn.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class cc.EaseBackIn :cc.ActionEase -local EaseBackIn={ } -cc.EaseBackIn=EaseBackIn - - - - ----* ----@param action cc.ActionInterval ----@return self -function EaseBackIn:create (action) end ----* ----@return self -function EaseBackIn:clone () end ----* ----@param time float ----@return self -function EaseBackIn:update (time) end ----* ----@return cc.ActionEase -function EaseBackIn:reverse () end ----* ----@return self -function EaseBackIn:EaseBackIn () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EaseBackInOut.lua b/meta/3rd/Cocos4.0/library/cc/EaseBackInOut.lua deleted file mode 100644 index 83a9200d..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EaseBackInOut.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class cc.EaseBackInOut :cc.ActionEase -local EaseBackInOut={ } -cc.EaseBackInOut=EaseBackInOut - - - - ----* ----@param action cc.ActionInterval ----@return self -function EaseBackInOut:create (action) end ----* ----@return self -function EaseBackInOut:clone () end ----* ----@param time float ----@return self -function EaseBackInOut:update (time) end ----* ----@return cc.ActionEase -function EaseBackInOut:reverse () end ----* ----@return self -function EaseBackInOut:EaseBackInOut () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EaseBackOut.lua b/meta/3rd/Cocos4.0/library/cc/EaseBackOut.lua deleted file mode 100644 index b40fd0bd..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EaseBackOut.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class cc.EaseBackOut :cc.ActionEase -local EaseBackOut={ } -cc.EaseBackOut=EaseBackOut - - - - ----* ----@param action cc.ActionInterval ----@return self -function EaseBackOut:create (action) end ----* ----@return self -function EaseBackOut:clone () end ----* ----@param time float ----@return self -function EaseBackOut:update (time) end ----* ----@return cc.ActionEase -function EaseBackOut:reverse () end ----* ----@return self -function EaseBackOut:EaseBackOut () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EaseBezierAction.lua b/meta/3rd/Cocos4.0/library/cc/EaseBezierAction.lua deleted file mode 100644 index f1e44116..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EaseBezierAction.lua +++ /dev/null @@ -1,35 +0,0 @@ ----@meta - ----@class cc.EaseBezierAction :cc.ActionEase -local EaseBezierAction={ } -cc.EaseBezierAction=EaseBezierAction - - - - ----* brief Set the bezier parameters. ----@param p0 float ----@param p1 float ----@param p2 float ----@param p3 float ----@return self -function EaseBezierAction:setBezierParamer (p0,p1,p2,p3) end ----* brief Create the action with the inner action.
----* param action The pointer of the inner action.
----* return A pointer of EaseBezierAction action. If creation failed, return nil. ----@param action cc.ActionInterval ----@return self -function EaseBezierAction:create (action) end ----* ----@return self -function EaseBezierAction:clone () end ----* ----@param time float ----@return self -function EaseBezierAction:update (time) end ----* ----@return self -function EaseBezierAction:reverse () end ----* ----@return self -function EaseBezierAction:EaseBezierAction () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EaseBounce.lua b/meta/3rd/Cocos4.0/library/cc/EaseBounce.lua deleted file mode 100644 index 341dc7e4..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EaseBounce.lua +++ /dev/null @@ -1,8 +0,0 @@ ----@meta - ----@class cc.EaseBounce :cc.ActionEase -local EaseBounce={ } -cc.EaseBounce=EaseBounce - - - diff --git a/meta/3rd/Cocos4.0/library/cc/EaseBounceIn.lua b/meta/3rd/Cocos4.0/library/cc/EaseBounceIn.lua deleted file mode 100644 index 877e9cd0..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EaseBounceIn.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class cc.EaseBounceIn :cc.ActionEase -local EaseBounceIn={ } -cc.EaseBounceIn=EaseBounceIn - - - - ----* ----@param action cc.ActionInterval ----@return self -function EaseBounceIn:create (action) end ----* ----@return self -function EaseBounceIn:clone () end ----* ----@param time float ----@return self -function EaseBounceIn:update (time) end ----* ----@return cc.ActionEase -function EaseBounceIn:reverse () end ----* ----@return self -function EaseBounceIn:EaseBounceIn () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EaseBounceInOut.lua b/meta/3rd/Cocos4.0/library/cc/EaseBounceInOut.lua deleted file mode 100644 index 2072de5d..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EaseBounceInOut.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class cc.EaseBounceInOut :cc.ActionEase -local EaseBounceInOut={ } -cc.EaseBounceInOut=EaseBounceInOut - - - - ----* ----@param action cc.ActionInterval ----@return self -function EaseBounceInOut:create (action) end ----* ----@return self -function EaseBounceInOut:clone () end ----* ----@param time float ----@return self -function EaseBounceInOut:update (time) end ----* ----@return cc.ActionEase -function EaseBounceInOut:reverse () end ----* ----@return self -function EaseBounceInOut:EaseBounceInOut () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EaseBounceOut.lua b/meta/3rd/Cocos4.0/library/cc/EaseBounceOut.lua deleted file mode 100644 index d4ec0f6a..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EaseBounceOut.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class cc.EaseBounceOut :cc.ActionEase -local EaseBounceOut={ } -cc.EaseBounceOut=EaseBounceOut - - - - ----* ----@param action cc.ActionInterval ----@return self -function EaseBounceOut:create (action) end ----* ----@return self -function EaseBounceOut:clone () end ----* ----@param time float ----@return self -function EaseBounceOut:update (time) end ----* ----@return cc.ActionEase -function EaseBounceOut:reverse () end ----* ----@return self -function EaseBounceOut:EaseBounceOut () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EaseCircleActionIn.lua b/meta/3rd/Cocos4.0/library/cc/EaseCircleActionIn.lua deleted file mode 100644 index c4b1cf18..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EaseCircleActionIn.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class cc.EaseCircleActionIn :cc.ActionEase -local EaseCircleActionIn={ } -cc.EaseCircleActionIn=EaseCircleActionIn - - - - ----* ----@param action cc.ActionInterval ----@return self -function EaseCircleActionIn:create (action) end ----* ----@return self -function EaseCircleActionIn:clone () end ----* ----@param time float ----@return self -function EaseCircleActionIn:update (time) end ----* ----@return cc.ActionEase -function EaseCircleActionIn:reverse () end ----* ----@return self -function EaseCircleActionIn:EaseCircleActionIn () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EaseCircleActionInOut.lua b/meta/3rd/Cocos4.0/library/cc/EaseCircleActionInOut.lua deleted file mode 100644 index ad8aaa92..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EaseCircleActionInOut.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class cc.EaseCircleActionInOut :cc.ActionEase -local EaseCircleActionInOut={ } -cc.EaseCircleActionInOut=EaseCircleActionInOut - - - - ----* ----@param action cc.ActionInterval ----@return self -function EaseCircleActionInOut:create (action) end ----* ----@return self -function EaseCircleActionInOut:clone () end ----* ----@param time float ----@return self -function EaseCircleActionInOut:update (time) end ----* ----@return cc.ActionEase -function EaseCircleActionInOut:reverse () end ----* ----@return self -function EaseCircleActionInOut:EaseCircleActionInOut () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EaseCircleActionOut.lua b/meta/3rd/Cocos4.0/library/cc/EaseCircleActionOut.lua deleted file mode 100644 index e5f8b481..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EaseCircleActionOut.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class cc.EaseCircleActionOut :cc.ActionEase -local EaseCircleActionOut={ } -cc.EaseCircleActionOut=EaseCircleActionOut - - - - ----* ----@param action cc.ActionInterval ----@return self -function EaseCircleActionOut:create (action) end ----* ----@return self -function EaseCircleActionOut:clone () end ----* ----@param time float ----@return self -function EaseCircleActionOut:update (time) end ----* ----@return cc.ActionEase -function EaseCircleActionOut:reverse () end ----* ----@return self -function EaseCircleActionOut:EaseCircleActionOut () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EaseCubicActionIn.lua b/meta/3rd/Cocos4.0/library/cc/EaseCubicActionIn.lua deleted file mode 100644 index d3e714f5..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EaseCubicActionIn.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class cc.EaseCubicActionIn :cc.ActionEase -local EaseCubicActionIn={ } -cc.EaseCubicActionIn=EaseCubicActionIn - - - - ----* ----@param action cc.ActionInterval ----@return self -function EaseCubicActionIn:create (action) end ----* ----@return self -function EaseCubicActionIn:clone () end ----* ----@param time float ----@return self -function EaseCubicActionIn:update (time) end ----* ----@return cc.ActionEase -function EaseCubicActionIn:reverse () end ----* ----@return self -function EaseCubicActionIn:EaseCubicActionIn () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EaseCubicActionInOut.lua b/meta/3rd/Cocos4.0/library/cc/EaseCubicActionInOut.lua deleted file mode 100644 index 38f58f18..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EaseCubicActionInOut.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class cc.EaseCubicActionInOut :cc.ActionEase -local EaseCubicActionInOut={ } -cc.EaseCubicActionInOut=EaseCubicActionInOut - - - - ----* ----@param action cc.ActionInterval ----@return self -function EaseCubicActionInOut:create (action) end ----* ----@return self -function EaseCubicActionInOut:clone () end ----* ----@param time float ----@return self -function EaseCubicActionInOut:update (time) end ----* ----@return cc.ActionEase -function EaseCubicActionInOut:reverse () end ----* ----@return self -function EaseCubicActionInOut:EaseCubicActionInOut () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EaseCubicActionOut.lua b/meta/3rd/Cocos4.0/library/cc/EaseCubicActionOut.lua deleted file mode 100644 index 76ff12db..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EaseCubicActionOut.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class cc.EaseCubicActionOut :cc.ActionEase -local EaseCubicActionOut={ } -cc.EaseCubicActionOut=EaseCubicActionOut - - - - ----* ----@param action cc.ActionInterval ----@return self -function EaseCubicActionOut:create (action) end ----* ----@return self -function EaseCubicActionOut:clone () end ----* ----@param time float ----@return self -function EaseCubicActionOut:update (time) end ----* ----@return cc.ActionEase -function EaseCubicActionOut:reverse () end ----* ----@return self -function EaseCubicActionOut:EaseCubicActionOut () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EaseElastic.lua b/meta/3rd/Cocos4.0/library/cc/EaseElastic.lua deleted file mode 100644 index 9be9bdc9..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EaseElastic.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class cc.EaseElastic :cc.ActionEase -local EaseElastic={ } -cc.EaseElastic=EaseElastic - - - - ----* brief Set period of the wave in radians.
----* param fPeriod The value will be set. ----@param fPeriod float ----@return self -function EaseElastic:setPeriod (fPeriod) end ----* brief Initializes the action with the inner action and the period in radians.
----* param action The pointer of the inner action.
----* param period Period of the wave in radians. Default is 0.3.
----* return Return true when the initialization success, otherwise return false. ----@param action cc.ActionInterval ----@param period float ----@return boolean -function EaseElastic:initWithAction (action,period) end ----* brief Get period of the wave in radians. Default value is 0.3.
----* return Return the period of the wave in radians. ----@return float -function EaseElastic:getPeriod () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EaseElasticIn.lua b/meta/3rd/Cocos4.0/library/cc/EaseElasticIn.lua deleted file mode 100644 index a14a0cde..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EaseElasticIn.lua +++ /dev/null @@ -1,27 +0,0 @@ ----@meta - ----@class cc.EaseElasticIn :cc.EaseElastic -local EaseElasticIn={ } -cc.EaseElasticIn=EaseElasticIn - - - - ----* ----@param action cc.ActionInterval ----@param rate float ----@return self -function EaseElasticIn:create (action,rate) end ----* ----@return self -function EaseElasticIn:clone () end ----* ----@param time float ----@return self -function EaseElasticIn:update (time) end ----* ----@return cc.EaseElastic -function EaseElasticIn:reverse () end ----* ----@return self -function EaseElasticIn:EaseElasticIn () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EaseElasticInOut.lua b/meta/3rd/Cocos4.0/library/cc/EaseElasticInOut.lua deleted file mode 100644 index c4f9feb8..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EaseElasticInOut.lua +++ /dev/null @@ -1,27 +0,0 @@ ----@meta - ----@class cc.EaseElasticInOut :cc.EaseElastic -local EaseElasticInOut={ } -cc.EaseElasticInOut=EaseElasticInOut - - - - ----* ----@param action cc.ActionInterval ----@param rate float ----@return self -function EaseElasticInOut:create (action,rate) end ----* ----@return self -function EaseElasticInOut:clone () end ----* ----@param time float ----@return self -function EaseElasticInOut:update (time) end ----* ----@return cc.EaseElastic -function EaseElasticInOut:reverse () end ----* ----@return self -function EaseElasticInOut:EaseElasticInOut () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EaseElasticOut.lua b/meta/3rd/Cocos4.0/library/cc/EaseElasticOut.lua deleted file mode 100644 index 8ea63ffc..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EaseElasticOut.lua +++ /dev/null @@ -1,27 +0,0 @@ ----@meta - ----@class cc.EaseElasticOut :cc.EaseElastic -local EaseElasticOut={ } -cc.EaseElasticOut=EaseElasticOut - - - - ----* ----@param action cc.ActionInterval ----@param rate float ----@return self -function EaseElasticOut:create (action,rate) end ----* ----@return self -function EaseElasticOut:clone () end ----* ----@param time float ----@return self -function EaseElasticOut:update (time) end ----* ----@return cc.EaseElastic -function EaseElasticOut:reverse () end ----* ----@return self -function EaseElasticOut:EaseElasticOut () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EaseExponentialIn.lua b/meta/3rd/Cocos4.0/library/cc/EaseExponentialIn.lua deleted file mode 100644 index fc96859d..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EaseExponentialIn.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class cc.EaseExponentialIn :cc.ActionEase -local EaseExponentialIn={ } -cc.EaseExponentialIn=EaseExponentialIn - - - - ----* ----@param action cc.ActionInterval ----@return self -function EaseExponentialIn:create (action) end ----* ----@return self -function EaseExponentialIn:clone () end ----* ----@param time float ----@return self -function EaseExponentialIn:update (time) end ----* ----@return cc.ActionEase -function EaseExponentialIn:reverse () end ----* ----@return self -function EaseExponentialIn:EaseExponentialIn () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EaseExponentialInOut.lua b/meta/3rd/Cocos4.0/library/cc/EaseExponentialInOut.lua deleted file mode 100644 index 652983ce..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EaseExponentialInOut.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class cc.EaseExponentialInOut :cc.ActionEase -local EaseExponentialInOut={ } -cc.EaseExponentialInOut=EaseExponentialInOut - - - - ----* ----@param action cc.ActionInterval ----@return self -function EaseExponentialInOut:create (action) end ----* ----@return self -function EaseExponentialInOut:clone () end ----* ----@param time float ----@return self -function EaseExponentialInOut:update (time) end ----* ----@return cc.ActionEase -function EaseExponentialInOut:reverse () end ----* ----@return self -function EaseExponentialInOut:EaseExponentialInOut () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EaseExponentialOut.lua b/meta/3rd/Cocos4.0/library/cc/EaseExponentialOut.lua deleted file mode 100644 index 55499805..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EaseExponentialOut.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class cc.EaseExponentialOut :cc.ActionEase -local EaseExponentialOut={ } -cc.EaseExponentialOut=EaseExponentialOut - - - - ----* ----@param action cc.ActionInterval ----@return self -function EaseExponentialOut:create (action) end ----* ----@return self -function EaseExponentialOut:clone () end ----* ----@param time float ----@return self -function EaseExponentialOut:update (time) end ----* ----@return cc.ActionEase -function EaseExponentialOut:reverse () end ----* ----@return self -function EaseExponentialOut:EaseExponentialOut () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EaseIn.lua b/meta/3rd/Cocos4.0/library/cc/EaseIn.lua deleted file mode 100644 index 0cd1fff3..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EaseIn.lua +++ /dev/null @@ -1,27 +0,0 @@ ----@meta - ----@class cc.EaseIn :cc.EaseRateAction -local EaseIn={ } -cc.EaseIn=EaseIn - - - - ----* ----@param action cc.ActionInterval ----@param rate float ----@return self -function EaseIn:create (action,rate) end ----* ----@return self -function EaseIn:clone () end ----* ----@param time float ----@return self -function EaseIn:update (time) end ----* ----@return cc.EaseRateAction -function EaseIn:reverse () end ----* ----@return self -function EaseIn:EaseIn () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EaseInOut.lua b/meta/3rd/Cocos4.0/library/cc/EaseInOut.lua deleted file mode 100644 index 9f47567e..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EaseInOut.lua +++ /dev/null @@ -1,27 +0,0 @@ ----@meta - ----@class cc.EaseInOut :cc.EaseRateAction -local EaseInOut={ } -cc.EaseInOut=EaseInOut - - - - ----* ----@param action cc.ActionInterval ----@param rate float ----@return self -function EaseInOut:create (action,rate) end ----* ----@return self -function EaseInOut:clone () end ----* ----@param time float ----@return self -function EaseInOut:update (time) end ----* ----@return cc.EaseRateAction -function EaseInOut:reverse () end ----* ----@return self -function EaseInOut:EaseInOut () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EaseOut.lua b/meta/3rd/Cocos4.0/library/cc/EaseOut.lua deleted file mode 100644 index b786c607..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EaseOut.lua +++ /dev/null @@ -1,27 +0,0 @@ ----@meta - ----@class cc.EaseOut :cc.EaseRateAction -local EaseOut={ } -cc.EaseOut=EaseOut - - - - ----* ----@param action cc.ActionInterval ----@param rate float ----@return self -function EaseOut:create (action,rate) end ----* ----@return self -function EaseOut:clone () end ----* ----@param time float ----@return self -function EaseOut:update (time) end ----* ----@return cc.EaseRateAction -function EaseOut:reverse () end ----* ----@return self -function EaseOut:EaseOut () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EaseQuadraticActionIn.lua b/meta/3rd/Cocos4.0/library/cc/EaseQuadraticActionIn.lua deleted file mode 100644 index afdbf7b6..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EaseQuadraticActionIn.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class cc.EaseQuadraticActionIn :cc.ActionEase -local EaseQuadraticActionIn={ } -cc.EaseQuadraticActionIn=EaseQuadraticActionIn - - - - ----* ----@param action cc.ActionInterval ----@return self -function EaseQuadraticActionIn:create (action) end ----* ----@return self -function EaseQuadraticActionIn:clone () end ----* ----@param time float ----@return self -function EaseQuadraticActionIn:update (time) end ----* ----@return cc.ActionEase -function EaseQuadraticActionIn:reverse () end ----* ----@return self -function EaseQuadraticActionIn:EaseQuadraticActionIn () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EaseQuadraticActionInOut.lua b/meta/3rd/Cocos4.0/library/cc/EaseQuadraticActionInOut.lua deleted file mode 100644 index 3638a1db..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EaseQuadraticActionInOut.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class cc.EaseQuadraticActionInOut :cc.ActionEase -local EaseQuadraticActionInOut={ } -cc.EaseQuadraticActionInOut=EaseQuadraticActionInOut - - - - ----* ----@param action cc.ActionInterval ----@return self -function EaseQuadraticActionInOut:create (action) end ----* ----@return self -function EaseQuadraticActionInOut:clone () end ----* ----@param time float ----@return self -function EaseQuadraticActionInOut:update (time) end ----* ----@return cc.ActionEase -function EaseQuadraticActionInOut:reverse () end ----* ----@return self -function EaseQuadraticActionInOut:EaseQuadraticActionInOut () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EaseQuadraticActionOut.lua b/meta/3rd/Cocos4.0/library/cc/EaseQuadraticActionOut.lua deleted file mode 100644 index 1c252fce..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EaseQuadraticActionOut.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class cc.EaseQuadraticActionOut :cc.ActionEase -local EaseQuadraticActionOut={ } -cc.EaseQuadraticActionOut=EaseQuadraticActionOut - - - - ----* ----@param action cc.ActionInterval ----@return self -function EaseQuadraticActionOut:create (action) end ----* ----@return self -function EaseQuadraticActionOut:clone () end ----* ----@param time float ----@return self -function EaseQuadraticActionOut:update (time) end ----* ----@return cc.ActionEase -function EaseQuadraticActionOut:reverse () end ----* ----@return self -function EaseQuadraticActionOut:EaseQuadraticActionOut () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EaseQuarticActionIn.lua b/meta/3rd/Cocos4.0/library/cc/EaseQuarticActionIn.lua deleted file mode 100644 index 97c4152e..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EaseQuarticActionIn.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class cc.EaseQuarticActionIn :cc.ActionEase -local EaseQuarticActionIn={ } -cc.EaseQuarticActionIn=EaseQuarticActionIn - - - - ----* ----@param action cc.ActionInterval ----@return self -function EaseQuarticActionIn:create (action) end ----* ----@return self -function EaseQuarticActionIn:clone () end ----* ----@param time float ----@return self -function EaseQuarticActionIn:update (time) end ----* ----@return cc.ActionEase -function EaseQuarticActionIn:reverse () end ----* ----@return self -function EaseQuarticActionIn:EaseQuarticActionIn () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EaseQuarticActionInOut.lua b/meta/3rd/Cocos4.0/library/cc/EaseQuarticActionInOut.lua deleted file mode 100644 index 96a619dd..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EaseQuarticActionInOut.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class cc.EaseQuarticActionInOut :cc.ActionEase -local EaseQuarticActionInOut={ } -cc.EaseQuarticActionInOut=EaseQuarticActionInOut - - - - ----* ----@param action cc.ActionInterval ----@return self -function EaseQuarticActionInOut:create (action) end ----* ----@return self -function EaseQuarticActionInOut:clone () end ----* ----@param time float ----@return self -function EaseQuarticActionInOut:update (time) end ----* ----@return cc.ActionEase -function EaseQuarticActionInOut:reverse () end ----* ----@return self -function EaseQuarticActionInOut:EaseQuarticActionInOut () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EaseQuarticActionOut.lua b/meta/3rd/Cocos4.0/library/cc/EaseQuarticActionOut.lua deleted file mode 100644 index e96994b4..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EaseQuarticActionOut.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class cc.EaseQuarticActionOut :cc.ActionEase -local EaseQuarticActionOut={ } -cc.EaseQuarticActionOut=EaseQuarticActionOut - - - - ----* ----@param action cc.ActionInterval ----@return self -function EaseQuarticActionOut:create (action) end ----* ----@return self -function EaseQuarticActionOut:clone () end ----* ----@param time float ----@return self -function EaseQuarticActionOut:update (time) end ----* ----@return cc.ActionEase -function EaseQuarticActionOut:reverse () end ----* ----@return self -function EaseQuarticActionOut:EaseQuarticActionOut () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EaseQuinticActionIn.lua b/meta/3rd/Cocos4.0/library/cc/EaseQuinticActionIn.lua deleted file mode 100644 index f913a19a..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EaseQuinticActionIn.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class cc.EaseQuinticActionIn :cc.ActionEase -local EaseQuinticActionIn={ } -cc.EaseQuinticActionIn=EaseQuinticActionIn - - - - ----* ----@param action cc.ActionInterval ----@return self -function EaseQuinticActionIn:create (action) end ----* ----@return self -function EaseQuinticActionIn:clone () end ----* ----@param time float ----@return self -function EaseQuinticActionIn:update (time) end ----* ----@return cc.ActionEase -function EaseQuinticActionIn:reverse () end ----* ----@return self -function EaseQuinticActionIn:EaseQuinticActionIn () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EaseQuinticActionInOut.lua b/meta/3rd/Cocos4.0/library/cc/EaseQuinticActionInOut.lua deleted file mode 100644 index 65640609..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EaseQuinticActionInOut.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class cc.EaseQuinticActionInOut :cc.ActionEase -local EaseQuinticActionInOut={ } -cc.EaseQuinticActionInOut=EaseQuinticActionInOut - - - - ----* ----@param action cc.ActionInterval ----@return self -function EaseQuinticActionInOut:create (action) end ----* ----@return self -function EaseQuinticActionInOut:clone () end ----* ----@param time float ----@return self -function EaseQuinticActionInOut:update (time) end ----* ----@return cc.ActionEase -function EaseQuinticActionInOut:reverse () end ----* ----@return self -function EaseQuinticActionInOut:EaseQuinticActionInOut () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EaseQuinticActionOut.lua b/meta/3rd/Cocos4.0/library/cc/EaseQuinticActionOut.lua deleted file mode 100644 index d6ffd022..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EaseQuinticActionOut.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class cc.EaseQuinticActionOut :cc.ActionEase -local EaseQuinticActionOut={ } -cc.EaseQuinticActionOut=EaseQuinticActionOut - - - - ----* ----@param action cc.ActionInterval ----@return self -function EaseQuinticActionOut:create (action) end ----* ----@return self -function EaseQuinticActionOut:clone () end ----* ----@param time float ----@return self -function EaseQuinticActionOut:update (time) end ----* ----@return cc.ActionEase -function EaseQuinticActionOut:reverse () end ----* ----@return self -function EaseQuinticActionOut:EaseQuinticActionOut () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EaseRateAction.lua b/meta/3rd/Cocos4.0/library/cc/EaseRateAction.lua deleted file mode 100644 index 554b31d9..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EaseRateAction.lua +++ /dev/null @@ -1,31 +0,0 @@ ----@meta - ----@class cc.EaseRateAction :cc.ActionEase -local EaseRateAction={ } -cc.EaseRateAction=EaseRateAction - - - - ----* brief Set the rate value for the ease rate action.
----* param rate The value will be set. ----@param rate float ----@return self -function EaseRateAction:setRate (rate) end ----* brief Initializes the action with the inner action and the rate parameter.
----* param pAction The pointer of the inner action.
----* param fRate The value of the rate parameter.
----* return Return true when the initialization success, otherwise return false. ----@param pAction cc.ActionInterval ----@param fRate float ----@return boolean -function EaseRateAction:initWithAction (pAction,fRate) end ----* brief Get the rate value of the ease rate action.
----* return Return the rate value of the ease rate action. ----@return float -function EaseRateAction:getRate () end ----* ----@param action cc.ActionInterval ----@param rate float ----@return self -function EaseRateAction:create (action,rate) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EaseSineIn.lua b/meta/3rd/Cocos4.0/library/cc/EaseSineIn.lua deleted file mode 100644 index 3b1f42fc..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EaseSineIn.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class cc.EaseSineIn :cc.ActionEase -local EaseSineIn={ } -cc.EaseSineIn=EaseSineIn - - - - ----* ----@param action cc.ActionInterval ----@return self -function EaseSineIn:create (action) end ----* ----@return self -function EaseSineIn:clone () end ----* ----@param time float ----@return self -function EaseSineIn:update (time) end ----* ----@return cc.ActionEase -function EaseSineIn:reverse () end ----* ----@return self -function EaseSineIn:EaseSineIn () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EaseSineInOut.lua b/meta/3rd/Cocos4.0/library/cc/EaseSineInOut.lua deleted file mode 100644 index dd445835..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EaseSineInOut.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class cc.EaseSineInOut :cc.ActionEase -local EaseSineInOut={ } -cc.EaseSineInOut=EaseSineInOut - - - - ----* ----@param action cc.ActionInterval ----@return self -function EaseSineInOut:create (action) end ----* ----@return self -function EaseSineInOut:clone () end ----* ----@param time float ----@return self -function EaseSineInOut:update (time) end ----* ----@return cc.ActionEase -function EaseSineInOut:reverse () end ----* ----@return self -function EaseSineInOut:EaseSineInOut () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EaseSineOut.lua b/meta/3rd/Cocos4.0/library/cc/EaseSineOut.lua deleted file mode 100644 index 62e678b0..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EaseSineOut.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class cc.EaseSineOut :cc.ActionEase -local EaseSineOut={ } -cc.EaseSineOut=EaseSineOut - - - - ----* ----@param action cc.ActionInterval ----@return self -function EaseSineOut:create (action) end ----* ----@return self -function EaseSineOut:clone () end ----* ----@param time float ----@return self -function EaseSineOut:update (time) end ----* ----@return cc.ActionEase -function EaseSineOut:reverse () end ----* ----@return self -function EaseSineOut:EaseSineOut () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Event.lua b/meta/3rd/Cocos4.0/library/cc/Event.lua deleted file mode 100644 index 7055f7a0..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Event.lua +++ /dev/null @@ -1,30 +0,0 @@ ----@meta - ----@class cc.Event :cc.Ref -local Event={ } -cc.Event=Event - - - - ----* Checks whether the event has been stopped.
----* return True if the event has been stopped. ----@return boolean -function Event:isStopped () end ----* Gets the event type.
----* return The event type. ----@return int -function Event:getType () end ----* Gets current target of the event.
----* return The target with which the event associates.
----* note It's only available when the event listener is associated with node.
----* It returns 0 when the listener is associated with fixed priority. ----@return cc.Node -function Event:getCurrentTarget () end ----* Stops propagation for current event. ----@return self -function Event:stopPropagation () end ----* Constructor ----@param type int ----@return self -function Event:Event (type) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EventAcceleration.lua b/meta/3rd/Cocos4.0/library/cc/EventAcceleration.lua deleted file mode 100644 index a85af2d3..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EventAcceleration.lua +++ /dev/null @@ -1,8 +0,0 @@ ----@meta - ----@class cc.EventAcceleration :cc.Event -local EventAcceleration={ } -cc.EventAcceleration=EventAcceleration - - - diff --git a/meta/3rd/Cocos4.0/library/cc/EventAssetsManagerEx.lua b/meta/3rd/Cocos4.0/library/cc/EventAssetsManagerEx.lua deleted file mode 100644 index 952a5ae8..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EventAssetsManagerEx.lua +++ /dev/null @@ -1,45 +0,0 @@ ----@meta - ----@class cc.EventAssetsManagerEx :cc.EventCustom -local EventAssetsManagerEx={ } -cc.EventAssetsManagerEx=EventAssetsManagerEx - - - - ----* ----@return cc.AssetsManagerEx -function EventAssetsManagerEx:getAssetsManagerEx () end ----* ----@return string -function EventAssetsManagerEx:getAssetId () end ----* ----@return int -function EventAssetsManagerEx:getCURLECode () end ----* ----@return string -function EventAssetsManagerEx:getMessage () end ----* ----@return int -function EventAssetsManagerEx:getCURLMCode () end ----* ----@return float -function EventAssetsManagerEx:getPercentByFile () end ----* ----@return int -function EventAssetsManagerEx:getEventCode () end ----* ----@return float -function EventAssetsManagerEx:getPercent () end ----* Constructor ----@param eventName string ----@param manager cc.AssetsManagerEx ----@param code int ----@param percent float ----@param percentByFile float ----@param assetId string ----@param message string ----@param curle_code int ----@param curlm_code int ----@return self -function EventAssetsManagerEx:EventAssetsManagerEx (eventName,manager,code,percent,percentByFile,assetId,message,curle_code,curlm_code) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EventController.lua b/meta/3rd/Cocos4.0/library/cc/EventController.lua deleted file mode 100644 index 3ce0a942..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EventController.lua +++ /dev/null @@ -1,40 +0,0 @@ ----@meta - ----@class cc.EventController :cc.Event -local EventController={ } -cc.EventController=EventController - - - - ----* Gets the event type of the controller.
----* return The event type of the controller. ----@return int -function EventController:getControllerEventType () end ----* Sets the connect status.
----* param True if it's connected. ----@param isConnected boolean ----@return self -function EventController:setConnectStatus (isConnected) end ----* Gets the connect status.
----* return True if it's connected. ----@return boolean -function EventController:isConnected () end ----* ----@param keyCode int ----@return self -function EventController:setKeyCode (keyCode) end ----* ----@return cc.Controller -function EventController:getController () end ----* Gets the key code of the controller.
----* return The key code of the controller. ----@return int -function EventController:getKeyCode () end ----@overload fun(int:int,cc.Controller:cc.Controller,int2:boolean):self ----@overload fun(int:int,cc.Controller:cc.Controller,int:int):self ----@param type int ----@param controller cc.Controller ----@param keyCode int ----@return self -function EventController:EventController (type,controller,keyCode) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EventCustom.lua b/meta/3rd/Cocos4.0/library/cc/EventCustom.lua deleted file mode 100644 index 68cde923..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EventCustom.lua +++ /dev/null @@ -1,19 +0,0 @@ ----@meta - ----@class cc.EventCustom :cc.Event -local EventCustom={ } -cc.EventCustom=EventCustom - - - - ----* Gets event name.
----* return The name of the event. ----@return string -function EventCustom:getEventName () end ----* Constructor.
----* param eventName A given name of the custom event.
----* js ctor ----@param eventName string ----@return self -function EventCustom:EventCustom (eventName) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EventDispatcher.lua b/meta/3rd/Cocos4.0/library/cc/EventDispatcher.lua deleted file mode 100644 index c8298080..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EventDispatcher.lua +++ /dev/null @@ -1,114 +0,0 @@ ----@meta - ----@class cc.EventDispatcher :cc.Ref -local EventDispatcher={ } -cc.EventDispatcher=EventDispatcher - - - - ----* Pauses all listeners which are associated the specified target.
----* param target A given target node.
----* param recursive True if pause recursively, the default value is false. ----@param target cc.Node ----@param recursive boolean ----@return self -function EventDispatcher:pauseEventListenersForTarget (target,recursive) end ----* Adds a event listener for a specified event with the priority of scene graph.
----* param listener The listener of a specified event.
----* param node The priority of the listener is based on the draw order of this node.
----* note The priority of scene graph will be fixed value 0. So the order of listener item
----* in the vector will be ' <0, scene graph (0 priority), >0'. ----@param listener cc.EventListener ----@param node cc.Node ----@return self -function EventDispatcher:addEventListenerWithSceneGraphPriority (listener,node) end ----* Whether to enable dispatching events.
----* param isEnabled True if enable dispatching events. ----@param isEnabled boolean ----@return self -function EventDispatcher:setEnabled (isEnabled) end ----* Adds a event listener for a specified event with the fixed priority.
----* param listener The listener of a specified event.
----* param fixedPriority The fixed priority of the listener.
----* note A lower priority will be called before the ones that have a higher value.
----* 0 priority is forbidden for fixed priority since it's used for scene graph based priority. ----@param listener cc.EventListener ----@param fixedPriority int ----@return self -function EventDispatcher:addEventListenerWithFixedPriority (listener,fixedPriority) end ----* Remove a listener.
----* param listener The specified event listener which needs to be removed. ----@param listener cc.EventListener ----@return self -function EventDispatcher:removeEventListener (listener) end ----* Dispatches a Custom Event with a event name an optional user data.
----* param eventName The name of the event which needs to be dispatched.
----* param optionalUserData The optional user data, it's a void*, the default value is nullptr. ----@param eventName string ----@param optionalUserData void ----@return self -function EventDispatcher:dispatchCustomEvent (eventName,optionalUserData) end ----* Resumes all listeners which are associated the specified target.
----* param target A given target node.
----* param recursive True if resume recursively, the default value is false. ----@param target cc.Node ----@param recursive boolean ----@return self -function EventDispatcher:resumeEventListenersForTarget (target,recursive) end ----* Removes all listeners which are associated with the specified target.
----* param target A given target node.
----* param recursive True if remove recursively, the default value is false. ----@param target cc.Node ----@param recursive boolean ----@return self -function EventDispatcher:removeEventListenersForTarget (target,recursive) end ----* Sets listener's priority with fixed value.
----* param listener A given listener.
----* param fixedPriority The fixed priority value. ----@param listener cc.EventListener ----@param fixedPriority int ----@return self -function EventDispatcher:setPriority (listener,fixedPriority) end ----* Adds a Custom event listener.
----* It will use a fixed priority of 1.
----* param eventName A given name of the event.
----* param callback A given callback method that associated the event name.
----* return the generated event. Needed in order to remove the event from the dispatcher ----@param eventName string ----@param callback function ----@return cc.EventListenerCustom -function EventDispatcher:addCustomEventListener (eventName,callback) end ----* Dispatches the event.
----* Also removes all EventListeners marked for deletion from the
----* event dispatcher list.
----* param event The event needs to be dispatched. ----@param event cc.Event ----@return self -function EventDispatcher:dispatchEvent (event) end ----* Query whether the specified event listener id has been added.
----* param listenerID The listenerID of the event listener id.
----* return True if dispatching events is exist ----@param listenerID string ----@return boolean -function EventDispatcher:hasEventListener (listenerID) end ----* Removes all listeners. ----@return self -function EventDispatcher:removeAllEventListeners () end ----* Removes all custom listeners with the same event name.
----* param customEventName A given event listener name which needs to be removed. ----@param customEventName string ----@return self -function EventDispatcher:removeCustomEventListeners (customEventName) end ----* Checks whether dispatching events is enabled.
----* return True if dispatching events is enabled. ----@return boolean -function EventDispatcher:isEnabled () end ----* Removes all listeners with the same event listener type.
----* param listenerType A given event listener type which needs to be removed. ----@param listenerType int ----@return self -function EventDispatcher:removeEventListenersForType (listenerType) end ----* Constructor of EventDispatcher. ----@return self -function EventDispatcher:EventDispatcher () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EventFocus.lua b/meta/3rd/Cocos4.0/library/cc/EventFocus.lua deleted file mode 100644 index 17265e0a..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EventFocus.lua +++ /dev/null @@ -1,17 +0,0 @@ ----@meta - ----@class cc.EventFocus :cc.Event -local EventFocus={ } -cc.EventFocus=EventFocus - - - - ----* Constructor.
----* param widgetLoseFocus The widget which lose focus.
----* param widgetGetFocus The widget which get focus.
----* js ctor ----@param widgetLoseFocus ccui.Widget ----@param widgetGetFocus ccui.Widget ----@return self -function EventFocus:EventFocus (widgetLoseFocus,widgetGetFocus) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EventKeyboard.lua b/meta/3rd/Cocos4.0/library/cc/EventKeyboard.lua deleted file mode 100644 index 06ef6db5..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EventKeyboard.lua +++ /dev/null @@ -1,17 +0,0 @@ ----@meta - ----@class cc.EventKeyboard :cc.Event -local EventKeyboard={ } -cc.EventKeyboard=EventKeyboard - - - - ----* Constructor.
----* param keyCode A given keycode.
----* param isPressed True if the key is pressed.
----* js ctor ----@param keyCode int ----@param isPressed boolean ----@return self -function EventKeyboard:EventKeyboard (keyCode,isPressed) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EventListener.lua b/meta/3rd/Cocos4.0/library/cc/EventListener.lua deleted file mode 100644 index eb3cc6a5..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EventListener.lua +++ /dev/null @@ -1,29 +0,0 @@ ----@meta - ----@class cc.EventListener :cc.Ref -local EventListener={ } -cc.EventListener=EventListener - - - - ----* Enables or disables the listener.
----* note Only listeners with `enabled` state will be able to receive events.
----* When an listener was initialized, it's enabled by default.
----* An event listener can receive events when it is enabled and is not paused.
----* paused state is always false when it is a fixed priority listener.
----* param enabled True if enables the listener. ----@param enabled boolean ----@return self -function EventListener:setEnabled (enabled) end ----* Checks whether the listener is enabled.
----* return True if the listener is enabled. ----@return boolean -function EventListener:isEnabled () end ----* Clones the listener, its subclasses have to override this method. ----@return self -function EventListener:clone () end ----* Checks whether the listener is available.
----* return True if the listener is available. ----@return boolean -function EventListener:checkAvailable () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EventListenerAcceleration.lua b/meta/3rd/Cocos4.0/library/cc/EventListenerAcceleration.lua deleted file mode 100644 index a162ebe8..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EventListenerAcceleration.lua +++ /dev/null @@ -1,22 +0,0 @@ ----@meta - ----@class cc.EventListenerAcceleration :cc.EventListener -local EventListenerAcceleration={ } -cc.EventListenerAcceleration=EventListenerAcceleration - - - - ----* ----@param callback function ----@return boolean -function EventListenerAcceleration:init (callback) end ----* / Overrides ----@return self -function EventListenerAcceleration:clone () end ----* ----@return boolean -function EventListenerAcceleration:checkAvailable () end ----* ----@return self -function EventListenerAcceleration:EventListenerAcceleration () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EventListenerAssetsManagerEx.lua b/meta/3rd/Cocos4.0/library/cc/EventListenerAssetsManagerEx.lua deleted file mode 100644 index 55e37f25..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EventListenerAssetsManagerEx.lua +++ /dev/null @@ -1,23 +0,0 @@ ----@meta - ----@class cc.EventListenerAssetsManagerEx :cc.EventListenerCustom -local EventListenerAssetsManagerEx={ } -cc.EventListenerAssetsManagerEx=EventListenerAssetsManagerEx - - - - ----* Initializes event with type and callback function ----@param AssetsManagerEx cc.AssetsManagerEx ----@param callback function ----@return boolean -function EventListenerAssetsManagerEx:init (AssetsManagerEx,callback) end ----* ----@return self -function EventListenerAssetsManagerEx:clone () end ----* / Overrides ----@return boolean -function EventListenerAssetsManagerEx:checkAvailable () end ----* Constructor ----@return self -function EventListenerAssetsManagerEx:EventListenerAssetsManagerEx () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EventListenerController.lua b/meta/3rd/Cocos4.0/library/cc/EventListenerController.lua deleted file mode 100644 index 81db209f..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EventListenerController.lua +++ /dev/null @@ -1,19 +0,0 @@ ----@meta - ----@class cc.EventListenerController :cc.EventListener -local EventListenerController={ } -cc.EventListenerController=EventListenerController - - - - ----* Create a controller event listener.
----* return An autoreleased EventListenerController object. ----@return self -function EventListenerController:create () end ----* ----@return self -function EventListenerController:clone () end ----* / Overrides ----@return boolean -function EventListenerController:checkAvailable () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EventListenerCustom.lua b/meta/3rd/Cocos4.0/library/cc/EventListenerCustom.lua deleted file mode 100644 index d553d212..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EventListenerCustom.lua +++ /dev/null @@ -1,18 +0,0 @@ ----@meta - ----@class cc.EventListenerCustom :cc.EventListener -local EventListenerCustom={ } -cc.EventListenerCustom=EventListenerCustom - - - - ----* ----@return self -function EventListenerCustom:clone () end ----* / Overrides ----@return boolean -function EventListenerCustom:checkAvailable () end ----* Constructor ----@return self -function EventListenerCustom:EventListenerCustom () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EventListenerFocus.lua b/meta/3rd/Cocos4.0/library/cc/EventListenerFocus.lua deleted file mode 100644 index 1cb7cda8..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EventListenerFocus.lua +++ /dev/null @@ -1,21 +0,0 @@ ----@meta - ----@class cc.EventListenerFocus :cc.EventListener -local EventListenerFocus={ } -cc.EventListenerFocus=EventListenerFocus - - - - ----* ----@return boolean -function EventListenerFocus:init () end ----* / Overrides ----@return self -function EventListenerFocus:clone () end ----* ----@return boolean -function EventListenerFocus:checkAvailable () end ----* ----@return self -function EventListenerFocus:EventListenerFocus () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EventListenerKeyboard.lua b/meta/3rd/Cocos4.0/library/cc/EventListenerKeyboard.lua deleted file mode 100644 index 2f1102ba..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EventListenerKeyboard.lua +++ /dev/null @@ -1,21 +0,0 @@ ----@meta - ----@class cc.EventListenerKeyboard :cc.EventListener -local EventListenerKeyboard={ } -cc.EventListenerKeyboard=EventListenerKeyboard - - - - ----* ----@return boolean -function EventListenerKeyboard:init () end ----* / Overrides ----@return self -function EventListenerKeyboard:clone () end ----* ----@return boolean -function EventListenerKeyboard:checkAvailable () end ----* ----@return self -function EventListenerKeyboard:EventListenerKeyboard () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EventListenerMouse.lua b/meta/3rd/Cocos4.0/library/cc/EventListenerMouse.lua deleted file mode 100644 index 0de14fd0..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EventListenerMouse.lua +++ /dev/null @@ -1,21 +0,0 @@ ----@meta - ----@class cc.EventListenerMouse :cc.EventListener -local EventListenerMouse={ } -cc.EventListenerMouse=EventListenerMouse - - - - ----* ----@return boolean -function EventListenerMouse:init () end ----* / Overrides ----@return self -function EventListenerMouse:clone () end ----* ----@return boolean -function EventListenerMouse:checkAvailable () end ----* ----@return self -function EventListenerMouse:EventListenerMouse () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EventListenerPhysicsContact.lua b/meta/3rd/Cocos4.0/library/cc/EventListenerPhysicsContact.lua deleted file mode 100644 index 42722cff..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EventListenerPhysicsContact.lua +++ /dev/null @@ -1,19 +0,0 @@ ----@meta - ----@class cc.EventListenerPhysicsContact :cc.EventListenerCustom -local EventListenerPhysicsContact={ } -cc.EventListenerPhysicsContact=EventListenerPhysicsContact - - - - ----* Create the listener. ----@return self -function EventListenerPhysicsContact:create () end ----* Clone an object from this listener. ----@return self -function EventListenerPhysicsContact:clone () end ----* Check the listener is available.
----* return True if there's one available callback function at least, false if there's no one. ----@return boolean -function EventListenerPhysicsContact:checkAvailable () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EventListenerPhysicsContactWithBodies.lua b/meta/3rd/Cocos4.0/library/cc/EventListenerPhysicsContactWithBodies.lua deleted file mode 100644 index ec64ae38..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EventListenerPhysicsContactWithBodies.lua +++ /dev/null @@ -1,22 +0,0 @@ ----@meta - ----@class cc.EventListenerPhysicsContactWithBodies :cc.EventListenerPhysicsContact -local EventListenerPhysicsContactWithBodies={ } -cc.EventListenerPhysicsContactWithBodies=EventListenerPhysicsContactWithBodies - - - - ----* ----@param shapeA cc.PhysicsShape ----@param shapeB cc.PhysicsShape ----@return boolean -function EventListenerPhysicsContactWithBodies:hitTest (shapeA,shapeB) end ----* Create the listener. ----@param bodyA cc.PhysicsBody ----@param bodyB cc.PhysicsBody ----@return self -function EventListenerPhysicsContactWithBodies:create (bodyA,bodyB) end ----* ----@return self -function EventListenerPhysicsContactWithBodies:clone () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EventListenerPhysicsContactWithGroup.lua b/meta/3rd/Cocos4.0/library/cc/EventListenerPhysicsContactWithGroup.lua deleted file mode 100644 index 259bc1f4..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EventListenerPhysicsContactWithGroup.lua +++ /dev/null @@ -1,21 +0,0 @@ ----@meta - ----@class cc.EventListenerPhysicsContactWithGroup :cc.EventListenerPhysicsContact -local EventListenerPhysicsContactWithGroup={ } -cc.EventListenerPhysicsContactWithGroup=EventListenerPhysicsContactWithGroup - - - - ----* ----@param shapeA cc.PhysicsShape ----@param shapeB cc.PhysicsShape ----@return boolean -function EventListenerPhysicsContactWithGroup:hitTest (shapeA,shapeB) end ----* Create the listener. ----@param group int ----@return self -function EventListenerPhysicsContactWithGroup:create (group) end ----* ----@return self -function EventListenerPhysicsContactWithGroup:clone () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EventListenerPhysicsContactWithShapes.lua b/meta/3rd/Cocos4.0/library/cc/EventListenerPhysicsContactWithShapes.lua deleted file mode 100644 index b1c619df..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EventListenerPhysicsContactWithShapes.lua +++ /dev/null @@ -1,22 +0,0 @@ ----@meta - ----@class cc.EventListenerPhysicsContactWithShapes :cc.EventListenerPhysicsContact -local EventListenerPhysicsContactWithShapes={ } -cc.EventListenerPhysicsContactWithShapes=EventListenerPhysicsContactWithShapes - - - - ----* ----@param shapeA cc.PhysicsShape ----@param shapeB cc.PhysicsShape ----@return boolean -function EventListenerPhysicsContactWithShapes:hitTest (shapeA,shapeB) end ----* Create the listener. ----@param shapeA cc.PhysicsShape ----@param shapeB cc.PhysicsShape ----@return self -function EventListenerPhysicsContactWithShapes:create (shapeA,shapeB) end ----* ----@return self -function EventListenerPhysicsContactWithShapes:clone () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EventListenerTouchAllAtOnce.lua b/meta/3rd/Cocos4.0/library/cc/EventListenerTouchAllAtOnce.lua deleted file mode 100644 index 70fece9f..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EventListenerTouchAllAtOnce.lua +++ /dev/null @@ -1,21 +0,0 @@ ----@meta - ----@class cc.EventListenerTouchAllAtOnce :cc.EventListener -local EventListenerTouchAllAtOnce={ } -cc.EventListenerTouchAllAtOnce=EventListenerTouchAllAtOnce - - - - ----* ----@return boolean -function EventListenerTouchAllAtOnce:init () end ----* / Overrides ----@return self -function EventListenerTouchAllAtOnce:clone () end ----* ----@return boolean -function EventListenerTouchAllAtOnce:checkAvailable () end ----* ----@return self -function EventListenerTouchAllAtOnce:EventListenerTouchAllAtOnce () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EventListenerTouchOneByOne.lua b/meta/3rd/Cocos4.0/library/cc/EventListenerTouchOneByOne.lua deleted file mode 100644 index 8f2fc78a..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EventListenerTouchOneByOne.lua +++ /dev/null @@ -1,30 +0,0 @@ ----@meta - ----@class cc.EventListenerTouchOneByOne :cc.EventListener -local EventListenerTouchOneByOne={ } -cc.EventListenerTouchOneByOne=EventListenerTouchOneByOne - - - - ----* Is swall touches or not.
----* return True if needs to swall touches. ----@return boolean -function EventListenerTouchOneByOne:isSwallowTouches () end ----* Whether or not to swall touches.
----* param needSwallow True if needs to swall touches. ----@param needSwallow boolean ----@return self -function EventListenerTouchOneByOne:setSwallowTouches (needSwallow) end ----* ----@return boolean -function EventListenerTouchOneByOne:init () end ----* / Overrides ----@return self -function EventListenerTouchOneByOne:clone () end ----* ----@return boolean -function EventListenerTouchOneByOne:checkAvailable () end ----* ----@return self -function EventListenerTouchOneByOne:EventListenerTouchOneByOne () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EventMouse.lua b/meta/3rd/Cocos4.0/library/cc/EventMouse.lua deleted file mode 100644 index f611c342..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EventMouse.lua +++ /dev/null @@ -1,91 +0,0 @@ ----@meta - ----@class cc.EventMouse :cc.Event -local EventMouse={ } -cc.EventMouse=EventMouse - - - - ----* Returns the previous touch location in screen coordinates.
----* return The previous touch location in screen coordinates.
----* js NA ----@return vec2_table -function EventMouse:getPreviousLocationInView () end ----* Returns the current touch location in OpenGL coordinates.
----* return The current touch location in OpenGL coordinates. ----@return vec2_table -function EventMouse:getLocation () end ----* Get mouse button.
----* return The mouse button.
----* js getButton ----@return int -function EventMouse:getMouseButton () end ----* Returns the previous touch location in OpenGL coordinates.
----* return The previous touch location in OpenGL coordinates.
----* js NA ----@return vec2_table -function EventMouse:getPreviousLocation () end ----* Returns the delta of 2 current touches locations in screen coordinates.
----* return The delta of 2 current touches locations in screen coordinates. ----@return vec2_table -function EventMouse:getDelta () end ----* Set mouse scroll data.
----* param scrollX The scroll data of x axis.
----* param scrollY The scroll data of y axis. ----@param scrollX float ----@param scrollY float ----@return self -function EventMouse:setScrollData (scrollX,scrollY) end ----* Returns the start touch location in screen coordinates.
----* return The start touch location in screen coordinates.
----* js NA ----@return vec2_table -function EventMouse:getStartLocationInView () end ----* Returns the start touch location in OpenGL coordinates.
----* return The start touch location in OpenGL coordinates.
----* js NA ----@return vec2_table -function EventMouse:getStartLocation () end ----* Set mouse button.
----* param button a given mouse button.
----* js setButton ----@param button int ----@return self -function EventMouse:setMouseButton (button) end ----* Returns the current touch location in screen coordinates.
----* return The current touch location in screen coordinates. ----@return vec2_table -function EventMouse:getLocationInView () end ----* Get mouse scroll data of y axis.
----* return The scroll data of y axis. ----@return float -function EventMouse:getScrollY () end ----* Get mouse scroll data of x axis.
----* return The scroll data of x axis. ----@return float -function EventMouse:getScrollX () end ----* Get the cursor position of x axis.
----* return The x coordinate of cursor position.
----* js getLocationX ----@return float -function EventMouse:getCursorX () end ----* Get the cursor position of y axis.
----* return The y coordinate of cursor position.
----* js getLocationY ----@return float -function EventMouse:getCursorY () end ----* Set the cursor position.
----* param x The x coordinate of cursor position.
----* param y The y coordinate of cursor position.
----* js setLocation ----@param x float ----@param y float ----@return self -function EventMouse:setCursorPosition (x,y) end ----* Constructor.
----* param mouseEventCode A given mouse event type.
----* js ctor ----@param mouseEventCode int ----@return self -function EventMouse:EventMouse (mouseEventCode) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/EventTouch.lua b/meta/3rd/Cocos4.0/library/cc/EventTouch.lua deleted file mode 100644 index 78eb0007..00000000 --- a/meta/3rd/Cocos4.0/library/cc/EventTouch.lua +++ /dev/null @@ -1,22 +0,0 @@ ----@meta - ----@class cc.EventTouch :cc.Event -local EventTouch={ } -cc.EventTouch=EventTouch - - - - ----* Get event code.
----* return The code of the event. ----@return int -function EventTouch:getEventCode () end ----* Set the event code.
----* param eventCode A given EventCode. ----@param eventCode int ----@return self -function EventTouch:setEventCode (eventCode) end ----* Constructor.
----* js NA ----@return self -function EventTouch:EventTouch () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/FadeIn.lua b/meta/3rd/Cocos4.0/library/cc/FadeIn.lua deleted file mode 100644 index adad8d33..00000000 --- a/meta/3rd/Cocos4.0/library/cc/FadeIn.lua +++ /dev/null @@ -1,32 +0,0 @@ ----@meta - ----@class cc.FadeIn :cc.FadeTo -local FadeIn={ } -cc.FadeIn=FadeIn - - - - ----* js NA ----@param ac cc.FadeTo ----@return self -function FadeIn:setReverseAction (ac) end ----* Creates the action.
----* param d Duration time, in seconds.
----* return An autoreleased FadeIn object. ----@param d float ----@return self -function FadeIn:create (d) end ----* ----@param target cc.Node ----@return self -function FadeIn:startWithTarget (target) end ----* ----@return self -function FadeIn:clone () end ----* ----@return cc.FadeTo -function FadeIn:reverse () end ----* ----@return self -function FadeIn:FadeIn () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/FadeOut.lua b/meta/3rd/Cocos4.0/library/cc/FadeOut.lua deleted file mode 100644 index 1162eef2..00000000 --- a/meta/3rd/Cocos4.0/library/cc/FadeOut.lua +++ /dev/null @@ -1,31 +0,0 @@ ----@meta - ----@class cc.FadeOut :cc.FadeTo -local FadeOut={ } -cc.FadeOut=FadeOut - - - - ----* js NA ----@param ac cc.FadeTo ----@return self -function FadeOut:setReverseAction (ac) end ----* Creates the action.
----* param d Duration time, in seconds. ----@param d float ----@return self -function FadeOut:create (d) end ----* ----@param target cc.Node ----@return self -function FadeOut:startWithTarget (target) end ----* ----@return self -function FadeOut:clone () end ----* ----@return cc.FadeTo -function FadeOut:reverse () end ----* ----@return self -function FadeOut:FadeOut () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/FadeOutBLTiles.lua b/meta/3rd/Cocos4.0/library/cc/FadeOutBLTiles.lua deleted file mode 100644 index c053df86..00000000 --- a/meta/3rd/Cocos4.0/library/cc/FadeOutBLTiles.lua +++ /dev/null @@ -1,28 +0,0 @@ ----@meta - ----@class cc.FadeOutBLTiles :cc.FadeOutTRTiles -local FadeOutBLTiles={ } -cc.FadeOutBLTiles=FadeOutBLTiles - - - - ----* brief Create the action with the grid size and the duration.
----* param duration Specify the duration of the FadeOutBLTiles action. It's a value in seconds.
----* param gridSize Specify the size of the grid.
----* return If the creation success, return a pointer of FadeOutBLTiles action; otherwise, return nil. ----@param duration float ----@param gridSize size_table ----@return self -function FadeOutBLTiles:create (duration,gridSize) end ----* ----@return self -function FadeOutBLTiles:clone () end ----* ----@param pos size_table ----@param time float ----@return float -function FadeOutBLTiles:testFunc (pos,time) end ----* ----@return self -function FadeOutBLTiles:FadeOutBLTiles () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/FadeOutDownTiles.lua b/meta/3rd/Cocos4.0/library/cc/FadeOutDownTiles.lua deleted file mode 100644 index 59b76c4f..00000000 --- a/meta/3rd/Cocos4.0/library/cc/FadeOutDownTiles.lua +++ /dev/null @@ -1,28 +0,0 @@ ----@meta - ----@class cc.FadeOutDownTiles :cc.FadeOutUpTiles -local FadeOutDownTiles={ } -cc.FadeOutDownTiles=FadeOutDownTiles - - - - ----* brief Create the action with the grid size and the duration.
----* param duration Specify the duration of the FadeOutDownTiles action. It's a value in seconds.
----* param gridSize Specify the size of the grid.
----* return If the creation success, return a pointer of FadeOutDownTiles action; otherwise, return nil. ----@param duration float ----@param gridSize size_table ----@return self -function FadeOutDownTiles:create (duration,gridSize) end ----* ----@return self -function FadeOutDownTiles:clone () end ----* ----@param pos size_table ----@param time float ----@return float -function FadeOutDownTiles:testFunc (pos,time) end ----* ----@return self -function FadeOutDownTiles:FadeOutDownTiles () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/FadeOutTRTiles.lua b/meta/3rd/Cocos4.0/library/cc/FadeOutTRTiles.lua deleted file mode 100644 index c753534b..00000000 --- a/meta/3rd/Cocos4.0/library/cc/FadeOutTRTiles.lua +++ /dev/null @@ -1,52 +0,0 @@ ----@meta - ----@class cc.FadeOutTRTiles :cc.TiledGrid3DAction -local FadeOutTRTiles={ } -cc.FadeOutTRTiles=FadeOutTRTiles - - - - ----* brief Show the tile at specified position.
----* param pos The position index of the tile should be shown. ----@param pos vec2_table ----@return self -function FadeOutTRTiles:turnOnTile (pos) end ----* brief Hide the tile at specified position.
----* param pos The position index of the tile should be hide. ----@param pos vec2_table ----@return self -function FadeOutTRTiles:turnOffTile (pos) end ----* brief Show part of the tile.
----* param pos The position index of the tile should be shown.
----* param distance The percentage that the tile should be shown. ----@param pos vec2_table ----@param distance float ----@return self -function FadeOutTRTiles:transformTile (pos,distance) end ----* brief Calculate the percentage a tile should be shown.
----* param pos The position index of the tile.
----* param time The current percentage of the action.
----* return Return the percentage the tile should be shown. ----@param pos size_table ----@param time float ----@return float -function FadeOutTRTiles:testFunc (pos,time) end ----* brief Create the action with the grid size and the duration.
----* param duration Specify the duration of the FadeOutTRTiles action. It's a value in seconds.
----* param gridSize Specify the size of the grid.
----* return If the creation success, return a pointer of FadeOutTRTiles action; otherwise, return nil. ----@param duration float ----@param gridSize size_table ----@return self -function FadeOutTRTiles:create (duration,gridSize) end ----* ----@return self -function FadeOutTRTiles:clone () end ----* ----@param time float ----@return self -function FadeOutTRTiles:update (time) end ----* ----@return self -function FadeOutTRTiles:FadeOutTRTiles () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/FadeOutUpTiles.lua b/meta/3rd/Cocos4.0/library/cc/FadeOutUpTiles.lua deleted file mode 100644 index 2e5f8389..00000000 --- a/meta/3rd/Cocos4.0/library/cc/FadeOutUpTiles.lua +++ /dev/null @@ -1,33 +0,0 @@ ----@meta - ----@class cc.FadeOutUpTiles :cc.FadeOutTRTiles -local FadeOutUpTiles={ } -cc.FadeOutUpTiles=FadeOutUpTiles - - - - ----* brief Create the action with the grid size and the duration.
----* param duration Specify the duration of the FadeOutUpTiles action. It's a value in seconds.
----* param gridSize Specify the size of the grid.
----* return If the creation success, return a pointer of FadeOutUpTiles action; otherwise, return nil. ----@param duration float ----@param gridSize size_table ----@return self -function FadeOutUpTiles:create (duration,gridSize) end ----* ----@return self -function FadeOutUpTiles:clone () end ----* ----@param pos vec2_table ----@param distance float ----@return self -function FadeOutUpTiles:transformTile (pos,distance) end ----* ----@param pos size_table ----@param time float ----@return float -function FadeOutUpTiles:testFunc (pos,time) end ----* ----@return self -function FadeOutUpTiles:FadeOutUpTiles () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/FadeTo.lua b/meta/3rd/Cocos4.0/library/cc/FadeTo.lua deleted file mode 100644 index 0e775a6c..00000000 --- a/meta/3rd/Cocos4.0/library/cc/FadeTo.lua +++ /dev/null @@ -1,40 +0,0 @@ ----@meta - ----@class cc.FadeTo :cc.ActionInterval -local FadeTo={ } -cc.FadeTo=FadeTo - - - - ----* initializes the action with duration and opacity
----* param duration in seconds ----@param duration float ----@param opacity unsigned_char ----@return boolean -function FadeTo:initWithDuration (duration,opacity) end ----* Creates an action with duration and opacity.
----* param duration Duration time, in seconds.
----* param opacity A certain opacity, the range is from 0 to 255.
----* return An autoreleased FadeTo object. ----@param duration float ----@param opacity unsigned_char ----@return self -function FadeTo:create (duration,opacity) end ----* ----@param target cc.Node ----@return self -function FadeTo:startWithTarget (target) end ----* ----@return self -function FadeTo:clone () end ----* ----@return self -function FadeTo:reverse () end ----* param time In seconds. ----@param time float ----@return self -function FadeTo:update (time) end ----* ----@return self -function FadeTo:FadeTo () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/FastTMXLayer.lua b/meta/3rd/Cocos4.0/library/cc/FastTMXLayer.lua deleted file mode 100644 index 1abec899..00000000 --- a/meta/3rd/Cocos4.0/library/cc/FastTMXLayer.lua +++ /dev/null @@ -1,135 +0,0 @@ ----@meta - ----@class cc.FastTMXLayer :cc.Node -local FastTMXLayer={ } -cc.FastTMXLayer=FastTMXLayer - - - - ----* Returns the position in points of a given tile coordinate.
----* param tileCoordinate The tile Coordinate.
----* return The position in points of a given tile coordinate. ----@param tileCoordinate vec2_table ----@return vec2_table -function FastTMXLayer:getPositionAt (tileCoordinate) end ----* Set Layer orientation, which is the same as the map orientation.
----* param orientation Layer orientation, which is the same as the map orientation. ----@param orientation int ----@return self -function FastTMXLayer:setLayerOrientation (orientation) end ----* Size of the layer in tiles.
----* return Size of the layer in tiles. ----@return size_table -function FastTMXLayer:getLayerSize () end ----* Set the size of the map's tile.
----* param size The new size of the map's tile. ----@param size size_table ----@return self -function FastTMXLayer:setMapTileSize (size) end ----* Layer orientation, which is the same as the map orientation.
----* return Layer orientation, which is the same as the map orientation. ----@return int -function FastTMXLayer:getLayerOrientation () end ----* Set the properties to the layer.
----* param properties The properties to the layer. ----@param properties map_table ----@return self -function FastTMXLayer:setProperties (properties) end ----* Set the tile layer name.
----* param layerName The new layer name. ----@param layerName string ----@return self -function FastTMXLayer:setLayerName (layerName) end ----* Removes a tile at given tile coordinate.
----* param tileCoordinate The tile Coordinate. ----@param tileCoordinate vec2_table ----@return self -function FastTMXLayer:removeTileAt (tileCoordinate) end ----@overload fun():self ----@overload fun():self ----@return map_table -function FastTMXLayer:getProperties () end ----* Creates the tiles. ----@return self -function FastTMXLayer:setupTiles () end ----* Set an sprite to the tile,with the tile coordinate and gid.
----* param sprite A Sprite.
----* param pos The tile coordinate.
----* param gid The tile gid. ----@param sprite cc.Sprite ----@param pos vec2_table ----@param gid unsigned_int ----@return self -function FastTMXLayer:setupTileSprite (sprite,pos,gid) end ----@overload fun(int:int,vec2_table:vec2_table,int:int):self ----@overload fun(int:int,vec2_table:vec2_table):self ----@param gid int ----@param tileCoordinate vec2_table ----@param flags int ----@return self -function FastTMXLayer:setTileGID (gid,tileCoordinate,flags) end ----* Size of the map's tile (could be different from the tile's size).
----* return Size of the map's tile (could be different from the tile's size). ----@return size_table -function FastTMXLayer:getMapTileSize () end ----* Return the value for the specific property name.
----* param propertyName The value for the specific property name.
----* return The value for the specific property name. ----@param propertyName string ----@return cc.Value -function FastTMXLayer:getProperty (propertyName) end ----* Set the size of the layer in tiles.
----* param size The new size of the layer in tiles. ----@param size size_table ----@return self -function FastTMXLayer:setLayerSize (size) end ----* Get the tile layer name.
----* return The tile layer name. ----@return string -function FastTMXLayer:getLayerName () end ----* Set the tileset information for the layer.
----* param info The new tileset information for the layer. ----@param info cc.TMXTilesetInfo ----@return self -function FastTMXLayer:setTileSet (info) end ----* Tileset information for the layer.
----* return Tileset information for the layer. ----@return cc.TMXTilesetInfo -function FastTMXLayer:getTileSet () end ----* Returns the tile (Sprite) at a given a tile coordinate.
----* The returned Sprite will be already added to the TMXLayer. Don't add it again.
----* The Sprite can be treated like any other Sprite: rotated, scaled, translated, opacity, color, etc.
----* You can remove either by calling:
----* - layer->removeChild(sprite, cleanup);
----* return Returns the tile (Sprite) at a given a tile coordinate. ----@param tileCoordinate vec2_table ----@return cc.Sprite -function FastTMXLayer:getTileAt (tileCoordinate) end ----* Creates a FastTMXLayer with an tileset info, a layer info and a map info.
----* param tilesetInfo An tileset info.
----* param layerInfo A layer info.
----* param mapInfo A map info.
----* return Return an autorelease object. ----@param tilesetInfo cc.TMXTilesetInfo ----@param layerInfo cc.TMXLayerInfo ----@param mapInfo cc.TMXMapInfo ----@return self -function FastTMXLayer:create (tilesetInfo,layerInfo,mapInfo) end ----* ----@param child cc.Node ----@param cleanup boolean ----@return self -function FastTMXLayer:removeChild (child,cleanup) end ----* ----@param renderer cc.Renderer ----@param transform mat4_table ----@param flags unsigned_int ----@return self -function FastTMXLayer:draw (renderer,transform,flags) end ----* ----@return string -function FastTMXLayer:getDescription () end ----* js ctor ----@return self -function FastTMXLayer:FastTMXLayer () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/FastTMXTiledMap.lua b/meta/3rd/Cocos4.0/library/cc/FastTMXTiledMap.lua deleted file mode 100644 index a35cf02c..00000000 --- a/meta/3rd/Cocos4.0/library/cc/FastTMXTiledMap.lua +++ /dev/null @@ -1,90 +0,0 @@ ----@meta - ----@class cc.FastTMXTiledMap :cc.Node -local FastTMXTiledMap={ } -cc.FastTMXTiledMap=FastTMXTiledMap - - - - ----* Set object groups.
----* param groups An object groups. ----@param groups array_table ----@return self -function FastTMXTiledMap:setObjectGroups (groups) end ----* Return the value for the specific property name.
----* return Return the value for the specific property name. ----@param propertyName string ----@return cc.Value -function FastTMXTiledMap:getProperty (propertyName) end ----* Set the map's size property measured in tiles.
----* param mapSize The map's size property measured in tiles. ----@param mapSize size_table ----@return self -function FastTMXTiledMap:setMapSize (mapSize) end ----* Return the TMXObjectGroup for the specific group.
----* return Return the TMXObjectGroup for the specific group. ----@param groupName string ----@return cc.TMXObjectGroup -function FastTMXTiledMap:getObjectGroup (groupName) end ----@overload fun():self ----@overload fun():self ----@return array_table -function FastTMXTiledMap:getObjectGroups () end ----* The tiles's size property measured in pixels.
----* return The tiles's size property measured in pixels. ----@return size_table -function FastTMXTiledMap:getTileSize () end ----* The map's size property measured in tiles.
----* return The map's size property measured in tiles. ----@return size_table -function FastTMXTiledMap:getMapSize () end ----* Get properties.
----* return Properties. ----@return map_table -function FastTMXTiledMap:getProperties () end ----* Return properties dictionary for tile GID.
----* return Return properties dictionary for tile GID. ----@param GID int ----@return cc.Value -function FastTMXTiledMap:getPropertiesForGID (GID) end ----* Set the tiles's size property measured in pixels.
----* param tileSize The tiles's size property measured in pixels. ----@param tileSize size_table ----@return self -function FastTMXTiledMap:setTileSize (tileSize) end ----* Set properties.
----* param properties An ValueMap Properties. ----@param properties map_table ----@return self -function FastTMXTiledMap:setProperties (properties) end ----* Return the FastTMXLayer for the specific layer.
----* return Return the FastTMXLayer for the specific layer. ----@param layerName string ----@return cc.FastTMXLayer -function FastTMXTiledMap:getLayer (layerName) end ----* Get map orientation.
----* return The map orientation. ----@return int -function FastTMXTiledMap:getMapOrientation () end ----* Set map orientation.
----* param mapOrientation The map orientation. ----@param mapOrientation int ----@return self -function FastTMXTiledMap:setMapOrientation (mapOrientation) end ----* Creates a TMX Tiled Map with a TMX file.
----* return An autorelease object. ----@param tmxFile string ----@return self -function FastTMXTiledMap:create (tmxFile) end ----* Initializes a TMX Tiled Map with a TMX formatted XML string and a path to TMX resources.
----* param tmxString A TMX formatted XML string.
----* param resourcePath A path to TMX resources.
----* return An autorelease object. ----@param tmxString string ----@param resourcePath string ----@return self -function FastTMXTiledMap:createWithXML (tmxString,resourcePath) end ----* ----@return string -function FastTMXTiledMap:getDescription () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/FileUtils.lua b/meta/3rd/Cocos4.0/library/cc/FileUtils.lua deleted file mode 100644 index 290756c3..00000000 --- a/meta/3rd/Cocos4.0/library/cc/FileUtils.lua +++ /dev/null @@ -1,343 +0,0 @@ ----@meta - ----@class cc.FileUtils -local FileUtils={ } -cc.FileUtils=FileUtils - - - - ----* Returns the fullpath for a given filename.
----* First it will try to get a new filename from the "filenameLookup" dictionary.
----* If a new filename can't be found on the dictionary, it will use the original filename.
----* Then it will try to obtain the full path of the filename using the FileUtils search rules: resolutions, and search paths.
----* The file search is based on the array element order of search paths and resolution directories.
----* For instance:
----* We set two elements("/mnt/sdcard/", "internal_dir/") to search paths vector by setSearchPaths,
----* and set three elements("resources-ipadhd/", "resources-ipad/", "resources-iphonehd")
----* to resolutions vector by setSearchResolutionsOrder. The "internal_dir" is relative to "Resources/".
----* If we have a file named 'sprite.png', the mapping in fileLookup dictionary contains `key: sprite.png -> value: sprite.pvr.gz`.
----* Firstly, it will replace 'sprite.png' with 'sprite.pvr.gz', then searching the file sprite.pvr.gz as follows:
----* /mnt/sdcard/resources-ipadhd/sprite.pvr.gz (if not found, search next)
----* /mnt/sdcard/resources-ipad/sprite.pvr.gz (if not found, search next)
----* /mnt/sdcard/resources-iphonehd/sprite.pvr.gz (if not found, search next)
----* /mnt/sdcard/sprite.pvr.gz (if not found, search next)
----* internal_dir/resources-ipadhd/sprite.pvr.gz (if not found, search next)
----* internal_dir/resources-ipad/sprite.pvr.gz (if not found, search next)
----* internal_dir/resources-iphonehd/sprite.pvr.gz (if not found, search next)
----* internal_dir/sprite.pvr.gz (if not found, return "sprite.png")
----* If the filename contains relative path like "gamescene/uilayer/sprite.png",
----* and the mapping in fileLookup dictionary contains `key: gamescene/uilayer/sprite.png -> value: gamescene/uilayer/sprite.pvr.gz`.
----* The file search order will be:
----* /mnt/sdcard/gamescene/uilayer/resources-ipadhd/sprite.pvr.gz (if not found, search next)
----* /mnt/sdcard/gamescene/uilayer/resources-ipad/sprite.pvr.gz (if not found, search next)
----* /mnt/sdcard/gamescene/uilayer/resources-iphonehd/sprite.pvr.gz (if not found, search next)
----* /mnt/sdcard/gamescene/uilayer/sprite.pvr.gz (if not found, search next)
----* internal_dir/gamescene/uilayer/resources-ipadhd/sprite.pvr.gz (if not found, search next)
----* internal_dir/gamescene/uilayer/resources-ipad/sprite.pvr.gz (if not found, search next)
----* internal_dir/gamescene/uilayer/resources-iphonehd/sprite.pvr.gz (if not found, search next)
----* internal_dir/gamescene/uilayer/sprite.pvr.gz (if not found, return "gamescene/uilayer/sprite.png")
----* If the new file can't be found on the file system, it will return the parameter filename directly.
----* This method was added to simplify multiplatform support. Whether you are using cocos2d-js or any cross-compilation toolchain like StellaSDK or Apportable,
----* you might need to load different resources for a given file in the different platforms.
----* since v2.1 ----@param filename string ----@return string -function FileUtils:fullPathForFilename (filename) end ----@overload fun(string:string,function:function):self ----@overload fun(string:string):self ----@param path string ----@param callback function ----@return self -function FileUtils:getStringFromFile (path,callback) end ----* Sets the filenameLookup dictionary.
----* param filenameLookupDict The dictionary for replacing filename.
----* since v2.1 ----@param filenameLookupDict map_table ----@return self -function FileUtils:setFilenameLookupDictionary (filenameLookupDict) end ----@overload fun(string:string,function:function):self ----@overload fun(string:string):self ----@param filepath string ----@param callback function ----@return self -function FileUtils:removeFile (filepath,callback) end ----* List all files recursively in a directory, async off the main cocos thread.
----* param dirPath The path of the directory, it could be a relative or an absolute path.
----* param callback The callback to be called once the list operation is complete.
----* Will be called on the main cocos thread.
----* js NA
----* lua NA ----@param dirPath string ----@param callback function ----@return self -function FileUtils:listFilesRecursivelyAsync (dirPath,callback) end ----* Checks whether the path is an absolute path.
----* note On Android, if the parameter passed in is relative to "assets/", this method will treat it as an absolute path.
----* Also on Blackberry, path starts with "app/native/Resources/" is treated as an absolute path.
----* param path The path that needs to be checked.
----* return True if it's an absolute path, false if not. ----@param path string ----@return boolean -function FileUtils:isAbsolutePath (path) end ----@overload fun(string:string,string:string,string:string,function:function):self ----@overload fun(string:string,string:string,string:string):self ----@overload fun(string:string,string:string):self ----@overload fun(string:string,string:string,string2:function):self ----@param path string ----@param oldname string ----@param name string ----@param callback function ----@return self -function FileUtils:renameFile (path,oldname,name,callback) end ----* Get default resource root path. ----@return string -function FileUtils:getDefaultResourceRootPath () end ----* Loads the filenameLookup dictionary from the contents of a filename.
----* note The plist file name should follow the format below:
----* code
----*
----*
----*
----*
----* filenames
----*
----* sounds/click.wav
----* sounds/click.caf
----* sounds/endgame.wav
----* sounds/endgame.caf
----* sounds/gem-0.wav
----* sounds/gem-0.caf
----*

----* metadata
----*
----* version
----* 1
----*

----*

----*

----* endcode
----* param filename The plist file name.
----* since v2.1
----* js loadFilenameLookup
----* lua loadFilenameLookup ----@param filename string ----@return self -function FileUtils:loadFilenameLookupDictionaryFromFile (filename) end ----* Checks whether to pop up a message box when failed to load an image.
----* return True if pop up a message box when failed to load an image, false if not. ----@return boolean -function FileUtils:isPopupNotify () end ----* ----@param filename string ----@return array_table -function FileUtils:getValueVectorFromFile (filename) end ----* Gets the array of search paths.
----* return The array of search paths which may contain the prefix of default resource root path.
----* note In best practise, getter function should return the value of setter function passes in.
----* But since we should not break the compatibility, we keep using the old logic.
----* Therefore, If you want to get the original search paths, please call 'getOriginalSearchPaths()' instead.
----* see fullPathForFilename(const char*).
----* lua NA ----@return array_table -function FileUtils:getSearchPaths () end ----* write a ValueMap into a plist file
----* param dict the ValueMap want to save
----* param fullPath The full path to the file you want to save a string
----* return bool ----@param dict map_table ----@param fullPath string ----@return boolean -function FileUtils:writeToFile (dict,fullPath) end ----* Gets the original search path array set by 'setSearchPaths' or 'addSearchPath'.
----* return The array of the original search paths ----@return array_table -function FileUtils:getOriginalSearchPaths () end ----* Gets the new filename from the filename lookup dictionary.
----* It is possible to have a override names.
----* param filename The original filename.
----* return The new filename after searching in the filename lookup dictionary.
----* If the original filename wasn't in the dictionary, it will return the original filename. ----@param filename string ----@return string -function FileUtils:getNewFilename (filename) end ----* List all files in a directory.
----* param dirPath The path of the directory, it could be a relative or an absolute path.
----* return File paths in a string vector ----@param dirPath string ----@return array_table -function FileUtils:listFiles (dirPath) end ----* Converts the contents of a file to a ValueMap.
----* param filename The filename of the file to gets content.
----* return ValueMap of the file contents.
----* note This method is used internally. ----@param filename string ----@return map_table -function FileUtils:getValueMapFromFile (filename) end ----@overload fun(string:string,function:function):self ----@overload fun(string:string):self ----@param filepath string ----@param callback function ----@return self -function FileUtils:getFileSize (filepath,callback) end ----* Converts the contents of a file to a ValueMap.
----* This method is used internally. ----@param filedata char ----@param filesize int ----@return map_table -function FileUtils:getValueMapFromData (filedata,filesize) end ----@overload fun(string:string,function:function):self ----@overload fun(string:string):self ----@param dirPath string ----@param callback function ----@return self -function FileUtils:removeDirectory (dirPath,callback) end ----* Sets the array of search paths.
----* You can use this array to modify the search path of the resources.
----* If you want to use "themes" or search resources in the "cache", you can do it easily by adding new entries in this array.
----* note This method could access relative path and absolute path.
----* If the relative path was passed to the vector, FileUtils will add the default resource directory before the relative path.
----* For instance:
----* On Android, the default resource root path is "assets/".
----* If "/mnt/sdcard/" and "resources-large" were set to the search paths vector,
----* "resources-large" will be converted to "assets/resources-large" since it was a relative path.
----* param searchPaths The array contains search paths.
----* see fullPathForFilename(const char*)
----* since v2.1
----* In js:var setSearchPaths(var jsval);
----* lua NA ----@param searchPaths array_table ----@return self -function FileUtils:setSearchPaths (searchPaths) end ----@overload fun(string:string,string:string,function:function):self ----@overload fun(string:string,string:string):self ----@param dataStr string ----@param fullPath string ----@param callback function ----@return self -function FileUtils:writeStringToFile (dataStr,fullPath,callback) end ----* Sets the array that contains the search order of the resources.
----* param searchResolutionsOrder The source array that contains the search order of the resources.
----* see getSearchResolutionsOrder(), fullPathForFilename(const char*).
----* since v2.1
----* In js:var setSearchResolutionsOrder(var jsval)
----* lua NA ----@param searchResolutionsOrder array_table ----@return self -function FileUtils:setSearchResolutionsOrder (searchResolutionsOrder) end ----* Append search order of the resources.
----* see setSearchResolutionsOrder(), fullPathForFilename().
----* since v2.1 ----@param order string ----@param front boolean ----@return self -function FileUtils:addSearchResolutionsOrder (order,front) end ----* Add search path.
----* since v2.1 ----@param path string ----@param front boolean ----@return self -function FileUtils:addSearchPath (path,front) end ----@overload fun(array_table:array_table,string:string,function:function):self ----@overload fun(array_table:array_table,string:string):self ----@param vecData array_table ----@param fullPath string ----@param callback function ----@return self -function FileUtils:writeValueVectorToFile (vecData,fullPath,callback) end ----@overload fun(string:string,function:function):self ----@overload fun(string:string):self ----@param filename string ----@param callback function ----@return self -function FileUtils:isFileExist (filename,callback) end ----* Purges full path caches. ----@return self -function FileUtils:purgeCachedEntries () end ----* Gets full path from a file name and the path of the relative file.
----* param filename The file name.
----* param relativeFile The path of the relative file.
----* return The full path.
----* e.g. filename: hello.png, pszRelativeFile: /User/path1/path2/hello.plist
----* Return: /User/path1/path2/hello.pvr (If there a a key(hello.png)-value(hello.pvr) in FilenameLookup dictionary. ) ----@param filename string ----@param relativeFile string ----@return string -function FileUtils:fullPathFromRelativeFile (filename,relativeFile) end ----* Windows fopen can't support UTF-8 filename
----* Need convert all parameters fopen and other 3rd-party libs
----* param filenameUtf8 std::string name file for conversion from utf-8
----* return std::string ansi filename in current locale ----@param filenameUtf8 string ----@return string -function FileUtils:getSuitableFOpen (filenameUtf8) end ----@overload fun(map_table:map_table,string:string,function:function):self ----@overload fun(map_table:map_table,string:string):self ----@param dict map_table ----@param fullPath string ----@param callback function ----@return self -function FileUtils:writeValueMapToFile (dict,fullPath,callback) end ----* Gets filename extension is a suffix (separated from the base filename by a dot) in lower case.
----* Examples of filename extensions are .png, .jpeg, .exe, .dmg and .txt.
----* param filePath The path of the file, it could be a relative or absolute path.
----* return suffix for filename in lower case or empty if a dot not found. ----@param filePath string ----@return string -function FileUtils:getFileExtension (filePath) end ----* Sets writable path. ----@param writablePath string ----@return self -function FileUtils:setWritablePath (writablePath) end ----* Sets whether to pop-up a message box when failed to load an image. ----@param notify boolean ----@return self -function FileUtils:setPopupNotify (notify) end ----@overload fun(string:string,function:function):self ----@overload fun(string:string):self ----@param fullPath string ----@param callback function ----@return self -function FileUtils:isDirectoryExist (fullPath,callback) end ----* Set default resource root path. ----@param path string ----@return self -function FileUtils:setDefaultResourceRootPath (path) end ----* Gets the array that contains the search order of the resources.
----* see setSearchResolutionsOrder(const std::vector&), fullPathForFilename(const char*).
----* since v2.1
----* lua NA ----@return array_table -function FileUtils:getSearchResolutionsOrder () end ----@overload fun(string:string,function:function):self ----@overload fun(string:string):self ----@param dirPath string ----@param callback function ----@return self -function FileUtils:createDirectory (dirPath,callback) end ----* List all files in a directory async, off of the main cocos thread.
----* param dirPath The path of the directory, it could be a relative or an absolute path.
----* param callback The callback to be called once the list operation is complete. Will be called on the main cocos thread.
----* js NA
----* lua NA ----@param dirPath string ----@param callback function ----@return self -function FileUtils:listFilesAsync (dirPath,callback) end ----* Gets the writable path.
----* return The path that can be write/read a file in ----@return string -function FileUtils:getWritablePath () end ----* List all files recursively in a directory.
----* param dirPath The path of the directory, it could be a relative or an absolute path.
----* return File paths in a string vector ----@param dirPath string ----@param files array_table ----@return self -function FileUtils:listFilesRecursively (dirPath,files) end ----* Destroys the instance of FileUtils. ----@return self -function FileUtils:destroyInstance () end ----* Gets the instance of FileUtils. ----@return self -function FileUtils:getInstance () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/FiniteTimeAction.lua b/meta/3rd/Cocos4.0/library/cc/FiniteTimeAction.lua deleted file mode 100644 index d5a1a356..00000000 --- a/meta/3rd/Cocos4.0/library/cc/FiniteTimeAction.lua +++ /dev/null @@ -1,24 +0,0 @@ ----@meta - ----@class cc.FiniteTimeAction :cc.Action -local FiniteTimeAction={ } -cc.FiniteTimeAction=FiniteTimeAction - - - - ----* Set duration in seconds of the action.
----* param duration In seconds of the action. ----@param duration float ----@return self -function FiniteTimeAction:setDuration (duration) end ----* Get duration in seconds of the action.
----* return The duration in seconds of the action. ----@return float -function FiniteTimeAction:getDuration () end ----* ----@return self -function FiniteTimeAction:clone () end ----* ----@return self -function FiniteTimeAction:reverse () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/FlipX.lua b/meta/3rd/Cocos4.0/library/cc/FlipX.lua deleted file mode 100644 index 97adb228..00000000 --- a/meta/3rd/Cocos4.0/library/cc/FlipX.lua +++ /dev/null @@ -1,32 +0,0 @@ ----@meta - ----@class cc.FlipX :cc.ActionInstant -local FlipX={ } -cc.FlipX=FlipX - - - - ----* init the action ----@param x boolean ----@return boolean -function FlipX:initWithFlipX (x) end ----* Create the action.
----* param x Flips the sprite horizontally if true.
----* return An autoreleased FlipX object. ----@param x boolean ----@return self -function FlipX:create (x) end ----* ----@return self -function FlipX:clone () end ----* param time In seconds. ----@param time float ----@return self -function FlipX:update (time) end ----* ----@return self -function FlipX:reverse () end ----* ----@return self -function FlipX:FlipX () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/FlipX3D.lua b/meta/3rd/Cocos4.0/library/cc/FlipX3D.lua deleted file mode 100644 index a782d5d4..00000000 --- a/meta/3rd/Cocos4.0/library/cc/FlipX3D.lua +++ /dev/null @@ -1,39 +0,0 @@ ----@meta - ----@class cc.FlipX3D :cc.Grid3DAction -local FlipX3D={ } -cc.FlipX3D=FlipX3D - - - - ----* brief Initializes an action with duration and grid size.
----* param gridSize Specify the grid size of the FlipX3D action.
----* param duration Specify the duration of the FlipX3D action. It's a value in seconds.
----* return If the initialization success, return true; otherwise, return false. ----@param gridSize size_table ----@param duration float ----@return boolean -function FlipX3D:initWithSize (gridSize,duration) end ----* brief Initializes an action with duration.
----* param duration Specify the duration of the FlipX3D action. It's a value in seconds.
----* return If the initialization success, return true; otherwise, return false. ----@param duration float ----@return boolean -function FlipX3D:initWithDuration (duration) end ----* brief Create the action with duration.
----* param duration Specify the duration of the FilpX3D action. It's a value in seconds.
----* return If the creation success, return a pointer of FilpX3D action; otherwise, return nil. ----@param duration float ----@return self -function FlipX3D:create (duration) end ----* ----@return self -function FlipX3D:clone () end ----* ----@param time float ----@return self -function FlipX3D:update (time) end ----* ----@return self -function FlipX3D:FlipX3D () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/FlipY.lua b/meta/3rd/Cocos4.0/library/cc/FlipY.lua deleted file mode 100644 index 107ba69f..00000000 --- a/meta/3rd/Cocos4.0/library/cc/FlipY.lua +++ /dev/null @@ -1,32 +0,0 @@ ----@meta - ----@class cc.FlipY :cc.ActionInstant -local FlipY={ } -cc.FlipY=FlipY - - - - ----* init the action ----@param y boolean ----@return boolean -function FlipY:initWithFlipY (y) end ----* Create the action.
----* param y Flips the sprite vertically if true.
----* return An autoreleased FlipY object. ----@param y boolean ----@return self -function FlipY:create (y) end ----* ----@return self -function FlipY:clone () end ----* param time In seconds. ----@param time float ----@return self -function FlipY:update (time) end ----* ----@return self -function FlipY:reverse () end ----* ----@return self -function FlipY:FlipY () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/FlipY3D.lua b/meta/3rd/Cocos4.0/library/cc/FlipY3D.lua deleted file mode 100644 index 97f30896..00000000 --- a/meta/3rd/Cocos4.0/library/cc/FlipY3D.lua +++ /dev/null @@ -1,25 +0,0 @@ ----@meta - ----@class cc.FlipY3D :cc.FlipX3D -local FlipY3D={ } -cc.FlipY3D=FlipY3D - - - - ----* brief Create the action with duration.
----* param duration Specify the duration of the FlipY3D action. It's a value in seconds.
----* return If the creation success, return a pointer of FlipY3D action; otherwise, return nil. ----@param duration float ----@return self -function FlipY3D:create (duration) end ----* ----@return self -function FlipY3D:clone () end ----* ----@param time float ----@return self -function FlipY3D:update (time) end ----* ----@return self -function FlipY3D:FlipY3D () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Follow.lua b/meta/3rd/Cocos4.0/library/cc/Follow.lua deleted file mode 100644 index 88ab9fb7..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Follow.lua +++ /dev/null @@ -1,88 +0,0 @@ ----@meta - ----@class cc.Follow :cc.Action -local Follow={ } -cc.Follow=Follow - - - - ----* Alter behavior - turn on/off boundary.
----* param value Turn on/off boundary. ----@param value boolean ----@return self -function Follow:setBoundarySet (value) end ----* Initializes the action with a set boundary or with no boundary.
----* param followedNode The node to be followed.
----* param rect The boundary. If \p rect is equal to Rect::ZERO, it'll work
----* with no boundary. ----@param followedNode cc.Node ----@param rect rect_table ----@return boolean -function Follow:initWithTarget (followedNode,rect) end ----* Initializes the action with a set boundary or with no boundary with offsets.
----* param followedNode The node to be followed.
----* param rect The boundary. If \p rect is equal to Rect::ZERO, it'll work
----* with no boundary.
----* param xOffset The horizontal offset from the center of the screen from which the
----* node is to be followed.It can be positive,negative or zero.If
----* set to zero the node will be horizontally centered followed.
----* param yOffset The vertical offset from the center of the screen from which the
----* node is to be followed.It can be positive,negative or zero.
----* If set to zero the node will be vertically centered followed.
----* If both xOffset and yOffset are set to zero,then the node will be horizontally and vertically centered followed. ----@param followedNode cc.Node ----@param xOffset float ----@param yOffset float ----@param rect rect_table ----@return boolean -function Follow:initWithTargetAndOffset (followedNode,xOffset,yOffset,rect) end ----* Return boundarySet.
----* return Return boundarySet. ----@return boolean -function Follow:isBoundarySet () end ----* Creates the action with a set boundary or with no boundary.
----* param followedNode The node to be followed.
----* param rect The boundary. If \p rect is equal to Rect::ZERO, it'll work
----* with no boundary. ----@param followedNode cc.Node ----@param rect rect_table ----@return self -function Follow:create (followedNode,rect) end ----* Creates the action with a set boundary or with no boundary with offsets.
----* param followedNode The node to be followed.
----* param rect The boundary. If \p rect is equal to Rect::ZERO, it'll work
----* with no boundary.
----* param xOffset The horizontal offset from the center of the screen from which the
----* node is to be followed.It can be positive,negative or zero.If
----* set to zero the node will be horizontally centered followed.
----* param yOffset The vertical offset from the center of the screen from which the
----* node is to be followed.It can be positive,negative or zero.
----* If set to zero the node will be vertically centered followed.
----* If both xOffset and yOffset are set to zero,then the node will be horizontally and vertically centered followed. ----@param followedNode cc.Node ----@param xOffset float ----@param yOffset float ----@param rect rect_table ----@return self -function Follow:createWithOffset (followedNode,xOffset,yOffset,rect) end ----* param dt in seconds.
----* js NA ----@param dt float ----@return self -function Follow:step (dt) end ----* ----@return self -function Follow:clone () end ----* ----@return self -function Follow:stop () end ----* ----@return self -function Follow:reverse () end ----* ----@return boolean -function Follow:isDone () end ----* js ctor ----@return self -function Follow:Follow () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/GLView.lua b/meta/3rd/Cocos4.0/library/cc/GLView.lua deleted file mode 100644 index 0a00dc41..00000000 --- a/meta/3rd/Cocos4.0/library/cc/GLView.lua +++ /dev/null @@ -1,187 +0,0 @@ ----@meta - ----@class cc.GLView :cc.Ref -local GLView={ } -cc.GLView=GLView - - - - ----* Set the frame size of EGL view.
----* param width The width of the fram size.
----* param height The height of the fram size. ----@param width float ----@param height float ----@return self -function GLView:setFrameSize (width,height) end ----* Get the opengl view port rectangle.
----* return Return the opengl view port rectangle. ----@return rect_table -function GLView:getViewPortRect () end ----* Get scale factor of the vertical direction.
----* return Scale factor of the vertical direction. ----@return float -function GLView:getScaleY () end ----* Only works on ios platform. Set Content Scale of the Factor. ----@param t floa ----@return boolean -function GLView:setContentScaleFactor (t) end ----* Only works on ios platform. Get Content Scale of the Factor. ----@return float -function GLView:getContentScaleFactor () end ----* Open or close IME keyboard , subclass must implement this method.
----* param open Open or close IME keyboard. ----@param open boolean ----@return self -function GLView:setIMEKeyboardState (open) end ----* Gets safe area rectangle ----@return rect_table -function GLView:getSafeAreaRect () end ----* Set Scissor rectangle with points.
----* param x Set the points of x.
----* param y Set the points of y.
----* param w Set the width of the view port
----* param h Set the Height of the view port. ----@param x float ----@param y float ----@param w float ----@param h float ----@return self -function GLView:setScissorInPoints (x,y,w,h) end ----* Get the view name.
----* return The view name. ----@return string -function GLView:getViewName () end ----* Get whether opengl render system is ready, subclass must implement this method. ----@return boolean -function GLView:isOpenGLReady () end ----* Hide or Show the mouse cursor if there is one.
----* param isVisible Hide or Show the mouse cursor if there is one. ----@param l boo ----@return self -function GLView:setCursorVisible (l) end ----* Get the frame size of EGL view.
----* In general, it returns the screen size since the EGL view is a fullscreen view.
----* return The frame size of EGL view. ----@return size_table -function GLView:getFrameSize () end ----* Set default window icon (implemented for windows and linux).
----* On windows it will use icon from .exe file (if included).
----* On linux it will use default window icon. ----@return self -function GLView:setDefaultIcon () end ----* Get scale factor of the horizontal direction.
----* return Scale factor of the horizontal direction. ----@return float -function GLView:getScaleX () end ----* Get the visible origin point of opengl viewport.
----* return The visible origin point of opengl viewport. ----@return vec2_table -function GLView:getVisibleOrigin () end ----* Set zoom factor for frame. This methods are for
----* debugging big resolution (e.g.new ipad) app on desktop.
----* param zoomFactor The zoom factor for frame. ----@param t floa ----@return self -function GLView:setFrameZoomFactor (t) end ----* Get zoom factor for frame. This methods are for
----* debugging big resolution (e.g.new ipad) app on desktop.
----* return The zoom factor for frame. ----@return float -function GLView:getFrameZoomFactor () end ----* Get design resolution size.
----* Default resolution size is the same as 'getFrameSize'.
----* return The design resolution size. ----@return size_table -function GLView:getDesignResolutionSize () end ----@overload fun(string0:array_table):self ----@overload fun(string:string):self ----@param filename string ----@return self -function GLView:setIcon (filename) end ----* When the window is closed, it will return false if the platforms is Ios or Android.
----* If the platforms is windows or Mac,it will return true.
----* return In ios and android it will return false,if in windows or Mac it will return true. ----@return boolean -function GLView:windowShouldClose () end ----* Exchanges the front and back buffers, subclass must implement this method. ----@return self -function GLView:swapBuffers () end ----* Set the design resolution size.
----* param width Design resolution width.
----* param height Design resolution height.
----* param resolutionPolicy The resolution policy desired, you may choose:
----* [1] EXACT_FIT Fill screen by stretch-to-fit: if the design resolution ratio of width to height is different from the screen resolution ratio, your game view will be stretched.
----* [2] NO_BORDER Full screen without black border: if the design resolution ratio of width to height is different from the screen resolution ratio, two areas of your game view will be cut.
----* [3] SHOW_ALL Full screen with black border: if the design resolution ratio of width to height is different from the screen resolution ratio, two black borders will be shown. ----@param width float ----@param height float ----@param resolutionPolicy int ----@return self -function GLView:setDesignResolutionSize (width,height,resolutionPolicy) end ----* Returns the current Resolution policy.
----* return The current Resolution policy. ----@return int -function GLView:getResolutionPolicy () end ----* Force destroying EGL view, subclass must implement this method.
----* lua endToLua ----@return self -function GLView:endToLua () end ----* Returns whether or not the view is in Retina Display mode.
----* return Returns whether or not the view is in Retina Display mode. ----@return boolean -function GLView:isRetinaDisplay () end ----* Renders a Scene with a Renderer
----* This method is called directly by the Director ----@param scene cc.Scene ----@param renderer cc.Renderer ----@return self -function GLView:renderScene (scene,renderer) end ----* Set opengl view port rectangle with points.
----* param x Set the points of x.
----* param y Set the points of y.
----* param w Set the width of the view port
----* param h Set the Height of the view port. ----@param x float ----@param y float ----@param w float ----@param h float ----@return self -function GLView:setViewPortInPoints (x,y,w,h) end ----* Get the current scissor rectangle.
----* return The current scissor rectangle. ----@return rect_table -function GLView:getScissorRect () end ----* Get retina factor.
----* return The retina factor. ----@return int -function GLView:getRetinaFactor () end ----* Set the view name.
----* param viewname A string will be set to the view as name. ----@param viewname string ----@return self -function GLView:setViewName (viewname) end ----* Get the visible rectangle of opengl viewport.
----* return The visible rectangle of opengl viewport. ----@return rect_table -function GLView:getVisibleRect () end ----* Get the visible area size of opengl viewport.
----* return The visible area size of opengl viewport. ----@return size_table -function GLView:getVisibleSize () end ----* Get whether GL_SCISSOR_TEST is enable.
----* return Whether GL_SCISSOR_TEST is enable. ----@return boolean -function GLView:isScissorEnabled () end ----* Polls the events. ----@return self -function GLView:pollEvents () end ----* Static method and member so that we can modify it on all platforms before create OpenGL context.
----* param glContextAttrs The OpenGL context attrs. ----@param glContextAttrs GLContextAttrs ----@return self -function GLView:setGLContextAttrs (glContextAttrs) end ----* Return the OpenGL context attrs.
----* return Return the OpenGL context attrs. ----@return GLContextAttrs -function GLView:getGLContextAttrs () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/GLViewImpl.lua b/meta/3rd/Cocos4.0/library/cc/GLViewImpl.lua deleted file mode 100644 index 12937390..00000000 --- a/meta/3rd/Cocos4.0/library/cc/GLViewImpl.lua +++ /dev/null @@ -1,33 +0,0 @@ ----@meta - ----@class cc.GLViewImpl :cc.GLView -local GLViewImpl={ } -cc.GLViewImpl=GLViewImpl - - - - ----* ----@param viewName string ----@param rect rect_table ----@param frameZoomFactor float ----@return self -function GLViewImpl:createWithRect (viewName,rect,frameZoomFactor) end ----* ----@param viewname string ----@return self -function GLViewImpl:create (viewname) end ----* ----@param viewName string ----@return self -function GLViewImpl:createWithFullScreen (viewName) end ----* ----@param bOpen boolean ----@return self -function GLViewImpl:setIMEKeyboardState (bOpen) end ----* ----@return boolean -function GLViewImpl:isOpenGLReady () end ----* ----@return rect_table -function GLViewImpl:getSafeAreaRect () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Grid3D.lua b/meta/3rd/Cocos4.0/library/cc/Grid3D.lua deleted file mode 100644 index 0bfdadd9..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Grid3D.lua +++ /dev/null @@ -1,46 +0,0 @@ ----@meta - ----@class cc.Grid3D :cc.GridBase -local Grid3D={ } -cc.Grid3D=Grid3D - - - - ----* ----@return boolean -function Grid3D:getNeedDepthTestForBlit () end ----* Getter and Setter for depth test state when blit.
----* js NA ----@param neededDepthTest boolean ----@return self -function Grid3D:setNeedDepthTestForBlit (neededDepthTest) end ----@overload fun(size_table:size_table,cc.Texture2D1:rect_table):self ----@overload fun(size_table:size_table):self ----@overload fun(size_table:size_table,cc.Texture2D:cc.Texture2D,boolean:boolean):self ----@overload fun(size_table:size_table,cc.Texture2D:cc.Texture2D,boolean:boolean,rect_table:rect_table):self ----@param gridSize size_table ----@param texture cc.Texture2D ----@param flipped boolean ----@param rect rect_table ----@return self -function Grid3D:create (gridSize,texture,flipped,rect) end ----* ----@return self -function Grid3D:calculateVertexPoints () end ----* Implementations for interfaces in base class. ----@return self -function Grid3D:beforeBlit () end ----* ----@return self -function Grid3D:afterBlit () end ----* ----@return self -function Grid3D:reuse () end ----* ----@return self -function Grid3D:blit () end ----* Constructor.
----* js ctor ----@return self -function Grid3D:Grid3D () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Grid3DAction.lua b/meta/3rd/Cocos4.0/library/cc/Grid3DAction.lua deleted file mode 100644 index cb6e30ab..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Grid3DAction.lua +++ /dev/null @@ -1,19 +0,0 @@ ----@meta - ----@class cc.Grid3DAction :cc.GridAction -local Grid3DAction={ } -cc.Grid3DAction=Grid3DAction - - - - ----* brief Get the effect grid rect.
----* return Return the effect grid rect. ----@return rect_table -function Grid3DAction:getGridRect () end ----* ----@return self -function Grid3DAction:clone () end ----* ----@return cc.GridBase -function Grid3DAction:getGrid () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/GridAction.lua b/meta/3rd/Cocos4.0/library/cc/GridAction.lua deleted file mode 100644 index c74cdb17..00000000 --- a/meta/3rd/Cocos4.0/library/cc/GridAction.lua +++ /dev/null @@ -1,31 +0,0 @@ ----@meta - ----@class cc.GridAction :cc.ActionInterval -local GridAction={ } -cc.GridAction=GridAction - - - - ----* brief Get the pointer of GridBase.
----* return The pointer of GridBase. ----@return cc.GridBase -function GridAction:getGrid () end ----* brief Initializes the action with size and duration.
----* param duration The duration of the GridAction. It's a value in seconds.
----* param gridSize The size of the GridAction should be.
----* return Return true when the initialization success, otherwise return false. ----@param duration float ----@param gridSize size_table ----@return boolean -function GridAction:initWithDuration (duration,gridSize) end ----* ----@param target cc.Node ----@return self -function GridAction:startWithTarget (target) end ----* ----@return self -function GridAction:clone () end ----* ----@return self -function GridAction:reverse () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/GridBase.lua b/meta/3rd/Cocos4.0/library/cc/GridBase.lua deleted file mode 100644 index 285484c2..00000000 --- a/meta/3rd/Cocos4.0/library/cc/GridBase.lua +++ /dev/null @@ -1,89 +0,0 @@ ----@meta - ----@class cc.GridBase :cc.Ref -local GridBase={ } -cc.GridBase=GridBase - - - - ----* Set the size of the grid. ----@param gridSize size_table ----@return self -function GridBase:setGridSize (gridSize) end ----* brief Set the effect grid rect.
----* param rect The effect grid rect. ----@param rect rect_table ----@return self -function GridBase:setGridRect (rect) end ----* Interface, Calculate the vertices used for the blit. ----@return self -function GridBase:calculateVertexPoints () end ----* Interface, Reuse the grid vertices. ----@return self -function GridBase:reuse () end ----* Init and reset the status when render effects by using the grid. ----@return self -function GridBase:beforeDraw () end ----* brief Get the effect grid rect.
----* return Return the effect grid rect. ----@return rect_table -function GridBase:getGridRect () end ----* is texture flipped. ----@return boolean -function GridBase:isTextureFlipped () end ----* Size of the grid. ----@return size_table -function GridBase:getGridSize () end ----* ----@return self -function GridBase:afterBlit () end ----* Change projection to 2D for grabbing. ----@return self -function GridBase:set2DProjection () end ----* Pixels between the grids. ----@return vec2_table -function GridBase:getStep () end ----* Get the pixels between the grids. ----@param step vec2_table ----@return self -function GridBase:setStep (step) end ----* Set the texture flipped or not. ----@param flipped boolean ----@return self -function GridBase:setTextureFlipped (flipped) end ----* Interface used to blit the texture with grid to screen. ----@return self -function GridBase:blit () end ----* ----@param active boolean ----@return self -function GridBase:setActive (active) end ----* Get number of times that the grid will be reused. ----@return int -function GridBase:getReuseGrid () end ----@overload fun(size_table:size_table,cc.Texture2D1:rect_table):self ----@overload fun(size_table:size_table):self ----@overload fun(size_table:size_table,cc.Texture2D:cc.Texture2D,boolean:boolean):self ----@overload fun(size_table:size_table,cc.Texture2D:cc.Texture2D,boolean:boolean,rect_table:rect_table):self ----@param gridSize size_table ----@param texture cc.Texture2D ----@param flipped boolean ----@param rect rect_table ----@return boolean -function GridBase:initWithSize (gridSize,texture,flipped,rect) end ----* Interface for custom action when before or after draw.
----* js NA ----@return self -function GridBase:beforeBlit () end ----* Set number of times that the grid will be reused. ----@param reuseGrid int ----@return self -function GridBase:setReuseGrid (reuseGrid) end ----* Getter and setter of the active state of the grid. ----@return boolean -function GridBase:isActive () end ----* ----@param target cc.Node ----@return self -function GridBase:afterDraw (target) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Hide.lua b/meta/3rd/Cocos4.0/library/cc/Hide.lua deleted file mode 100644 index d22972cd..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Hide.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class cc.Hide :cc.ActionInstant -local Hide={ } -cc.Hide=Hide - - - - ----* Allocates and initializes the action.
----* return An autoreleased Hide object. ----@return self -function Hide:create () end ----* ----@return self -function Hide:clone () end ----* param time In seconds. ----@param time float ----@return self -function Hide:update (time) end ----* ----@return cc.ActionInstant -function Hide:reverse () end ----* ----@return self -function Hide:Hide () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Image.lua b/meta/3rd/Cocos4.0/library/cc/Image.lua deleted file mode 100644 index e1c28616..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Image.lua +++ /dev/null @@ -1,73 +0,0 @@ ----@meta - ----@class cc.Image :cc.Ref -local Image={ } -cc.Image=Image - - - - ----* ----@return boolean -function Image:hasPremultipliedAlpha () end ----* ----@return self -function Image:reversePremultipliedAlpha () end ----* ----@return boolean -function Image:isCompressed () end ----* ----@return boolean -function Image:hasAlpha () end ----* ----@return int -function Image:getPixelFormat () end ----* ----@return int -function Image:getHeight () end ----* ----@return self -function Image:premultiplyAlpha () end ----* brief Load the image from the specified path.
----* param path the absolute file path.
----* return true if loaded correctly. ----@param path string ----@return boolean -function Image:initWithImageFile (path) end ----* ----@return int -function Image:getWidth () end ----* ----@return int -function Image:getBitPerPixel () end ----* ----@return int -function Image:getFileType () end ----* ----@return string -function Image:getFilePath () end ----* ----@return int -function Image:getNumberOfMipmaps () end ----* brief Save Image data to the specified file, with specified format.
----* param filePath the file's absolute path, including file suffix.
----* param isToRGB whether the image is saved as RGB format. ----@param filename string ----@param isToRGB boolean ----@return boolean -function Image:saveToFile (filename,isToRGB) end ----* treats (or not) PVR files as if they have alpha premultiplied.
----* Since it is impossible to know at runtime if the PVR images have the alpha channel premultiplied, it is
----* possible load them as if they have (or not) the alpha channel premultiplied.
----* By default it is disabled. ----@param haveAlphaPremultiplied boolean ----@return self -function Image:setPVRImagesHavePremultipliedAlpha (haveAlphaPremultiplied) end ----* Enables or disables premultiplied alpha for PNG files.
----* param enabled (default: true) ----@param enabled boolean ----@return self -function Image:setPNGPremultipliedAlphaEnabled (enabled) end ----* js ctor ----@return self -function Image:Image () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/JumpBy.lua b/meta/3rd/Cocos4.0/library/cc/JumpBy.lua deleted file mode 100644 index 9122cb5f..00000000 --- a/meta/3rd/Cocos4.0/library/cc/JumpBy.lua +++ /dev/null @@ -1,46 +0,0 @@ ----@meta - ----@class cc.JumpBy :cc.ActionInterval -local JumpBy={ } -cc.JumpBy=JumpBy - - - - ----* initializes the action
----* param duration in seconds ----@param duration float ----@param position vec2_table ----@param height float ----@param jumps int ----@return boolean -function JumpBy:initWithDuration (duration,position,height,jumps) end ----* Creates the action.
----* param duration Duration time, in seconds.
----* param position The jumping distance.
----* param height The jumping height.
----* param jumps The jumping times.
----* return An autoreleased JumpBy object. ----@param duration float ----@param position vec2_table ----@param height float ----@param jumps int ----@return self -function JumpBy:create (duration,position,height,jumps) end ----* ----@param target cc.Node ----@return self -function JumpBy:startWithTarget (target) end ----* ----@return self -function JumpBy:clone () end ----* ----@return self -function JumpBy:reverse () end ----* param time In seconds. ----@param time float ----@return self -function JumpBy:update (time) end ----* ----@return self -function JumpBy:JumpBy () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/JumpTiles3D.lua b/meta/3rd/Cocos4.0/library/cc/JumpTiles3D.lua deleted file mode 100644 index f19233b2..00000000 --- a/meta/3rd/Cocos4.0/library/cc/JumpTiles3D.lua +++ /dev/null @@ -1,61 +0,0 @@ ----@meta - ----@class cc.JumpTiles3D :cc.TiledGrid3DAction -local JumpTiles3D={ } -cc.JumpTiles3D=JumpTiles3D - - - - ----* brief Set the amplitude rate of the effect.
----* param amplitudeRate The value of amplitude rate will be set. ----@param amplitudeRate float ----@return self -function JumpTiles3D:setAmplitudeRate (amplitudeRate) end ----* brief Initializes the action with the number of jumps, the sin amplitude, the grid size and the duration.
----* param duration Specify the duration of the JumpTiles3D action. It's a value in seconds.
----* param gridSize Specify the size of the grid.
----* param numberOfJumps Specify the jump tiles count.
----* param amplitude Specify the amplitude of the JumpTiles3D action.
----* return If the initialization success, return true; otherwise, return false. ----@param duration float ----@param gridSize size_table ----@param numberOfJumps unsigned_int ----@param amplitude float ----@return boolean -function JumpTiles3D:initWithDuration (duration,gridSize,numberOfJumps,amplitude) end ----* brief Get the amplitude of the effect.
----* return Return the amplitude of the effect. ----@return float -function JumpTiles3D:getAmplitude () end ----* brief Get the amplitude rate of the effect.
----* return Return the amplitude rate of the effect. ----@return float -function JumpTiles3D:getAmplitudeRate () end ----* brief Set the amplitude to the effect.
----* param amplitude The value of amplitude will be set. ----@param amplitude float ----@return self -function JumpTiles3D:setAmplitude (amplitude) end ----* brief Create the action with the number of jumps, the sin amplitude, the grid size and the duration.
----* param duration Specify the duration of the JumpTiles3D action. It's a value in seconds.
----* param gridSize Specify the size of the grid.
----* param numberOfJumps Specify the jump tiles count.
----* param amplitude Specify the amplitude of the JumpTiles3D action.
----* return If the creation success, return a pointer of JumpTiles3D action; otherwise, return nil. ----@param duration float ----@param gridSize size_table ----@param numberOfJumps unsigned_int ----@param amplitude float ----@return self -function JumpTiles3D:create (duration,gridSize,numberOfJumps,amplitude) end ----* ----@return self -function JumpTiles3D:clone () end ----* ----@param time float ----@return self -function JumpTiles3D:update (time) end ----* ----@return self -function JumpTiles3D:JumpTiles3D () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/JumpTo.lua b/meta/3rd/Cocos4.0/library/cc/JumpTo.lua deleted file mode 100644 index d0590271..00000000 --- a/meta/3rd/Cocos4.0/library/cc/JumpTo.lua +++ /dev/null @@ -1,42 +0,0 @@ ----@meta - ----@class cc.JumpTo :cc.JumpBy -local JumpTo={ } -cc.JumpTo=JumpTo - - - - ----* initializes the action
----* param duration In seconds. ----@param duration float ----@param position vec2_table ----@param height float ----@param jumps int ----@return boolean -function JumpTo:initWithDuration (duration,position,height,jumps) end ----* Creates the action.
----* param duration Duration time, in seconds.
----* param position The jumping destination position.
----* param height The jumping height.
----* param jumps The jumping times.
----* return An autoreleased JumpTo object. ----@param duration float ----@param position vec2_table ----@param height float ----@param jumps int ----@return self -function JumpTo:create (duration,position,height,jumps) end ----* ----@param target cc.Node ----@return self -function JumpTo:startWithTarget (target) end ----* ----@return self -function JumpTo:clone () end ----* ----@return self -function JumpTo:reverse () end ----* ----@return self -function JumpTo:JumpTo () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Label.lua b/meta/3rd/Cocos4.0/library/cc/Label.lua deleted file mode 100644 index 4fd8684d..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Label.lua +++ /dev/null @@ -1,400 +0,0 @@ ----@meta - ----@class cc.Label :cc.Node@all parent class: Node,LabelProtocol,BlendProtocol -local Label={ } -cc.Label=Label - - - - ----* ----@return boolean -function Label:isClipMarginEnabled () end ----* Enable shadow effect to Label.
----* todo Support blur for shadow effect. ----@return self -function Label:enableShadow () end ----* Sets the untransformed size of the Label in a more efficient way. ----@param width float ----@param height float ----@return self -function Label:setDimensions (width,height) end ----* ----@return float -function Label:getWidth () end ----* Return the text the Label is currently displaying. ----@return string -function Label:getString () end ----* ----@return float -function Label:getHeight () end ----@overload fun(int:int):self ----@overload fun():self ----@param effect int ----@return self -function Label:disableEffect (effect) end ----* Sets a new TTF configuration to Label.
----* see `TTFConfig` ----@param ttfConfig cc._ttfConfig ----@return boolean -function Label:setTTFConfig (ttfConfig) end ----* Returns type of label
----* warning Not support system font.
----* return the type of label
----* since v3.18.0 ----@return int -function Label:getLabelType () end ----* Returns the text color of the Label. ----@return color4b_table -function Label:getTextColor () end ----* ----@return cc.BlendFunc -function Label:getBlendFunc () end ----* Toggle wrap option of the label.
----* Note: System font doesn't support manually toggle wrap.
----* param enable Set true to enable wrap and false to disable wrap. ----@param enable boolean ----@return self -function Label:enableWrap (enable) end ----* Makes the Label exactly this untransformed width.
----* The Label's width be used for text align if the value not equal zero. ----@param width float ----@return self -function Label:setWidth (width) end ----* Returns the additional kerning of the Label.
----* warning Not support system font.
----* since v3.2.0 ----@return float -function Label:getAdditionalKerning () end ----* Return the user define BMFont size.
----* return The BMFont size in float value. ----@return float -function Label:getBMFontSize () end ----* ----@return float -function Label:getMaxLineWidth () end ----* Returns the Label's text horizontal alignment. ----@return int -function Label:getHorizontalAlignment () end ----* Return shadow effect offset value. ----@return size_table -function Label:getShadowOffset () end ----* ----@return float -function Label:getLineSpacing () end ----* Clips upper and lower margin to reduce height of Label. ----@param clipEnabled boolean ----@return self -function Label:setClipMarginEnabled (clipEnabled) end ----* Sets the text that this Label is to display. ----@param text string ----@return self -function Label:setString (text) end ----* Sets a new system font to Label.
----* param font A font file or a font family name.
----* warning ----@param font string ----@return self -function Label:setSystemFontName (font) end ----* Query the wrap is enabled or not.
----* Note: System font will always return true. ----@return boolean -function Label:isWrapEnabled () end ----* Return the outline effect size value. ----@return float -function Label:getOutlineSize () end ----* Sets a new bitmap font to Label ----@param bmfontFilePath string ----@param imageOffset vec2_table ----@param fontSize float ----@return boolean -function Label:setBMFontFilePath (bmfontFilePath,imageOffset,fontSize) end ----@overload fun(string0:cc._ttfConfig,string:string,float2:int,size_table3:int):self ----@overload fun(string:string,string:string,float:float,size_table:size_table,int:int,int:int):self ----@param text string ----@param fontFilePath string ----@param fontSize float ----@param dimensions size_table ----@param hAlignment int ----@param vAlignment int ----@return boolean -function Label:initWithTTF (text,fontFilePath,fontSize,dimensions,hAlignment,vAlignment) end ----* ----@return cc.FontAtlas -function Label:getFontAtlas () end ----* Sets the line height of the Label.
----* warning Not support system font.
----* since v3.2.0 ----@param height float ----@return self -function Label:setLineHeight (height) end ----* ----@param fontSize float ----@return self -function Label:setSystemFontSize (fontSize) end ----* Change the label's Overflow type, currently only TTF and BMFont support all the valid Overflow type.
----* Char Map font supports all the Overflow type except for SHRINK, because we can't measure it's font size.
----* System font only support Overflow::Normal and Overflow::RESIZE_HEIGHT.
----* param overflow see `Overflow` ----@param overflow int ----@return self -function Label:setOverflow (overflow) end ----* Enables strikethrough.
----* Underline and Strikethrough cannot be enabled at the same time.
----* Strikethrough is like an underline but at the middle of the glyph ----@return self -function Label:enableStrikethrough () end ----* Update content immediately. ----@return self -function Label:updateContent () end ----* Return length of string. ----@return int -function Label:getStringLength () end ----* Specify what happens when a line is too long for Label.
----* param breakWithoutSpace Lines are automatically broken between words if this value is false. ----@param breakWithoutSpace boolean ----@return self -function Label:setLineBreakWithoutSpace (breakWithoutSpace) end ----* Return the number of lines of text. ----@return int -function Label:getStringNumLines () end ----* Enable outline effect to Label.
----* warning Limiting use to only when the Label created with true type font or system font. ----@param outlineColor color4b_table ----@param outlineSize int ----@return self -function Label:enableOutline (outlineColor,outlineSize) end ----* Return the shadow effect blur radius. ----@return float -function Label:getShadowBlurRadius () end ----* Return current effect color value. ----@return color4f_table -function Label:getEffectColor () end ----* ----@param cleanup boolean ----@return self -function Label:removeAllChildrenWithCleanup (cleanup) end ----@overload fun(string0:cc.Texture2D,int:int,int:int,int:int):self ----@overload fun(string:string,int:int,int:int,int:int):self ----@overload fun(string:string):self ----@param charMapFile string ----@param itemWidth int ----@param itemHeight int ----@param startCharMap int ----@return boolean -function Label:setCharMap (charMapFile,itemWidth,itemHeight,startCharMap) end ----* ----@return size_table -function Label:getDimensions () end ----* Makes the Label at most this line untransformed width.
----* The Label's max line width be used for force line breaks if the value not equal zero. ----@param maxLineWidth float ----@return self -function Label:setMaxLineWidth (maxLineWidth) end ----* Returns the system font used by the Label. ----@return string -function Label:getSystemFontName () end ----* Sets the Label's text vertical alignment. ----@param vAlignment int ----@return self -function Label:setVerticalAlignment (vAlignment) end ----* ----@param height float ----@return self -function Label:setLineSpacing (height) end ----* Returns font size ----@return float -function Label:getRenderingFontSize () end ----* Returns the line height of this Label.
----* warning Not support system font.
----* since v3.2.0 ----@return float -function Label:getLineHeight () end ----* Return the shadow effect color value. ----@return color4f_table -function Label:getShadowColor () end ----* Returns the TTF configuration object used by the Label.
----* see `TTFConfig` ----@return cc._ttfConfig -function Label:getTTFConfig () end ----* Enable italics rendering ----@return self -function Label:enableItalics () end ----* Sets the text color of Label.
----* The text color is different from the color of Node.
----* warning Limiting use to only when the Label created with true type font or system font. ----@param color color4b_table ----@return self -function Label:setTextColor (color) end ----* Provides a way to treat each character like a Sprite.
----* warning No support system font. ----@param lettetIndex int ----@return cc.Sprite -function Label:getLetter (lettetIndex) end ----* Makes the Label exactly this untransformed height.
----* The Label's height be used for text align if the value not equal zero.
----* The text will display incomplete if the size of Label is not large enough to display all text. ----@param height float ----@return self -function Label:setHeight (height) end ----* Return whether the shadow effect is enabled. ----@return boolean -function Label:isShadowEnabled () end ----* Enable glow effect to Label.
----* warning Limiting use to only when the Label created with true type font. ----@param glowColor color4b_table ----@return self -function Label:enableGlow (glowColor) end ----* Query the label's Overflow type.
----* return see `Overflow` ----@return int -function Label:getOverflow () end ----* Returns the Label's text vertical alignment. ----@return int -function Label:getVerticalAlignment () end ----* Sets the additional kerning of the Label.
----* warning Not support system font.
----* since v3.2.0 ----@param space float ----@return self -function Label:setAdditionalKerning (space) end ----* Returns the bitmap font path used by the Label. ----@return float -function Label:getSystemFontSize () end ----* ----@param blendFunc cc.BlendFunc ----@return self -function Label:setBlendFunc (blendFunc) end ----* Returns the Label's text horizontal alignment. ----@return int -function Label:getTextAlignment () end ----* Returns the bitmap font used by the Label. ----@return string -function Label:getBMFontFilePath () end ----* Sets the Label's text horizontal alignment. ----@param hAlignment int ----@return self -function Label:setHorizontalAlignment (hAlignment) end ----* Enable bold rendering ----@return self -function Label:enableBold () end ----* Enable underline ----@return self -function Label:enableUnderline () end ----* Return current effect type. ----@return int -function Label:getLabelEffectType () end ----@overload fun(int:int,int:int):self ----@overload fun(int:int):self ----@param hAlignment int ----@param vAlignment int ----@return self -function Label:setAlignment (hAlignment,vAlignment) end ----* warning This method is not recommended for game developers. ----@return self -function Label:requestSystemFontRefresh () end ----* Change font size of label type BMFONT
----* Note: This function only scale the BMFONT letter to mimic the font size change effect.
----* param fontSize The desired font size in float. ----@param fontSize float ----@return self -function Label:setBMFontSize (fontSize) end ----* Allocates and initializes a Label, with a bitmap font file.
----* param bmfontPath A bitmap font file, it's a FNT format.
----* param text The initial text.
----* param hAlignment Text horizontal alignment.
----* param maxLineWidth The max line width.
----* param imageOffset
----* return An automatically released Label object.
----* see setBMFontFilePath setMaxLineWidth ----@param bmfontPath string ----@param text string ----@param hAlignment int ----@param maxLineWidth int ----@param imageOffset vec2_table ----@return self -function Label:createWithBMFont (bmfontPath,text,hAlignment,maxLineWidth,imageOffset) end ----* Allocates and initializes a Label, with default settings.
----* return An automatically released Label object. ----@return self -function Label:create () end ----@overload fun(string0:cc.Texture2D,int:int,int:int,int:int):self ----@overload fun(string:string,int:int,int:int,int:int):self ----@overload fun(string:string):self ----@param charMapFile string ----@param itemWidth int ----@param itemHeight int ----@param startCharMap int ----@return self -function Label:createWithCharMap (charMapFile,itemWidth,itemHeight,startCharMap) end ----* Allocates and initializes a Label, base on platform-dependent API.
----* param text The initial text.
----* param font A font file or a font family name.
----* param fontSize The font size. This value must be > 0.
----* param dimensions
----* param hAlignment The text horizontal alignment.
----* param vAlignment The text vertical alignment.
----* warning It will generate texture by the platform-dependent code.
----* return An automatically released Label object. ----@param text string ----@param font string ----@param fontSize float ----@param dimensions size_table ----@param hAlignment int ----@param vAlignment int ----@return self -function Label:createWithSystemFont (text,font,fontSize,dimensions,hAlignment,vAlignment) end ----* ----@param renderer cc.Renderer ----@param transform mat4_table ----@param flags unsigned_int ----@return self -function Label:draw (renderer,transform,flags) end ----* ----@return boolean -function Label:isOpacityModifyRGB () end ----* ----@param mask unsigned short ----@param applyChildren boolean ----@return self -function Label:setCameraMask (mask,applyChildren) end ----* ----@param child cc.Node ----@param cleanup boolean ----@return self -function Label:removeChild (child,cleanup) end ----* ----@param renderer cc.Renderer ----@param parentTransform mat4_table ----@param parentFlags unsigned_int ----@return self -function Label:visit (renderer,parentTransform,parentFlags) end ----* ----@return string -function Label:getDescription () end ----* ----@param isOpacityModifyRGB boolean ----@return self -function Label:setOpacityModifyRGB (isOpacityModifyRGB) end ----* ----@param parentOpacity unsigned_char ----@return self -function Label:updateDisplayedOpacity (parentOpacity) end ----* set ProgramState of current render command ----@param programState cc.backend.ProgramState ----@return self -function Label:setProgramState (programState) end ----* ----@return size_table -function Label:getContentSize () end ----* ----@return rect_table -function Label:getBoundingBox () end ----* ----@param parentColor color3b_table ----@return self -function Label:updateDisplayedColor (parentColor) end ----* ----@param globalZOrder float ----@return self -function Label:setGlobalZOrder (globalZOrder) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/LabelAtlas.lua b/meta/3rd/Cocos4.0/library/cc/LabelAtlas.lua deleted file mode 100644 index a7ea8828..00000000 --- a/meta/3rd/Cocos4.0/library/cc/LabelAtlas.lua +++ /dev/null @@ -1,45 +0,0 @@ ----@meta - ----@class cc.LabelAtlas :cc.AtlasNode@all parent class: AtlasNode,LabelProtocol -local LabelAtlas={ } -cc.LabelAtlas=LabelAtlas - - - - ----* ----@param label string ----@return self -function LabelAtlas:setString (label) end ----@overload fun(string:string,cc.Texture2D1:string):self ----@overload fun(string:string,cc.Texture2D1:string,int:int,int:int,int:int):self ----@overload fun(string:string,cc.Texture2D:cc.Texture2D,int:int,int:int,int:int):self ----@param string string ----@param texture cc.Texture2D ----@param itemWidth int ----@param itemHeight int ----@param startCharMap int ----@return boolean -function LabelAtlas:initWithString (string,texture,itemWidth,itemHeight,startCharMap) end ----* ----@return string -function LabelAtlas:getString () end ----@overload fun(string:string,string:string,int:int,int:int,int:int):self ----@overload fun():self ----@overload fun(string:string,string:string):self ----@param string string ----@param charMapFile string ----@param itemWidth int ----@param itemHeight int ----@param startCharMap int ----@return self -function LabelAtlas:create (string,charMapFile,itemWidth,itemHeight,startCharMap) end ----* ----@return self -function LabelAtlas:updateAtlasValues () end ----* js NA ----@return string -function LabelAtlas:getDescription () end ----* ----@return self -function LabelAtlas:LabelAtlas () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Layer.lua b/meta/3rd/Cocos4.0/library/cc/Layer.lua deleted file mode 100644 index 67feb9a9..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Layer.lua +++ /dev/null @@ -1,22 +0,0 @@ ----@meta - ----@class cc.Layer :cc.Node -local Layer={ } -cc.Layer=Layer - - - - ----* Creates a fullscreen black layer.
----* return An autoreleased Layer object. ----@return self -function Layer:create () end ----* ----@return boolean -function Layer:init () end ----* ----@return string -function Layer:getDescription () end ----* ----@return self -function Layer:Layer () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/LayerColor.lua b/meta/3rd/Cocos4.0/library/cc/LayerColor.lua deleted file mode 100644 index faaf445a..00000000 --- a/meta/3rd/Cocos4.0/library/cc/LayerColor.lua +++ /dev/null @@ -1,70 +0,0 @@ ----@meta - ----@class cc.LayerColor :cc.Layer@all parent class: Layer,BlendProtocol -local LayerColor={ } -cc.LayerColor=LayerColor - - - - ----* Change width and height in Points.
----* param w The width of layer.
----* param h The Height of layer.
----* since v0.8 ----@param w float ----@param h float ----@return self -function LayerColor:changeWidthAndHeight (w,h) end ----* BlendFunction. Conforms to BlendProtocol protocol
----* lua NA ----@return cc.BlendFunc -function LayerColor:getBlendFunc () end ----* code
----* When this function bound into js or lua,the parameter will be changed
----* In js: var setBlendFunc(var src, var dst)
----* In lua: local setBlendFunc(local src, local dst)
----* endcode ----@param blendFunc cc.BlendFunc ----@return self -function LayerColor:setBlendFunc (blendFunc) end ----* Change width in Points.
----* param w The width of layer. ----@param w float ----@return self -function LayerColor:changeWidth (w) end ----@overload fun(color4b_table:color4b_table):self ----@overload fun(color4b_table:color4b_table,float:float,float:float):self ----@param color color4b_table ----@param width float ----@param height float ----@return boolean -function LayerColor:initWithColor (color,width,height) end ----* Change height in Points.
----* param h The height of layer. ----@param h float ----@return self -function LayerColor:changeHeight (h) end ----@overload fun(color4b_table:color4b_table,float:float,float:float):self ----@overload fun():self ----@overload fun(color4b_table:color4b_table):self ----@param color color4b_table ----@param width float ----@param height float ----@return self -function LayerColor:create (color,width,height) end ----* ----@param renderer cc.Renderer ----@param transform mat4_table ----@param flags unsigned_int ----@return self -function LayerColor:draw (renderer,transform,flags) end ----* ----@return boolean -function LayerColor:init () end ----* ----@param var size_table ----@return self -function LayerColor:setContentSize (var) end ----* ----@return self -function LayerColor:LayerColor () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/LayerGradient.lua b/meta/3rd/Cocos4.0/library/cc/LayerGradient.lua deleted file mode 100644 index 5254aa72..00000000 --- a/meta/3rd/Cocos4.0/library/cc/LayerGradient.lua +++ /dev/null @@ -1,89 +0,0 @@ ----@meta - ----@class cc.LayerGradient :cc.LayerColor -local LayerGradient={ } -cc.LayerGradient=LayerGradient - - - - ----* Returns the start color of the gradient.
----* return The start color. ----@return color3b_table -function LayerGradient:getStartColor () end ----* Get the compressedInterpolation
----* return The interpolation will be compressed if true. ----@return boolean -function LayerGradient:isCompressedInterpolation () end ----* Returns the start opacity of the gradient.
----* return The start opacity. ----@return unsigned_char -function LayerGradient:getStartOpacity () end ----* Sets the directional vector that will be used for the gradient.
----* The default value is vertical direction (0,-1).
----* param alongVector The direction of gradient. ----@param alongVector vec2_table ----@return self -function LayerGradient:setVector (alongVector) end ----* Returns the start opacity of the gradient.
----* param startOpacity The start opacity, from 0 to 255. ----@param startOpacity unsigned_char ----@return self -function LayerGradient:setStartOpacity (startOpacity) end ----* Whether or not the interpolation will be compressed in order to display all the colors of the gradient both in canonical and non canonical vectors.
----* Default: true.
----* param compressedInterpolation The interpolation will be compressed if true. ----@param compressedInterpolation boolean ----@return self -function LayerGradient:setCompressedInterpolation (compressedInterpolation) end ----* Returns the end opacity of the gradient.
----* param endOpacity The end opacity, from 0 to 255. ----@param endOpacity unsigned_char ----@return self -function LayerGradient:setEndOpacity (endOpacity) end ----* Returns the directional vector used for the gradient.
----* return The direction of gradient. ----@return vec2_table -function LayerGradient:getVector () end ----* Sets the end color of the gradient.
----* param endColor The end color. ----@param endColor color3b_table ----@return self -function LayerGradient:setEndColor (endColor) end ----@overload fun(color4b_table:color4b_table,color4b_table:color4b_table,vec2_table:vec2_table):self ----@overload fun(color4b_table:color4b_table,color4b_table:color4b_table):self ----@param start color4b_table ----@param _end color4b_table ----@param v vec2_table ----@return boolean -function LayerGradient:initWithColor (start,_end,v) end ----* Returns the end color of the gradient.
----* return The end color. ----@return color3b_table -function LayerGradient:getEndColor () end ----* Returns the end opacity of the gradient.
----* return The end opacity. ----@return unsigned_char -function LayerGradient:getEndOpacity () end ----* Sets the start color of the gradient.
----* param startColor The start color. ----@param startColor color3b_table ----@return self -function LayerGradient:setStartColor (startColor) end ----@overload fun(color4b_table:color4b_table,color4b_table:color4b_table):self ----@overload fun():self ----@overload fun(color4b_table:color4b_table,color4b_table:color4b_table,vec2_table:vec2_table):self ----@param start color4b_table ----@param _end color4b_table ----@param v vec2_table ----@return self -function LayerGradient:create (start,_end,v) end ----* ----@return boolean -function LayerGradient:init () end ----* ----@return string -function LayerGradient:getDescription () end ----* ----@return self -function LayerGradient:LayerGradient () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/LayerMultiplex.lua b/meta/3rd/Cocos4.0/library/cc/LayerMultiplex.lua deleted file mode 100644 index ab1714bc..00000000 --- a/meta/3rd/Cocos4.0/library/cc/LayerMultiplex.lua +++ /dev/null @@ -1,40 +0,0 @@ ----@meta - ----@class cc.LayerMultiplex :cc.Layer -local LayerMultiplex={ } -cc.LayerMultiplex=LayerMultiplex - - - - ----* initializes a MultiplexLayer with an array of layers
----* since v2.1 ----@param arrayOfLayers array_table ----@return boolean -function LayerMultiplex:initWithArray (arrayOfLayers) end ----* release the current layer and switches to another layer indexed by n.
----* The current (old) layer will be removed from it's parent with 'cleanup=true'.
----* param n The layer indexed by n will display. ----@param n int ----@return self -function LayerMultiplex:switchToAndReleaseMe (n) end ----* Add a certain layer to LayerMultiplex.
----* param layer A layer need to be added to the LayerMultiplex. ----@param layer cc.Layer ----@return self -function LayerMultiplex:addLayer (layer) end ----@overload fun(int:int,boolean:boolean):self ----@overload fun(int:int):self ----@param n int ----@param cleanup boolean ----@return self -function LayerMultiplex:switchTo (n,cleanup) end ----* ----@return boolean -function LayerMultiplex:init () end ----* ----@return string -function LayerMultiplex:getDescription () end ----* js ctor ----@return self -function LayerMultiplex:LayerMultiplex () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/LayerRadialGradient.lua b/meta/3rd/Cocos4.0/library/cc/LayerRadialGradient.lua deleted file mode 100644 index 0292f71a..00000000 --- a/meta/3rd/Cocos4.0/library/cc/LayerRadialGradient.lua +++ /dev/null @@ -1,103 +0,0 @@ ----@meta - ----@class cc.LayerRadialGradient :cc.Layer -local LayerRadialGradient={ } -cc.LayerRadialGradient=LayerRadialGradient - - - - ----* ----@return color4b_table -function LayerRadialGradient:getStartColor () end ----* ----@return cc.BlendFunc -function LayerRadialGradient:getBlendFunc () end ----* ----@return color3b_table -function LayerRadialGradient:getStartColor3B () end ----* ----@return unsigned_char -function LayerRadialGradient:getStartOpacity () end ----* ----@param center vec2_table ----@return self -function LayerRadialGradient:setCenter (center) end ----* ----@return color4b_table -function LayerRadialGradient:getEndColor () end ----* ----@param opacity unsigned_char ----@return self -function LayerRadialGradient:setStartOpacity (opacity) end ----* ----@return vec2_table -function LayerRadialGradient:getCenter () end ----* ----@param opacity unsigned_char ----@return self -function LayerRadialGradient:setEndOpacity (opacity) end ----* ----@param expand float ----@return self -function LayerRadialGradient:setExpand (expand) end ----* ----@return unsigned_char -function LayerRadialGradient:getEndOpacity () end ----* ----@param startColor color4b_table ----@param endColor color4b_table ----@param radius float ----@param center vec2_table ----@param expand float ----@return boolean -function LayerRadialGradient:initWithColor (startColor,endColor,radius,center,expand) end ----@overload fun(color3b_table0:color4b_table):self ----@overload fun(color3b_table:color3b_table):self ----@param color color3b_table ----@return self -function LayerRadialGradient:setEndColor (color) end ----* ----@return color3b_table -function LayerRadialGradient:getEndColor3B () end ----* ----@param radius float ----@return self -function LayerRadialGradient:setRadius (radius) end ----@overload fun(color3b_table0:color4b_table):self ----@overload fun(color3b_table:color3b_table):self ----@param color color3b_table ----@return self -function LayerRadialGradient:setStartColor (color) end ----* ----@return float -function LayerRadialGradient:getExpand () end ----* ----@param blendFunc cc.BlendFunc ----@return self -function LayerRadialGradient:setBlendFunc (blendFunc) end ----* ----@return float -function LayerRadialGradient:getRadius () end ----@overload fun():self ----@overload fun(color4b_table:color4b_table,color4b_table:color4b_table,float:float,vec2_table:vec2_table,float:float):self ----@param startColor color4b_table ----@param endColor color4b_table ----@param radius float ----@param center vec2_table ----@param expand float ----@return self -function LayerRadialGradient:create (startColor,endColor,radius,center,expand) end ----* ----@param renderer cc.Renderer ----@param transform mat4_table ----@param flags unsigned_int ----@return self -function LayerRadialGradient:draw (renderer,transform,flags) end ----* ----@param size size_table ----@return self -function LayerRadialGradient:setContentSize (size) end ----* ----@return self -function LayerRadialGradient:LayerRadialGradient () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Lens3D.lua b/meta/3rd/Cocos4.0/library/cc/Lens3D.lua deleted file mode 100644 index 43f437f3..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Lens3D.lua +++ /dev/null @@ -1,66 +0,0 @@ ----@meta - ----@class cc.Lens3D :cc.Grid3DAction -local Lens3D={ } -cc.Lens3D=Lens3D - - - - ----* brief Set whether lens is concave.
----* param concave Whether lens is concave. ----@param concave boolean ----@return self -function Lens3D:setConcave (concave) end ----* brief Initializes the action with center position, radius, grid size and duration.
----* param duration Specify the duration of the Lens3D action. It's a value in seconds.
----* param gridSize Specify the size of the grid.
----* param position Specify the center position of the lens effect.
----* param radius Specify the radius of the lens effect.
----* return If the initialization success, return true; otherwise, return false. ----@param duration float ----@param gridSize size_table ----@param position vec2_table ----@param radius float ----@return boolean -function Lens3D:initWithDuration (duration,gridSize,position,radius) end ----* brief Set the value of lens effect.
----* param lensEffect The value of lens effect will be set. ----@param lensEffect float ----@return self -function Lens3D:setLensEffect (lensEffect) end ----* brief Get the value of lens effect. Default value is 0.7.
----* return The value of lens effect. ----@return float -function Lens3D:getLensEffect () end ----* brief Set the center position of lens effect.
----* param position The center position will be set. ----@param position vec2_table ----@return self -function Lens3D:setPosition (position) end ----* brief Get the center position of lens effect.
----* return The center position of lens effect. ----@return vec2_table -function Lens3D:getPosition () end ----* brief Create the action with center position, radius, a grid size and duration.
----* param duration Specify the duration of the Lens3D action. It's a value in seconds.
----* param gridSize Specify the size of the grid.
----* param position Specify the center position of the lens.
----* param radius Specify the radius of the lens.
----* return If the creation success, return a pointer of Lens3D action; otherwise, return nil. ----@param duration float ----@param gridSize size_table ----@param position vec2_table ----@param radius float ----@return self -function Lens3D:create (duration,gridSize,position,radius) end ----* ----@return self -function Lens3D:clone () end ----* ----@param time float ----@return self -function Lens3D:update (time) end ----* ----@return self -function Lens3D:Lens3D () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Liquid.lua b/meta/3rd/Cocos4.0/library/cc/Liquid.lua deleted file mode 100644 index 2e6588d7..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Liquid.lua +++ /dev/null @@ -1,61 +0,0 @@ ----@meta - ----@class cc.Liquid :cc.Grid3DAction -local Liquid={ } -cc.Liquid=Liquid - - - - ----* brief Set the amplitude rate of the effect.
----* param amplitudeRate The value of amplitude rate will be set. ----@param amplitudeRate float ----@return self -function Liquid:setAmplitudeRate (amplitudeRate) end ----* brief Initializes the action with amplitude, grid size, waves count and duration.
----* param duration Specify the duration of the Liquid action. It's a value in seconds.
----* param gridSize Specify the size of the grid.
----* param waves Specify the waves count of the Liquid action.
----* param amplitude Specify the amplitude of the Liquid action.
----* return If the initialization success, return true; otherwise, return false. ----@param duration float ----@param gridSize size_table ----@param waves unsigned_int ----@param amplitude float ----@return boolean -function Liquid:initWithDuration (duration,gridSize,waves,amplitude) end ----* brief Get the amplitude of the effect.
----* return Return the amplitude of the effect. ----@return float -function Liquid:getAmplitude () end ----* brief Get the amplitude rate of the effect.
----* return Return the amplitude rate of the effect. ----@return float -function Liquid:getAmplitudeRate () end ----* brief Set the amplitude to the effect.
----* param amplitude The value of amplitude will be set. ----@param amplitude float ----@return self -function Liquid:setAmplitude (amplitude) end ----* brief Create the action with amplitude, grid size, waves count and duration.
----* param duration Specify the duration of the Liquid action. It's a value in seconds.
----* param gridSize Specify the size of the grid.
----* param waves Specify the waves count of the Liquid action.
----* param amplitude Specify the amplitude of the Liquid action.
----* return If the creation success, return a pointer of Liquid action; otherwise, return nil. ----@param duration float ----@param gridSize size_table ----@param waves unsigned_int ----@param amplitude float ----@return self -function Liquid:create (duration,gridSize,waves,amplitude) end ----* ----@return self -function Liquid:clone () end ----* ----@param time float ----@return self -function Liquid:update (time) end ----* ----@return self -function Liquid:Liquid () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Manifest.lua b/meta/3rd/Cocos4.0/library/cc/Manifest.lua deleted file mode 100644 index 5f72dfa9..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Manifest.lua +++ /dev/null @@ -1,30 +0,0 @@ ----@meta - ----@class cc.Manifest :cc.Ref -local Manifest={ } -cc.Manifest=Manifest - - - - ----* @brief Gets remote manifest file url. ----@return string -function Manifest:getManifestFileUrl () end ----* @brief Check whether the version informations have been fully loaded ----@return boolean -function Manifest:isVersionLoaded () end ----* @brief Check whether the manifest have been fully loaded ----@return boolean -function Manifest:isLoaded () end ----* @brief Gets remote package url. ----@return string -function Manifest:getPackageUrl () end ----* @brief Gets manifest version. ----@return string -function Manifest:getVersion () end ----* @brief Gets remote version file url. ----@return string -function Manifest:getVersionFileUrl () end ----* @brief Get the search paths list related to the Manifest. ----@return array_table -function Manifest:getSearchPaths () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Material.lua b/meta/3rd/Cocos4.0/library/cc/Material.lua deleted file mode 100644 index 2d5ed078..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Material.lua +++ /dev/null @@ -1,81 +0,0 @@ ----@meta - ----@class cc.Material :cc.Ref -local Material={ } -cc.Material=Material - - - - ----* returns a clone (deep-copy) of the material ----@return self -function Material:clone () end ----* ----@param meshCommand cc.MeshCommand ----@param globalZOrder float ----@param vertexBuffer cc.backend.Buffer ----@param indexBuffer cc.backend.Buffer ----@param primitive int ----@param indexFormat int ----@param indexCount unsigned_int ----@param modelView mat4_table ----@return self -function Material:draw (meshCommand,globalZOrder,vertexBuffer,indexBuffer,primitive,indexFormat,indexCount,modelView) end ----* ----@return cc.RenderState -function Material:getRenderState () end ----* / sets the material name ----@param name string ----@return self -function Material:setName (name) end ----* Returns a Technique by index.
----* returns `nullptr` if the index is invalid. ----@param index int ----@return cc.Technique -function Material:getTechniqueByIndex (index) end ----* / returns the material name ----@return string -function Material:getName () end ----* Returns the list of Techniques ----@return array_table -function Material:getTechniques () end ----* Returns the number of Techniques in the Material. ----@return int -function Material:getTechniqueCount () end ----* Sets the current technique ----@param techniqueName string ----@return self -function Material:setTechnique (techniqueName) end ----* Returns a Technique by its name.
----* returns `nullptr` if the Technique can't be found. ----@param name string ----@return cc.Technique -function Material:getTechniqueByName (name) end ----* Adds a Technique into the Material ----@param technique cc.Technique ----@return self -function Material:addTechnique (technique) end ----* Returns the Technique used by the Material ----@return cc.Technique -function Material:getTechnique () end ----* Creates a Material using the data from the Properties object defined at the specified URL,
----* where the URL is of the format ".#//.../"
----* (and "#//.../" is optional).
----* param url The URL pointing to the Properties object defining the material.
----* return A new Material or NULL if there was an error. ----@param path string ----@return self -function Material:createWithFilename (path) end ----* Creates a material from the specified properties object.
----* param materialProperties The properties object defining the
----* material (must have namespace equal to 'material').
----* return A new Material. ----@param materialProperties cc.Properties ----@return self -function Material:createWithProperties (materialProperties) end ----* Creates a Material with a GLProgramState.
----* It will only contain one Technique and one Pass.
----* Added in order to support legacy code. ----@param programState cc.backend.ProgramState ----@return self -function Material:createWithProgramState (programState) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Menu.lua b/meta/3rd/Cocos4.0/library/cc/Menu.lua deleted file mode 100644 index 61d5ef51..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Menu.lua +++ /dev/null @@ -1,71 +0,0 @@ ----@meta - ----@class cc.Menu :cc.Layer -local Menu={ } -cc.Menu=Menu - - - - ----* initializes a Menu with a NSArray of MenuItem objects ----@param arrayOfItems array_table ----@return boolean -function Menu:initWithArray (arrayOfItems) end ----* Set whether the menu is enabled. If set to false, interacting with the menu
----* will have no effect.
----* The default value is true, a menu is enabled by default.
----* param value true if menu is to be enabled, false if menu is to be disabled. ----@param value boolean ----@return self -function Menu:setEnabled (value) end ----* Align items vertically. ----@return self -function Menu:alignItemsVertically () end ----* Determines if the menu is enabled.
----* see `setEnabled(bool)`.
----* return whether the menu is enabled or not. ----@return boolean -function Menu:isEnabled () end ----* Align items horizontally. ----@return self -function Menu:alignItemsHorizontally () end ----* Align items horizontally with padding.
----* since v0.7.2 ----@param padding float ----@return self -function Menu:alignItemsHorizontallyWithPadding (padding) end ----* Align items vertically with padding.
----* since v0.7.2 ----@param padding float ----@return self -function Menu:alignItemsVerticallyWithPadding (padding) end ----@overload fun(cc.Node:cc.Node,int:int):self ----@overload fun(cc.Node:cc.Node):self ----@overload fun(cc.Node:cc.Node,int:int,string2:int):self ----@overload fun(cc.Node:cc.Node,int:int,string:string):self ----@param child cc.Node ----@param zOrder int ----@param name string ----@return self -function Menu:addChild (child,zOrder,name) end ----* ----@return string -function Menu:getDescription () end ----* ----@param child cc.Node ----@param cleanup boolean ----@return self -function Menu:removeChild (child,cleanup) end ----* initializes an empty Menu ----@return boolean -function Menu:init () end ----* ----@param value boolean ----@return self -function Menu:setOpacityModifyRGB (value) end ----* ----@return boolean -function Menu:isOpacityModifyRGB () end ----* js ctor ----@return self -function Menu:Menu () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/MenuItem.lua b/meta/3rd/Cocos4.0/library/cc/MenuItem.lua deleted file mode 100644 index 8405b5a2..00000000 --- a/meta/3rd/Cocos4.0/library/cc/MenuItem.lua +++ /dev/null @@ -1,37 +0,0 @@ ----@meta - ----@class cc.MenuItem :cc.Node -local MenuItem={ } -cc.MenuItem=MenuItem - - - - ----* Enables or disables the item. ----@param value boolean ----@return self -function MenuItem:setEnabled (value) end ----* Activate the item. ----@return self -function MenuItem:activate () end ----* Returns whether or not the item is enabled. ----@return boolean -function MenuItem:isEnabled () end ----* The item was selected (not activated), similar to "mouse-over". ----@return self -function MenuItem:selected () end ----* Returns whether or not the item is selected. ----@return boolean -function MenuItem:isSelected () end ----* The item was unselected. ----@return self -function MenuItem:unselected () end ----* Returns the outside box. ----@return rect_table -function MenuItem:rect () end ----* js NA ----@return string -function MenuItem:getDescription () end ----* js ctor ----@return self -function MenuItem:MenuItem () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/MenuItemAtlasFont.lua b/meta/3rd/Cocos4.0/library/cc/MenuItemAtlasFont.lua deleted file mode 100644 index ce96ac83..00000000 --- a/meta/3rd/Cocos4.0/library/cc/MenuItemAtlasFont.lua +++ /dev/null @@ -1,21 +0,0 @@ ----@meta - ----@class cc.MenuItemAtlasFont :cc.MenuItemLabel -local MenuItemAtlasFont={ } -cc.MenuItemAtlasFont=MenuItemAtlasFont - - - - ----* Initializes a menu item from a string and atlas with a target/selector. ----@param value string ----@param charMapFile string ----@param itemWidth int ----@param itemHeight int ----@param startCharMap char ----@param callback function ----@return boolean -function MenuItemAtlasFont:initWithString (value,charMapFile,itemWidth,itemHeight,startCharMap,callback) end ----* js ctor ----@return self -function MenuItemAtlasFont:MenuItemAtlasFont () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/MenuItemFont.lua b/meta/3rd/Cocos4.0/library/cc/MenuItemFont.lua deleted file mode 100644 index 5f45ef10..00000000 --- a/meta/3rd/Cocos4.0/library/cc/MenuItemFont.lua +++ /dev/null @@ -1,57 +0,0 @@ ----@meta - ----@class cc.MenuItemFont :cc.MenuItemLabel -local MenuItemFont={ } -cc.MenuItemFont=MenuItemFont - - - - ----* Returns the name of the Font.
----* js getFontNameObj
----* js NA ----@return string -function MenuItemFont:getFontNameObj () end ----* Set the font name .
----* c++ can not overload static and non-static member functions with the same parameter types.
----* so change the name to setFontNameObj.
----* js setFontName
----* js NA ----@param name string ----@return self -function MenuItemFont:setFontNameObj (name) end ----* Initializes a menu item from a string with a target/selector. ----@param value string ----@param callback function ----@return boolean -function MenuItemFont:initWithString (value,callback) end ----* get font size .
----* js getFontSize
----* js NA ----@return int -function MenuItemFont:getFontSizeObj () end ----* Set font size.
----* c++ can not overload static and non-static member functions with the same parameter types.
----* so change the name to setFontSizeObj.
----* js setFontSize
----* js NA ----@param size int ----@return self -function MenuItemFont:setFontSizeObj (size) end ----* Set the default font name. ----@param name string ----@return self -function MenuItemFont:setFontName (name) end ----* Get default font size. ----@return int -function MenuItemFont:getFontSize () end ----* Get the default font name. ----@return string -function MenuItemFont:getFontName () end ----* Set default font size. ----@param size int ----@return self -function MenuItemFont:setFontSize (size) end ----* js ctor ----@return self -function MenuItemFont:MenuItemFont () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/MenuItemImage.lua b/meta/3rd/Cocos4.0/library/cc/MenuItemImage.lua deleted file mode 100644 index 4b0f3815..00000000 --- a/meta/3rd/Cocos4.0/library/cc/MenuItemImage.lua +++ /dev/null @@ -1,34 +0,0 @@ ----@meta - ----@class cc.MenuItemImage :cc.MenuItemSprite -local MenuItemImage={ } -cc.MenuItemImage=MenuItemImage - - - - ----* Sets the sprite frame for the disabled image. ----@param frame cc.SpriteFrame ----@return self -function MenuItemImage:setDisabledSpriteFrame (frame) end ----* Sets the sprite frame for the selected image. ----@param frame cc.SpriteFrame ----@return self -function MenuItemImage:setSelectedSpriteFrame (frame) end ----* Sets the sprite frame for the normal image. ----@param frame cc.SpriteFrame ----@return self -function MenuItemImage:setNormalSpriteFrame (frame) end ----* ----@return boolean -function MenuItemImage:init () end ----* Initializes a menu item with a normal, selected and disabled image with a callable object. ----@param normalImage string ----@param selectedImage string ----@param disabledImage string ----@param callback function ----@return boolean -function MenuItemImage:initWithNormalImage (normalImage,selectedImage,disabledImage,callback) end ----* js ctor ----@return self -function MenuItemImage:MenuItemImage () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/MenuItemLabel.lua b/meta/3rd/Cocos4.0/library/cc/MenuItemLabel.lua deleted file mode 100644 index 01061a05..00000000 --- a/meta/3rd/Cocos4.0/library/cc/MenuItemLabel.lua +++ /dev/null @@ -1,51 +0,0 @@ ----@meta - ----@class cc.MenuItemLabel :cc.MenuItem -local MenuItemLabel={ } -cc.MenuItemLabel=MenuItemLabel - - - - ----* Sets the label that is rendered. ----@param node cc.Node ----@return self -function MenuItemLabel:setLabel (node) end ----* Get the inner string of the inner label. ----@return string -function MenuItemLabel:getString () end ----* Gets the color that will be used when the item is disabled. ----@return color3b_table -function MenuItemLabel:getDisabledColor () end ----* Sets a new string to the inner label. ----@param label string ----@return self -function MenuItemLabel:setString (label) end ----* Initializes a MenuItemLabel with a Label, target and selector. ----@param label cc.Node ----@param callback function ----@return boolean -function MenuItemLabel:initWithLabel (label,callback) end ----* Sets the color that will be used when the item is disabled. ----@param color color3b_table ----@return self -function MenuItemLabel:setDisabledColor (color) end ----* Gets the label that is rendered. ----@return cc.Node -function MenuItemLabel:getLabel () end ----* ----@param enabled boolean ----@return self -function MenuItemLabel:setEnabled (enabled) end ----* ----@return self -function MenuItemLabel:activate () end ----* ----@return self -function MenuItemLabel:unselected () end ----* ----@return self -function MenuItemLabel:selected () end ----* js ctor ----@return self -function MenuItemLabel:MenuItemLabel () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/MenuItemSprite.lua b/meta/3rd/Cocos4.0/library/cc/MenuItemSprite.lua deleted file mode 100644 index 78a1f885..00000000 --- a/meta/3rd/Cocos4.0/library/cc/MenuItemSprite.lua +++ /dev/null @@ -1,51 +0,0 @@ ----@meta - ----@class cc.MenuItemSprite :cc.MenuItem -local MenuItemSprite={ } -cc.MenuItemSprite=MenuItemSprite - - - - ----* Enables or disables the item. ----@param bEnabled boolean ----@return self -function MenuItemSprite:setEnabled (bEnabled) end ----* The item was selected (not activated), similar to "mouse-over".
----* since v0.99.5 ----@return self -function MenuItemSprite:selected () end ----* Sets the image used when the item is not selected. ----@param image cc.Node ----@return self -function MenuItemSprite:setNormalImage (image) end ----* Sets the image used when the item is disabled. ----@param image cc.Node ----@return self -function MenuItemSprite:setDisabledImage (image) end ----* Initializes a menu item with a normal, selected and disabled image with a callable object. ----@param normalSprite cc.Node ----@param selectedSprite cc.Node ----@param disabledSprite cc.Node ----@param callback function ----@return boolean -function MenuItemSprite:initWithNormalSprite (normalSprite,selectedSprite,disabledSprite,callback) end ----* Sets the image used when the item is selected. ----@param image cc.Node ----@return self -function MenuItemSprite:setSelectedImage (image) end ----* Gets the image used when the item is disabled. ----@return cc.Node -function MenuItemSprite:getDisabledImage () end ----* Gets the image used when the item is selected. ----@return cc.Node -function MenuItemSprite:getSelectedImage () end ----* Gets the image used when the item is not selected. ----@return cc.Node -function MenuItemSprite:getNormalImage () end ----* The item was unselected. ----@return self -function MenuItemSprite:unselected () end ----* ----@return self -function MenuItemSprite:MenuItemSprite () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/MenuItemToggle.lua b/meta/3rd/Cocos4.0/library/cc/MenuItemToggle.lua deleted file mode 100644 index db7cc146..00000000 --- a/meta/3rd/Cocos4.0/library/cc/MenuItemToggle.lua +++ /dev/null @@ -1,50 +0,0 @@ ----@meta - ----@class cc.MenuItemToggle :cc.MenuItem -local MenuItemToggle={ } -cc.MenuItemToggle=MenuItemToggle - - - - ----* Sets the array that contains the subitems. ----@param items array_table ----@return self -function MenuItemToggle:setSubItems (items) end ----* Initializes a menu item with a item. ----@param item cc.MenuItem ----@return boolean -function MenuItemToggle:initWithItem (item) end ----* Gets the index of the selected item. ----@return unsigned_int -function MenuItemToggle:getSelectedIndex () end ----* Add more menu item. ----@param item cc.MenuItem ----@return self -function MenuItemToggle:addSubItem (item) end ----* Return the selected item. ----@return cc.MenuItem -function MenuItemToggle:getSelectedItem () end ----* Sets the index of the selected item. ----@param index unsigned_int ----@return self -function MenuItemToggle:setSelectedIndex (index) end ----* ----@param var boolean ----@return self -function MenuItemToggle:setEnabled (var) end ----* ----@return self -function MenuItemToggle:cleanup () end ----* ----@return self -function MenuItemToggle:activate () end ----* ----@return self -function MenuItemToggle:unselected () end ----* ----@return self -function MenuItemToggle:selected () end ----* js ctor ----@return self -function MenuItemToggle:MenuItemToggle () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Mesh.lua b/meta/3rd/Cocos4.0/library/cc/Mesh.lua deleted file mode 100644 index eff1e527..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Mesh.lua +++ /dev/null @@ -1,85 +0,0 @@ ----@meta - ----@class cc.Mesh :cc.Ref -local Mesh={ } -cc.Mesh=Mesh - - - - ----* Returns the Material being used by the Mesh ----@return cc.Material -function Mesh:getMaterial () end ----* get per vertex size in bytes ----@return int -function Mesh:getVertexSizeInBytes () end ----* Sets a new ProgramState for the Mesh
----* A new Material will be created for it ----@param programState cc.backend.ProgramState ----@return self -function Mesh:setProgramState (programState) end ----* Sets a new Material to the Mesh ----@param material cc.Material ----@return self -function Mesh:setMaterial (material) end ----* name getter ----@return string -function Mesh:getName () end ----* get MeshVertexAttribute by index ----@param idx int ----@return cc.MeshVertexAttrib -function Mesh:getMeshVertexAttribute (idx) end ----* calculate the AABB of the mesh
----* note the AABB is in the local space, not the world space ----@return self -function Mesh:calculateAABB () end ----* ----@param renderer cc.Renderer ----@param globalZ float ----@param transform mat4_table ----@param flags unsigned_int ----@param lightMask unsigned_int ----@param color vec4_table ----@param forceDepthWrite boolean ----@return self -function Mesh:draw (renderer,globalZ,transform,flags,lightMask,color,forceDepthWrite) end ----* ----@return cc.BlendFunc -function Mesh:getBlendFunc () end ----* name setter ----@param name string ----@return self -function Mesh:setName (name) end ----* Mesh index data setter ----@param indexdata cc.MeshIndexData ----@return self -function Mesh:setMeshIndexData (indexdata) end ----* get ProgramState
----* lua NA ----@return cc.backend.ProgramState -function Mesh:getProgramState () end ----* get mesh vertex attribute count ----@return int -function Mesh:getMeshVertexAttribCount () end ----* ----@param blendFunc cc.BlendFunc ----@return self -function Mesh:setBlendFunc (blendFunc) end ----* force set this Sprite3D to 2D render queue ----@param force2D boolean ----@return self -function Mesh:setForce2DQueue (force2D) end ----* skin setter ----@param skin cc.MeshSkin ----@return self -function Mesh:setSkin (skin) end ----* ----@return boolean -function Mesh:isVisible () end ----* visible getter and setter ----@param visible boolean ----@return self -function Mesh:setVisible (visible) end ----* ----@return self -function Mesh:Mesh () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/MotionStreak.lua b/meta/3rd/Cocos4.0/library/cc/MotionStreak.lua deleted file mode 100644 index 7aecbd2f..00000000 --- a/meta/3rd/Cocos4.0/library/cc/MotionStreak.lua +++ /dev/null @@ -1,124 +0,0 @@ ----@meta - ----@class cc.MotionStreak :cc.Node@all parent class: Node,TextureProtocol -local MotionStreak={ } -cc.MotionStreak=MotionStreak - - - - ----* Remove all living segments of the ribbon. ----@return self -function MotionStreak:reset () end ----* js NA
----* lua NA ----@return cc.BlendFunc -function MotionStreak:getBlendFunc () end ----* js NA
----* lua NA ----@param blendFunc cc.BlendFunc ----@return self -function MotionStreak:setBlendFunc (blendFunc) end ----* Color used for the tint.
----* param colors The color used for the tint. ----@param colors color3b_table ----@return self -function MotionStreak:tintWithColor (colors) end ----* ----@return cc.Texture2D -function MotionStreak:getTexture () end ----* Sets the starting position initialized or not.
----* param bStartingPositionInitialized True if initialized the starting position. ----@param bStartingPositionInitialized boolean ----@return self -function MotionStreak:setStartingPositionInitialized (bStartingPositionInitialized) end ----* ----@param texture cc.Texture2D ----@return self -function MotionStreak:setTexture (texture) end ----* Is the starting position initialized or not.
----* return True if the starting position is initialized. ----@return boolean -function MotionStreak:isStartingPositionInitialized () end ----* When fast mode is enabled, new points are added faster but with lower precision.
----* return True if fast mode is enabled. ----@return boolean -function MotionStreak:isFastMode () end ----* Get stroke.
----* return float stroke. ----@return float -function MotionStreak:getStroke () end ----@overload fun(float:float,float:float,float:float,color3b_table:color3b_table,string4:cc.Texture2D):self ----@overload fun(float:float,float:float,float:float,color3b_table:color3b_table,string:string):self ----@param fade float ----@param minSeg float ----@param stroke float ----@param color color3b_table ----@param path string ----@return boolean -function MotionStreak:initWithFade (fade,minSeg,stroke,color,path) end ----* Sets fast mode or not.
----* param bFastMode True if enabled fast mode. ----@param bFastMode boolean ----@return self -function MotionStreak:setFastMode (bFastMode) end ----* Set stroke.
----* param stroke The width of stroke. ----@param stroke float ----@return self -function MotionStreak:setStroke (stroke) end ----@overload fun(float:float,float:float,float:float,color3b_table:color3b_table,string4:cc.Texture2D):self ----@overload fun(float:float,float:float,float:float,color3b_table:color3b_table,string:string):self ----@param timeToFade float ----@param minSeg float ----@param strokeWidth float ----@param strokeColor color3b_table ----@param imagePath string ----@return self -function MotionStreak:create (timeToFade,minSeg,strokeWidth,strokeColor,imagePath) end ----* ----@return boolean -function MotionStreak:isOpacityModifyRGB () end ----* ----@param opacity unsigned_char ----@return self -function MotionStreak:setOpacity (opacity) end ----* ----@param y float ----@return self -function MotionStreak:setPositionY (y) end ----* ----@param x float ----@return self -function MotionStreak:setPositionX (x) end ----* ----@return float -function MotionStreak:getPositionY () end ----* ----@return float -function MotionStreak:getPositionX () end ----* ----@return vec3_table -function MotionStreak:getPosition3D () end ----* ----@param value boolean ----@return self -function MotionStreak:setOpacityModifyRGB (value) end ----* ----@return unsigned_char -function MotionStreak:getOpacity () end ----@overload fun(float:float,float:float):self ----@overload fun(float0:vec2_table):self ----@param x float ----@param y float ----@return self -function MotionStreak:setPosition (x,y) end ----@overload fun(float:float,float:float):self ----@overload fun():self ----@param x float ----@param y float ----@return self -function MotionStreak:getPosition (x,y) end ----* ----@return self -function MotionStreak:MotionStreak () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/MotionStreak3D.lua b/meta/3rd/Cocos4.0/library/cc/MotionStreak3D.lua deleted file mode 100644 index fae595d9..00000000 --- a/meta/3rd/Cocos4.0/library/cc/MotionStreak3D.lua +++ /dev/null @@ -1,146 +0,0 @@ ----@meta - ----@class cc.MotionStreak3D :cc.Node@all parent class: Node,TextureProtocol -local MotionStreak3D={ } -cc.MotionStreak3D=MotionStreak3D - - - - ----* Remove all living segments of the ribbon. ----@return self -function MotionStreak3D:reset () end ----* ----@param texture cc.Texture2D ----@return self -function MotionStreak3D:setTexture (texture) end ----* ----@return cc.Texture2D -function MotionStreak3D:getTexture () end ----* Color used for the tint.
----* param colors The color used for the tint. ----@param colors color3b_table ----@return self -function MotionStreak3D:tintWithColor (colors) end ----* Get the direction of sweeping line segment ----@return vec3_table -function MotionStreak3D:getSweepAxis () end ----* js NA
----* lua NA ----@param blendFunc cc.BlendFunc ----@return self -function MotionStreak3D:setBlendFunc (blendFunc) end ----* Sets the starting position initialized or not.
----* param bStartingPositionInitialized True if initialized the starting position. ----@param bStartingPositionInitialized boolean ----@return self -function MotionStreak3D:setStartingPositionInitialized (bStartingPositionInitialized) end ----* js NA
----* lua NA ----@return cc.BlendFunc -function MotionStreak3D:getBlendFunc () end ----* Is the starting position initialized or not.
----* return True if the starting position is initialized. ----@return boolean -function MotionStreak3D:isStartingPositionInitialized () end ----* Get stroke.
----* return float stroke. ----@return float -function MotionStreak3D:getStroke () end ----@overload fun(float:float,float:float,float:float,color3b_table:color3b_table,string4:cc.Texture2D):self ----@overload fun(float:float,float:float,float:float,color3b_table:color3b_table,string:string):self ----@param fade float ----@param minSeg float ----@param stroke float ----@param color color3b_table ----@param path string ----@return boolean -function MotionStreak3D:initWithFade (fade,minSeg,stroke,color,path) end ----* Set the direction of sweeping line segment.
----* param sweepAxis Direction of sweeping line segment ----@param sweepAxis vec3_table ----@return self -function MotionStreak3D:setSweepAxis (sweepAxis) end ----* Set stroke.
----* param stroke The width of stroke. ----@param stroke float ----@return self -function MotionStreak3D:setStroke (stroke) end ----@overload fun(float:float,float:float,float:float,color3b_table:color3b_table,string4:cc.Texture2D):self ----@overload fun(float:float,float:float,float:float,color3b_table:color3b_table,string:string):self ----@param fade float ----@param minSeg float ----@param stroke float ----@param color color3b_table ----@param path string ----@return self -function MotionStreak3D:create (fade,minSeg,stroke,color,path) end ----* js NA
----* lua NA ----@param renderer cc.Renderer ----@param transform mat4_table ----@param flags unsigned_int ----@return self -function MotionStreak3D:draw (renderer,transform,flags) end ----* ----@param value boolean ----@return self -function MotionStreak3D:setOpacityModifyRGB (value) end ----* ----@param y float ----@return self -function MotionStreak3D:setPositionY (y) end ----* ----@param rotation vec3_table ----@return self -function MotionStreak3D:setRotation3D (rotation) end ----* ----@param x float ----@return self -function MotionStreak3D:setPositionX (x) end ----* ----@param position vec3_table ----@return self -function MotionStreak3D:setPosition3D (position) end ----* ----@return float -function MotionStreak3D:getPositionY () end ----* ----@return float -function MotionStreak3D:getPositionX () end ----* ----@return vec3_table -function MotionStreak3D:getPosition3D () end ----* ----@param opacity unsigned_char ----@return self -function MotionStreak3D:setOpacity (opacity) end ----* lua NA ----@param delta float ----@return self -function MotionStreak3D:update (delta) end ----* ----@param quat cc.Quaternion ----@return self -function MotionStreak3D:setRotationQuat (quat) end ----* ----@return unsigned_char -function MotionStreak3D:getOpacity () end ----@overload fun(float:float,float:float):self ----@overload fun(float0:vec2_table):self ----@param x float ----@param y float ----@return self -function MotionStreak3D:setPosition (x,y) end ----@overload fun(float:float,float:float):self ----@overload fun():self ----@param x float ----@param y float ----@return self -function MotionStreak3D:getPosition (x,y) end ----* ----@return boolean -function MotionStreak3D:isOpacityModifyRGB () end ----* ----@return self -function MotionStreak3D:MotionStreak3D () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/MoveBy.lua b/meta/3rd/Cocos4.0/library/cc/MoveBy.lua deleted file mode 100644 index a7eb9bed..00000000 --- a/meta/3rd/Cocos4.0/library/cc/MoveBy.lua +++ /dev/null @@ -1,38 +0,0 @@ ----@meta - ----@class cc.MoveBy :cc.ActionInterval -local MoveBy={ } -cc.MoveBy=MoveBy - - - - ----@overload fun(float:float,vec2_table1:vec3_table):self ----@overload fun(float:float,vec2_table:vec2_table):self ----@param duration float ----@param deltaPosition vec2_table ----@return boolean -function MoveBy:initWithDuration (duration,deltaPosition) end ----@overload fun(float:float,vec2_table1:vec3_table):self ----@overload fun(float:float,vec2_table:vec2_table):self ----@param duration float ----@param deltaPosition vec2_table ----@return self -function MoveBy:create (duration,deltaPosition) end ----* ----@param target cc.Node ----@return self -function MoveBy:startWithTarget (target) end ----* ----@return self -function MoveBy:clone () end ----* ----@return self -function MoveBy:reverse () end ----* param time in seconds ----@param time float ----@return self -function MoveBy:update (time) end ----* ----@return self -function MoveBy:MoveBy () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/MoveTo.lua b/meta/3rd/Cocos4.0/library/cc/MoveTo.lua deleted file mode 100644 index bae3dfc3..00000000 --- a/meta/3rd/Cocos4.0/library/cc/MoveTo.lua +++ /dev/null @@ -1,34 +0,0 @@ ----@meta - ----@class cc.MoveTo :cc.MoveBy -local MoveTo={ } -cc.MoveTo=MoveTo - - - - ----@overload fun(float:float,vec2_table1:vec3_table):self ----@overload fun(float:float,vec2_table:vec2_table):self ----@param duration float ----@param position vec2_table ----@return boolean -function MoveTo:initWithDuration (duration,position) end ----@overload fun(float:float,vec2_table1:vec3_table):self ----@overload fun(float:float,vec2_table:vec2_table):self ----@param duration float ----@param position vec2_table ----@return self -function MoveTo:create (duration,position) end ----* ----@param target cc.Node ----@return self -function MoveTo:startWithTarget (target) end ----* ----@return self -function MoveTo:clone () end ----* ----@return self -function MoveTo:reverse () end ----* ----@return self -function MoveTo:MoveTo () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/NavMesh.lua b/meta/3rd/Cocos4.0/library/cc/NavMesh.lua deleted file mode 100644 index a78e8336..00000000 --- a/meta/3rd/Cocos4.0/library/cc/NavMesh.lua +++ /dev/null @@ -1,50 +0,0 @@ ----@meta - ----@class cc.NavMesh :cc.Ref -local NavMesh={ } -cc.NavMesh=NavMesh - - - - ----* remove a obstacle from navmesh. ----@param obstacle cc.NavMeshObstacle ----@return self -function NavMesh:removeNavMeshObstacle (obstacle) end ----* remove a agent from navmesh. ----@param agent cc.NavMeshAgent ----@return self -function NavMesh:removeNavMeshAgent (agent) end ----* update navmesh. ----@param dt float ----@return self -function NavMesh:update (dt) end ----* Check enabled debug draw. ----@return boolean -function NavMesh:isDebugDrawEnabled () end ----* add a agent to navmesh. ----@param agent cc.NavMeshAgent ----@return self -function NavMesh:addNavMeshAgent (agent) end ----* add a obstacle to navmesh. ----@param obstacle cc.NavMeshObstacle ----@return self -function NavMesh:addNavMeshObstacle (obstacle) end ----* Enable debug draw or disable. ----@param enable boolean ----@return self -function NavMesh:setDebugDrawEnable (enable) end ----* Internal method, the updater of debug drawing, need called each frame. ----@param renderer cc.Renderer ----@return self -function NavMesh:debugDraw (renderer) end ----* Create navmesh
----* param navFilePath The NavMesh File path.
----* param geomFilePath The geometry File Path,include offmesh information,etc. ----@param navFilePath string ----@param geomFilePath string ----@return self -function NavMesh:create (navFilePath,geomFilePath) end ----* ----@return self -function NavMesh:NavMesh () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/NavMeshAgent.lua b/meta/3rd/Cocos4.0/library/cc/NavMeshAgent.lua deleted file mode 100644 index b00b2943..00000000 --- a/meta/3rd/Cocos4.0/library/cc/NavMeshAgent.lua +++ /dev/null @@ -1,125 +0,0 @@ ----@meta - ----@class cc.NavMeshAgent :cc.Component -local NavMeshAgent={ } -cc.NavMeshAgent=NavMeshAgent - - - - ----* set maximal speed of agent ----@param maxSpeed float ----@return self -function NavMeshAgent:setMaxSpeed (maxSpeed) end ----* synchronize parameter to node. ----@return self -function NavMeshAgent:syncToNode () end ----* Traverse OffMeshLink manually ----@return self -function NavMeshAgent:completeOffMeshLink () end ----* get separation weight ----@return float -function NavMeshAgent:getSeparationWeight () end ----* Set automatic Traverse OffMeshLink ----@param isAuto boolean ----@return self -function NavMeshAgent:setAutoTraverseOffMeshLink (isAuto) end ----* get current velocity ----@return vec3_table -function NavMeshAgent:getCurrentVelocity () end ----* synchronize parameter to agent. ----@return self -function NavMeshAgent:syncToAgent () end ----* Check agent arrived OffMeshLink ----@return boolean -function NavMeshAgent:isOnOffMeshLink () end ----* set separation weight ----@param weight float ----@return self -function NavMeshAgent:setSeparationWeight (weight) end ----* pause movement ----@return self -function NavMeshAgent:pause () end ----* ----@return void -function NavMeshAgent:getUserData () end ----* Set automatic Orientation ----@param isAuto boolean ----@return self -function NavMeshAgent:setAutoOrientation (isAuto) end ----* get agent height ----@return float -function NavMeshAgent:getHeight () end ----* get maximal speed of agent ----@return float -function NavMeshAgent:getMaxSpeed () end ----* Get current OffMeshLink information ----@return cc.OffMeshLinkData -function NavMeshAgent:getCurrentOffMeshLinkData () end ----* get agent radius ----@return float -function NavMeshAgent:getRadius () end ----* synchronization between node and agent is time consuming, you can skip some synchronization using this function ----@param flag int ----@return self -function NavMeshAgent:setSyncFlag (flag) end ----* ----@return int -function NavMeshAgent:getSyncFlag () end ----* resume movement ----@return self -function NavMeshAgent:resume () end ----* stop movement ----@return self -function NavMeshAgent:stop () end ----* set maximal acceleration of agent ----@param maxAcceleration float ----@return self -function NavMeshAgent:setMaxAcceleration (maxAcceleration) end ----* Set the reference axes of agent's orientation
----* param rotRefAxes The value of reference axes in local coordinate system. ----@param rotRefAxes vec3_table ----@return self -function NavMeshAgent:setOrientationRefAxes (rotRefAxes) end ----* get maximal acceleration of agent ----@return float -function NavMeshAgent:getMaxAcceleration () end ----* set agent height ----@param height float ----@return self -function NavMeshAgent:setHeight (height) end ----* ----@param data void ----@return self -function NavMeshAgent:setUserData (data) end ----* get obstacle avoidance type ----@return unsigned_char -function NavMeshAgent:getObstacleAvoidanceType () end ----* get current velocity ----@return vec3_table -function NavMeshAgent:getVelocity () end ----* set agent radius ----@param radius float ----@return self -function NavMeshAgent:setRadius (radius) end ----* set obstacle avoidance type ----@param type unsigned_char ----@return self -function NavMeshAgent:setObstacleAvoidanceType (type) end ----* ----@return string -function NavMeshAgent:getNavMeshAgentComponentName () end ----* Create agent
----* param param The parameters of agent. ----@param param cc.NavMeshAgentParam ----@return self -function NavMeshAgent:create (param) end ----* ----@return self -function NavMeshAgent:onEnter () end ----* ----@return self -function NavMeshAgent:onExit () end ----* ----@return self -function NavMeshAgent:NavMeshAgent () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/NavMeshObstacle.lua b/meta/3rd/Cocos4.0/library/cc/NavMeshObstacle.lua deleted file mode 100644 index 2923a9b0..00000000 --- a/meta/3rd/Cocos4.0/library/cc/NavMeshObstacle.lua +++ /dev/null @@ -1,52 +0,0 @@ ----@meta - ----@class cc.NavMeshObstacle :cc.Component -local NavMeshObstacle={ } -cc.NavMeshObstacle=NavMeshObstacle - - - - ----* ----@return int -function NavMeshObstacle:getSyncFlag () end ----* ----@param radius float ----@param height float ----@return boolean -function NavMeshObstacle:initWith (radius,height) end ----* synchronize parameter to obstacle. ----@return self -function NavMeshObstacle:syncToObstacle () end ----* synchronize parameter to node. ----@return self -function NavMeshObstacle:syncToNode () end ----* Get height of obstacle ----@return float -function NavMeshObstacle:getHeight () end ----* synchronization between node and obstacle is time consuming, you can skip some synchronization using this function ----@param flag int ----@return self -function NavMeshObstacle:setSyncFlag (flag) end ----* Get radius of obstacle ----@return float -function NavMeshObstacle:getRadius () end ----* Create obstacle, shape is cylinder
----* param radius The radius of obstacle.
----* param height The height of obstacle. ----@param radius float ----@param height float ----@return self -function NavMeshObstacle:create (radius,height) end ----* ----@return string -function NavMeshObstacle:getNavMeshObstacleComponentName () end ----* ----@return self -function NavMeshObstacle:onEnter () end ----* ----@return self -function NavMeshObstacle:onExit () end ----* ----@return self -function NavMeshObstacle:NavMeshObstacle () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Node.lua b/meta/3rd/Cocos4.0/library/cc/Node.lua deleted file mode 100644 index 498a49ba..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Node.lua +++ /dev/null @@ -1,805 +0,0 @@ ----@meta - ----@class cc.Node :cc.Ref -local Node={ } -cc.Node=Node - - - - ----@overload fun(cc.Node:cc.Node,int:int):self ----@overload fun(cc.Node:cc.Node):self ----@overload fun(cc.Node:cc.Node,int:int,string2:int):self ----@overload fun(cc.Node:cc.Node,int:int,string:string):self ----@param child cc.Node ----@param localZOrder int ----@param name string ----@return self -function Node:addChild (child,localZOrder,name) end ----@overload fun(string0:cc.Component):self ----@overload fun(string:string):self ----@param name string ----@return boolean -function Node:removeComponent (name) end ----* ----@param physicsBody cc.PhysicsBody ----@return self -function Node:setPhysicsBody (physicsBody) end ----* Get the callback of event ExitTransitionDidStart.
----* return std::function ----@return function -function Node:getOnExitTransitionDidStartCallback () end ----* Gets the description string. It makes debugging easier.
----* return A string
----* js NA
----* lua NA ----@return string -function Node:getDescription () end ----* Sets the Y rotation (angle) of the node in degrees which performs a vertical rotational skew.
----* The difference between `setRotationalSkew()` and `setSkew()` is that the first one simulate Flash's skew functionality,
----* while the second one uses the real skew function.
----* 0 is the default rotation angle.
----* Positive values rotate node clockwise, and negative values for anti-clockwise.
----* param rotationY The Y rotation in degrees.
----* warning The physics body doesn't support this.
----* js setRotationY ----@param rotationY float ----@return self -function Node:setRotationSkewY (rotationY) end ----* If you want the opacity affect the color property, then set to true.
----* param value A boolean value. ----@param value boolean ----@return self -function Node:setOpacityModifyRGB (value) end ----* Change node's cascadeOpacity property.
----* param cascadeOpacityEnabled True to enable cascadeOpacity, false otherwise. ----@param cascadeOpacityEnabled boolean ----@return self -function Node:setCascadeOpacityEnabled (cascadeOpacityEnabled) end ----@overload fun():self ----@overload fun():self ----@return array_table -function Node:getChildren () end ----* Set the callback of event onExit.
----* param callback A std::function callback. ----@param callback function ----@return self -function Node:setOnExitCallback (callback) end ----* Sets the ActionManager object that is used by all actions.
----* warning If you set a new ActionManager, then previously created actions will be removed.
----* param actionManager A ActionManager object that is used by all actions. ----@param actionManager cc.ActionManager ----@return self -function Node:setActionManager (actionManager) end ----* Converts a local Vec2 to world space coordinates.The result is in Points.
----* treating the returned/received node point as anchor relative.
----* param nodePoint A given coordinate.
----* return A point in world space coordinates, anchor relative. ----@param nodePoint vec2_table ----@return vec2_table -function Node:convertToWorldSpaceAR (nodePoint) end ----* Gets whether the anchor point will be (0,0) when you position this node.
----* see `setIgnoreAnchorPointForPosition(bool)`
----* return true if the anchor point will be (0,0) when you position this node. ----@return boolean -function Node:isIgnoreAnchorPointForPosition () end ----* Gets a child from the container with its name.
----* param name An identifier to find the child node.
----* return a Node object whose name equals to the input parameter.
----* since v3.2 ----@param name string ----@return self -function Node:getChildByName (name) end ----* Update the displayed opacity of node with it's parent opacity;
----* param parentOpacity The opacity of parent node. ----@param parentOpacity unsigned_char ----@return self -function Node:updateDisplayedOpacity (parentOpacity) end ----* ----@return boolean -function Node:init () end ----* get & set camera mask, the node is visible by the camera whose camera flag & node's camera mask is true ----@return unsigned short -function Node:getCameraMask () end ----* Sets the rotation (angle) of the node in degrees.
----* 0 is the default rotation angle.
----* Positive values rotate node clockwise, and negative values for anti-clockwise.
----* param rotation The rotation of the node in degrees. ----@param rotation float ----@return self -function Node:setRotation (rotation) end ----* Changes the scale factor on Z axis of this node
----* The Default value is 1.0 if you haven't changed it before.
----* param scaleZ The scale factor on Z axis.
----* warning The physics body doesn't support this. ----@param scaleZ float ----@return self -function Node:setScaleZ (scaleZ) end ----* Sets the scale (y) of the node.
----* It is a scaling factor that multiplies the height of the node and its children.
----* param scaleY The scale factor on Y axis.
----* warning The physics body doesn't support this. ----@param scaleY float ----@return self -function Node:setScaleY (scaleY) end ----* Sets the scale (x) of the node.
----* It is a scaling factor that multiplies the width of the node and its children.
----* param scaleX The scale factor on X axis.
----* warning The physics body doesn't support this. ----@param scaleX float ----@return self -function Node:setScaleX (scaleX) end ----* Sets the X rotation (angle) of the node in degrees which performs a horizontal rotational skew.
----* The difference between `setRotationalSkew()` and `setSkew()` is that the first one simulate Flash's skew functionality,
----* while the second one uses the real skew function.
----* 0 is the default rotation angle.
----* Positive values rotate node clockwise, and negative values for anti-clockwise.
----* param rotationX The X rotation in degrees which performs a horizontal rotational skew.
----* warning The physics body doesn't support this.
----* js setRotationX ----@param rotationX float ----@return self -function Node:setRotationSkewX (rotationX) end ----* Removes all components ----@return self -function Node:removeAllComponents () end ----* ----@param z int ----@return self -function Node:_setLocalZOrder (z) end ----* Modify the camera mask for current node.
----* If applyChildren is true, then it will modify the camera mask of its children recursively.
----* param mask A unsigned short bit for mask.
----* param applyChildren A boolean value to determine whether the mask bit should apply to its children or not. ----@param mask unsigned short ----@param applyChildren boolean ----@return self -function Node:setCameraMask (mask,applyChildren) end ----* Returns a tag that is used to identify the node easily.
----* return An integer that identifies the node.
----* Please use `getTag()` instead. ----@return int -function Node:getTag () end ----* ----@return cc.AffineTransform -function Node:getNodeToWorldAffineTransform () end ----* Returns the world affine transform matrix. The matrix is in Pixels.
----* return transformation matrix, in pixels. ----@return mat4_table -function Node:getNodeToWorldTransform () end ----* Returns the position (X,Y,Z) in its parent's coordinate system.
----* return The position (X, Y, and Z) in its parent's coordinate system.
----* js NA ----@return vec3_table -function Node:getPosition3D () end ----* Removes a child from the container. It will also cleanup all running actions depending on the cleanup parameter.
----* param child The child node which will be removed.
----* param cleanup True if all running actions and callbacks on the child node will be cleanup, false otherwise. ----@param child cc.Node ----@param cleanup boolean ----@return self -function Node:removeChild (child,cleanup) end ----* Converts a Vec2 to world space coordinates. The result is in Points.
----* param nodePoint A given coordinate.
----* return A point in world space coordinates. ----@param nodePoint vec2_table ----@return vec2_table -function Node:convertToWorldSpace (nodePoint) end ----* Returns the Scene that contains the Node.
----* It returns `nullptr` if the node doesn't belong to any Scene.
----* This function recursively calls parent->getScene() until parent is a Scene object. The results are not cached. It is that the user caches the results in case this functions is being used inside a loop.
----* return The Scene that contains the node. ----@return cc.Scene -function Node:getScene () end ----* Get the event dispatcher of scene.
----* return The event dispatcher of scene. ----@return cc.EventDispatcher -function Node:getEventDispatcher () end ----* Changes the X skew angle of the node in degrees.
----* The difference between `setRotationalSkew()` and `setSkew()` is that the first one simulate Flash's skew functionality
----* while the second one uses the real skew function.
----* This angle describes the shear distortion in the X direction.
----* Thus, it is the angle between the Y coordinate and the left edge of the shape
----* The default skewX angle is 0. Positive values distort the node in a CW direction.
----* param skewX The X skew angle of the node in degrees.
----* warning The physics body doesn't support this. ----@param skewX float ----@return self -function Node:setSkewX (skewX) end ----* Changes the Y skew angle of the node in degrees.
----* The difference between `setRotationalSkew()` and `setSkew()` is that the first one simulate Flash's skew functionality
----* while the second one uses the real skew function.
----* This angle describes the shear distortion in the Y direction.
----* Thus, it is the angle between the X coordinate and the bottom edge of the shape.
----* The default skewY angle is 0. Positive values distort the node in a CCW direction.
----* param skewY The Y skew angle of the node in degrees.
----* warning The physics body doesn't support this. ----@param skewY float ----@return self -function Node:setSkewY (skewY) end ----* Set the callback of event onEnter.
----* param callback A std::function callback. ----@param callback function ----@return self -function Node:setOnEnterCallback (callback) end ----* Removes all actions from the running action list by its flags.
----* param flags A flag field that removes actions based on bitwise AND. ----@param flags unsigned_int ----@return self -function Node:stopActionsByFlags (flags) end ----* ----@param position vec2_table ----@return self -function Node:setNormalizedPosition (position) end ----* convenience methods which take a Touch instead of Vec2.
----* param touch A given touch.
----* return A point in world space coordinates. ----@param touch cc.Touch ----@return vec2_table -function Node:convertTouchToNodeSpace (touch) end ----@overload fun(boolean:boolean):self ----@overload fun():self ----@param cleanup boolean ----@return self -function Node:removeAllChildrenWithCleanup (cleanup) end ----* Set the callback of event EnterTransitionDidFinish.
----* param callback A std::function callback. ----@param callback function ----@return self -function Node:setOnEnterTransitionDidFinishCallback (callback) end ----* ----@param programState cc.backend.ProgramState ----@return self -function Node:setProgramState (programState) end ----@overload fun(cc.Node:cc.Node):self ----@overload fun():self ----@param ancestor cc.Node ----@return cc.AffineTransform -function Node:getNodeToParentAffineTransform (ancestor) end ----* Whether cascadeOpacity is enabled or not.
----* return A boolean value. ----@return boolean -function Node:isCascadeOpacityEnabled () end ----* Sets the parent node.
----* param parent A pointer to the parent node. ----@param parent cc.Node ----@return self -function Node:setParent (parent) end ----* Returns a string that is used to identify the node.
----* return A string that identifies the node.
----* since v3.2 ----@return string -function Node:getName () end ----* Resumes all scheduled selectors, actions and event listeners.
----* This method is called internally by onEnter. ----@return self -function Node:resume () end ----* Returns the rotation (X,Y,Z) in degrees.
----* return The rotation of the node in 3d.
----* js NA ----@return vec3_table -function Node:getRotation3D () end ----@overload fun(cc.Node:cc.Node):self ----@overload fun():self ----@param ancestor cc.Node ----@return mat4_table -function Node:getNodeToParentTransform (ancestor) end ----* converts a Touch (world coordinates) into a local coordinate. This method is AR (Anchor Relative).
----* param touch A given touch.
----* return A point in world space coordinates, anchor relative. ----@param touch cc.Touch ----@return vec2_table -function Node:convertTouchToNodeSpaceAR (touch) end ----* Converts a Vec2 to node (local) space coordinates. The result is in Points.
----* param worldPoint A given coordinate.
----* return A point in node (local) space coordinates. ----@param worldPoint vec2_table ----@return vec2_table -function Node:convertToNodeSpace (worldPoint) end ----* Sets the position (x,y) using values between 0 and 1.
----* The positions in pixels is calculated like the following:
----* code pseudo code
----* void setNormalizedPosition(Vec2 pos) {
----* Size s = getParent()->getContentSize();
----* _position = pos * s;
----* }
----* endcode
----* param position The normalized position (x,y) of the node, using value between 0 and 1. ----@param position vec2_table ----@return self -function Node:setPositionNormalized (position) end ----* Pauses all scheduled selectors, actions and event listeners.
----* This method is called internally by onExit. ----@return self -function Node:pause () end ----* If node opacity will modify the RGB color value, then you should override this method and return true.
----* return A boolean value, true indicates that opacity will modify color; false otherwise. ----@return boolean -function Node:isOpacityModifyRGB () end ----@overload fun(float:float,float:float):self ----@overload fun(float0:vec2_table):self ----@param x float ----@param y float ----@return self -function Node:setPosition (x,y) end ----* Removes an action from the running action list by its tag.
----* param tag A tag that indicates the action to be removed. ----@param tag int ----@return self -function Node:stopActionByTag (tag) end ----* Reorders a child according to a new z value.
----* param child An already added child node. It MUST be already added.
----* param localZOrder Z order for drawing priority. Please refer to setLocalZOrder(int). ----@param child cc.Node ----@param localZOrder int ----@return self -function Node:reorderChild (child,localZOrder) end ----* Sets the 'z' coordinate in the position. It is the OpenGL Z vertex value.
----* The OpenGL depth buffer and depth testing are disabled by default. You need to turn them on.
----* In order to use this property correctly.
----* `setPositionZ()` also sets the `setGlobalZValue()` with the positionZ as value.
----* see `setGlobalZValue()`
----* param positionZ OpenGL Z vertex of this node.
----* js setVertexZ ----@param positionZ float ----@return self -function Node:setPositionZ (positionZ) end ----* Sets the rotation (X,Y,Z) in degrees.
----* Useful for 3d rotations.
----* warning The physics body doesn't support this.
----* param rotation The rotation of the node in 3d.
----* js NA ----@param rotation vec3_table ----@return self -function Node:setRotation3D (rotation) end ----* Gets/Sets x or y coordinate individually for position.
----* These methods are used in Lua and Javascript Bindings
----* Sets the x coordinate of the node in its parent's coordinate system.
----* param x The x coordinate of the node. ----@param x float ----@return self -function Node:setPositionX (x) end ----* Sets the transformation matrix manually.
----* param transform A given transformation matrix. ----@param transform mat4_table ----@return self -function Node:setNodeToParentTransform (transform) end ----* Returns the anchor point in percent.
----* see `setAnchorPoint(const Vec2&)`
----* return The anchor point of node. ----@return vec2_table -function Node:getAnchorPoint () end ----* Returns the numbers of actions that are running plus the ones that are schedule to run (actions in actionsToAdd and actions arrays).
----* Composable actions are counted as 1 action. Example:
----* If you are running 1 Sequence of 7 actions, it will return 1.
----* If you are running 7 Sequences of 2 actions, it will return 7.
----* return The number of actions that are running plus the ones that are schedule to run. ----@return int -function Node:getNumberOfRunningActions () end ----* Calls children's updateTransform() method recursively.
----* This method is moved from Sprite, so it's no longer specific to Sprite.
----* As the result, you apply SpriteBatchNode's optimization on your customed Node.
----* e.g., `batchNode->addChild(myCustomNode)`, while you can only addChild(sprite) before. ----@return self -function Node:updateTransform () end ----* Determines if the node is visible.
----* see `setVisible(bool)`
----* return true if the node is visible, false if the node is hidden. ----@return boolean -function Node:isVisible () end ----* Returns the amount of children.
----* return The amount of children. ----@return int -function Node:getChildrenCount () end ----* Converts a Vec2 to node (local) space coordinates. The result is in Points.
----* treating the returned/received node point as anchor relative.
----* param worldPoint A given coordinate.
----* return A point in node (local) space coordinates, anchor relative. ----@param worldPoint vec2_table ----@return vec2_table -function Node:convertToNodeSpaceAR (worldPoint) end ----* Adds a component.
----* param component A given component.
----* return True if added success. ----@param component cc.Component ----@return boolean -function Node:addComponent (component) end ----* Executes an action, and returns the action that is executed.
----* This node becomes the action's target. Refer to Action::getTarget().
----* warning Actions don't retain their target.
----* param action An Action pointer. ----@param action cc.Action ----@return cc.Action -function Node:runAction (action) end ----@overload fun():self ----@overload fun(cc.Renderer:cc.Renderer,mat4_table:mat4_table,unsigned_int:unsigned_int):self ----@param renderer cc.Renderer ----@param parentTransform mat4_table ----@param parentFlags unsigned_int ----@return self -function Node:visit (renderer,parentTransform,parentFlags) end ----* Returns the rotation of the node in degrees.
----* see `setRotation(float)`
----* return The rotation of the node in degrees. ----@return float -function Node:getRotation () end ----* ----@return cc.PhysicsBody -function Node:getPhysicsBody () end ----* Returns the anchorPoint in absolute pixels.
----* warning You can only read it. If you wish to modify it, use anchorPoint instead.
----* see `getAnchorPoint()`
----* return The anchor point in absolute pixels. ----@return vec2_table -function Node:getAnchorPointInPoints () end ----* Removes a child from the container by tag value. It will also cleanup all running actions depending on the cleanup parameter.
----* param name A string that identifies a child node.
----* param cleanup True if all running actions and callbacks on the child node will be cleanup, false otherwise. ----@param name string ----@param cleanup boolean ----@return self -function Node:removeChildByName (name,cleanup) end ----* Sets a Scheduler object that is used to schedule all "updates" and timers.
----* warning If you set a new Scheduler, then previously created timers/update are going to be removed.
----* param scheduler A Scheduler object that is used to schedule all "update" and timers. ----@param scheduler cc.Scheduler ----@return self -function Node:setScheduler (scheduler) end ----* Stops and removes all actions from the running action list . ----@return self -function Node:stopAllActions () end ----* Returns the X skew angle of the node in degrees.
----* see `setSkewX(float)`
----* return The X skew angle of the node in degrees. ----@return float -function Node:getSkewX () end ----* Returns the Y skew angle of the node in degrees.
----* see `setSkewY(float)`
----* return The Y skew angle of the node in degrees. ----@return float -function Node:getSkewY () end ----* Get the callback of event EnterTransitionDidFinish.
----* return std::function ----@return function -function Node:getOnEnterTransitionDidFinishCallback () end ----* Query node's displayed color.
----* return A Color3B color value. ----@return color3b_table -function Node:getDisplayedColor () end ----* Gets an action from the running action list by its tag.
----* see `setTag(int)`, `getTag()`.
----* return The action object with the given tag. ----@param tag int ----@return cc.Action -function Node:getActionByTag (tag) end ----* Changes the name that is used to identify the node easily.
----* param name A string that identifies the node.
----* since v3.2 ----@param name string ----@return self -function Node:setName (name) end ----* Update method will be called automatically every frame if "scheduleUpdate" is called, and the node is "live".
----* param delta In seconds. ----@param delta float ----@return self -function Node:update (delta) end ----* Return the node's display opacity.
----* The difference between opacity and displayedOpacity is:
----* The displayedOpacity is what's the final rendering opacity of node.
----* return A GLubyte value. ----@return unsigned_char -function Node:getDisplayedOpacity () end ----* Gets the local Z order of this node.
----* see `setLocalZOrder(int)`
----* return The local (relative to its siblings) Z order. ----@return int -function Node:getLocalZOrder () end ----@overload fun():self ----@overload fun():self ----@return cc.Scheduler -function Node:getScheduler () end ----* ----@return cc.AffineTransform -function Node:getParentToNodeAffineTransform () end ----* Returns the normalized position.
----* return The normalized position. ----@return vec2_table -function Node:getPositionNormalized () end ----* Change the color of node.
----* param color A Color3B color value. ----@param color color3b_table ----@return self -function Node:setColor (color) end ----* Returns whether or not the node is "running".
----* If the node is running it will accept event callbacks like onEnter(), onExit(), update().
----* return Whether or not the node is running. ----@return boolean -function Node:isRunning () end ----@overload fun():self ----@overload fun():self ----@return self -function Node:getParent () end ----* Gets position Z coordinate of this node.
----* see setPositionZ(float)
----* return The position Z coordinate of this node.
----* js getVertexZ ----@return float -function Node:getPositionZ () end ----* Gets the y coordinate of the node in its parent's coordinate system.
----* return The y coordinate of the node. ----@return float -function Node:getPositionY () end ----* Gets the x coordinate of the node in its parent's coordinate system.
----* return The x coordinate of the node. ----@return float -function Node:getPositionX () end ----* Removes a child from the container by tag value. It will also cleanup all running actions depending on the cleanup parameter.
----* param tag An integer number that identifies a child node.
----* param cleanup True if all running actions and callbacks on the child node will be cleanup, false otherwise.
----* Please use `removeChildByName` instead. ----@param tag int ----@param cleanup boolean ----@return self -function Node:removeChildByTag (tag,cleanup) end ----* Sets the y coordinate of the node in its parent's coordinate system.
----* param y The y coordinate of the node. ----@param y float ----@return self -function Node:setPositionY (y) end ----* Update node's displayed color with its parent color.
----* param parentColor A Color3B color value. ----@param parentColor color3b_table ----@return self -function Node:updateDisplayedColor (parentColor) end ----* Sets whether the node is visible.
----* The default value is true, a node is default to visible.
----* param visible true if the node is visible, false if the node is hidden. ----@param visible boolean ----@return self -function Node:setVisible (visible) end ----* Returns the matrix that transform parent's space coordinates to the node's (local) space coordinates.
----* The matrix is in Pixels.
----* return The transformation matrix. ----@return mat4_table -function Node:getParentToNodeTransform () end ----* Checks whether a lambda function is scheduled.
----* param key key of the callback
----* return Whether the lambda function selector is scheduled.
----* js NA
----* lua NA ----@param key string ----@return boolean -function Node:isScheduled (key) end ----* Defines the order in which the nodes are renderer.
----* Nodes that have a Global Z Order lower, are renderer first.
----* In case two or more nodes have the same Global Z Order, the order is not guaranteed.
----* The only exception if the Nodes have a Global Z Order == 0. In that case, the Scene Graph order is used.
----* By default, all nodes have a Global Z Order = 0. That means that by default, the Scene Graph order is used to render the nodes.
----* Global Z Order is useful when you need to render nodes in an order different than the Scene Graph order.
----* Limitations: Global Z Order can't be used by Nodes that have SpriteBatchNode as one of their ancestors.
----* And if ClippingNode is one of the ancestors, then "global Z order" will be relative to the ClippingNode.
----* see `setLocalZOrder()`
----* see `setVertexZ()`
----* since v3.0
----* param globalZOrder The global Z order value. ----@param globalZOrder float ----@return self -function Node:setGlobalZOrder (globalZOrder) end ----@overload fun(float:float,float:float):self ----@overload fun(float:float):self ----@param scaleX float ----@param scaleY float ----@return self -function Node:setScale (scaleX,scaleY) end ----* Gets a child from the container with its tag.
----* param tag An identifier to find the child node.
----* return a Node object whose tag equals to the input parameter.
----* Please use `getChildByName()` instead. ----@param tag int ----@return self -function Node:getChildByTag (tag) end ----* Returns the scale factor on Z axis of this node
----* see `setScaleZ(float)`
----* return The scale factor on Z axis. ----@return float -function Node:getScaleZ () end ----* Returns the scale factor on Y axis of this node
----* see `setScaleY(float)`
----* return The scale factor on Y axis. ----@return float -function Node:getScaleY () end ----* Returns the scale factor on X axis of this node
----* see setScaleX(float)
----* return The scale factor on X axis. ----@return float -function Node:getScaleX () end ----* LocalZOrder is the 'key' used to sort the node relative to its siblings.
----* The Node's parent will sort all its children based on the LocalZOrder value.
----* If two nodes have the same LocalZOrder, then the node that was added first to the children's array will be in front of the other node in the array.
----* Also, the Scene Graph is traversed using the "In-Order" tree traversal algorithm ( http:en.wikipedia.org/wiki/Tree_traversal#In-order )
----* And Nodes that have LocalZOrder values < 0 are the "left" subtree
----* While Nodes with LocalZOrder >=0 are the "right" subtree.
----* see `setGlobalZOrder`
----* see `setVertexZ`
----* param localZOrder The local Z order value. ----@param localZOrder int ----@return self -function Node:setLocalZOrder (localZOrder) end ----* ----@return cc.AffineTransform -function Node:getWorldToNodeAffineTransform () end ----* If you want node's color affect the children node's color, then set it to true.
----* Otherwise, set it to false.
----* param cascadeColorEnabled A boolean value. ----@param cascadeColorEnabled boolean ----@return self -function Node:setCascadeColorEnabled (cascadeColorEnabled) end ----* Change node opacity.
----* param opacity A GLubyte opacity value. ----@param opacity unsigned_char ----@return self -function Node:setOpacity (opacity) end ----* Stops all running actions and schedulers ----@return self -function Node:cleanup () end ----* / @{/ @name component functions
----* Gets a component by its name.
----* param name A given name of component.
----* return The Component by name. ----@param name string ----@return cc.Component -function Node:getComponent (name) end ----* Returns the untransformed size of the node.
----* see `setContentSize(const Size&)`
----* return The untransformed size of the node. ----@return size_table -function Node:getContentSize () end ----* Removes all actions from the running action list by its tag.
----* param tag A tag that indicates the action to be removed. ----@param tag int ----@return self -function Node:stopAllActionsByTag (tag) end ----* Query node's color value.
----* return A Color3B color value. ----@return color3b_table -function Node:getColor () end ----* Returns an AABB (axis-aligned bounding-box) in its parent's coordinate system.
----* return An AABB (axis-aligned bounding-box) in its parent's coordinate system ----@return rect_table -function Node:getBoundingBox () end ----* Sets whether the anchor point will be (0,0) when you position this node.
----* This is an internal method, only used by Layer and Scene. Don't call it outside framework.
----* The default value is false, while in Layer and Scene are true.
----* param ignore true if anchor point will be (0,0) when you position this node. ----@param ignore boolean ----@return self -function Node:setIgnoreAnchorPointForPosition (ignore) end ----* Set event dispatcher for scene.
----* param dispatcher The event dispatcher of scene. ----@param dispatcher cc.EventDispatcher ----@return self -function Node:setEventDispatcher (dispatcher) end ----* Returns the Node's Global Z Order.
----* see `setGlobalZOrder(int)`
----* return The node's global Z order ----@return float -function Node:getGlobalZOrder () end ----@overload fun():self ----@overload fun(cc.Renderer:cc.Renderer,mat4_table:mat4_table,unsigned_int:unsigned_int):self ----@param renderer cc.Renderer ----@param transform mat4_table ----@param flags unsigned_int ----@return self -function Node:draw (renderer,transform,flags) end ----* Returns a user assigned Object.
----* Similar to UserData, but instead of holding a void* it holds an object.
----* The UserObject will be retained once in this method,
----* and the previous UserObject (if existed) will be released.
----* The UserObject will be released in Node's destructor.
----* param userObject A user assigned Object. ----@param userObject cc.Ref ----@return self -function Node:setUserObject (userObject) end ----@overload fun(boolean:boolean):self ----@overload fun():self ----@param cleanup boolean ----@return self -function Node:removeFromParentAndCleanup (cleanup) end ----* Sets the position (X, Y, and Z) in its parent's coordinate system.
----* param position The position (X, Y, and Z) in its parent's coordinate system.
----* js NA ----@param position vec3_table ----@return self -function Node:setPosition3D (position) end ----* Returns the numbers of actions that are running plus the ones that are
----* schedule to run (actions in actionsToAdd and actions arrays) with a
----* specific tag.
----* Composable actions are counted as 1 action. Example:
----* If you are running 1 Sequence of 7 actions, it will return 1.
----* If you are running 7 Sequences of 2 actions, it will return 7.
----* param tag The tag that will be searched.
----* return The number of actions that are running plus the
----* ones that are schedule to run with specific tag. ----@param tag int ----@return int -function Node:getNumberOfRunningActionsByTag (tag) end ----* Sorts the children array once before drawing, instead of every time when a child is added or reordered.
----* This approach can improve the performance massively.
----* note Don't call this manually unless a child added needs to be removed in the same frame. ----@return self -function Node:sortAllChildren () end ----* ----@return cc.backend.ProgramState -function Node:getProgramState () end ----* Returns the inverse world affine transform matrix. The matrix is in Pixels.
----* return The transformation matrix. ----@return mat4_table -function Node:getWorldToNodeTransform () end ----* Gets the scale factor of the node, when X and Y have the same scale factor.
----* warning Assert when `_scaleX != _scaleY`
----* see setScale(float)
----* return The scale factor of the node. ----@return float -function Node:getScale () end ----* Return the node's opacity.
----* return A GLubyte value. ----@return unsigned_char -function Node:getOpacity () end ----* !!! ONLY FOR INTERNAL USE
----* Sets the arrival order when this node has a same ZOrder with other children.
----* A node which called addChild subsequently will take a larger arrival order,
----* If two children have the same Z order, the child with larger arrival order will be drawn later.
----* warning This method is used internally for localZOrder sorting, don't change this manually
----* param orderOfArrival The arrival order. ----@return self -function Node:updateOrderOfArrival () end ----* ----@return vec2_table -function Node:getNormalizedPosition () end ----* Set the callback of event ExitTransitionDidStart.
----* param callback A std::function callback. ----@param callback function ----@return self -function Node:setOnExitTransitionDidStartCallback (callback) end ----* Gets the X rotation (angle) of the node in degrees which performs a horizontal rotation skew.
----* see `setRotationSkewX(float)`
----* return The X rotation in degrees.
----* js getRotationX ----@return float -function Node:getRotationSkewX () end ----* Gets the Y rotation (angle) of the node in degrees which performs a vertical rotational skew.
----* see `setRotationSkewY(float)`
----* return The Y rotation in degrees.
----* js getRotationY ----@return float -function Node:getRotationSkewY () end ----* Changes the tag that is used to identify the node easily.
----* Please refer to getTag for the sample code.
----* param tag A integer that identifies the node.
----* Please use `setName()` instead. ----@param tag int ----@return self -function Node:setTag (tag) end ----* Query whether cascadeColor is enabled or not.
----* return Whether cascadeColor is enabled or not. ----@return boolean -function Node:isCascadeColorEnabled () end ----* Stops and removes an action from the running action list.
----* param action The action object to be removed. ----@param action cc.Action ----@return self -function Node:stopAction (action) end ----@overload fun():cc.ActionManager ----@overload fun():cc.ActionManager ----@return cc.ActionManager -function Node:getActionManager () end ----* Allocates and initializes a node.
----* return A initialized node which is marked as "autorelease". ----@return self -function Node:create () end ----* Gets count of nodes those are attached to scene graph. ----@return int -function Node:getAttachedNodeCount () end ----* ----@return self -function Node:Node () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/NodeGrid.lua b/meta/3rd/Cocos4.0/library/cc/NodeGrid.lua deleted file mode 100644 index 29bb8539..00000000 --- a/meta/3rd/Cocos4.0/library/cc/NodeGrid.lua +++ /dev/null @@ -1,46 +0,0 @@ ----@meta - ----@class cc.NodeGrid :cc.Node -local NodeGrid={ } -cc.NodeGrid=NodeGrid - - - - ----* brief Set the effect grid rect.
----* param gridRect The effect grid rect. ----@param gridRect rect_table ----@return self -function NodeGrid:setGridRect (gridRect) end ----* Set the Grid Target.
----* param target A Node is used to set the Grid Target. ----@param target cc.Node ----@return self -function NodeGrid:setTarget (target) end ----* Changes a grid object that is used when applying effects.
----* param grid A Grid object that is used when applying effects. ----@param grid cc.GridBase ----@return self -function NodeGrid:setGrid (grid) end ----@overload fun():cc.GridBase ----@overload fun():cc.GridBase ----@return cc.GridBase -function NodeGrid:getGrid () end ----* brief Get the effect grid rect.
----* return Return the effect grid rect. ----@return rect_table -function NodeGrid:getGridRect () end ----@overload fun(rect_table:rect_table):self ----@overload fun():self ----@param rect rect_table ----@return self -function NodeGrid:create (rect) end ----* ----@param renderer cc.Renderer ----@param parentTransform mat4_table ----@param parentFlags unsigned_int ----@return self -function NodeGrid:visit (renderer,parentTransform,parentFlags) end ----* ----@return self -function NodeGrid:NodeGrid () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/OrbitCamera.lua b/meta/3rd/Cocos4.0/library/cc/OrbitCamera.lua deleted file mode 100644 index 8114d7f8..00000000 --- a/meta/3rd/Cocos4.0/library/cc/OrbitCamera.lua +++ /dev/null @@ -1,51 +0,0 @@ ----@meta - ----@class cc.OrbitCamera :cc.ActionCamera -local OrbitCamera={ } -cc.OrbitCamera=OrbitCamera - - - - ----* Initializes a OrbitCamera action with radius, delta-radius, z, deltaZ, x, deltaX. ----@param t float ----@param radius float ----@param deltaRadius float ----@param angleZ float ----@param deltaAngleZ float ----@param angleX float ----@param deltaAngleX float ----@return boolean -function OrbitCamera:initWithDuration (t,radius,deltaRadius,angleZ,deltaAngleZ,angleX,deltaAngleX) end ----* Creates a OrbitCamera action with radius, delta-radius, z, deltaZ, x, deltaX.
----* param t Duration in seconds.
----* param radius The start radius.
----* param deltaRadius The delta radius.
----* param angleZ The start angle in Z.
----* param deltaAngleZ The delta angle in Z.
----* param angleX The start angle in X.
----* param deltaAngleX The delta angle in X.
----* return An OrbitCamera. ----@param t float ----@param radius float ----@param deltaRadius float ----@param angleZ float ----@param deltaAngleZ float ----@param angleX float ----@param deltaAngleX float ----@return self -function OrbitCamera:create (t,radius,deltaRadius,angleZ,deltaAngleZ,angleX,deltaAngleX) end ----* ----@param target cc.Node ----@return self -function OrbitCamera:startWithTarget (target) end ----* ----@return self -function OrbitCamera:clone () end ----* ----@param time float ----@return self -function OrbitCamera:update (time) end ----* js ctor ----@return self -function OrbitCamera:OrbitCamera () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/PUParticleSystem3D.lua b/meta/3rd/Cocos4.0/library/cc/PUParticleSystem3D.lua deleted file mode 100644 index 037bd82b..00000000 --- a/meta/3rd/Cocos4.0/library/cc/PUParticleSystem3D.lua +++ /dev/null @@ -1,195 +0,0 @@ ----@meta - ----@class cc.PUParticleSystem3D :cc.ParticleSystem3D -local PUParticleSystem3D={ } -cc.PUParticleSystem3D=PUParticleSystem3D - - - - ----* ----@param filePath string ----@return boolean -function PUParticleSystem3D:initWithFilePath (filePath) end ----* Returns the velocity scale, defined in the particle system, but passed to the technique for convenience. ----@return float -function PUParticleSystem3D:getParticleSystemScaleVelocity () end ----* ----@param quota unsigned_int ----@return self -function PUParticleSystem3D:setEmittedSystemQuota (quota) end ----* default particle depth ----@return float -function PUParticleSystem3D:getDefaultDepth () end ----* ----@return unsigned_int -function PUParticleSystem3D:getEmittedSystemQuota () end ----* ----@param filePath string ----@param materialPath string ----@return boolean -function PUParticleSystem3D:initWithFilePathAndMaterialPath (filePath,materialPath) end ----* ----@return self -function PUParticleSystem3D:clearAllParticles () end ----* ----@return string -function PUParticleSystem3D:getMaterialName () end ----* ----@return self -function PUParticleSystem3D:calulateRotationOffset () end ----* Return the maximum velocity a particle can have, even if the velocity of the particle has been set higher (either by initialisation of the particle or by means of an affector). ----@return float -function PUParticleSystem3D:getMaxVelocity () end ----* ----@param delta float ----@return self -function PUParticleSystem3D:forceUpdate (delta) end ----* ----@return float -function PUParticleSystem3D:getTimeElapsedSinceStart () end ----* ----@return self -function PUParticleSystem3D:removeAllBehaviourTemplate () end ----* ----@return unsigned_int -function PUParticleSystem3D:getEmittedEmitterQuota () end ----* Forces emission of particles.
----* remarks The number of requested particles are the exact number that are emitted. No down-scaling is applied. ----@param emitter cc.PUEmitter ----@param requested unsigned_int ----@return self -function PUParticleSystem3D:forceEmission (emitter,requested) end ----* ----@param listener cc.PUListener ----@return self -function PUParticleSystem3D:addListener (listener) end ----* ----@return boolean -function PUParticleSystem3D:isMarkedForEmission () end ----* default particle width ----@return float -function PUParticleSystem3D:getDefaultWidth () end ----* ----@param quota unsigned_int ----@return self -function PUParticleSystem3D:setEmittedEmitterQuota (quota) end ----* ----@param isMarked boolean ----@return self -function PUParticleSystem3D:setMarkedForEmission (isMarked) end ----* ----@return self -function PUParticleSystem3D:clone () end ----* add particle affector ----@param emitter cc.PUEmitter ----@return self -function PUParticleSystem3D:addEmitter (emitter) end ----* ----@param behaviour cc.PUBehaviour ----@return self -function PUParticleSystem3D:addBehaviourTemplate (behaviour) end ----* ----@param width float ----@return self -function PUParticleSystem3D:setDefaultWidth (width) end ----* ----@param system cc.PUParticleSystem3D ----@return self -function PUParticleSystem3D:copyAttributesTo (system) end ----* ----@param name string ----@return self -function PUParticleSystem3D:setMaterialName (name) end ----* ----@return self -function PUParticleSystem3D:getParentParticleSystem () end ----* ----@param listener cc.PUListener ----@return self -function PUParticleSystem3D:removeListener (listener) end ----* Set the maximum velocity a particle can have. ----@param maxVelocity float ----@return self -function PUParticleSystem3D:setMaxVelocity (maxVelocity) end ----* default particle height ----@return float -function PUParticleSystem3D:getDefaultHeight () end ----* ----@return vec3_table -function PUParticleSystem3D:getDerivedPosition () end ----* If the orientation of the particle system has been changed since the last update, the passed vector is rotated accordingly. ----@param pos vec3_table ----@return self -function PUParticleSystem3D:rotationOffset (pos) end ----* ----@return self -function PUParticleSystem3D:removeAllEmitter () end ----* ----@param scaleVelocity float ----@return self -function PUParticleSystem3D:setParticleSystemScaleVelocity (scaleVelocity) end ----* ----@return vec3_table -function PUParticleSystem3D:getDerivedScale () end ----* ----@param height float ----@return self -function PUParticleSystem3D:setDefaultHeight (height) end ----* ----@return self -function PUParticleSystem3D:removeAllListener () end ----* ----@param filePath string ----@return boolean -function PUParticleSystem3D:initSystem (filePath) end ----* ----@param particle cc.PUParticle3D ----@return boolean -function PUParticleSystem3D:makeParticleLocal (particle) end ----* ----@return self -function PUParticleSystem3D:removerAllObserver () end ----* ----@param depth float ----@return self -function PUParticleSystem3D:setDefaultDepth (depth) end ----* ----@param observer cc.PUObserver ----@return self -function PUParticleSystem3D:addObserver (observer) end ----@overload fun(string:string):self ----@overload fun():self ----@overload fun(string:string,string:string):self ----@param filePath string ----@param materialPath string ----@return self -function PUParticleSystem3D:create (filePath,materialPath) end ----* ----@param renderer cc.Renderer ----@param transform mat4_table ----@param flags unsigned_int ----@return self -function PUParticleSystem3D:draw (renderer,transform,flags) end ----* particle system play control ----@return self -function PUParticleSystem3D:startParticleSystem () end ----* stop particle ----@return self -function PUParticleSystem3D:stopParticleSystem () end ----* ----@param delta float ----@return self -function PUParticleSystem3D:update (delta) end ----* pause particle ----@return self -function PUParticleSystem3D:pauseParticleSystem () end ----* resume particle ----@return self -function PUParticleSystem3D:resumeParticleSystem () end ----* ----@return int -function PUParticleSystem3D:getAliveParticleCount () end ----* ----@return self -function PUParticleSystem3D:PUParticleSystem3D () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/PageTurn3D.lua b/meta/3rd/Cocos4.0/library/cc/PageTurn3D.lua deleted file mode 100644 index fdf16d5f..00000000 --- a/meta/3rd/Cocos4.0/library/cc/PageTurn3D.lua +++ /dev/null @@ -1,27 +0,0 @@ ----@meta - ----@class cc.PageTurn3D :cc.Grid3DAction -local PageTurn3D={ } -cc.PageTurn3D=PageTurn3D - - - - ----* brief Create an action with duration, grid size.
----* param duration Specify the duration of the PageTurn3D action. It's a value in seconds.
----* param gridSize Specify the size of the grid.
----* return If the creation success, return a pointer of PageTurn3D action; otherwise, return nil. ----@param duration float ----@param gridSize size_table ----@return self -function PageTurn3D:create (duration,gridSize) end ----* ----@return self -function PageTurn3D:clone () end ----* js NA ----@return cc.GridBase -function PageTurn3D:getGrid () end ----* ----@param time float ----@return self -function PageTurn3D:update (time) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ParallaxNode.lua b/meta/3rd/Cocos4.0/library/cc/ParallaxNode.lua deleted file mode 100644 index 1c795902..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ParallaxNode.lua +++ /dev/null @@ -1,52 +0,0 @@ ----@meta - ----@class cc.ParallaxNode :cc.Node -local ParallaxNode={ } -cc.ParallaxNode=ParallaxNode - - - - ----* Adds a child to the container with a local z-order, parallax ratio and position offset.
----* param child A child node.
----* param z Z order for drawing priority.
----* param parallaxRatio A given parallax ratio.
----* param positionOffset A given position offset. ----@param child cc.Node ----@param z int ----@param parallaxRatio vec2_table ----@param positionOffset vec2_table ----@return self -function ParallaxNode:addChild (child,z,parallaxRatio,positionOffset) end ----* ----@param cleanup boolean ----@return self -function ParallaxNode:removeAllChildrenWithCleanup (cleanup) end ----* Create a Parallax node.
----* return An autoreleased ParallaxNode object. ----@return self -function ParallaxNode:create () end ----@overload fun(cc.Node:cc.Node,int:int,int2:string):self ----@overload fun(cc.Node:cc.Node,int:int,int:int):self ----@param child cc.Node ----@param zOrder int ----@param tag int ----@return self -function ParallaxNode:addChild (child,zOrder,tag) end ----* ----@param renderer cc.Renderer ----@param parentTransform mat4_table ----@param parentFlags unsigned_int ----@return self -function ParallaxNode:visit (renderer,parentTransform,parentFlags) end ----* ----@param child cc.Node ----@param cleanup boolean ----@return self -function ParallaxNode:removeChild (child,cleanup) end ----* Adds a child to the container with a z-order, a parallax ratio and a position offset
----* It returns self, so you can chain several addChilds.
----* since v0.8
----* js ctor ----@return self -function ParallaxNode:ParallaxNode () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ParticleBatchNode.lua b/meta/3rd/Cocos4.0/library/cc/ParticleBatchNode.lua deleted file mode 100644 index a4235205..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ParticleBatchNode.lua +++ /dev/null @@ -1,119 +0,0 @@ ----@meta - ----@class cc.ParticleBatchNode :cc.Node@all parent class: Node,TextureProtocol -local ParticleBatchNode={ } -cc.ParticleBatchNode=ParticleBatchNode - - - - ----* ----@param texture cc.Texture2D ----@return self -function ParticleBatchNode:setTexture (texture) end ----* initializes the particle system with Texture2D, a capacity of particles ----@param tex cc.Texture2D ----@param capacity int ----@return boolean -function ParticleBatchNode:initWithTexture (tex,capacity) end ----* Disables a particle by inserting a 0'd quad into the texture atlas.
----* param particleIndex The index of the particle. ----@param particleIndex int ----@return self -function ParticleBatchNode:disableParticle (particleIndex) end ----* ----@return cc.Texture2D -function ParticleBatchNode:getTexture () end ----* Sets the texture atlas used for drawing the quads.
----* param atlas The texture atlas used for drawing the quads. ----@param atlas cc.TextureAtlas ----@return self -function ParticleBatchNode:setTextureAtlas (atlas) end ----* initializes the particle system with the name of a file on disk (for a list of supported formats look at the Texture2D class), a capacity of particles ----@param fileImage string ----@param capacity int ----@return boolean -function ParticleBatchNode:initWithFile (fileImage,capacity) end ----* code
----* When this function bound into js or lua,the parameter will be changed
----* In js: var setBlendFunc(var src, var dst)
----* endcode
----* lua NA ----@param blendFunc cc.BlendFunc ----@return self -function ParticleBatchNode:setBlendFunc (blendFunc) end ----* ----@param doCleanup boolean ----@return self -function ParticleBatchNode:removeAllChildrenWithCleanup (doCleanup) end ----* Gets the texture atlas used for drawing the quads.
----* return The texture atlas used for drawing the quads. ----@return cc.TextureAtlas -function ParticleBatchNode:getTextureAtlas () end ----* js NA
----* lua NA ----@return cc.BlendFunc -function ParticleBatchNode:getBlendFunc () end ----* Inserts a child into the ParticleBatchNode.
----* param system A given particle system.
----* param index The insert index. ----@param system cc.ParticleSystem ----@param index int ----@return self -function ParticleBatchNode:insertChild (system,index) end ----* Remove a child of the ParticleBatchNode.
----* param index The index of the child.
----* param doCleanup True if all actions and callbacks on this node should be removed, false otherwise. ----@param index int ----@param doCleanup boolean ----@return self -function ParticleBatchNode:removeChildAtIndex (index,doCleanup) end ----* Create the particle system with the name of a file on disk (for a list of supported formats look at the Texture2D class), a capacity of particles.
----* param fileImage A given file name.
----* param capacity A capacity of particles.
----* return An autoreleased ParticleBatchNode object. ----@param fileImage string ----@param capacity int ----@return self -function ParticleBatchNode:create (fileImage,capacity) end ----* Create the particle system with Texture2D, a capacity of particles, which particle system to use.
----* param tex A given texture.
----* param capacity A capacity of particles.
----* return An autoreleased ParticleBatchNode object.
----* js NA ----@param tex cc.Texture2D ----@param capacity int ----@return self -function ParticleBatchNode:createWithTexture (tex,capacity) end ----@overload fun(cc.Node:cc.Node,int:int,int2:string):self ----@overload fun(cc.Node:cc.Node,int:int,int:int):self ----@param child cc.Node ----@param zOrder int ----@param tag int ----@return self -function ParticleBatchNode:addChild (child,zOrder,tag) end ----* ----@param renderer cc.Renderer ----@param transform mat4_table ----@param flags unsigned_int ----@return self -function ParticleBatchNode:draw (renderer,transform,flags) end ----* ----@param renderer cc.Renderer ----@param parentTransform mat4_table ----@param parentFlags unsigned_int ----@return self -function ParticleBatchNode:visit (renderer,parentTransform,parentFlags) end ----* ----@param child cc.Node ----@param zOrder int ----@return self -function ParticleBatchNode:reorderChild (child,zOrder) end ----* ----@param child cc.Node ----@param cleanup boolean ----@return self -function ParticleBatchNode:removeChild (child,cleanup) end ----* js ctor ----@return self -function ParticleBatchNode:ParticleBatchNode () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ParticleData.lua b/meta/3rd/Cocos4.0/library/cc/ParticleData.lua deleted file mode 100644 index 663070b3..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ParticleData.lua +++ /dev/null @@ -1,27 +0,0 @@ ----@meta - ----@class cc.ParticleData -local ParticleData={ } -cc.ParticleData=ParticleData - - - - ----* ----@return self -function ParticleData:release () end ----* ----@return unsigned_int -function ParticleData:getMaxCount () end ----* ----@param count int ----@return boolean -function ParticleData:init (count) end ----* ----@param p1 int ----@param p2 int ----@return self -function ParticleData:copyParticle (p1,p2) end ----* ----@return self -function ParticleData:ParticleData () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ParticleExplosion.lua b/meta/3rd/Cocos4.0/library/cc/ParticleExplosion.lua deleted file mode 100644 index 6d3cada5..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ParticleExplosion.lua +++ /dev/null @@ -1,30 +0,0 @@ ----@meta - ----@class cc.ParticleExplosion :cc.ParticleSystemQuad -local ParticleExplosion={ } -cc.ParticleExplosion=ParticleExplosion - - - - ----* ----@return boolean -function ParticleExplosion:init () end ----* ----@param numberOfParticles int ----@return boolean -function ParticleExplosion:initWithTotalParticles (numberOfParticles) end ----* Create a explosion particle system.
----* return An autoreleased ParticleExplosion object. ----@return self -function ParticleExplosion:create () end ----* Create a explosion particle system withe a fixed number of particles.
----* param numberOfParticles A given number of particles.
----* return An autoreleased ParticleExplosion object.
----* js NA ----@param numberOfParticles int ----@return self -function ParticleExplosion:createWithTotalParticles (numberOfParticles) end ----* js ctor ----@return self -function ParticleExplosion:ParticleExplosion () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ParticleFire.lua b/meta/3rd/Cocos4.0/library/cc/ParticleFire.lua deleted file mode 100644 index 6574783d..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ParticleFire.lua +++ /dev/null @@ -1,30 +0,0 @@ ----@meta - ----@class cc.ParticleFire :cc.ParticleSystemQuad -local ParticleFire={ } -cc.ParticleFire=ParticleFire - - - - ----* Create a fire particle system.
----* return An autoreleased ParticleFire object. ----@return self -function ParticleFire:create () end ----* Create a fire particle system withe a fixed number of particles.
----* param numberOfParticles A given number of particles.
----* return An autoreleased ParticleFire object.
----* js NA ----@param numberOfParticles int ----@return self -function ParticleFire:createWithTotalParticles (numberOfParticles) end ----* ----@return boolean -function ParticleFire:init () end ----* ----@param numberOfParticles int ----@return boolean -function ParticleFire:initWithTotalParticles (numberOfParticles) end ----* js ctor ----@return self -function ParticleFire:ParticleFire () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ParticleFireworks.lua b/meta/3rd/Cocos4.0/library/cc/ParticleFireworks.lua deleted file mode 100644 index 5254e088..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ParticleFireworks.lua +++ /dev/null @@ -1,30 +0,0 @@ ----@meta - ----@class cc.ParticleFireworks :cc.ParticleSystemQuad -local ParticleFireworks={ } -cc.ParticleFireworks=ParticleFireworks - - - - ----* ----@return boolean -function ParticleFireworks:init () end ----* ----@param numberOfParticles int ----@return boolean -function ParticleFireworks:initWithTotalParticles (numberOfParticles) end ----* Create a fireworks particle system.
----* return An autoreleased ParticleFireworks object. ----@return self -function ParticleFireworks:create () end ----* Create a fireworks particle system withe a fixed number of particles.
----* param numberOfParticles A given number of particles.
----* return An autoreleased ParticleFireworks object.
----* js NA ----@param numberOfParticles int ----@return self -function ParticleFireworks:createWithTotalParticles (numberOfParticles) end ----* js ctor ----@return self -function ParticleFireworks:ParticleFireworks () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ParticleFlower.lua b/meta/3rd/Cocos4.0/library/cc/ParticleFlower.lua deleted file mode 100644 index fafae8b9..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ParticleFlower.lua +++ /dev/null @@ -1,30 +0,0 @@ ----@meta - ----@class cc.ParticleFlower :cc.ParticleSystemQuad -local ParticleFlower={ } -cc.ParticleFlower=ParticleFlower - - - - ----* ----@return boolean -function ParticleFlower:init () end ----* ----@param numberOfParticles int ----@return boolean -function ParticleFlower:initWithTotalParticles (numberOfParticles) end ----* Create a flower particle system.
----* return An autoreleased ParticleFlower object. ----@return self -function ParticleFlower:create () end ----* Create a flower particle system withe a fixed number of particles.
----* param numberOfParticles A given number of particles.
----* return An autoreleased ParticleFlower object.
----* js NA ----@param numberOfParticles int ----@return self -function ParticleFlower:createWithTotalParticles (numberOfParticles) end ----* js ctor ----@return self -function ParticleFlower:ParticleFlower () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ParticleGalaxy.lua b/meta/3rd/Cocos4.0/library/cc/ParticleGalaxy.lua deleted file mode 100644 index 3a323f4e..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ParticleGalaxy.lua +++ /dev/null @@ -1,30 +0,0 @@ ----@meta - ----@class cc.ParticleGalaxy :cc.ParticleSystemQuad -local ParticleGalaxy={ } -cc.ParticleGalaxy=ParticleGalaxy - - - - ----* ----@return boolean -function ParticleGalaxy:init () end ----* ----@param numberOfParticles int ----@return boolean -function ParticleGalaxy:initWithTotalParticles (numberOfParticles) end ----* Create a galaxy particle system.
----* return An autoreleased ParticleGalaxy object. ----@return self -function ParticleGalaxy:create () end ----* Create a galaxy particle system withe a fixed number of particles.
----* param numberOfParticles A given number of particles.
----* return An autoreleased ParticleGalaxy object.
----* js NA ----@param numberOfParticles int ----@return self -function ParticleGalaxy:createWithTotalParticles (numberOfParticles) end ----* js ctor ----@return self -function ParticleGalaxy:ParticleGalaxy () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ParticleMeteor.lua b/meta/3rd/Cocos4.0/library/cc/ParticleMeteor.lua deleted file mode 100644 index 6752d6bb..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ParticleMeteor.lua +++ /dev/null @@ -1,30 +0,0 @@ ----@meta - ----@class cc.ParticleMeteor :cc.ParticleSystemQuad -local ParticleMeteor={ } -cc.ParticleMeteor=ParticleMeteor - - - - ----* ----@return boolean -function ParticleMeteor:init () end ----* ----@param numberOfParticles int ----@return boolean -function ParticleMeteor:initWithTotalParticles (numberOfParticles) end ----* Create a meteor particle system.
----* return An autoreleased ParticleMeteor object. ----@return self -function ParticleMeteor:create () end ----* Create a meteor particle system withe a fixed number of particles.
----* param numberOfParticles A given number of particles.
----* return An autoreleased ParticleMeteor object.
----* js NA ----@param numberOfParticles int ----@return self -function ParticleMeteor:createWithTotalParticles (numberOfParticles) end ----* js ctor ----@return self -function ParticleMeteor:ParticleMeteor () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ParticleRain.lua b/meta/3rd/Cocos4.0/library/cc/ParticleRain.lua deleted file mode 100644 index e851f3cb..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ParticleRain.lua +++ /dev/null @@ -1,30 +0,0 @@ ----@meta - ----@class cc.ParticleRain :cc.ParticleSystemQuad -local ParticleRain={ } -cc.ParticleRain=ParticleRain - - - - ----* ----@return boolean -function ParticleRain:init () end ----* ----@param numberOfParticles int ----@return boolean -function ParticleRain:initWithTotalParticles (numberOfParticles) end ----* Create a rain particle system.
----* return An autoreleased ParticleRain object. ----@return self -function ParticleRain:create () end ----* Create a rain particle system withe a fixed number of particles.
----* param numberOfParticles A given number of particles.
----* return An autoreleased ParticleRain object.
----* js NA ----@param numberOfParticles int ----@return self -function ParticleRain:createWithTotalParticles (numberOfParticles) end ----* js ctor ----@return self -function ParticleRain:ParticleRain () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ParticleSmoke.lua b/meta/3rd/Cocos4.0/library/cc/ParticleSmoke.lua deleted file mode 100644 index c342f9f7..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ParticleSmoke.lua +++ /dev/null @@ -1,30 +0,0 @@ ----@meta - ----@class cc.ParticleSmoke :cc.ParticleSystemQuad -local ParticleSmoke={ } -cc.ParticleSmoke=ParticleSmoke - - - - ----* ----@return boolean -function ParticleSmoke:init () end ----* ----@param numberOfParticles int ----@return boolean -function ParticleSmoke:initWithTotalParticles (numberOfParticles) end ----* Create a smoke particle system.
----* return An autoreleased ParticleSmoke object. ----@return self -function ParticleSmoke:create () end ----* Create a smoke particle system withe a fixed number of particles.
----* param numberOfParticles A given number of particles.
----* return An autoreleased ParticleSmoke object.
----* js NA ----@param numberOfParticles int ----@return self -function ParticleSmoke:createWithTotalParticles (numberOfParticles) end ----* js ctor ----@return self -function ParticleSmoke:ParticleSmoke () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ParticleSnow.lua b/meta/3rd/Cocos4.0/library/cc/ParticleSnow.lua deleted file mode 100644 index 11c2327a..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ParticleSnow.lua +++ /dev/null @@ -1,30 +0,0 @@ ----@meta - ----@class cc.ParticleSnow :cc.ParticleSystemQuad -local ParticleSnow={ } -cc.ParticleSnow=ParticleSnow - - - - ----* ----@return boolean -function ParticleSnow:init () end ----* ----@param numberOfParticles int ----@return boolean -function ParticleSnow:initWithTotalParticles (numberOfParticles) end ----* Create a snow particle system.
----* return An autoreleased ParticleSnow object. ----@return self -function ParticleSnow:create () end ----* Create a snow particle system withe a fixed number of particles.
----* param numberOfParticles A given number of particles.
----* return An autoreleased ParticleSnow object.
----* js NA ----@param numberOfParticles int ----@return self -function ParticleSnow:createWithTotalParticles (numberOfParticles) end ----* js ctor ----@return self -function ParticleSnow:ParticleSnow () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ParticleSpiral.lua b/meta/3rd/Cocos4.0/library/cc/ParticleSpiral.lua deleted file mode 100644 index a6a80875..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ParticleSpiral.lua +++ /dev/null @@ -1,30 +0,0 @@ ----@meta - ----@class cc.ParticleSpiral :cc.ParticleSystemQuad -local ParticleSpiral={ } -cc.ParticleSpiral=ParticleSpiral - - - - ----* ----@return boolean -function ParticleSpiral:init () end ----* ----@param numberOfParticles int ----@return boolean -function ParticleSpiral:initWithTotalParticles (numberOfParticles) end ----* Create a spiral particle system.
----* return An autoreleased ParticleSpiral object. ----@return self -function ParticleSpiral:create () end ----* Create a spiral particle system withe a fixed number of particles.
----* param numberOfParticles A given number of particles.
----* return An autoreleased ParticleSpiral object.
----* js NA ----@param numberOfParticles int ----@return self -function ParticleSpiral:createWithTotalParticles (numberOfParticles) end ----* js ctor ----@return self -function ParticleSpiral:ParticleSpiral () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ParticleSun.lua b/meta/3rd/Cocos4.0/library/cc/ParticleSun.lua deleted file mode 100644 index f4347236..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ParticleSun.lua +++ /dev/null @@ -1,30 +0,0 @@ ----@meta - ----@class cc.ParticleSun :cc.ParticleSystemQuad -local ParticleSun={ } -cc.ParticleSun=ParticleSun - - - - ----* ----@return boolean -function ParticleSun:init () end ----* ----@param numberOfParticles int ----@return boolean -function ParticleSun:initWithTotalParticles (numberOfParticles) end ----* Create a sun particle system.
----* return An autoreleased ParticleSun object. ----@return self -function ParticleSun:create () end ----* Create a sun particle system withe a fixed number of particles.
----* param numberOfParticles A given number of particles.
----* return An autoreleased ParticleSun object.
----* js NA ----@param numberOfParticles int ----@return self -function ParticleSun:createWithTotalParticles (numberOfParticles) end ----* js ctor ----@return self -function ParticleSun:ParticleSun () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ParticleSystem.lua b/meta/3rd/Cocos4.0/library/cc/ParticleSystem.lua deleted file mode 100644 index 2ef35e52..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ParticleSystem.lua +++ /dev/null @@ -1,529 +0,0 @@ ----@meta - ----@class cc.ParticleSystem :cc.Node@all parent class: Node,TextureProtocol,PlayableProtocol -local ParticleSystem={ } -cc.ParticleSystem=ParticleSystem - - - - ----* Gets the start size variance in pixels of each particle.
----* return The start size variance in pixels of each particle. ----@return float -function ParticleSystem:getStartSizeVar () end ----* ----@return cc.Texture2D -function ParticleSystem:getTexture () end ----* Whether or not the system is full.
----* return True if the system is full. ----@return boolean -function ParticleSystem:isFull () end ----* Gets the batch node.
----* return The batch node. ----@return cc.ParticleBatchNode -function ParticleSystem:getBatchNode () end ----* Gets the start color of each particle.
----* return The start color of each particle. ----@return color4f_table -function ParticleSystem:getStartColor () end ----* Gets the particles movement type: Free or Grouped.
----* since v0.8
----* return The particles movement type. ----@return int -function ParticleSystem:getPositionType () end ----* Sets the position variance of the emitter.
----* param pos The position variance of the emitter. ----@param pos vec2_table ----@return self -function ParticleSystem:setPosVar (pos) end ----* Gets the end spin of each particle.
----* return The end spin of each particle. ----@return float -function ParticleSystem:getEndSpin () end ----* Sets the rotate per second variance.
----* param degrees The rotate per second variance. ----@param degrees float ----@return self -function ParticleSystem:setRotatePerSecondVar (degrees) end ----* / @} end of PlayableProtocol ----@param sourcePositionCompatible boolean ----@return self -function ParticleSystem:setSourcePositionCompatible (sourcePositionCompatible) end ----* Gets the start spin variance of each particle.
----* return The start spin variance of each particle. ----@return float -function ParticleSystem:getStartSpinVar () end ----* Gets the radial acceleration variance.
----* return The radial acceleration variance. ----@return float -function ParticleSystem:getRadialAccelVar () end ----* Gets the end size variance in pixels of each particle.
----* return The end size variance in pixels of each particle. ----@return float -function ParticleSystem:getEndSizeVar () end ----* Sets the tangential acceleration.
----* param t The tangential acceleration. ----@param t float ----@return self -function ParticleSystem:setTangentialAccel (t) end ----* Gets the radial acceleration.
----* return The radial acceleration. ----@return float -function ParticleSystem:getRadialAccel () end ----* Sets the start radius.
----* param startRadius The start radius. ----@param startRadius float ----@return self -function ParticleSystem:setStartRadius (startRadius) end ----* Sets the number of degrees to rotate a particle around the source pos per second.
----* param degrees The number of degrees to rotate a particle around the source pos per second. ----@param degrees float ----@return self -function ParticleSystem:setRotatePerSecond (degrees) end ----* Sets the end size in pixels of each particle.
----* param endSize The end size in pixels of each particle. ----@param endSize float ----@return self -function ParticleSystem:setEndSize (endSize) end ----* Gets the gravity.
----* return The gravity. ----@return vec2_table -function ParticleSystem:getGravity () end ----* ----@return self -function ParticleSystem:resumeEmissions () end ----* Gets the tangential acceleration.
----* return The tangential acceleration. ----@return float -function ParticleSystem:getTangentialAccel () end ----* Sets the end radius.
----* param endRadius The end radius. ----@param endRadius float ----@return self -function ParticleSystem:setEndRadius (endRadius) end ----* Gets the speed.
----* return The speed. ----@return float -function ParticleSystem:getSpeed () end ----* ----@return self -function ParticleSystem:pauseEmissions () end ----* Gets the angle of each particle.
----* return The angle of each particle. ----@return float -function ParticleSystem:getAngle () end ----* Sets the end color and end color variation of each particle.
----* param color The end color and end color variation of each particle. ----@param color color4f_table ----@return self -function ParticleSystem:setEndColor (color) end ----* Sets the start spin of each particle.
----* param spin The start spin of each particle. ----@param spin float ----@return self -function ParticleSystem:setStartSpin (spin) end ----* Sets how many seconds the emitter will run. -1 means 'forever'.
----* param duration The seconds that the emitter will run. -1 means 'forever'. ----@param duration float ----@return self -function ParticleSystem:setDuration (duration) end ----* Initializes a system with a fixed number of particles ----@param numberOfParticles int ----@return boolean -function ParticleSystem:initWithTotalParticles (numberOfParticles) end ----* ----@param count int ----@return self -function ParticleSystem:addParticles (count) end ----* ----@param texture cc.Texture2D ----@return self -function ParticleSystem:setTexture (texture) end ----* Gets the position variance of the emitter.
----* return The position variance of the emitter. ----@return vec2_table -function ParticleSystem:getPosVar () end ----* Call the update method with no time.. ----@return self -function ParticleSystem:updateWithNoTime () end ----* Whether or not the particle system is blend additive.
----* return True if the particle system is blend additive. ----@return boolean -function ParticleSystem:isBlendAdditive () end ----* Gets the speed variance.
----* return The speed variance. ----@return float -function ParticleSystem:getSpeedVar () end ----* Sets the particles movement type: Free or Grouped.
----* since v0.8
----* param type The particles movement type. ----@param type int ----@return self -function ParticleSystem:setPositionType (type) end ----* ----@return self -function ParticleSystem:stopSystem () end ----* Gets the source position of the emitter.
----* return The source position of the emitter. ----@return vec2_table -function ParticleSystem:getSourcePosition () end ----* Sets the life variance of each particle.
----* param lifeVar The life variance of each particle. ----@param lifeVar float ----@return self -function ParticleSystem:setLifeVar (lifeVar) end ----* Sets the maximum particles of the system.
----* param totalParticles The maximum particles of the system. ----@param totalParticles int ----@return self -function ParticleSystem:setTotalParticles (totalParticles) end ----* Sets the end color variance of each particle.
----* param color The end color variance of each particle. ----@param color color4f_table ----@return self -function ParticleSystem:setEndColorVar (color) end ----* Gets the index of system in batch node array.
----* return The index of system in batch node array. ----@return int -function ParticleSystem:getAtlasIndex () end ----* Gets the start size in pixels of each particle.
----* return The start size in pixels of each particle. ----@return float -function ParticleSystem:getStartSize () end ----* Sets the start spin variance of each particle.
----* param pinVar The start spin variance of each particle. ----@param pinVar float ----@return self -function ParticleSystem:setStartSpinVar (pinVar) end ----* Kill all living particles. ----@return self -function ParticleSystem:resetSystem () end ----* Sets the index of system in batch node array.
----* param index The index of system in batch node array. ----@param index int ----@return self -function ParticleSystem:setAtlasIndex (index) end ----* Sets the tangential acceleration variance.
----* param t The tangential acceleration variance. ----@param t float ----@return self -function ParticleSystem:setTangentialAccelVar (t) end ----* Sets the end radius variance.
----* param endRadiusVar The end radius variance. ----@param endRadiusVar float ----@return self -function ParticleSystem:setEndRadiusVar (endRadiusVar) end ----* Gets the end radius.
----* return The end radius. ----@return float -function ParticleSystem:getEndRadius () end ----* Whether or not the particle system is active.
----* return True if the particle system is active. ----@return boolean -function ParticleSystem:isActive () end ----* Sets the radial acceleration variance.
----* param t The radial acceleration variance. ----@param t float ----@return self -function ParticleSystem:setRadialAccelVar (t) end ----* Sets the start size in pixels of each particle.
----* param startSize The start size in pixels of each particle. ----@param startSize float ----@return self -function ParticleSystem:setStartSize (startSize) end ----* Sets the speed.
----* param speed The speed. ----@param speed float ----@return self -function ParticleSystem:setSpeed (speed) end ----* Gets the start spin of each particle.
----* return The start spin of each particle. ----@return float -function ParticleSystem:getStartSpin () end ----* ----@return string -function ParticleSystem:getResourceFile () end ----* Gets the number of degrees to rotate a particle around the source pos per second.
----* return The number of degrees to rotate a particle around the source pos per second. ----@return float -function ParticleSystem:getRotatePerSecond () end ----* Sets the mode of the emitter.
----* param mode The mode of the emitter. ----@param mode int ----@return self -function ParticleSystem:setEmitterMode (mode) end ----* Gets how many seconds the emitter will run. -1 means 'forever'.
----* return The seconds that the emitter will run. -1 means 'forever'. ----@return float -function ParticleSystem:getDuration () end ----* Sets the source position of the emitter.
----* param pos The source position of the emitter. ----@param pos vec2_table ----@return self -function ParticleSystem:setSourcePosition (pos) end ----* ----@return self -function ParticleSystem:stop () end ----* Update the verts position data of particle,
----* should be overridden by subclasses. ----@return self -function ParticleSystem:updateParticleQuads () end ----* Gets the end spin variance of each particle.
----* return The end spin variance of each particle. ----@return float -function ParticleSystem:getEndSpinVar () end ----* Sets the particle system blend additive.
----* param value True if the particle system is blend additive. ----@param value boolean ----@return self -function ParticleSystem:setBlendAdditive (value) end ----* Sets the life of each particle.
----* param life The life of each particle. ----@param life float ----@return self -function ParticleSystem:setLife (life) end ----* Sets the angle variance of each particle.
----* param angleVar The angle variance of each particle. ----@param angleVar float ----@return self -function ParticleSystem:setAngleVar (angleVar) end ----* Sets the rotation of each particle to its direction.
----* param t True if the rotation is the direction. ----@param t boolean ----@return self -function ParticleSystem:setRotationIsDir (t) end ----* / @{/ @name implement Playable Protocol ----@return self -function ParticleSystem:start () end ----* Sets the end size variance in pixels of each particle.
----* param sizeVar The end size variance in pixels of each particle. ----@param sizeVar float ----@return self -function ParticleSystem:setEndSizeVar (sizeVar) end ----* Sets the angle of each particle.
----* param angle The angle of each particle. ----@param angle float ----@return self -function ParticleSystem:setAngle (angle) end ----* Sets the batch node.
----* param batchNode The batch node. ----@param batchNode cc.ParticleBatchNode ----@return self -function ParticleSystem:setBatchNode (batchNode) end ----* Gets the tangential acceleration variance.
----* return The tangential acceleration variance. ----@return float -function ParticleSystem:getTangentialAccelVar () end ----* Switch between different kind of emitter modes:
----* - kParticleModeGravity: uses gravity, speed, radial and tangential acceleration.
----* - kParticleModeRadius: uses radius movement + rotation.
----* return The mode of the emitter. ----@return int -function ParticleSystem:getEmitterMode () end ----* Sets the end spin variance of each particle.
----* param endSpinVar The end spin variance of each particle. ----@param endSpinVar float ----@return self -function ParticleSystem:setEndSpinVar (endSpinVar) end ----* initializes a ParticleSystem from a plist file.
----* This plist files can be created manually or with Particle Designer:
----* http:particledesigner.71squared.com/
----* since v0.99.3 ----@param plistFile string ----@return boolean -function ParticleSystem:initWithFile (plistFile) end ----* Gets the angle variance of each particle.
----* return The angle variance of each particle. ----@return float -function ParticleSystem:getAngleVar () end ----* Sets the start color of each particle.
----* param color The start color of each particle. ----@param color color4f_table ----@return self -function ParticleSystem:setStartColor (color) end ----* Gets the rotate per second variance.
----* return The rotate per second variance. ----@return float -function ParticleSystem:getRotatePerSecondVar () end ----* Gets the end size in pixels of each particle.
----* return The end size in pixels of each particle. ----@return float -function ParticleSystem:getEndSize () end ----* Gets the life of each particle.
----* return The life of each particle. ----@return float -function ParticleSystem:getLife () end ----* Are the emissions paused
----* return True if the emissions are paused, else false ----@return boolean -function ParticleSystem:isPaused () end ----* Sets the speed variance.
----* param speed The speed variance. ----@param speed float ----@return self -function ParticleSystem:setSpeedVar (speed) end ----* Set the particle system auto removed it self on finish.
----* param var True if the particle system removed self on finish. ----@param var boolean ----@return self -function ParticleSystem:setAutoRemoveOnFinish (var) end ----* Sets the gravity.
----* param g The gravity. ----@param g vec2_table ----@return self -function ParticleSystem:setGravity (g) end ----* Update the VBO verts buffer which does not use batch node,
----* should be overridden by subclasses. ----@return self -function ParticleSystem:postStep () end ----* Sets the emission rate of the particles.
----* param rate The emission rate of the particles. ----@param rate float ----@return self -function ParticleSystem:setEmissionRate (rate) end ----* Gets the end color variance of each particle.
----* return The end color variance of each particle. ----@return color4f_table -function ParticleSystem:getEndColorVar () end ----* Whether or not the rotation of each particle to its direction.
----* return True if the rotation is the direction. ----@return boolean -function ParticleSystem:getRotationIsDir () end ----* Gets the emission rate of the particles.
----* return The emission rate of the particles. ----@return float -function ParticleSystem:getEmissionRate () end ----* Gets the end color and end color variation of each particle.
----* return The end color and end color variation of each particle. ----@return color4f_table -function ParticleSystem:getEndColor () end ----* Gets the life variance of each particle.
----* return The life variance of each particle. ----@return float -function ParticleSystem:getLifeVar () end ----* Sets the start size variance in pixels of each particle.
----* param sizeVar The start size variance in pixels of each particle. ----@param sizeVar float ----@return self -function ParticleSystem:setStartSizeVar (sizeVar) end ----* Gets the start radius.
----* return The start radius. ----@return float -function ParticleSystem:getStartRadius () end ----* Gets the Quantity of particles that are being simulated at the moment.
----* return The Quantity of particles that are being simulated at the moment. ----@return unsigned_int -function ParticleSystem:getParticleCount () end ----* Gets the start radius variance.
----* return The start radius variance. ----@return float -function ParticleSystem:getStartRadiusVar () end ----* js NA
----* lua NA ----@return cc.BlendFunc -function ParticleSystem:getBlendFunc () end ----* Sets the start color variance of each particle.
----* param color The start color variance of each particle. ----@param color color4f_table ----@return self -function ParticleSystem:setStartColorVar (color) end ----* Sets the end spin of each particle.
----* param endSpin The end spin of each particle. ----@param endSpin float ----@return self -function ParticleSystem:setEndSpin (endSpin) end ----* Sets the radial acceleration.
----* param t The radial acceleration. ----@param t float ----@return self -function ParticleSystem:setRadialAccel (t) end ----@overload fun(map_table:map_table,string:string):self ----@overload fun(map_table:map_table):self ----@param dictionary map_table ----@param dirname string ----@return boolean -function ParticleSystem:initWithDictionary (dictionary,dirname) end ----* Whether or not the particle system removed self on finish.
----* return True if the particle system removed self on finish. ----@return boolean -function ParticleSystem:isAutoRemoveOnFinish () end ----* ----@return boolean -function ParticleSystem:isSourcePositionCompatible () end ----* Gets the maximum particles of the system.
----* return The maximum particles of the system. ----@return int -function ParticleSystem:getTotalParticles () end ----* Sets the start radius variance.
----* param startRadiusVar The start radius variance. ----@param startRadiusVar float ----@return self -function ParticleSystem:setStartRadiusVar (startRadiusVar) end ----* code
----* When this function bound into js or lua,the parameter will be changed
----* In js: var setBlendFunc(var src, var dst)
----* In lua: local setBlendFunc(local src, local dst)
----* endcode ----@param blendFunc cc.BlendFunc ----@return self -function ParticleSystem:setBlendFunc (blendFunc) end ----* Gets the end radius variance.
----* return The end radius variance. ----@return float -function ParticleSystem:getEndRadiusVar () end ----* Gets the start color variance of each particle.
----* return The start color variance of each particle. ----@return color4f_table -function ParticleSystem:getStartColorVar () end ----* Creates an initializes a ParticleSystem from a plist file.
----* This plist files can be created manually or with Particle Designer:
----* http:particledesigner.71squared.com/
----* since v2.0
----* param plistFile Particle plist file name.
----* return An autoreleased ParticleSystem object. ----@param plistFile string ----@return self -function ParticleSystem:create (plistFile) end ----* Create a system with a fixed number of particles.
----* param numberOfParticles A given number of particles.
----* return An autoreleased ParticleSystemQuad object.
----* js NA ----@param numberOfParticles int ----@return self -function ParticleSystem:createWithTotalParticles (numberOfParticles) end ----* Gets all ParticleSystem references ----@return array_table -function ParticleSystem:getAllParticleSystems () end ----* ----@param newScaleY float ----@return self -function ParticleSystem:setScaleY (newScaleY) end ----* ----@param newScaleX float ----@return self -function ParticleSystem:setScaleX (newScaleX) end ----* ----@return boolean -function ParticleSystem:isOpacityModifyRGB () end ----* does the alpha value modify color ----@param opacityModifyRGB boolean ----@return self -function ParticleSystem:setOpacityModifyRGB (opacityModifyRGB) end ----* ----@param s float ----@return self -function ParticleSystem:setScale (s) end ----* ----@param dt float ----@return self -function ParticleSystem:update (dt) end ----* initializes a ParticleSystem ----@return boolean -function ParticleSystem:init () end ----* ----@param newRotation float ----@return self -function ParticleSystem:setRotation (newRotation) end ----* js ctor ----@return self -function ParticleSystem:ParticleSystem () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ParticleSystem3D.lua b/meta/3rd/Cocos4.0/library/cc/ParticleSystem3D.lua deleted file mode 100644 index 3f5664a3..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ParticleSystem3D.lua +++ /dev/null @@ -1,90 +0,0 @@ ----@meta - ----@class cc.ParticleSystem3D :cc.Node@all parent class: Node,BlendProtocol -local ParticleSystem3D={ } -cc.ParticleSystem3D=ParticleSystem3D - - - - ----* remove affector by index ----@param index int ----@return self -function ParticleSystem3D:removeAffector (index) end ----* resume particle ----@return self -function ParticleSystem3D:resumeParticleSystem () end ----* remove all particle affector ----@return self -function ParticleSystem3D:removeAllAffector () end ----* add particle affector ----@param affector cc.Particle3DAffector ----@return self -function ParticleSystem3D:addAffector (affector) end ----* particle system play control ----@return self -function ParticleSystem3D:startParticleSystem () end ----* is enabled ----@return boolean -function ParticleSystem3D:isEnabled () end ----* return particle render ----@return cc.Particle3DRender -function ParticleSystem3D:getRender () end ----* set emitter for particle system, can set your own particle emitter ----@param emitter cc.Particle3DEmitter ----@return self -function ParticleSystem3D:setEmitter (emitter) end ----* ----@return boolean -function ParticleSystem3D:isKeepLocal () end ----* Enables or disables the system. ----@param enabled boolean ----@return self -function ParticleSystem3D:setEnabled (enabled) end ----* get particle quota ----@return unsigned_int -function ParticleSystem3D:getParticleQuota () end ----* override function ----@return cc.BlendFunc -function ParticleSystem3D:getBlendFunc () end ----* pause particle ----@return self -function ParticleSystem3D:pauseParticleSystem () end ----* get particle playing state ----@return int -function ParticleSystem3D:getState () end ----* get alive particles count ----@return int -function ParticleSystem3D:getAliveParticleCount () end ----* set particle quota ----@param quota unsigned_int ----@return self -function ParticleSystem3D:setParticleQuota (quota) end ----* override function ----@param blendFunc cc.BlendFunc ----@return self -function ParticleSystem3D:setBlendFunc (blendFunc) end ----* set particle render, can set your own particle render ----@param render cc.Particle3DRender ----@return self -function ParticleSystem3D:setRender (render) end ----* stop particle ----@return self -function ParticleSystem3D:stopParticleSystem () end ----* ----@param keepLocal boolean ----@return self -function ParticleSystem3D:setKeepLocal (keepLocal) end ----* override function ----@param renderer cc.Renderer ----@param transform mat4_table ----@param flags unsigned_int ----@return self -function ParticleSystem3D:draw (renderer,transform,flags) end ----* override function ----@param delta float ----@return self -function ParticleSystem3D:update (delta) end ----* ----@return self -function ParticleSystem3D:ParticleSystem3D () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ParticleSystemQuad.lua b/meta/3rd/Cocos4.0/library/cc/ParticleSystemQuad.lua deleted file mode 100644 index a538e57c..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ParticleSystemQuad.lua +++ /dev/null @@ -1,55 +0,0 @@ ----@meta - ----@class cc.ParticleSystemQuad :cc.ParticleSystem -local ParticleSystemQuad={ } -cc.ParticleSystemQuad=ParticleSystemQuad - - - - ----* Sets a new SpriteFrame as particle.
----* WARNING: this method is experimental. Use setTextureWithRect instead.
----* param spriteFrame A given sprite frame as particle texture.
----* since v0.99.4 ----@param spriteFrame cc.SpriteFrame ----@return self -function ParticleSystemQuad:setDisplayFrame (spriteFrame) end ----* Sets a new texture with a rect. The rect is in Points.
----* since v0.99.4
----* js NA
----* lua NA
----* param texture A given texture.
----* 8 @param rect A given rect, in points. ----@param texture cc.Texture2D ----@param rect rect_table ----@return self -function ParticleSystemQuad:setTextureWithRect (texture,rect) end ----* Listen the event that renderer was recreated on Android/WP8.
----* js NA
----* lua NA
----* param event the event that renderer was recreated on Android/WP8. ----@param event cc.EventCustom ----@return self -function ParticleSystemQuad:listenRendererRecreated (event) end ----@overload fun(map_table0:string):self ----@overload fun():self ----@overload fun(map_table:map_table):self ----@param dictionary map_table ----@return self -function ParticleSystemQuad:create (dictionary) end ----* Creates a Particle Emitter with a number of particles.
----* param numberOfParticles A given number of particles.
----* return An autoreleased ParticleSystemQuad object. ----@param numberOfParticles int ----@return self -function ParticleSystemQuad:createWithTotalParticles (numberOfParticles) end ----* ----@return string -function ParticleSystemQuad:getDescription () end ----* js NA
----* lua NA ----@return self -function ParticleSystemQuad:updateParticleQuads () end ----* js ctor ----@return self -function ParticleSystemQuad:ParticleSystemQuad () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Pass.lua b/meta/3rd/Cocos4.0/library/cc/Pass.lua deleted file mode 100644 index a1f36d49..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Pass.lua +++ /dev/null @@ -1,141 +0,0 @@ ----@meta - ----@class cc.Pass :cc.Ref -local Pass={ } -cc.Pass=Pass - - - - ----* ----@param d voi ----@param t unsigned in ----@return self -function Pass:setUniformPointLightPosition (d,t) end ----* ----@param d voi ----@param t unsigned in ----@return self -function Pass:setUniformDirLightDir (d,t) end ----* ----@param technique cc.Technique ----@return self -function Pass:setTechnique (technique) end ----* Returns the vertex attribute binding for this pass.
----* return The vertex attribute binding for this pass. ----@return cc.VertexAttribBinding -function Pass:getVertexAttributeBinding () end ----* ----@param d voi ----@param t unsigned in ----@return self -function Pass:setUniformSpotLightOuterAngleCos (d,t) end ----* ----@param d voi ----@param t unsigned in ----@return self -function Pass:setUniformSpotLightDir (d,t) end ----* ----@param d voi ----@param t unsigned in ----@return self -function Pass:setUniformMatrixPalette (d,t) end ----* ----@param name string ----@return self -function Pass:setName (name) end ----* ----@return string -function Pass:getName () end ----* ----@param d voi ----@param t unsigned in ----@return self -function Pass:setUniformSpotLightRangeInverse (d,t) end ----* Returns a clone (deep-copy) of this instance ----@return self -function Pass:clone () end ----* ----@param meshCommand cc.MeshCommand ----@param globalZOrder float ----@param vertexBuffer cc.backend.Buffer ----@param indexBuffer cc.backend.Buffer ----@param primitive int ----@param indexFormat int ----@param indexCount unsigned_int ----@param modelView mat4_table ----@return self -function Pass:draw (meshCommand,globalZOrder,vertexBuffer,indexBuffer,primitive,indexFormat,indexCount,modelView) end ----* ----@param d voi ----@param t unsigned in ----@return self -function Pass:setUniformPointLightRangeInverse (d,t) end ----* ----@param slot unsigned_int ----@param d cc.backend.TextureBacken ----@return self -function Pass:setUniformNormTexture (slot,d) end ----* ----@param modelView mat4_table ----@return self -function Pass:updateMVPUniform (modelView) end ----* Returns the ProgramState ----@return cc.backend.ProgramState -function Pass:getProgramState () end ----* ----@param d voi ----@param t unsigned in ----@return self -function Pass:setUniformSpotLightColor (d,t) end ----* ----@param d voi ----@param t unsigned in ----@return self -function Pass:setUniformAmbientLigthColor (d,t) end ----* ----@param d voi ----@param t unsigned in ----@return self -function Pass:setUniformDirLightColor (d,t) end ----* ----@param d voi ----@param t unsigned in ----@return self -function Pass:setUniformSpotLightPosition (d,t) end ----* Sets a vertex attribute binding for this pass.
----* When a mesh binding is set, the VertexAttribBinding will be automatically
----* bound when the bind() method is called for the pass.
----* param binding The VertexAttribBinding to set (or NULL to remove an existing binding). ----@param binding cc.VertexAttribBinding ----@return self -function Pass:setVertexAttribBinding (binding) end ----* ----@param slot unsigned_int ----@param d cc.backend.TextureBacken ----@return self -function Pass:setUniformTexture (slot,d) end ----* ----@param d voi ----@param t unsigned in ----@return self -function Pass:setUniformSpotLightInnerAngleCos (d,t) end ----* ----@param d voi ----@param t unsigned in ----@return self -function Pass:setUniformColor (d,t) end ----* ----@param d voi ----@param t unsigned in ----@return self -function Pass:setUniformPointLightColor (d,t) end ----* Creates a Pass with a GLProgramState. ----@param parent cc.Technique ----@param programState cc.backend.ProgramState ----@return self -function Pass:createWithProgramState (parent,programState) end ----* ----@param parent cc.Technique ----@return self -function Pass:create (parent) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Physics3D6DofConstraint.lua b/meta/3rd/Cocos4.0/library/cc/Physics3D6DofConstraint.lua deleted file mode 100644 index 7101db2d..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Physics3D6DofConstraint.lua +++ /dev/null @@ -1,61 +0,0 @@ ----@meta - ----@class cc.Physics3D6DofConstraint :cc.Physics3DConstraint -local Physics3D6DofConstraint={ } -cc.Physics3D6DofConstraint=Physics3D6DofConstraint - - - - ----* set linear lower limit ----@param linearLower vec3_table ----@return self -function Physics3D6DofConstraint:setLinearLowerLimit (linearLower) end ----* get linear lower limit ----@return vec3_table -function Physics3D6DofConstraint:getLinearLowerLimit () end ----* get angular upper limit ----@return vec3_table -function Physics3D6DofConstraint:getAngularUpperLimit () end ----* access for UseFrameOffset ----@return boolean -function Physics3D6DofConstraint:getUseFrameOffset () end ----* get linear upper limit ----@return vec3_table -function Physics3D6DofConstraint:getLinearUpperLimit () end ----* set angular lower limit ----@param angularLower vec3_table ----@return self -function Physics3D6DofConstraint:setAngularLowerLimit (angularLower) end ----* is limited?
----* param limitIndex first 3 are linear, next 3 are angular ----@param limitIndex int ----@return boolean -function Physics3D6DofConstraint:isLimited (limitIndex) end ----* set use frame offset ----@param frameOffsetOnOff boolean ----@return self -function Physics3D6DofConstraint:setUseFrameOffset (frameOffsetOnOff) end ----* set linear upper limit ----@param linearUpper vec3_table ----@return self -function Physics3D6DofConstraint:setLinearUpperLimit (linearUpper) end ----* get angular lower limit ----@return vec3_table -function Physics3D6DofConstraint:getAngularLowerLimit () end ----* set angular upper limit ----@param angularUpper vec3_table ----@return self -function Physics3D6DofConstraint:setAngularUpperLimit (angularUpper) end ----@overload fun(cc.Physics3DRigidBody:cc.Physics3DRigidBody,cc.Physics3DRigidBody1:mat4_table,mat4_table2:boolean):self ----@overload fun(cc.Physics3DRigidBody:cc.Physics3DRigidBody,cc.Physics3DRigidBody:cc.Physics3DRigidBody,mat4_table:mat4_table,mat4_table:mat4_table,boolean:boolean):self ----@param rbA cc.Physics3DRigidBody ----@param rbB cc.Physics3DRigidBody ----@param frameInA mat4_table ----@param frameInB mat4_table ----@param useLinearReferenceFrameA boolean ----@return self -function Physics3D6DofConstraint:create (rbA,rbB,frameInA,frameInB,useLinearReferenceFrameA) end ----* ----@return self -function Physics3D6DofConstraint:Physics3D6DofConstraint () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Physics3DComponent.lua b/meta/3rd/Cocos4.0/library/cc/Physics3DComponent.lua deleted file mode 100644 index 62dc9de9..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Physics3DComponent.lua +++ /dev/null @@ -1,49 +0,0 @@ ----@meta - ----@class cc.Physics3DComponent :cc.Component -local Physics3DComponent={ } -cc.Physics3DComponent=Physics3DComponent - - - - ----* synchronize node transformation to physics ----@return self -function Physics3DComponent:syncNodeToPhysics () end ----* add this component to physics world, called by scene ----@param world cc.Physics3DWorld ----@return self -function Physics3DComponent:addToPhysicsWorld (world) end ----* synchronize physics transformation to node ----@return self -function Physics3DComponent:syncPhysicsToNode () end ----* get physics object ----@return cc.Physics3DObject -function Physics3DComponent:getPhysics3DObject () end ----* set Physics object to the component ----@param physicsObj cc.Physics3DObject ----@return self -function Physics3DComponent:setPhysics3DObject (physicsObj) end ----* synchronization between node and physics is time consuming, you can skip some synchronization using this function ----@param syncFlag int ----@return self -function Physics3DComponent:setSyncFlag (syncFlag) end ----* get the component name, it is used to find whether it is Physics3DComponent ----@return string -function Physics3DComponent:getPhysics3DComponentName () end ----* set it enable or not ----@param b boolean ----@return self -function Physics3DComponent:setEnabled (b) end ----* ----@return boolean -function Physics3DComponent:init () end ----* ----@return self -function Physics3DComponent:onEnter () end ----* ----@return self -function Physics3DComponent:onExit () end ----* ----@return self -function Physics3DComponent:Physics3DComponent () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Physics3DConeTwistConstraint.lua b/meta/3rd/Cocos4.0/library/cc/Physics3DConeTwistConstraint.lua deleted file mode 100644 index aa617d96..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Physics3DConeTwistConstraint.lua +++ /dev/null @@ -1,92 +0,0 @@ ----@meta - ----@class cc.Physics3DConeTwistConstraint :cc.Physics3DConstraint -local Physics3DConeTwistConstraint={ } -cc.Physics3DConeTwistConstraint=Physics3DConeTwistConstraint - - - - ----* get B's frame ----@return mat4_table -function Physics3DConeTwistConstraint:getBFrame () end ----* set fix thresh ----@param fixThresh float ----@return self -function Physics3DConeTwistConstraint:setFixThresh (fixThresh) end ----* get B's frame offset ----@return mat4_table -function Physics3DConeTwistConstraint:getFrameOffsetB () end ----* get A's frame offset ----@return mat4_table -function Physics3DConeTwistConstraint:getFrameOffsetA () end ----* get fix thresh ----@return float -function Physics3DConeTwistConstraint:getFixThresh () end ----* get swing span2 ----@return float -function Physics3DConeTwistConstraint:getSwingSpan2 () end ----* get swing span1 ----@return float -function Physics3DConeTwistConstraint:getSwingSpan1 () end ----* set max motor impulse ----@param maxMotorImpulse float ----@return self -function Physics3DConeTwistConstraint:setMaxMotorImpulse (maxMotorImpulse) end ----* set A and B's frame ----@param frameA mat4_table ----@param frameB mat4_table ----@return self -function Physics3DConeTwistConstraint:setFrames (frameA,frameB) end ----* get twist angle ----@return float -function Physics3DConeTwistConstraint:getTwistAngle () end ----* get point for angle ----@param fAngleInRadians float ----@param fLength float ----@return vec3_table -function Physics3DConeTwistConstraint:GetPointForAngle (fAngleInRadians,fLength) end ----* set max motor impulse normalize ----@param maxMotorImpulse float ----@return self -function Physics3DConeTwistConstraint:setMaxMotorImpulseNormalized (maxMotorImpulse) end ----* get twist span ----@return float -function Physics3DConeTwistConstraint:getTwistSpan () end ----* set damping ----@param damping float ----@return self -function Physics3DConeTwistConstraint:setDamping (damping) end ----* set limits
----* param swingSpan1 swing span1
----* param swingSpan2 swing span2
----* param twistSpan twist span
----* param softness 0->1, recommend ~0.8->1. Describes % of limits where movement is free. Beyond this softness %, the limit is gradually enforced until the "hard" (1.0) limit is reached.
----* param biasFactor 0->1?, recommend 0.3 +/-0.3 or so. Strength with which constraint resists zeroth order (angular, not angular velocity) limit violation.
----* param relaxationFactor 0->1, recommend to stay near 1. the lower the value, the less the constraint will fight velocities which violate the angular limits. ----@param swingSpan1 float ----@param swingSpan2 float ----@param twistSpan float ----@param softness float ----@param biasFactor float ----@param relaxationFactor float ----@return self -function Physics3DConeTwistConstraint:setLimit (swingSpan1,swingSpan2,twistSpan,softness,biasFactor,relaxationFactor) end ----* get A's frame ----@return mat4_table -function Physics3DConeTwistConstraint:getAFrame () end ----* enable motor ----@param b boolean ----@return self -function Physics3DConeTwistConstraint:enableMotor (b) end ----@overload fun(cc.Physics3DRigidBody:cc.Physics3DRigidBody,cc.Physics3DRigidBody:cc.Physics3DRigidBody,mat4_table:mat4_table,mat4_table:mat4_table):self ----@overload fun(cc.Physics3DRigidBody:cc.Physics3DRigidBody,cc.Physics3DRigidBody1:mat4_table):self ----@param rbA cc.Physics3DRigidBody ----@param rbB cc.Physics3DRigidBody ----@param frameA mat4_table ----@param frameB mat4_table ----@return self -function Physics3DConeTwistConstraint:create (rbA,rbB,frameA,frameB) end ----* ----@return self -function Physics3DConeTwistConstraint:Physics3DConeTwistConstraint () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Physics3DConstraint.lua b/meta/3rd/Cocos4.0/library/cc/Physics3DConstraint.lua deleted file mode 100644 index 6c04127c..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Physics3DConstraint.lua +++ /dev/null @@ -1,49 +0,0 @@ ----@meta - ----@class cc.Physics3DConstraint :cc.Ref -local Physics3DConstraint={ } -cc.Physics3DConstraint=Physics3DConstraint - - - - ----* set enable or not ----@param enabled boolean ----@return self -function Physics3DConstraint:setEnabled (enabled) end ----* set the impulse that break the constraint ----@param impulse float ----@return self -function Physics3DConstraint:setBreakingImpulse (impulse) end ----* get user data ----@return void -function Physics3DConstraint:getUserData () end ----* get the impulse that break the constraint ----@return float -function Physics3DConstraint:getBreakingImpulse () end ----* get rigid body a ----@return cc.Physics3DRigidBody -function Physics3DConstraint:getBodyA () end ----* is it enabled ----@return boolean -function Physics3DConstraint:isEnabled () end ----* get override number of solver iterations ----@return int -function Physics3DConstraint:getOverrideNumSolverIterations () end ----* get rigid body b ----@return cc.Physics3DRigidBody -function Physics3DConstraint:getBodyB () end ----* override the number of constraint solver iterations used to solve this constraint, -1 will use the default number of iterations, as specified in SolverInfo.m_numIterations ----@param overrideNumIterations int ----@return self -function Physics3DConstraint:setOverrideNumSolverIterations (overrideNumIterations) end ----* get constraint type ----@return int -function Physics3DConstraint:getConstraintType () end ----* get user data ----@param userData void ----@return self -function Physics3DConstraint:setUserData (userData) end ----* ----@return btTypedConstraint -function Physics3DConstraint:getbtContraint () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Physics3DHingeConstraint.lua b/meta/3rd/Cocos4.0/library/cc/Physics3DHingeConstraint.lua deleted file mode 100644 index 9ddd60bf..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Physics3DHingeConstraint.lua +++ /dev/null @@ -1,103 +0,0 @@ ----@meta - ----@class cc.Physics3DHingeConstraint :cc.Physics3DConstraint -local Physics3DHingeConstraint={ } -cc.Physics3DHingeConstraint=Physics3DHingeConstraint - - - - ----@overload fun(mat4_table:mat4_table,mat4_table:mat4_table):self ----@overload fun():self ----@param transA mat4_table ----@param transB mat4_table ----@return float -function Physics3DHingeConstraint:getHingeAngle (transA,transB) end ----* get motor target velocity ----@return float -function Physics3DHingeConstraint:getMotorTargetVelosity () end ----* get rigid body A's frame offset ----@return mat4_table -function Physics3DHingeConstraint:getFrameOffsetA () end ----* get rigid body B's frame offset ----@return mat4_table -function Physics3DHingeConstraint:getFrameOffsetB () end ----* set max motor impulse ----@param maxMotorImpulse float ----@return self -function Physics3DHingeConstraint:setMaxMotorImpulse (maxMotorImpulse) end ----* enable angular motor ----@param enableMotor boolean ----@param targetVelocity float ----@param maxMotorImpulse float ----@return self -function Physics3DHingeConstraint:enableAngularMotor (enableMotor,targetVelocity,maxMotorImpulse) end ----* get upper limit ----@return float -function Physics3DHingeConstraint:getUpperLimit () end ----* get max motor impulse ----@return float -function Physics3DHingeConstraint:getMaxMotorImpulse () end ----* get lower limit ----@return float -function Physics3DHingeConstraint:getLowerLimit () end ----* set use frame offset ----@param frameOffsetOnOff boolean ----@return self -function Physics3DHingeConstraint:setUseFrameOffset (frameOffsetOnOff) end ----* get enable angular motor ----@return boolean -function Physics3DHingeConstraint:getEnableAngularMotor () end ----* ----@param enableMotor boolean ----@return self -function Physics3DHingeConstraint:enableMotor (enableMotor) end ----* get B's frame ----@return mat4_table -function Physics3DHingeConstraint:getBFrame () end ----* set frames for rigid body A and B ----@param frameA mat4_table ----@param frameB mat4_table ----@return self -function Physics3DHingeConstraint:setFrames (frameA,frameB) end ----* access for UseFrameOffset ----@return boolean -function Physics3DHingeConstraint:getUseFrameOffset () end ----* set angular only ----@param angularOnly boolean ----@return self -function Physics3DHingeConstraint:setAngularOnly (angularOnly) end ----* set limit ----@param low float ----@param high float ----@param _softness float ----@param _biasFactor float ----@param _relaxationFactor float ----@return self -function Physics3DHingeConstraint:setLimit (low,high,_softness,_biasFactor,_relaxationFactor) end ----* get angular only ----@return boolean -function Physics3DHingeConstraint:getAngularOnly () end ----* set axis ----@param axisInA vec3_table ----@return self -function Physics3DHingeConstraint:setAxis (axisInA) end ----* get A's frame ----@return mat4_table -function Physics3DHingeConstraint:getAFrame () end ----@overload fun(cc.Physics3DRigidBody:cc.Physics3DRigidBody,cc.Physics3DRigidBody1:vec3_table,vec3_table:vec3_table,vec3_table3:boolean):self ----@overload fun(cc.Physics3DRigidBody:cc.Physics3DRigidBody,cc.Physics3DRigidBody1:mat4_table,vec3_table2:boolean):self ----@overload fun(cc.Physics3DRigidBody:cc.Physics3DRigidBody,cc.Physics3DRigidBody:cc.Physics3DRigidBody,vec3_table:vec3_table,vec3_table:vec3_table,vec3_table:vec3_table,vec3_table:vec3_table,boolean:boolean):self ----@overload fun(cc.Physics3DRigidBody:cc.Physics3DRigidBody,cc.Physics3DRigidBody:cc.Physics3DRigidBody,vec3_table2:mat4_table,vec3_table3:mat4_table,vec3_table4:boolean):self ----@param rbA cc.Physics3DRigidBody ----@param rbB cc.Physics3DRigidBody ----@param pivotInA vec3_table ----@param pivotInB vec3_table ----@param axisInA vec3_table ----@param axisInB vec3_table ----@param useReferenceFrameA boolean ----@return self -function Physics3DHingeConstraint:create (rbA,rbB,pivotInA,pivotInB,axisInA,axisInB,useReferenceFrameA) end ----* ----@return self -function Physics3DHingeConstraint:Physics3DHingeConstraint () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Physics3DObject.lua b/meta/3rd/Cocos4.0/library/cc/Physics3DObject.lua deleted file mode 100644 index 86fe2733..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Physics3DObject.lua +++ /dev/null @@ -1,42 +0,0 @@ ----@meta - ----@class cc.Physics3DObject :cc.Ref -local Physics3DObject={ } -cc.Physics3DObject=Physics3DObject - - - - ----* Set the user data. ----@param userData void ----@return self -function Physics3DObject:setUserData (userData) end ----* Get the user data. ----@return void -function Physics3DObject:getUserData () end ----* Get the Physics3DObject Type. ----@return int -function Physics3DObject:getObjType () end ----* Internal method. Set the pointer of Physics3DWorld. ----@param world cc.Physics3DWorld ----@return self -function Physics3DObject:setPhysicsWorld (world) end ----* Get the world matrix of Physics3DObject. ----@return mat4_table -function Physics3DObject:getWorldTransform () end ----* Get the pointer of Physics3DWorld. ----@return cc.Physics3DWorld -function Physics3DObject:getPhysicsWorld () end ----* Set the mask of Physics3DObject. ----@param mask unsigned_int ----@return self -function Physics3DObject:setMask (mask) end ----* Get the collision callback function. ----@return function -function Physics3DObject:getCollisionCallback () end ----* Get the mask of Physics3DObject. ----@return unsigned_int -function Physics3DObject:getMask () end ----* Check has collision callback function. ----@return boolean -function Physics3DObject:needCollisionCallback () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Physics3DPointToPointConstraint.lua b/meta/3rd/Cocos4.0/library/cc/Physics3DPointToPointConstraint.lua deleted file mode 100644 index a891f045..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Physics3DPointToPointConstraint.lua +++ /dev/null @@ -1,42 +0,0 @@ ----@meta - ----@class cc.Physics3DPointToPointConstraint :cc.Physics3DConstraint -local Physics3DPointToPointConstraint={ } -cc.Physics3DPointToPointConstraint=Physics3DPointToPointConstraint - - - - ----* get pivot point in A's local space ----@return vec3_table -function Physics3DPointToPointConstraint:getPivotPointInA () end ----* get pivot point in B's local space ----@return vec3_table -function Physics3DPointToPointConstraint:getPivotPointInB () end ----@overload fun(cc.Physics3DRigidBody:cc.Physics3DRigidBody,cc.Physics3DRigidBody:cc.Physics3DRigidBody,vec3_table:vec3_table,vec3_table:vec3_table):self ----@overload fun(cc.Physics3DRigidBody:cc.Physics3DRigidBody,cc.Physics3DRigidBody1:vec3_table):self ----@param rbA cc.Physics3DRigidBody ----@param rbB cc.Physics3DRigidBody ----@param pivotPointInA vec3_table ----@param pivotPointInB vec3_table ----@return boolean -function Physics3DPointToPointConstraint:init (rbA,rbB,pivotPointInA,pivotPointInB) end ----* set pivot point in A's local space ----@param pivotA vec3_table ----@return self -function Physics3DPointToPointConstraint:setPivotPointInA (pivotA) end ----* set pivot point in B's local space ----@param pivotB vec3_table ----@return self -function Physics3DPointToPointConstraint:setPivotPointInB (pivotB) end ----@overload fun(cc.Physics3DRigidBody:cc.Physics3DRigidBody,cc.Physics3DRigidBody:cc.Physics3DRigidBody,vec3_table:vec3_table,vec3_table:vec3_table):self ----@overload fun(cc.Physics3DRigidBody:cc.Physics3DRigidBody,cc.Physics3DRigidBody1:vec3_table):self ----@param rbA cc.Physics3DRigidBody ----@param rbB cc.Physics3DRigidBody ----@param pivotPointInA vec3_table ----@param pivotPointInB vec3_table ----@return self -function Physics3DPointToPointConstraint:create (rbA,rbB,pivotPointInA,pivotPointInB) end ----* ----@return self -function Physics3DPointToPointConstraint:Physics3DPointToPointConstraint () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Physics3DRigidBody.lua b/meta/3rd/Cocos4.0/library/cc/Physics3DRigidBody.lua deleted file mode 100644 index 5c68569d..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Physics3DRigidBody.lua +++ /dev/null @@ -1,204 +0,0 @@ ----@meta - ----@class cc.Physics3DRigidBody :cc.Physics3DObject -local Physics3DRigidBody={ } -cc.Physics3DRigidBody=Physics3DRigidBody - - - - ----* Set the acceleration. ----@param acceleration vec3_table ----@return self -function Physics3DRigidBody:setGravity (acceleration) end ----* Get friction. ----@return float -function Physics3DRigidBody:getFriction () end ----@overload fun(vec3_table0:float):self ----@overload fun(vec3_table:vec3_table):self ----@param angFac vec3_table ----@return self -function Physics3DRigidBody:setAngularFactor (angFac) end ----* ----@param constraint cc.Physics3DConstraint ----@return self -function Physics3DRigidBody:addConstraint (constraint) end ----* Get the pointer of btRigidBody. ----@return btRigidBody -function Physics3DRigidBody:getRigidBody () end ----* Get total force. ----@return vec3_table -function Physics3DRigidBody:getTotalForce () end ----* Get the total number of constraints. ----@return unsigned_int -function Physics3DRigidBody:getConstraintCount () end ----* Apply a central force.
----* param force the value of the force ----@param force vec3_table ----@return self -function Physics3DRigidBody:applyCentralForce (force) end ----* Set mass and inertia. ----@param mass float ----@param inertia vec3_table ----@return self -function Physics3DRigidBody:setMassProps (mass,inertia) end ----* Set friction. ----@param frict float ----@return self -function Physics3DRigidBody:setFriction (frict) end ----* Set kinematic object. ----@param kinematic boolean ----@return self -function Physics3DRigidBody:setKinematic (kinematic) end ----* Set linear damping and angular damping. ----@param lin_damping float ----@param ang_damping float ----@return self -function Physics3DRigidBody:setDamping (lin_damping,ang_damping) end ----* Apply a impulse.
----* param impulse the value of the impulse
----* param rel_pos the position of the impulse ----@param impulse vec3_table ----@param rel_pos vec3_table ----@return self -function Physics3DRigidBody:applyImpulse (impulse,rel_pos) end ----* Check rigid body is kinematic object. ----@return boolean -function Physics3DRigidBody:isKinematic () end ----* Apply a torque.
----* param torque the value of the torque ----@param torque vec3_table ----@return self -function Physics3DRigidBody:applyTorque (torque) end ----* Set motion threshold, don't do continuous collision detection if the motion (in one step) is less then ccdMotionThreshold ----@param ccdMotionThreshold float ----@return self -function Physics3DRigidBody:setCcdMotionThreshold (ccdMotionThreshold) end ----* Set rolling friction. ----@param frict float ----@return self -function Physics3DRigidBody:setRollingFriction (frict) end ----* Get motion threshold. ----@return float -function Physics3DRigidBody:getCcdMotionThreshold () end ----* Get the linear factor. ----@return vec3_table -function Physics3DRigidBody:getLinearFactor () end ----* Damps the velocity, using the given linearDamping and angularDamping. ----@param timeStep float ----@return self -function Physics3DRigidBody:applyDamping (timeStep) end ----* Get the angular velocity. ----@return vec3_table -function Physics3DRigidBody:getAngularVelocity () end ----* ----@param info cc.Physics3DRigidBodyDes ----@return boolean -function Physics3DRigidBody:init (info) end ----* Apply a torque impulse.
----* param torque the value of the torque ----@param torque vec3_table ----@return self -function Physics3DRigidBody:applyTorqueImpulse (torque) end ----* Active or inactive. ----@param active boolean ----@return self -function Physics3DRigidBody:setActive (active) end ----* Set the linear factor. ----@param linearFactor vec3_table ----@return self -function Physics3DRigidBody:setLinearFactor (linearFactor) end ----* Set the linear velocity. ----@param lin_vel vec3_table ----@return self -function Physics3DRigidBody:setLinearVelocity (lin_vel) end ----* Get the linear velocity. ----@return vec3_table -function Physics3DRigidBody:getLinearVelocity () end ----* Set swept sphere radius. ----@param radius float ----@return self -function Physics3DRigidBody:setCcdSweptSphereRadius (radius) end ----* Apply a force.
----* param force the value of the force
----* param rel_pos the position of the force ----@param force vec3_table ----@param rel_pos vec3_table ----@return self -function Physics3DRigidBody:applyForce (force,rel_pos) end ----* Set the angular velocity. ----@param ang_vel vec3_table ----@return self -function Physics3DRigidBody:setAngularVelocity (ang_vel) end ----* Apply a central impulse.
----* param impulse the value of the impulse ----@param impulse vec3_table ----@return self -function Physics3DRigidBody:applyCentralImpulse (impulse) end ----* Get the acceleration. ----@return vec3_table -function Physics3DRigidBody:getGravity () end ----* Get rolling friction. ----@return float -function Physics3DRigidBody:getRollingFriction () end ----* Set the center of mass. ----@param xform mat4_table ----@return self -function Physics3DRigidBody:setCenterOfMassTransform (xform) end ----* Set the inverse of local inertia. ----@param diagInvInertia vec3_table ----@return self -function Physics3DRigidBody:setInvInertiaDiagLocal (diagInvInertia) end ----@overload fun(cc.Physics3DConstraint0:unsigned_int):self ----@overload fun(cc.Physics3DConstraint:cc.Physics3DConstraint):self ----@param constraint cc.Physics3DConstraint ----@return self -function Physics3DRigidBody:removeConstraint (constraint) end ----* Get total torque. ----@return vec3_table -function Physics3DRigidBody:getTotalTorque () end ----* Get inverse of mass. ----@return float -function Physics3DRigidBody:getInvMass () end ----* Get constraint by index. ----@param idx unsigned_int ----@return cc.Physics3DConstraint -function Physics3DRigidBody:getConstraint (idx) end ----* Get restitution. ----@return float -function Physics3DRigidBody:getRestitution () end ----* Get swept sphere radius. ----@return float -function Physics3DRigidBody:getCcdSweptSphereRadius () end ----* Get hit friction. ----@return float -function Physics3DRigidBody:getHitFraction () end ----* Get angular damping. ----@return float -function Physics3DRigidBody:getAngularDamping () end ----* Get the inverse of local inertia. ----@return vec3_table -function Physics3DRigidBody:getInvInertiaDiagLocal () end ----* Get the center of mass. ----@return mat4_table -function Physics3DRigidBody:getCenterOfMassTransform () end ----* Get the angular factor. ----@return vec3_table -function Physics3DRigidBody:getAngularFactor () end ----* Set restitution. ----@param rest float ----@return self -function Physics3DRigidBody:setRestitution (rest) end ----* Set hit friction. ----@param hitFraction float ----@return self -function Physics3DRigidBody:setHitFraction (hitFraction) end ----* Get linear damping. ----@return float -function Physics3DRigidBody:getLinearDamping () end ----* override. ----@return mat4_table -function Physics3DRigidBody:getWorldTransform () end ----* ----@return self -function Physics3DRigidBody:Physics3DRigidBody () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Physics3DShape.lua b/meta/3rd/Cocos4.0/library/cc/Physics3DShape.lua deleted file mode 100644 index 964783dd..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Physics3DShape.lua +++ /dev/null @@ -1,67 +0,0 @@ ----@meta - ----@class cc.Physics3DShape :cc.Ref -local Physics3DShape={ } -cc.Physics3DShape=Physics3DShape - - - - ----* ----@return btCollisionShape -function Physics3DShape:getbtShape () end ----* ----@param radius float ----@return boolean -function Physics3DShape:initSphere (radius) end ----* ----@param ext vec3_table ----@return boolean -function Physics3DShape:initBox (ext) end ----* ----@param radius float ----@param height float ----@return boolean -function Physics3DShape:initCapsule (radius,height) end ----* ----@param radius float ----@param height float ----@return boolean -function Physics3DShape:initCylinder (radius,height) end ----* get shape type ----@return int -function Physics3DShape:getShapeType () end ----* create box shape
----* param extent The extent of sphere. ----@param extent vec3_table ----@return self -function Physics3DShape:createBox (extent) end ----* create cylinder shape
----* param radius The radius of cylinder.
----* param height The height. ----@param radius float ----@param height float ----@return self -function Physics3DShape:createCylinder (radius,height) end ----* create convex hull
----* param points The vertices of convex hull
----* param numPoints The number of vertices. ----@param points vec3_table ----@param numPoints int ----@return self -function Physics3DShape:createConvexHull (points,numPoints) end ----* create capsule shape
----* param radius The radius of capsule.
----* param height The height (cylinder part). ----@param radius float ----@param height float ----@return self -function Physics3DShape:createCapsule (radius,height) end ----* create sphere shape
----* param radius The radius of sphere. ----@param radius float ----@return self -function Physics3DShape:createSphere (radius) end ----* ----@return self -function Physics3DShape:Physics3DShape () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Physics3DSliderConstraint.lua b/meta/3rd/Cocos4.0/library/cc/Physics3DSliderConstraint.lua deleted file mode 100644 index 307c2e70..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Physics3DSliderConstraint.lua +++ /dev/null @@ -1,248 +0,0 @@ ----@meta - ----@class cc.Physics3DSliderConstraint :cc.Physics3DConstraint -local Physics3DSliderConstraint={ } -cc.Physics3DSliderConstraint=Physics3DSliderConstraint - - - - ----* ----@param onOff boolean ----@return self -function Physics3DSliderConstraint:setPoweredAngMotor (onOff) end ----* ----@return float -function Physics3DSliderConstraint:getDampingLimAng () end ----* ----@param restitutionOrthoLin float ----@return self -function Physics3DSliderConstraint:setRestitutionOrthoLin (restitutionOrthoLin) end ----* ----@param restitutionDirLin float ----@return self -function Physics3DSliderConstraint:setRestitutionDirLin (restitutionDirLin) end ----* ----@return float -function Physics3DSliderConstraint:getLinearPos () end ----* get A's frame offset ----@return mat4_table -function Physics3DSliderConstraint:getFrameOffsetA () end ----* get B's frame offset ----@return mat4_table -function Physics3DSliderConstraint:getFrameOffsetB () end ----* ----@param onOff boolean ----@return self -function Physics3DSliderConstraint:setPoweredLinMotor (onOff) end ----* ----@return float -function Physics3DSliderConstraint:getDampingDirAng () end ----* ----@return float -function Physics3DSliderConstraint:getRestitutionLimLin () end ----* ----@return float -function Physics3DSliderConstraint:getSoftnessOrthoAng () end ----* ----@param softnessOrthoLin float ----@return self -function Physics3DSliderConstraint:setSoftnessOrthoLin (softnessOrthoLin) end ----* ----@param softnessLimLin float ----@return self -function Physics3DSliderConstraint:setSoftnessLimLin (softnessLimLin) end ----* ----@return float -function Physics3DSliderConstraint:getAngularPos () end ----* ----@param restitutionLimAng float ----@return self -function Physics3DSliderConstraint:setRestitutionLimAng (restitutionLimAng) end ----* set upper linear limit ----@param upperLimit float ----@return self -function Physics3DSliderConstraint:setUpperLinLimit (upperLimit) end ----* ----@param dampingDirLin float ----@return self -function Physics3DSliderConstraint:setDampingDirLin (dampingDirLin) end ----* get upper angular limit ----@return float -function Physics3DSliderConstraint:getUpperAngLimit () end ----* ----@return float -function Physics3DSliderConstraint:getDampingDirLin () end ----* ----@return float -function Physics3DSliderConstraint:getSoftnessDirAng () end ----* ----@return boolean -function Physics3DSliderConstraint:getPoweredAngMotor () end ----* set lower angular limit ----@param lowerLimit float ----@return self -function Physics3DSliderConstraint:setLowerAngLimit (lowerLimit) end ----* set upper angular limit ----@param upperLimit float ----@return self -function Physics3DSliderConstraint:setUpperAngLimit (upperLimit) end ----* ----@param targetLinMotorVelocity float ----@return self -function Physics3DSliderConstraint:setTargetLinMotorVelocity (targetLinMotorVelocity) end ----* ----@param dampingLimAng float ----@return self -function Physics3DSliderConstraint:setDampingLimAng (dampingLimAng) end ----* ----@return float -function Physics3DSliderConstraint:getRestitutionLimAng () end ----* access for UseFrameOffset ----@return boolean -function Physics3DSliderConstraint:getUseFrameOffset () end ----* ----@return float -function Physics3DSliderConstraint:getSoftnessOrthoLin () end ----* ----@return float -function Physics3DSliderConstraint:getDampingOrthoAng () end ----* set use frame offset ----@param frameOffsetOnOff boolean ----@return self -function Physics3DSliderConstraint:setUseFrameOffset (frameOffsetOnOff) end ----* set lower linear limit ----@param lowerLimit float ----@return self -function Physics3DSliderConstraint:setLowerLinLimit (lowerLimit) end ----* ----@return float -function Physics3DSliderConstraint:getRestitutionDirLin () end ----* ----@return float -function Physics3DSliderConstraint:getTargetLinMotorVelocity () end ----* get lower linear limit ----@return float -function Physics3DSliderConstraint:getLowerLinLimit () end ----* ----@return float -function Physics3DSliderConstraint:getSoftnessLimLin () end ----* ----@param dampingOrthoAng float ----@return self -function Physics3DSliderConstraint:setDampingOrthoAng (dampingOrthoAng) end ----* ----@param softnessDirAng float ----@return self -function Physics3DSliderConstraint:setSoftnessDirAng (softnessDirAng) end ----* ----@return boolean -function Physics3DSliderConstraint:getPoweredLinMotor () end ----* ----@param restitutionOrthoAng float ----@return self -function Physics3DSliderConstraint:setRestitutionOrthoAng (restitutionOrthoAng) end ----* ----@param dampingDirAng float ----@return self -function Physics3DSliderConstraint:setDampingDirAng (dampingDirAng) end ----* set frames for rigid body A and B ----@param frameA mat4_table ----@param frameB mat4_table ----@return self -function Physics3DSliderConstraint:setFrames (frameA,frameB) end ----* ----@return float -function Physics3DSliderConstraint:getRestitutionOrthoAng () end ----* ----@return float -function Physics3DSliderConstraint:getMaxAngMotorForce () end ----* ----@return float -function Physics3DSliderConstraint:getDampingOrthoLin () end ----* get upper linear limit ----@return float -function Physics3DSliderConstraint:getUpperLinLimit () end ----* ----@param maxLinMotorForce float ----@return self -function Physics3DSliderConstraint:setMaxLinMotorForce (maxLinMotorForce) end ----* ----@return float -function Physics3DSliderConstraint:getRestitutionOrthoLin () end ----* ----@param targetAngMotorVelocity float ----@return self -function Physics3DSliderConstraint:setTargetAngMotorVelocity (targetAngMotorVelocity) end ----* ----@return float -function Physics3DSliderConstraint:getSoftnessLimAng () end ----* ----@param restitutionDirAng float ----@return self -function Physics3DSliderConstraint:setRestitutionDirAng (restitutionDirAng) end ----* ----@return float -function Physics3DSliderConstraint:getDampingLimLin () end ----* get lower angular limit ----@return float -function Physics3DSliderConstraint:getLowerAngLimit () end ----* ----@return float -function Physics3DSliderConstraint:getRestitutionDirAng () end ----* ----@return float -function Physics3DSliderConstraint:getTargetAngMotorVelocity () end ----* ----@param restitutionLimLin float ----@return self -function Physics3DSliderConstraint:setRestitutionLimLin (restitutionLimLin) end ----* ----@return float -function Physics3DSliderConstraint:getMaxLinMotorForce () end ----* ----@param dampingOrthoLin float ----@return self -function Physics3DSliderConstraint:setDampingOrthoLin (dampingOrthoLin) end ----* ----@param softnessOrthoAng float ----@return self -function Physics3DSliderConstraint:setSoftnessOrthoAng (softnessOrthoAng) end ----* ----@param dampingLimLin float ----@return self -function Physics3DSliderConstraint:setDampingLimLin (dampingLimLin) end ----* ----@param softnessDirLin float ----@return self -function Physics3DSliderConstraint:setSoftnessDirLin (softnessDirLin) end ----* ----@param maxAngMotorForce float ----@return self -function Physics3DSliderConstraint:setMaxAngMotorForce (maxAngMotorForce) end ----* ----@return float -function Physics3DSliderConstraint:getSoftnessDirLin () end ----* ----@param softnessLimAng float ----@return self -function Physics3DSliderConstraint:setSoftnessLimAng (softnessLimAng) end ----* use A's frame as linear reference ----@return boolean -function Physics3DSliderConstraint:getUseLinearReferenceFrameA () end ----* create slider constraint
----* param rbA rigid body A
----* param rbB rigid body B
----* param frameInA frame in A's local space
----* param frameInB frame in B's local space
----* param useLinearReferenceFrameA use fixed frame A for linear limits ----@param rbA cc.Physics3DRigidBody ----@param rbB cc.Physics3DRigidBody ----@param frameInA mat4_table ----@param frameInB mat4_table ----@param useLinearReferenceFrameA boolean ----@return self -function Physics3DSliderConstraint:create (rbA,rbB,frameInA,frameInB,useLinearReferenceFrameA) end ----* ----@return self -function Physics3DSliderConstraint:Physics3DSliderConstraint () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Physics3DWorld.lua b/meta/3rd/Cocos4.0/library/cc/Physics3DWorld.lua deleted file mode 100644 index 42e24fc0..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Physics3DWorld.lua +++ /dev/null @@ -1,66 +0,0 @@ ----@meta - ----@class cc.Physics3DWorld :cc.Ref -local Physics3DWorld={ } -cc.Physics3DWorld=Physics3DWorld - - - - ----* set gravity for the physics world ----@param gravity vec3_table ----@return self -function Physics3DWorld:setGravity (gravity) end ----* Simulate one frame. ----@param dt float ----@return self -function Physics3DWorld:stepSimulate (dt) end ----* ----@return boolean -function Physics3DWorld:needCollisionChecking () end ----* ----@return self -function Physics3DWorld:collisionChecking () end ----* ----@return self -function Physics3DWorld:setGhostPairCallback () end ----* Remove all Physics3DObjects. ----@return self -function Physics3DWorld:removeAllPhysics3DObjects () end ----* Check debug drawing is enabled. ----@return boolean -function Physics3DWorld:isDebugDrawEnabled () end ----* Remove all Physics3DConstraint. ----@return self -function Physics3DWorld:removeAllPhysics3DConstraints () end ----* get current gravity ----@return vec3_table -function Physics3DWorld:getGravity () end ----* Remove a Physics3DConstraint. ----@param constraint cc.Physics3DConstraint ----@return self -function Physics3DWorld:removePhysics3DConstraint (constraint) end ----* Add a Physics3DObject. ----@param physicsObj cc.Physics3DObject ----@return self -function Physics3DWorld:addPhysics3DObject (physicsObj) end ----* Enable or disable debug drawing. ----@param enableDebugDraw boolean ----@return self -function Physics3DWorld:setDebugDrawEnable (enableDebugDraw) end ----* Remove a Physics3DObject. ----@param physicsObj cc.Physics3DObject ----@return self -function Physics3DWorld:removePhysics3DObject (physicsObj) end ----* Add a Physics3DConstraint. ----@param constraint cc.Physics3DConstraint ----@param disableCollisionsBetweenLinkedObjs boolean ----@return self -function Physics3DWorld:addPhysics3DConstraint (constraint,disableCollisionsBetweenLinkedObjs) end ----* Internal method, the updater of debug drawing, need called each frame. ----@param renderer cc.Renderer ----@return self -function Physics3DWorld:debugDraw (renderer) end ----* ----@return self -function Physics3DWorld:Physics3DWorld () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/PhysicsBody.lua b/meta/3rd/Cocos4.0/library/cc/PhysicsBody.lua deleted file mode 100644 index 27ada7ac..00000000 --- a/meta/3rd/Cocos4.0/library/cc/PhysicsBody.lua +++ /dev/null @@ -1,338 +0,0 @@ ----@meta - ----@class cc.PhysicsBody :cc.Component -local PhysicsBody={ } -cc.PhysicsBody=PhysicsBody - - - - ----* Whether this physics body is affected by the physics world's gravitational force. ----@return boolean -function PhysicsBody:isGravityEnabled () end ----* reset all the force applied to body. ----@return self -function PhysicsBody:resetForces () end ----* get the max of velocity ----@return float -function PhysicsBody:getVelocityLimit () end ----* Set the group of body.
----* Collision groups let you specify an integral group index. You can have all fixtures with the same group index always collide (positive index) or never collide (negative index).
----* It have high priority than bit masks. ----@param group int ----@return self -function PhysicsBody:setGroup (group) end ----* Get the body mass. ----@return float -function PhysicsBody:getMass () end ----* Return bitmask of first shape.
----* return If there is no shape in body, return default value.(0xFFFFFFFF) ----@return int -function PhysicsBody:getCollisionBitmask () end ----* set the body rotation offset ----@return float -function PhysicsBody:getRotationOffset () end ----* get the body rotation. ----@return float -function PhysicsBody:getRotation () end ----* Get the body moment of inertia. ----@return float -function PhysicsBody:getMoment () end ----* Applies a immediate force to body.
----* param impulse The impulse is applies to this body.
----* param offset A Vec2 object, it is the offset from the body's center of gravity in world coordinates. ----@param impulse vec2_table ----@param offset vec2_table ----@return self -function PhysicsBody:applyImpulse (impulse,offset) end ----* set body rotation offset, it's the rotation witch relative to node ----@param rotation float ----@return self -function PhysicsBody:setRotationOffset (rotation) end ----* Applies a continuous force to body.
----* param force The force is applies to this body.
----* param offset A Vec2 object, it is the offset from the body's center of gravity in world coordinates. ----@param force vec2_table ----@param offset vec2_table ----@return self -function PhysicsBody:applyForce (force,offset) end ----* brief Add a shape to body.
----* param shape The shape to be added.
----* param addMassAndMoment If this is true, the shape's mass and moment will be added to body. The default is true.
----* return This shape's pointer if added success or nullptr if failed. ----@param shape cc.PhysicsShape ----@param addMassAndMoment boolean ----@return cc.PhysicsShape -function PhysicsBody:addShape (shape,addMassAndMoment) end ----* Applies a torque force to body.
----* param torque The torque is applies to this body. ----@param torque float ----@return self -function PhysicsBody:applyTorque (torque) end ----* get the max of angular velocity ----@return float -function PhysicsBody:getAngularVelocityLimit () end ----* set the max of angular velocity ----@param limit float ----@return self -function PhysicsBody:setAngularVelocityLimit (limit) end ----* Get the velocity of a body. ----@return vec2_table -function PhysicsBody:getVelocity () end ----* get linear damping. ----@return float -function PhysicsBody:getLinearDamping () end ----* Remove all shapes.
----* param reduceMassAndMoment If this is true, the body mass and moment will be reduced by shape. The default is true. ----@return self -function PhysicsBody:removeAllShapes () end ----* Set angular damping.
----* It is used to simulate fluid or air friction forces on the body.
----* param damping The value is 0.0f to 1.0f. ----@param damping float ----@return self -function PhysicsBody:setAngularDamping (damping) end ----* set the max of velocity ----@param limit float ----@return self -function PhysicsBody:setVelocityLimit (limit) end ----* set body to rest ----@param rest boolean ----@return self -function PhysicsBody:setResting (rest) end ----* get body position offset. ----@return vec2_table -function PhysicsBody:getPositionOffset () end ----* A mask that defines which categories this physics body belongs to.
----* Every physics body in a scene can be assigned to up to 32 different categories, each corresponding to a bit in the bit mask. You define the mask values used in your game. In conjunction with the collisionBitMask and contactTestBitMask properties, you define which physics bodies interact with each other and when your game is notified of these interactions.
----* param bitmask An integer number, the default value is 0xFFFFFFFF (all bits set). ----@param bitmask int ----@return self -function PhysicsBody:setCategoryBitmask (bitmask) end ----* get the world body added to. ----@return cc.PhysicsWorld -function PhysicsBody:getWorld () end ----* get the angular velocity of a body ----@return float -function PhysicsBody:getAngularVelocity () end ----* get the body position. ----@return vec2_table -function PhysicsBody:getPosition () end ----* Set the body is affected by the physics world's gravitational force or not. ----@param enable boolean ----@return self -function PhysicsBody:setGravityEnable (enable) end ----* Return group of first shape.
----* return If there is no shape in body, return default value.(0) ----@return int -function PhysicsBody:getGroup () end ----* brief Set the body moment of inertia.
----* note If you need add/subtract moment to body, don't use setMoment(getMoment() +/- moment), because the moment of body may be equal to PHYSICS_INFINITY, it will cause some unexpected result, please use addMoment() instead. ----@param moment float ----@return self -function PhysicsBody:setMoment (moment) end ----* Get the body's tag. ----@return int -function PhysicsBody:getTag () end ----* Convert the local point to world. ----@param point vec2_table ----@return vec2_table -function PhysicsBody:local2World (point) end ----* Return bitmask of first shape.
----* return If there is no shape in body, return default value.(0xFFFFFFFF) ----@return int -function PhysicsBody:getCategoryBitmask () end ----* brief Set dynamic to body.
----* A dynamic body will effect with gravity. ----@param dynamic boolean ----@return self -function PhysicsBody:setDynamic (dynamic) end ----* Get the first shape of the body shapes.
----* return The first shape in this body. ----@return cc.PhysicsShape -function PhysicsBody:getFirstShape () end ----* Get the body shapes.
----* return A Vector object contains PhysicsShape pointer. ----@return array_table -function PhysicsBody:getShapes () end ----* Return bitmask of first shape.
----* return If there is no shape in body, return default value.(0x00000000) ----@return int -function PhysicsBody:getContactTestBitmask () end ----* Set the angular velocity of a body.
----* param velocity The angular velocity is set to this body. ----@param velocity float ----@return self -function PhysicsBody:setAngularVelocity (velocity) end ----* Convert the world point to local. ----@param point vec2_table ----@return vec2_table -function PhysicsBody:world2Local (point) end ----@overload fun(cc.PhysicsShape0:int,boolean:boolean):self ----@overload fun(cc.PhysicsShape:cc.PhysicsShape,boolean:boolean):self ----@param shape cc.PhysicsShape ----@param reduceMassAndMoment boolean ----@return self -function PhysicsBody:removeShape (shape,reduceMassAndMoment) end ----* brief Set the body mass.
----* attention If you need add/subtract mass to body, don't use setMass(getMass() +/- mass), because the mass of body may be equal to PHYSICS_INFINITY, it will cause some unexpected result, please use addMass() instead. ----@param mass float ----@return self -function PhysicsBody:setMass (mass) end ----* brief Add moment of inertia to body.
----* param moment If _moment(moment of the body) == PHYSICS_INFINITY, it remains.
----* if moment == PHYSICS_INFINITY, _moment will be PHYSICS_INFINITY.
----* if moment == -PHYSICS_INFINITY, _moment will not change.
----* if moment + _moment <= 0, _moment will equal to MASS_DEFAULT(1.0)
----* other wise, moment = moment + _moment; ----@param moment float ----@return self -function PhysicsBody:addMoment (moment) end ----* Set the velocity of a body.
----* param velocity The velocity is set to this body. ----@param velocity vec2_table ----@return self -function PhysicsBody:setVelocity (velocity) end ----* Set linear damping.
----* it is used to simulate fluid or air friction forces on the body.
----* param damping The value is 0.0f to 1.0f. ----@param damping float ----@return self -function PhysicsBody:setLinearDamping (damping) end ----* A mask that defines which categories of physics bodies can collide with this physics body.
----* When two physics bodies contact each other, a collision may occur. This body's collision mask is compared to the other body's category mask by performing a logical AND operation. If the result is a non-zero value, then this body is affected by the collision. Each body independently chooses whether it wants to be affected by the other body. For example, you might use this to avoid collision calculations that would make negligible changes to a body's velocity.
----* param bitmask An integer number, the default value is 0xFFFFFFFF (all bits set). ----@param bitmask int ----@return self -function PhysicsBody:setCollisionBitmask (bitmask) end ----* set body position offset, it's the position witch relative to node ----@param position vec2_table ----@return self -function PhysicsBody:setPositionOffset (position) end ----* Set the body is allow rotation or not ----@param enable boolean ----@return self -function PhysicsBody:setRotationEnable (enable) end ----* Whether the body can rotation. ----@return boolean -function PhysicsBody:isRotationEnabled () end ----* Get the rigid body of chipmunk. ----@return cpBody -function PhysicsBody:getCPBody () end ----* Get angular damping. ----@return float -function PhysicsBody:getAngularDamping () end ----* Get the angular velocity of a body at a local point. ----@param point vec2_table ----@return vec2_table -function PhysicsBody:getVelocityAtLocalPoint (point) end ----* Whether the body is at rest. ----@return boolean -function PhysicsBody:isResting () end ----* brief Add mass to body.
----* param mass If _mass(mass of the body) == PHYSICS_INFINITY, it remains.
----* if mass == PHYSICS_INFINITY, _mass will be PHYSICS_INFINITY.
----* if mass == -PHYSICS_INFINITY, _mass will not change.
----* if mass + _mass <= 0, _mass will equal to MASS_DEFAULT(1.0)
----* other wise, mass = mass + _mass; ----@param mass float ----@return self -function PhysicsBody:addMass (mass) end ----* get the shape of the body.
----* param tag An integer number that identifies a PhysicsShape object.
----* return A PhysicsShape object pointer or nullptr if no shapes were found. ----@param tag int ----@return cc.PhysicsShape -function PhysicsBody:getShape (tag) end ----* set the body's tag. ----@param tag int ----@return self -function PhysicsBody:setTag (tag) end ----* get the angular velocity of a body at a world point ----@param point vec2_table ----@return vec2_table -function PhysicsBody:getVelocityAtWorldPoint (point) end ----* A mask that defines which categories of bodies cause intersection notifications with this physics body.
----* When two bodies share the same space, each body's category mask is tested against the other body's contact mask by performing a logical AND operation. If either comparison results in a non-zero value, an PhysicsContact object is created and passed to the physics world’s delegate. For best performance, only set bits in the contacts mask for interactions you are interested in.
----* param bitmask An integer number, the default value is 0x00000000 (all bits cleared). ----@param bitmask int ----@return self -function PhysicsBody:setContactTestBitmask (bitmask) end ----* remove the body from the world it added to ----@return self -function PhysicsBody:removeFromWorld () end ----* brief Test the body is dynamic or not.
----* A dynamic body will effect with gravity. ----@return boolean -function PhysicsBody:isDynamic () end ----* get the node the body set to. ----@return cc.Node -function PhysicsBody:getNode () end ----* Create a body contains a box shape.
----* param size Size contains this box's width and height.
----* param material A PhysicsMaterial object, the default value is PHYSICSSHAPE_MATERIAL_DEFAULT.
----* param offset A Vec2 object, it is the offset from the body's center of gravity in body local coordinates.
----* return An autoreleased PhysicsBody object pointer. ----@param size size_table ----@param material cc.PhysicsMaterial ----@param offset vec2_table ----@return self -function PhysicsBody:createBox (size,material,offset) end ----* Create a body contains a EdgeSegment shape.
----* param a It's the edge's begin position.
----* param b It's the edge's end position.
----* param material A PhysicsMaterial object, the default value is PHYSICSSHAPE_MATERIAL_DEFAULT.
----* param border It's a edge's border width.
----* return An autoreleased PhysicsBody object pointer. ----@param a vec2_table ----@param b vec2_table ----@param material cc.PhysicsMaterial ----@param border float ----@return self -function PhysicsBody:createEdgeSegment (a,b,material,border) end ----@overload fun(float:float):self ----@overload fun():self ----@overload fun(float:float,float:float):self ----@param mass float ----@param moment float ----@return self -function PhysicsBody:create (mass,moment) end ----* Create a body contains a EdgeBox shape.
----* param size Size contains this box's width and height.
----* param material A PhysicsMaterial object, the default value is PHYSICSSHAPE_MATERIAL_DEFAULT.
----* param border It's a edge's border width.
----* param offset A Vec2 object, it is the offset from the body's center of gravity in body local coordinates.
----* return An autoreleased PhysicsBody object pointer. ----@param size size_table ----@param material cc.PhysicsMaterial ----@param border float ----@param offset vec2_table ----@return self -function PhysicsBody:createEdgeBox (size,material,border,offset) end ----* Create a body contains a circle.
----* param radius A float number, it is the circle's radius.
----* param material A PhysicsMaterial object, the default value is PHYSICSSHAPE_MATERIAL_DEFAULT.
----* param offset A Vec2 object, it is the offset from the body's center of gravity in body local coordinates.
----* return An autoreleased PhysicsBody object pointer. ----@param radius float ----@param material cc.PhysicsMaterial ----@param offset vec2_table ----@return self -function PhysicsBody:createCircle (radius,material,offset) end ----* Set the enable value.
----* If the body it isn't enabled, it will not has simulation by world. ----@param enable boolean ----@return self -function PhysicsBody:setEnabled (enable) end ----* ----@return self -function PhysicsBody:onRemove () end ----* ----@return self -function PhysicsBody:onEnter () end ----* ----@return self -function PhysicsBody:onExit () end ----* ----@return self -function PhysicsBody:onAdd () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/PhysicsContact.lua b/meta/3rd/Cocos4.0/library/cc/PhysicsContact.lua deleted file mode 100644 index d5855b65..00000000 --- a/meta/3rd/Cocos4.0/library/cc/PhysicsContact.lua +++ /dev/null @@ -1,24 +0,0 @@ ----@meta - ----@class cc.PhysicsContact :cc.EventCustom -local PhysicsContact={ } -cc.PhysicsContact=PhysicsContact - - - - ----* Get contact data. ----@return cc.PhysicsContactData -function PhysicsContact:getContactData () end ----* Get the event code ----@return int -function PhysicsContact:getEventCode () end ----* Get previous contact data ----@return cc.PhysicsContactData -function PhysicsContact:getPreContactData () end ----* Get contact shape A. ----@return cc.PhysicsShape -function PhysicsContact:getShapeA () end ----* Get contact shape B. ----@return cc.PhysicsShape -function PhysicsContact:getShapeB () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/PhysicsContactPostSolve.lua b/meta/3rd/Cocos4.0/library/cc/PhysicsContactPostSolve.lua deleted file mode 100644 index 7aff2b1e..00000000 --- a/meta/3rd/Cocos4.0/library/cc/PhysicsContactPostSolve.lua +++ /dev/null @@ -1,18 +0,0 @@ ----@meta - ----@class cc.PhysicsContactPostSolve -local PhysicsContactPostSolve={ } -cc.PhysicsContactPostSolve=PhysicsContactPostSolve - - - - ----* Get friction between two bodies. ----@return float -function PhysicsContactPostSolve:getFriction () end ----* Get surface velocity between two bodies. ----@return vec2_table -function PhysicsContactPostSolve:getSurfaceVelocity () end ----* Get restitution between two bodies. ----@return float -function PhysicsContactPostSolve:getRestitution () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/PhysicsContactPreSolve.lua b/meta/3rd/Cocos4.0/library/cc/PhysicsContactPreSolve.lua deleted file mode 100644 index ab3b6b43..00000000 --- a/meta/3rd/Cocos4.0/library/cc/PhysicsContactPreSolve.lua +++ /dev/null @@ -1,33 +0,0 @@ ----@meta - ----@class cc.PhysicsContactPreSolve -local PhysicsContactPreSolve={ } -cc.PhysicsContactPreSolve=PhysicsContactPreSolve - - - - ----* Get friction between two bodies. ----@return float -function PhysicsContactPreSolve:getFriction () end ----* Get restitution between two bodies. ----@return float -function PhysicsContactPreSolve:getRestitution () end ----* Set the friction. ----@param friction float ----@return self -function PhysicsContactPreSolve:setFriction (friction) end ----* Ignore the rest of the contact presolve and postsolve callbacks. ----@return self -function PhysicsContactPreSolve:ignore () end ----* Get surface velocity between two bodies. ----@return vec2_table -function PhysicsContactPreSolve:getSurfaceVelocity () end ----* Set the surface velocity. ----@param velocity vec2_table ----@return self -function PhysicsContactPreSolve:setSurfaceVelocity (velocity) end ----* Set the restitution. ----@param restitution float ----@return self -function PhysicsContactPreSolve:setRestitution (restitution) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/PhysicsJoint.lua b/meta/3rd/Cocos4.0/library/cc/PhysicsJoint.lua deleted file mode 100644 index 4655e156..00000000 --- a/meta/3rd/Cocos4.0/library/cc/PhysicsJoint.lua +++ /dev/null @@ -1,51 +0,0 @@ ----@meta - ----@class cc.PhysicsJoint -local PhysicsJoint={ } -cc.PhysicsJoint=PhysicsJoint - - - - ----* Get physics body a connected to this joint. ----@return cc.PhysicsBody -function PhysicsJoint:getBodyA () end ----* Get physics body b connected to this joint. ----@return cc.PhysicsBody -function PhysicsJoint:getBodyB () end ----* Get the max force setting. ----@return float -function PhysicsJoint:getMaxForce () end ----* Set the max force between two bodies. ----@param force float ----@return self -function PhysicsJoint:setMaxForce (force) end ----* Determines if the joint is enable. ----@return boolean -function PhysicsJoint:isEnabled () end ----* Enable/Disable the joint. ----@param enable boolean ----@return self -function PhysicsJoint:setEnable (enable) end ----* Enable/disable the collision between two bodies. ----@param enable boolean ----@return self -function PhysicsJoint:setCollisionEnable (enable) end ----* Get the physics world. ----@return cc.PhysicsWorld -function PhysicsJoint:getWorld () end ----* Set this joint's tag.
----* param tag An integer number that identifies a PhysicsJoint. ----@param tag int ----@return self -function PhysicsJoint:setTag (tag) end ----* Remove the joint from the world. ----@return self -function PhysicsJoint:removeFormWorld () end ----* Determines if the collision is enable. ----@return boolean -function PhysicsJoint:isCollisionEnabled () end ----* Get this joint's tag.
----* return An integer number. ----@return int -function PhysicsJoint:getTag () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/PhysicsJointDistance.lua b/meta/3rd/Cocos4.0/library/cc/PhysicsJointDistance.lua deleted file mode 100644 index d8d8461f..00000000 --- a/meta/3rd/Cocos4.0/library/cc/PhysicsJointDistance.lua +++ /dev/null @@ -1,31 +0,0 @@ ----@meta - ----@class cc.PhysicsJointDistance :cc.PhysicsJoint -local PhysicsJointDistance={ } -cc.PhysicsJointDistance=PhysicsJointDistance - - - - ----* ----@return boolean -function PhysicsJointDistance:createConstraints () end ----* Set the distance of the anchor points. ----@param distance float ----@return self -function PhysicsJointDistance:setDistance (distance) end ----* Get the distance of the anchor points. ----@return float -function PhysicsJointDistance:getDistance () end ----* Create a fixed distance joint.
----* param a A is the body to connect.
----* param b B is the body to connect.
----* param anchr1 Anchr1 is the anchor point on body a.
----* param anchr2 Anchr2 is the anchor point on body b.
----* return A object pointer. ----@param a cc.PhysicsBody ----@param b cc.PhysicsBody ----@param anchr1 vec2_table ----@param anchr2 vec2_table ----@return self -function PhysicsJointDistance:construct (a,b,anchr1,anchr2) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/PhysicsJointFixed.lua b/meta/3rd/Cocos4.0/library/cc/PhysicsJointFixed.lua deleted file mode 100644 index 1dc195a2..00000000 --- a/meta/3rd/Cocos4.0/library/cc/PhysicsJointFixed.lua +++ /dev/null @@ -1,22 +0,0 @@ ----@meta - ----@class cc.PhysicsJointFixed :cc.PhysicsJoint -local PhysicsJointFixed={ } -cc.PhysicsJointFixed=PhysicsJointFixed - - - - ----* ----@return boolean -function PhysicsJointFixed:createConstraints () end ----* Create a fixed joint.
----* param a A is the body to connect.
----* param b B is the body to connect.
----* param anchr It's the pivot position.
----* return A object pointer. ----@param a cc.PhysicsBody ----@param b cc.PhysicsBody ----@param anchr vec2_table ----@return self -function PhysicsJointFixed:construct (a,b,anchr) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/PhysicsJointGear.lua b/meta/3rd/Cocos4.0/library/cc/PhysicsJointGear.lua deleted file mode 100644 index e8c0330b..00000000 --- a/meta/3rd/Cocos4.0/library/cc/PhysicsJointGear.lua +++ /dev/null @@ -1,38 +0,0 @@ ----@meta - ----@class cc.PhysicsJointGear :cc.PhysicsJoint -local PhysicsJointGear={ } -cc.PhysicsJointGear=PhysicsJointGear - - - - ----* Set the ratio. ----@param ratchet float ----@return self -function PhysicsJointGear:setRatio (ratchet) end ----* Get the angular offset of the two bodies. ----@return float -function PhysicsJointGear:getPhase () end ----* Set the angular offset of the two bodies. ----@param phase float ----@return self -function PhysicsJointGear:setPhase (phase) end ----* ----@return boolean -function PhysicsJointGear:createConstraints () end ----* Get the ratio. ----@return float -function PhysicsJointGear:getRatio () end ----* Create a gear joint.
----* param a A is the body to connect.
----* param b B is the body to connect.
----* param phase Phase is the initial angular offset of the two bodies.
----* param ratio Ratio is always measured in absolute terms.
----* return A object pointer. ----@param a cc.PhysicsBody ----@param b cc.PhysicsBody ----@param phase float ----@param ratio float ----@return self -function PhysicsJointGear:construct (a,b,phase,ratio) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/PhysicsJointGroove.lua b/meta/3rd/Cocos4.0/library/cc/PhysicsJointGroove.lua deleted file mode 100644 index f88b37f4..00000000 --- a/meta/3rd/Cocos4.0/library/cc/PhysicsJointGroove.lua +++ /dev/null @@ -1,47 +0,0 @@ ----@meta - ----@class cc.PhysicsJointGroove :cc.PhysicsJoint -local PhysicsJointGroove={ } -cc.PhysicsJointGroove=PhysicsJointGroove - - - - ----* Set the anchor point on body b. ----@param anchr2 vec2_table ----@return self -function PhysicsJointGroove:setAnchr2 (anchr2) end ----* Set the line begin position ----@param grooveA vec2_table ----@return self -function PhysicsJointGroove:setGrooveA (grooveA) end ----* Set the line end position ----@param grooveB vec2_table ----@return self -function PhysicsJointGroove:setGrooveB (grooveB) end ----* Get the line begin position ----@return vec2_table -function PhysicsJointGroove:getGrooveA () end ----* Get the line end position ----@return vec2_table -function PhysicsJointGroove:getGrooveB () end ----* Get the anchor point on body b. ----@return vec2_table -function PhysicsJointGroove:getAnchr2 () end ----* ----@return boolean -function PhysicsJointGroove:createConstraints () end ----* Create a groove joint.
----* param a A is the body to connect.
----* param b B is the body to connect.
----* param grooveA The line begin position.
----* param grooveB The line end position.
----* param anchr2 Anchr2 is the anchor point on body b.
----* return A object pointer. ----@param a cc.PhysicsBody ----@param b cc.PhysicsBody ----@param grooveA vec2_table ----@param grooveB vec2_table ----@param anchr2 vec2_table ----@return self -function PhysicsJointGroove:construct (a,b,grooveA,grooveB,anchr2) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/PhysicsJointLimit.lua b/meta/3rd/Cocos4.0/library/cc/PhysicsJointLimit.lua deleted file mode 100644 index 6c4475ef..00000000 --- a/meta/3rd/Cocos4.0/library/cc/PhysicsJointLimit.lua +++ /dev/null @@ -1,50 +0,0 @@ ----@meta - ----@class cc.PhysicsJointLimit :cc.PhysicsJoint -local PhysicsJointLimit={ } -cc.PhysicsJointLimit=PhysicsJointLimit - - - - ----* Set the anchor point on body b. ----@param anchr2 vec2_table ----@return self -function PhysicsJointLimit:setAnchr2 (anchr2) end ----* Set the anchor point on body a. ----@param anchr1 vec2_table ----@return self -function PhysicsJointLimit:setAnchr1 (anchr1) end ----* Set the max distance of the anchor points. ----@param max float ----@return self -function PhysicsJointLimit:setMax (max) end ----* Get the anchor point on body b. ----@return vec2_table -function PhysicsJointLimit:getAnchr2 () end ----* Get the anchor point on body a. ----@return vec2_table -function PhysicsJointLimit:getAnchr1 () end ----* ----@return boolean -function PhysicsJointLimit:createConstraints () end ----* Get the allowed min distance of the anchor points. ----@return float -function PhysicsJointLimit:getMin () end ----* Get the allowed max distance of the anchor points. ----@return float -function PhysicsJointLimit:getMax () end ----* Set the min distance of the anchor points. ----@param min float ----@return self -function PhysicsJointLimit:setMin (min) end ----@overload fun(cc.PhysicsBody:cc.PhysicsBody,cc.PhysicsBody:cc.PhysicsBody,vec2_table:vec2_table,vec2_table:vec2_table,float:float,float:float):self ----@overload fun(cc.PhysicsBody:cc.PhysicsBody,cc.PhysicsBody:cc.PhysicsBody,vec2_table:vec2_table,vec2_table:vec2_table):self ----@param a cc.PhysicsBody ----@param b cc.PhysicsBody ----@param anchr1 vec2_table ----@param anchr2 vec2_table ----@param min float ----@param max float ----@return self -function PhysicsJointLimit:construct (a,b,anchr1,anchr2,min,max) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/PhysicsJointMotor.lua b/meta/3rd/Cocos4.0/library/cc/PhysicsJointMotor.lua deleted file mode 100644 index 77e79241..00000000 --- a/meta/3rd/Cocos4.0/library/cc/PhysicsJointMotor.lua +++ /dev/null @@ -1,29 +0,0 @@ ----@meta - ----@class cc.PhysicsJointMotor :cc.PhysicsJoint -local PhysicsJointMotor={ } -cc.PhysicsJointMotor=PhysicsJointMotor - - - - ----* Set the relative angular velocity. ----@param rate float ----@return self -function PhysicsJointMotor:setRate (rate) end ----* Get the relative angular velocity. ----@return float -function PhysicsJointMotor:getRate () end ----* ----@return boolean -function PhysicsJointMotor:createConstraints () end ----* Create a motor joint.
----* param a A is the body to connect.
----* param b B is the body to connect.
----* param rate Rate is the desired relative angular velocity.
----* return A object pointer. ----@param a cc.PhysicsBody ----@param b cc.PhysicsBody ----@param rate float ----@return self -function PhysicsJointMotor:construct (a,b,rate) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/PhysicsJointPin.lua b/meta/3rd/Cocos4.0/library/cc/PhysicsJointPin.lua deleted file mode 100644 index d19d23fd..00000000 --- a/meta/3rd/Cocos4.0/library/cc/PhysicsJointPin.lua +++ /dev/null @@ -1,20 +0,0 @@ ----@meta - ----@class cc.PhysicsJointPin :cc.PhysicsJoint -local PhysicsJointPin={ } -cc.PhysicsJointPin=PhysicsJointPin - - - - ----* ----@return boolean -function PhysicsJointPin:createConstraints () end ----@overload fun(cc.PhysicsBody:cc.PhysicsBody,cc.PhysicsBody:cc.PhysicsBody,vec2_table:vec2_table,vec2_table:vec2_table):self ----@overload fun(cc.PhysicsBody:cc.PhysicsBody,cc.PhysicsBody:cc.PhysicsBody,vec2_table:vec2_table):self ----@param a cc.PhysicsBody ----@param b cc.PhysicsBody ----@param anchr1 vec2_table ----@param anchr2 vec2_table ----@return self -function PhysicsJointPin:construct (a,b,anchr1,anchr2) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/PhysicsJointRatchet.lua b/meta/3rd/Cocos4.0/library/cc/PhysicsJointRatchet.lua deleted file mode 100644 index be8033b4..00000000 --- a/meta/3rd/Cocos4.0/library/cc/PhysicsJointRatchet.lua +++ /dev/null @@ -1,45 +0,0 @@ ----@meta - ----@class cc.PhysicsJointRatchet :cc.PhysicsJoint -local PhysicsJointRatchet={ } -cc.PhysicsJointRatchet=PhysicsJointRatchet - - - - ----* Get the ratchet angle. ----@return float -function PhysicsJointRatchet:getAngle () end ----* Set the ratchet angle. ----@param angle float ----@return self -function PhysicsJointRatchet:setAngle (angle) end ----* ----@return boolean -function PhysicsJointRatchet:createConstraints () end ----* Set the initial offset. ----@param phase float ----@return self -function PhysicsJointRatchet:setPhase (phase) end ----* Get the initial offset. ----@return float -function PhysicsJointRatchet:getPhase () end ----* Set the distance between "clicks". ----@param ratchet float ----@return self -function PhysicsJointRatchet:setRatchet (ratchet) end ----* Get the distance between "clicks". ----@return float -function PhysicsJointRatchet:getRatchet () end ----* Create a ratchet joint.
----* param a A is the body to connect.
----* param b B is the body to connect.
----* param phase Phase is the initial offset to use when deciding where the ratchet angles are.
----* param ratchet Ratchet is the distance between "clicks".
----* return A object pointer. ----@param a cc.PhysicsBody ----@param b cc.PhysicsBody ----@param phase float ----@param ratchet float ----@return self -function PhysicsJointRatchet:construct (a,b,phase,ratchet) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/PhysicsJointRotaryLimit.lua b/meta/3rd/Cocos4.0/library/cc/PhysicsJointRotaryLimit.lua deleted file mode 100644 index 467f0887..00000000 --- a/meta/3rd/Cocos4.0/library/cc/PhysicsJointRotaryLimit.lua +++ /dev/null @@ -1,34 +0,0 @@ ----@meta - ----@class cc.PhysicsJointRotaryLimit :cc.PhysicsJoint -local PhysicsJointRotaryLimit={ } -cc.PhysicsJointRotaryLimit=PhysicsJointRotaryLimit - - - - ----* Get the max rotation limit. ----@return float -function PhysicsJointRotaryLimit:getMax () end ----* ----@return boolean -function PhysicsJointRotaryLimit:createConstraints () end ----* Set the min rotation limit. ----@param min float ----@return self -function PhysicsJointRotaryLimit:setMin (min) end ----* Set the max rotation limit. ----@param max float ----@return self -function PhysicsJointRotaryLimit:setMax (max) end ----* Get the min rotation limit. ----@return float -function PhysicsJointRotaryLimit:getMin () end ----@overload fun(cc.PhysicsBody:cc.PhysicsBody,cc.PhysicsBody:cc.PhysicsBody):self ----@overload fun(cc.PhysicsBody:cc.PhysicsBody,cc.PhysicsBody:cc.PhysicsBody,float:float,float:float):self ----@param a cc.PhysicsBody ----@param b cc.PhysicsBody ----@param min float ----@param max float ----@return self -function PhysicsJointRotaryLimit:construct (a,b,min,max) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/PhysicsJointRotarySpring.lua b/meta/3rd/Cocos4.0/library/cc/PhysicsJointRotarySpring.lua deleted file mode 100644 index 94884149..00000000 --- a/meta/3rd/Cocos4.0/library/cc/PhysicsJointRotarySpring.lua +++ /dev/null @@ -1,45 +0,0 @@ ----@meta - ----@class cc.PhysicsJointRotarySpring :cc.PhysicsJoint -local PhysicsJointRotarySpring={ } -cc.PhysicsJointRotarySpring=PhysicsJointRotarySpring - - - - ----* Get the spring soft constant. ----@return float -function PhysicsJointRotarySpring:getDamping () end ----* Set the relative angle in radians from the body a to b. ----@param restAngle float ----@return self -function PhysicsJointRotarySpring:setRestAngle (restAngle) end ----* Get the spring constant. ----@return float -function PhysicsJointRotarySpring:getStiffness () end ----* ----@return boolean -function PhysicsJointRotarySpring:createConstraints () end ----* Set the spring constant. ----@param stiffness float ----@return self -function PhysicsJointRotarySpring:setStiffness (stiffness) end ----* Set the spring soft constant. ----@param damping float ----@return self -function PhysicsJointRotarySpring:setDamping (damping) end ----* Get the relative angle in radians from the body a to b. ----@return float -function PhysicsJointRotarySpring:getRestAngle () end ----* Create a damped rotary spring joint.
----* param a A is the body to connect.
----* param b B is the body to connect.
----* param stiffness It's the spring constant.
----* param damping It's how soft to make the damping of the spring.
----* return A object pointer. ----@param a cc.PhysicsBody ----@param b cc.PhysicsBody ----@param stiffness float ----@param damping float ----@return self -function PhysicsJointRotarySpring:construct (a,b,stiffness,damping) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/PhysicsJointSpring.lua b/meta/3rd/Cocos4.0/library/cc/PhysicsJointSpring.lua deleted file mode 100644 index 3cd52cdb..00000000 --- a/meta/3rd/Cocos4.0/library/cc/PhysicsJointSpring.lua +++ /dev/null @@ -1,63 +0,0 @@ ----@meta - ----@class cc.PhysicsJointSpring :cc.PhysicsJoint -local PhysicsJointSpring={ } -cc.PhysicsJointSpring=PhysicsJointSpring - - - - ----* Set the anchor point on body b. ----@param anchr2 vec2_table ----@return self -function PhysicsJointSpring:setAnchr2 (anchr2) end ----* Set the anchor point on body a. ----@param anchr1 vec2_table ----@return self -function PhysicsJointSpring:setAnchr1 (anchr1) end ----* Get the spring soft constant. ----@return float -function PhysicsJointSpring:getDamping () end ----* Set the spring constant. ----@param stiffness float ----@return self -function PhysicsJointSpring:setStiffness (stiffness) end ----* Get the distance of the anchor points. ----@return float -function PhysicsJointSpring:getRestLength () end ----* Get the anchor point on body b. ----@return vec2_table -function PhysicsJointSpring:getAnchr2 () end ----* Get the anchor point on body a. ----@return vec2_table -function PhysicsJointSpring:getAnchr1 () end ----* Get the spring constant. ----@return float -function PhysicsJointSpring:getStiffness () end ----* ----@return boolean -function PhysicsJointSpring:createConstraints () end ----* Set the distance of the anchor points. ----@param restLength float ----@return self -function PhysicsJointSpring:setRestLength (restLength) end ----* Set the spring soft constant. ----@param damping float ----@return self -function PhysicsJointSpring:setDamping (damping) end ----* Create a fixed distance joint.
----* param a A is the body to connect.
----* param b B is the body to connect.
----* param anchr1 Anchr1 is the anchor point on body a.
----* param anchr2 Anchr2 is the anchor point on body b.
----* param stiffness It's the spring constant.
----* param damping It's how soft to make the damping of the spring.
----* return A object pointer. ----@param a cc.PhysicsBody ----@param b cc.PhysicsBody ----@param anchr1 vec2_table ----@param anchr2 vec2_table ----@param stiffness float ----@param damping float ----@return self -function PhysicsJointSpring:construct (a,b,anchr1,anchr2,stiffness,damping) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/PhysicsShape.lua b/meta/3rd/Cocos4.0/library/cc/PhysicsShape.lua deleted file mode 100644 index 372bc765..00000000 --- a/meta/3rd/Cocos4.0/library/cc/PhysicsShape.lua +++ /dev/null @@ -1,158 +0,0 @@ ----@meta - ----@class cc.PhysicsShape :cc.Ref -local PhysicsShape={ } -cc.PhysicsShape=PhysicsShape - - - - ----* Get this shape's friction.
----* return A float number. ----@return float -function PhysicsShape:getFriction () end ----* Set the group of body.
----* Collision groups let you specify an integral group index. You can have all fixtures with the same group index always collide (positive index) or never collide (negative index).
----* param group An integer number, it have high priority than bit masks. ----@param group int ----@return self -function PhysicsShape:setGroup (group) end ----* Set this shape's density.
----* It will change the body's mass this shape attaches.
----* param density A float number. ----@param density float ----@return self -function PhysicsShape:setDensity (density) end ----* Get the mass of this shape.
----* return A float number. ----@return float -function PhysicsShape:getMass () end ----* Get this shape's PhysicsMaterial object.
----* return A PhysicsMaterial object reference. ----@return cc.PhysicsMaterial -function PhysicsShape:getMaterial () end ----* ----@param sensor boolean ----@return self -function PhysicsShape:setSensor (sensor) end ----* Get a mask that defines which categories of physics bodies can collide with this physics body.
----* return An integer number. ----@return int -function PhysicsShape:getCollisionBitmask () end ----* Return this shape's area.
----* return A float number. ----@return float -function PhysicsShape:getArea () end ----* Set a mask that defines which categories this physics body belongs to.
----* Every physics body in a scene can be assigned to up to 32 different categories, each corresponding to a bit in the bit mask. You define the mask values used in your game. In conjunction with the collisionBitMask and contactTestBitMask properties, you define which physics bodies interact with each other and when your game is notified of these interactions.
----* param bitmask An integer number, the default value is 0xFFFFFFFF (all bits set). ----@param bitmask int ----@return self -function PhysicsShape:setCategoryBitmask (bitmask) end ----* Get the group of body.
----* return An integer number. ----@return int -function PhysicsShape:getGroup () end ----* Set this shape's moment.
----* It will change the body's moment this shape attaches.
----* param moment A float number. ----@param moment float ----@return self -function PhysicsShape:setMoment (moment) end ----* Test point is inside this shape or not.
----* param point A Vec2 object.
----* return A bool object. ----@param point vec2_table ----@return boolean -function PhysicsShape:containsPoint (point) end ----* Get a mask that defines which categories this physics body belongs to.
----* return An integer number. ----@return int -function PhysicsShape:getCategoryBitmask () end ----* ----@return boolean -function PhysicsShape:isSensor () end ----* Return this shape's type.
----* return A Type object. ----@return int -function PhysicsShape:getType () end ----* Get a mask that defines which categories of bodies cause intersection notifications with this physics body.
----* return An integer number. ----@return int -function PhysicsShape:getContactTestBitmask () end ----* Get this shape's center position.
----* This function should be overridden in inherit classes.
----* return A Vec2 object. ----@return vec2_table -function PhysicsShape:getCenter () end ----* Get this shape's density.
----* return A float number. ----@return float -function PhysicsShape:getDensity () end ----* Set this shape's mass.
----* It will change the body's mass this shape attaches.
----* param mass A float number. ----@param mass float ----@return self -function PhysicsShape:setMass (mass) end ----* Get this shape's tag.
----* return An integer number. ----@return int -function PhysicsShape:getTag () end ----* Calculate the default moment value.
----* This function should be overridden in inherit classes.
----* return A float number, equals 0.0. ----@return float -function PhysicsShape:calculateDefaultMoment () end ----* A mask that defines which categories of physics bodies can collide with this physics body.
----* When two physics bodies contact each other, a collision may occur. This body's collision mask is compared to the other body's category mask by performing a logical AND operation. If the result is a non-zero value, then this body is affected by the collision. Each body independently chooses whether it wants to be affected by the other body. For example, you might use this to avoid collision calculations that would make negligible changes to a body's velocity.
----* param bitmask An integer number, the default value is 0xFFFFFFFF (all bits set). ----@param bitmask int ----@return self -function PhysicsShape:setCollisionBitmask (bitmask) end ----* Get this shape's moment.
----* return A float number. ----@return float -function PhysicsShape:getMoment () end ----* Get this shape's position offset.
----* This function should be overridden in inherit classes.
----* return A Vec2 object. ----@return vec2_table -function PhysicsShape:getOffset () end ----* Get this shape's restitution.
----* return A float number. ----@return float -function PhysicsShape:getRestitution () end ----* Set this shape's friction.
----* It will change the shape's friction.
----* param friction A float number. ----@param friction float ----@return self -function PhysicsShape:setFriction (friction) end ----* Set this shape's material.
----* It will change the shape's mass, elasticity and friction.
----* param material A PhysicsMaterial object. ----@param material cc.PhysicsMaterial ----@return self -function PhysicsShape:setMaterial (material) end ----* Set this shape's tag.
----* param tag An integer number that identifies a shape object. ----@param tag int ----@return self -function PhysicsShape:setTag (tag) end ----* A mask that defines which categories of bodies cause intersection notifications with this physics body.
----* When two bodies share the same space, each body's category mask is tested against the other body's contact mask by performing a logical AND operation. If either comparison results in a non-zero value, an PhysicsContact object is created and passed to the physics world’s delegate. For best performance, only set bits in the contacts mask for interactions you are interested in.
----* param bitmask An integer number, the default value is 0x00000000 (all bits cleared). ----@param bitmask int ----@return self -function PhysicsShape:setContactTestBitmask (bitmask) end ----* Set this shape's restitution.
----* It will change the shape's elasticity.
----* param restitution A float number. ----@param restitution float ----@return self -function PhysicsShape:setRestitution (restitution) end ----* Get the body that this shape attaches.
----* return A PhysicsBody object pointer. ----@return cc.PhysicsBody -function PhysicsShape:getBody () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/PhysicsShapeBox.lua b/meta/3rd/Cocos4.0/library/cc/PhysicsShapeBox.lua deleted file mode 100644 index 818a6a62..00000000 --- a/meta/3rd/Cocos4.0/library/cc/PhysicsShapeBox.lua +++ /dev/null @@ -1,28 +0,0 @@ ----@meta - ----@class cc.PhysicsShapeBox :cc.PhysicsShapePolygon -local PhysicsShapeBox={ } -cc.PhysicsShapeBox=PhysicsShapeBox - - - - ----* Get this box's width and height.
----* return An Size object. ----@return size_table -function PhysicsShapeBox:getSize () end ----* Creates a PhysicsShapeBox with specified value.
----* param size Size contains this box's width and height.
----* param material A PhysicsMaterial object, the default value is PHYSICSSHAPE_MATERIAL_DEFAULT.
----* param offset A Vec2 object, it is the offset from the body's center of gravity in body local coordinates.
----* return An autoreleased PhysicsShapeBox object pointer. ----@param size size_table ----@param material cc.PhysicsMaterial ----@param offset vec2_table ----@param radius float ----@return self -function PhysicsShapeBox:create (size,material,offset,radius) end ----* Get this box's position offset.
----* return A Vec2 object. ----@return vec2_table -function PhysicsShapeBox:getOffset () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/PhysicsShapeCircle.lua b/meta/3rd/Cocos4.0/library/cc/PhysicsShapeCircle.lua deleted file mode 100644 index c8bfc811..00000000 --- a/meta/3rd/Cocos4.0/library/cc/PhysicsShapeCircle.lua +++ /dev/null @@ -1,47 +0,0 @@ ----@meta - ----@class cc.PhysicsShapeCircle :cc.PhysicsShape -local PhysicsShapeCircle={ } -cc.PhysicsShapeCircle=PhysicsShapeCircle - - - - ----* Get the circle's radius.
----* return A float number. ----@return float -function PhysicsShapeCircle:getRadius () end ----* Creates a PhysicsShapeCircle with specified value.
----* param radius A float number, it is the circle's radius.
----* param material A PhysicsMaterial object, the default value is PHYSICSSHAPE_MATERIAL_DEFAULT.
----* param offset A Vec2 object, it is the offset from the body's center of gravity in body local coordinates.
----* return An autoreleased PhysicsShapeCircle object pointer. ----@param radius float ----@param material cc.PhysicsMaterial ----@param offset vec2_table ----@return self -function PhysicsShapeCircle:create (radius,material,offset) end ----* Calculate the area of a circle with specified radius.
----* param radius A float number
----* return A float number ----@param radius float ----@return float -function PhysicsShapeCircle:calculateArea (radius) end ----* Calculate the moment of a circle with specified value.
----* param mass A float number
----* param radius A float number
----* param offset A Vec2 object, it is the offset from the body's center of gravity in body local coordinates.
----* return A float number ----@param mass float ----@param radius float ----@param offset vec2_table ----@return float -function PhysicsShapeCircle:calculateMoment (mass,radius,offset) end ----* Get this circle's position offset.
----* return A Vec2 object. ----@return vec2_table -function PhysicsShapeCircle:getOffset () end ----* Calculate the moment for a circle.
----* return A float number. ----@return float -function PhysicsShapeCircle:calculateDefaultMoment () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/PhysicsShapeEdgeBox.lua b/meta/3rd/Cocos4.0/library/cc/PhysicsShapeEdgeBox.lua deleted file mode 100644 index a48f9e6e..00000000 --- a/meta/3rd/Cocos4.0/library/cc/PhysicsShapeEdgeBox.lua +++ /dev/null @@ -1,25 +0,0 @@ ----@meta - ----@class cc.PhysicsShapeEdgeBox :cc.PhysicsShapeEdgePolygon -local PhysicsShapeEdgeBox={ } -cc.PhysicsShapeEdgeBox=PhysicsShapeEdgeBox - - - - ----* Creates a PhysicsShapeEdgeBox with specified value.
----* param size Size contains this box's width and height.
----* param material A PhysicsMaterial object, the default value is PHYSICSSHAPE_MATERIAL_DEFAULT.
----* param border It's a edge's border width.
----* param offset A Vec2 object, it is the offset from the body's center of gravity in body local coordinates.
----* return An autoreleased PhysicsShapeEdgeBox object pointer. ----@param size size_table ----@param material cc.PhysicsMaterial ----@param border float ----@param offset vec2_table ----@return self -function PhysicsShapeEdgeBox:create (size,material,border,offset) end ----* Get this box's position offset.
----* return A Vec2 object. ----@return vec2_table -function PhysicsShapeEdgeBox:getOffset () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/PhysicsShapeEdgeChain.lua b/meta/3rd/Cocos4.0/library/cc/PhysicsShapeEdgeChain.lua deleted file mode 100644 index d2c605ef..00000000 --- a/meta/3rd/Cocos4.0/library/cc/PhysicsShapeEdgeChain.lua +++ /dev/null @@ -1,17 +0,0 @@ ----@meta - ----@class cc.PhysicsShapeEdgeChain :cc.PhysicsShape -local PhysicsShapeEdgeChain={ } -cc.PhysicsShapeEdgeChain=PhysicsShapeEdgeChain - - - - ----* Get this chain's points array count.
----* return An integer number. ----@return int -function PhysicsShapeEdgeChain:getPointsCount () end ----* Get this chain's center position.
----* return A Vec2 object. ----@return vec2_table -function PhysicsShapeEdgeChain:getCenter () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/PhysicsShapeEdgePolygon.lua b/meta/3rd/Cocos4.0/library/cc/PhysicsShapeEdgePolygon.lua deleted file mode 100644 index 915e0f24..00000000 --- a/meta/3rd/Cocos4.0/library/cc/PhysicsShapeEdgePolygon.lua +++ /dev/null @@ -1,17 +0,0 @@ ----@meta - ----@class cc.PhysicsShapeEdgePolygon :cc.PhysicsShape -local PhysicsShapeEdgePolygon={ } -cc.PhysicsShapeEdgePolygon=PhysicsShapeEdgePolygon - - - - ----* Get this polygon's points array count.
----* return An integer number. ----@return int -function PhysicsShapeEdgePolygon:getPointsCount () end ----* Get this polygon's center position.
----* return A Vec2 object. ----@return vec2_table -function PhysicsShapeEdgePolygon:getCenter () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/PhysicsShapeEdgeSegment.lua b/meta/3rd/Cocos4.0/library/cc/PhysicsShapeEdgeSegment.lua deleted file mode 100644 index cea28126..00000000 --- a/meta/3rd/Cocos4.0/library/cc/PhysicsShapeEdgeSegment.lua +++ /dev/null @@ -1,33 +0,0 @@ ----@meta - ----@class cc.PhysicsShapeEdgeSegment :cc.PhysicsShape -local PhysicsShapeEdgeSegment={ } -cc.PhysicsShapeEdgeSegment=PhysicsShapeEdgeSegment - - - - ----* Get this edge's end position.
----* return A Vec2 object. ----@return vec2_table -function PhysicsShapeEdgeSegment:getPointB () end ----* Get this edge's begin position.
----* return A Vec2 object. ----@return vec2_table -function PhysicsShapeEdgeSegment:getPointA () end ----* Creates a PhysicsShapeEdgeSegment with specified value.
----* param a It's the edge's begin position.
----* param b It's the edge's end position.
----* param material A PhysicsMaterial object, the default value is PHYSICSSHAPE_MATERIAL_DEFAULT.
----* param border It's a edge's border width.
----* return An autoreleased PhysicsShapeEdgeSegment object pointer. ----@param a vec2_table ----@param b vec2_table ----@param material cc.PhysicsMaterial ----@param border float ----@return self -function PhysicsShapeEdgeSegment:create (a,b,material,border) end ----* Get this edge's center position.
----* return A Vec2 object. ----@return vec2_table -function PhysicsShapeEdgeSegment:getCenter () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/PhysicsShapePolygon.lua b/meta/3rd/Cocos4.0/library/cc/PhysicsShapePolygon.lua deleted file mode 100644 index 9bf3aa46..00000000 --- a/meta/3rd/Cocos4.0/library/cc/PhysicsShapePolygon.lua +++ /dev/null @@ -1,27 +0,0 @@ ----@meta - ----@class cc.PhysicsShapePolygon :cc.PhysicsShape -local PhysicsShapePolygon={ } -cc.PhysicsShapePolygon=PhysicsShapePolygon - - - - ----* Get this polygon's points array count.
----* return An integer number. ----@return int -function PhysicsShapePolygon:getPointsCount () end ----* Get a point of this polygon's points array.
----* param i A index of this polygon's points array.
----* return A point value. ----@param i int ----@return vec2_table -function PhysicsShapePolygon:getPoint (i) end ----* Calculate the moment for a polygon.
----* return A float number. ----@return float -function PhysicsShapePolygon:calculateDefaultMoment () end ----* Get this polygon's center position.
----* return A Vec2 object. ----@return vec2_table -function PhysicsShapePolygon:getCenter () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/PhysicsSprite3D.lua b/meta/3rd/Cocos4.0/library/cc/PhysicsSprite3D.lua deleted file mode 100644 index d85d7f4f..00000000 --- a/meta/3rd/Cocos4.0/library/cc/PhysicsSprite3D.lua +++ /dev/null @@ -1,25 +0,0 @@ ----@meta - ----@class cc.PhysicsSprite3D :cc.Sprite3D -local PhysicsSprite3D={ } -cc.PhysicsSprite3D=PhysicsSprite3D - - - - ----* synchronize node transformation to physics. ----@return self -function PhysicsSprite3D:syncNodeToPhysics () end ----* synchronize physics transformation to node. ----@return self -function PhysicsSprite3D:syncPhysicsToNode () end ----* Get the Physics3DObject. ----@return cc.Physics3DObject -function PhysicsSprite3D:getPhysicsObj () end ----* Set synchronization flag, see Physics3DComponent. ----@param syncFlag int ----@return self -function PhysicsSprite3D:setSyncFlag (syncFlag) end ----* ----@return self -function PhysicsSprite3D:PhysicsSprite3D () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/PhysicsWorld.lua b/meta/3rd/Cocos4.0/library/cc/PhysicsWorld.lua deleted file mode 100644 index c46e5ef7..00000000 --- a/meta/3rd/Cocos4.0/library/cc/PhysicsWorld.lua +++ /dev/null @@ -1,150 +0,0 @@ ----@meta - ----@class cc.PhysicsWorld -local PhysicsWorld={ } -cc.PhysicsWorld=PhysicsWorld - - - - ----* set the gravity value of this physics world.
----* param gravity A gravity value of this physics world. ----@param gravity vec2_table ----@return self -function PhysicsWorld:setGravity (gravity) end ----* Get all the bodies that in this physics world.
----* return A Vector& object contains all bodies in this physics world. ----@return array_table -function PhysicsWorld:getAllBodies () end ----* set the number of update of the physics world in a second.
----* 0 - disable fixed step system
----* default value is 0 ----@param updatesPerSecond int ----@return self -function PhysicsWorld:setFixedUpdateRate (updatesPerSecond) end ----* set the number of substeps in an update of the physics world.
----* One physics update will be divided into several substeps to increase its accuracy.
----* param steps An integer number, default value is 1. ----@param steps int ----@return self -function PhysicsWorld:setSubsteps (steps) end ----* To control the step of physics.
----* If you want control it by yourself( fixed-timestep for example ), you can set this to false and call step by yourself.
----* attention If you set auto step to false, setSpeed setSubsteps and setUpdateRate won't work, you need to control the time step by yourself.
----* param autoStep A bool object, default value is true. ----@param autoStep boolean ----@return self -function PhysicsWorld:setAutoStep (autoStep) end ----* Adds a joint to this physics world.
----* This joint will be added to this physics world at next frame.
----* attention If this joint is already added to another physics world, it will be removed from that world first and then add to this world.
----* param joint A pointer to an existing PhysicsJoint object. ----@param joint cc.PhysicsJoint ----@return self -function PhysicsWorld:addJoint (joint) end ----* Remove all joints from this physics world.
----* attention This function is invoked in the destructor of this physics world, you do not use this api in common.
----* param destroy true all joints will be destroyed after remove from this world, false otherwise. ----@return self -function PhysicsWorld:removeAllJoints () end ----* Get the debug draw mask.
----* return An integer number. ----@return int -function PhysicsWorld:getDebugDrawMask () end ----* set the callback which invoked before update of each object in physics world. ----@param callback function ----@return self -function PhysicsWorld:setPreUpdateCallback (callback) end ----* Get the auto step of this physics world.
----* return A bool object. ----@return boolean -function PhysicsWorld:isAutoStep () end ----* set the callback which invoked after update of each object in physics world. ----@param callback function ----@return self -function PhysicsWorld:setPostUpdateCallback (callback) end ----@overload fun(cc.PhysicsBody0:int):self ----@overload fun(cc.PhysicsBody:cc.PhysicsBody):self ----@param body cc.PhysicsBody ----@return self -function PhysicsWorld:removeBody (body) end ----* Remove a joint from this physics world.
----* If this world is not locked, the joint is removed immediately, otherwise at next frame.
----* If this joint is connected with a body, it will be removed from the body also.
----* param joint A pointer to an existing PhysicsJoint object.
----* param destroy true this joint will be destroyed after remove from this world, false otherwise. ----@param joint cc.PhysicsJoint ----@param destroy boolean ----@return self -function PhysicsWorld:removeJoint (joint,destroy) end ----* Get physics shapes that contains the point.
----* All shapes contains the point will be pushed in a Vector object.
----* attention The point must lie inside a shape.
----* param point A Vec2 object contains the position of the point.
----* return A Vector object contains all found PhysicsShape pointer. ----@param point vec2_table ----@return array_table -function PhysicsWorld:getShapes (point) end ----* The step for physics world.
----* The times passing for simulate the physics.
----* attention You need to setAutoStep(false) first before it can work.
----* param delta A float number. ----@param delta float ----@return self -function PhysicsWorld:step (delta) end ----* Set the debug draw mask of this physics world.
----* This physics world will draw shapes and joints by DrawNode according to mask.
----* param mask Mask has four value:DEBUGDRAW_NONE, DEBUGDRAW_SHAPE, DEBUGDRAW_JOINT, DEBUGDRAW_CONTACT and DEBUGDRAW_ALL, default is DEBUGDRAW_NONE ----@param mask int ----@return self -function PhysicsWorld:setDebugDrawMask (mask) end ----* Get the gravity value of this physics world.
----* return A Vec2 object. ----@return vec2_table -function PhysicsWorld:getGravity () end ----* Set the update rate of this physics world
----* Update rate is the value of EngineUpdateTimes/PhysicsWorldUpdateTimes.
----* Set it higher can improve performance, set it lower can improve accuracy of physics world simulation.
----* attention if you setAutoStep(false), this won't work.
----* param rate An integer number, default value is 1.0. ----@param rate int ----@return self -function PhysicsWorld:setUpdateRate (rate) end ----* get the number of substeps ----@return int -function PhysicsWorld:getFixedUpdateRate () end ----* Get the number of substeps of this physics world.
----* return An integer number. ----@return int -function PhysicsWorld:getSubsteps () end ----* Get the speed of this physics world.
----* return A float number. ----@return float -function PhysicsWorld:getSpeed () end ----* Get the update rate of this physics world.
----* return An integer number. ----@return int -function PhysicsWorld:getUpdateRate () end ----* Remove all bodies from physics world.
----* If this world is not locked, those body are removed immediately, otherwise at next frame. ----@return self -function PhysicsWorld:removeAllBodies () end ----* Set the speed of this physics world.
----* attention if you setAutoStep(false), this won't work.
----* param speed A float number. Speed is the rate at which the simulation executes. default value is 1.0. ----@param speed float ----@return self -function PhysicsWorld:setSpeed (speed) end ----* Get the nearest physics shape that contains the point.
----* Query this physics world at point and return the closest shape.
----* param point A Vec2 object contains the position of the point.
----* return A PhysicsShape object pointer or nullptr if no shapes were found ----@param point vec2_table ----@return cc.PhysicsShape -function PhysicsWorld:getShape (point) end ----* Get a body by tag.
----* param tag An integer number that identifies a PhysicsBody object.
----* return A PhysicsBody object pointer or nullptr if no shapes were found. ----@param tag int ----@return cc.PhysicsBody -function PhysicsWorld:getBody (tag) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Place.lua b/meta/3rd/Cocos4.0/library/cc/Place.lua deleted file mode 100644 index c97c1caf..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Place.lua +++ /dev/null @@ -1,32 +0,0 @@ ----@meta - ----@class cc.Place :cc.ActionInstant -local Place={ } -cc.Place=Place - - - - ----* Initializes a Place action with a position ----@param pos vec2_table ----@return boolean -function Place:initWithPosition (pos) end ----* Creates a Place action with a position.
----* param pos A certain position.
----* return An autoreleased Place object. ----@param pos vec2_table ----@return self -function Place:create (pos) end ----* ----@return self -function Place:clone () end ----* param time In seconds. ----@param time float ----@return self -function Place:update (time) end ----* ----@return self -function Place:reverse () end ----* ----@return self -function Place:Place () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/PointLight.lua b/meta/3rd/Cocos4.0/library/cc/PointLight.lua deleted file mode 100644 index f041d240..00000000 --- a/meta/3rd/Cocos4.0/library/cc/PointLight.lua +++ /dev/null @@ -1,32 +0,0 @@ ----@meta - ----@class cc.PointLight :cc.BaseLight -local PointLight={ } -cc.PointLight=PointLight - - - - ----* get or set range ----@return float -function PointLight:getRange () end ----* ----@param range float ----@return point_table -function PointLight:setRange (range) end ----* Creates a point light.
----* param position The light's position
----* param color The light's color.
----* param range The light's range.
----* return The new point light. ----@param position vec3_table ----@param color color3b_table ----@param range float ----@return point_table -function PointLight:create (position,color,range) end ----* ----@return int -function PointLight:getLightType () end ----* ----@return point_table -function PointLight:PointLight () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/PolygonInfo.lua b/meta/3rd/Cocos4.0/library/cc/PolygonInfo.lua deleted file mode 100644 index 9a4cb3b2..00000000 --- a/meta/3rd/Cocos4.0/library/cc/PolygonInfo.lua +++ /dev/null @@ -1,63 +0,0 @@ ----@meta - ----@class cc.PolygonInfo -local PolygonInfo={ } -cc.PolygonInfo=PolygonInfo - - - - ----* ----@return string -function PolygonInfo:getFilename () end ----* get sum of all triangle area size
----* return sum of all triangle area size ----@return float -function PolygonInfo:getArea () end ----* ----@return rect_table -function PolygonInfo:getRect () end ----* ----@param filename string ----@return self -function PolygonInfo:setFilename (filename) end ----* set the data to be a pointer to a number of Quads
----* the member verts will not be released when this PolygonInfo destructs
----* as the verts memory are managed by other objects
----* param quad a pointer to the V3F_C4B_T2F_Quad quads ----@param quads cc.V3F_C4B_T2F_Quad ----@param numberOfQuads int ----@return self -function PolygonInfo:setQuads (quads,numberOfQuads) end ----* get vertex count
----* return number of vertices ----@return unsigned_int -function PolygonInfo:getVertCount () end ----* get triangles count
----* return number of triangles ----@return unsigned_int -function PolygonInfo:getTrianglesCount () end ----* set the data to be a pointer to a quad
----* the member verts will not be released when this PolygonInfo destructs
----* as the verts memory are managed by other objects
----* param quad a pointer to the V3F_C4B_T2F_Quad object ----@param quad cc.V3F_C4B_T2F_Quad ----@return self -function PolygonInfo:setQuad (quad) end ----* set the data to be a pointer to a triangles
----* the member verts will not be released when this PolygonInfo destructs
----* as the verts memory are managed by other objects
----* param triangles a pointer to the TrianglesCommand::Triangles object ----@param triangles cc.TrianglesCommand.Triangles ----@return self -function PolygonInfo:setTriangles (triangles) end ----* ----@param rect rect_table ----@return self -function PolygonInfo:setRect (rect) end ----* / @name Creators/ @{
----* Creates an empty Polygon info
----* memberof PolygonInfo
----* return PolygonInfo object ----@return self -function PolygonInfo:PolygonInfo () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ProgressFromTo.lua b/meta/3rd/Cocos4.0/library/cc/ProgressFromTo.lua deleted file mode 100644 index c3235dca..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ProgressFromTo.lua +++ /dev/null @@ -1,46 +0,0 @@ ----@meta - ----@class cc.ProgressFromTo :cc.ActionInterval -local ProgressFromTo={ } -cc.ProgressFromTo=ProgressFromTo - - - - ----* brief Initializes the action with a duration, a "from" percentage and a "to" percentage.
----* param duration Specify the duration of the ProgressFromTo action. It's a value in seconds.
----* param fromPercentage Specify the source percentage.
----* param toPercentage Specify the destination percentage.
----* return If the creation success, return true; otherwise, return false. ----@param duration float ----@param fromPercentage float ----@param toPercentage float ----@return boolean -function ProgressFromTo:initWithDuration (duration,fromPercentage,toPercentage) end ----* brief Create and initializes the action with a duration, a "from" percentage and a "to" percentage.
----* param duration Specify the duration of the ProgressFromTo action. It's a value in seconds.
----* param fromPercentage Specify the source percentage.
----* param toPercentage Specify the destination percentage.
----* return If the creation success, return a pointer of ProgressFromTo action; otherwise, return nil. ----@param duration float ----@param fromPercentage float ----@param toPercentage float ----@return self -function ProgressFromTo:create (duration,fromPercentage,toPercentage) end ----* ----@param target cc.Node ----@return self -function ProgressFromTo:startWithTarget (target) end ----* ----@return self -function ProgressFromTo:clone () end ----* ----@return self -function ProgressFromTo:reverse () end ----* ----@param time float ----@return self -function ProgressFromTo:update (time) end ----* ----@return self -function ProgressFromTo:ProgressFromTo () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ProgressTimer.lua b/meta/3rd/Cocos4.0/library/cc/ProgressTimer.lua deleted file mode 100644 index a797081c..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ProgressTimer.lua +++ /dev/null @@ -1,110 +0,0 @@ ----@meta - ----@class cc.ProgressTimer :cc.Node -local ProgressTimer={ } -cc.ProgressTimer=ProgressTimer - - - - ----* Initializes a progress timer with the sprite as the shape the timer goes through ----@param sp cc.Sprite ----@return boolean -function ProgressTimer:initWithSprite (sp) end ----* Return the Reverse direction.
----* return If the direction is Anti-clockwise,it will return true. ----@return boolean -function ProgressTimer:isReverseDirection () end ----* This allows the bar type to move the component at a specific rate.
----* Set the component to 0 to make sure it stays at 100%.
----* For example you want a left to right bar but not have the height stay 100%.
----* Set the rate to be Vec2(0,1); and set the midpoint to = Vec2(0,.5f).
----* param barChangeRate A Vec2. ----@param barChangeRate vec2_table ----@return self -function ProgressTimer:setBarChangeRate (barChangeRate) end ----* Percentages are from 0 to 100.
----* return Percentages. ----@return float -function ProgressTimer:getPercentage () end ----* Set the sprite as the shape.
----* param sprite The sprite as the shape. ----@param sprite cc.Sprite ----@return self -function ProgressTimer:setSprite (sprite) end ----* Change the percentage to change progress.
----* return A Type ----@return int -function ProgressTimer:getType () end ----* The image to show the progress percentage, retain.
----* return A sprite. ----@return cc.Sprite -function ProgressTimer:getSprite () end ----* Midpoint is used to modify the progress start position.
----* If you're using radials type then the midpoint changes the center point.
----* If you're using bar type then the midpoint changes the bar growth.
----* it expands from the center but clamps to the sprites edge so:
----* you want a left to right then set the midpoint all the way to Vec2(0,y).
----* you want a right to left then set the midpoint all the way to Vec2(1,y).
----* you want a bottom to top then set the midpoint all the way to Vec2(x,0).
----* you want a top to bottom then set the midpoint all the way to Vec2(x,1).
----* param point A Vec2 point. ----@param point vec2_table ----@return self -function ProgressTimer:setMidpoint (point) end ----* Returns the BarChangeRate.
----* return A barChangeRate. ----@return vec2_table -function ProgressTimer:getBarChangeRate () end ----* Set the Reverse direction.
----* param value If value is false it will clockwise,if is true it will Anti-clockwise. ----@param value boolean ----@return self -function ProgressTimer:setReverseDirection (value) end ----* Returns the Midpoint.
----* return A Vec2. ----@return vec2_table -function ProgressTimer:getMidpoint () end ----* Set the initial percentage values.
----* param percentage The initial percentage values. ----@param percentage float ----@return self -function ProgressTimer:setPercentage (percentage) end ----* Set the ProgressTimer type.
----* param type Is an Type. ----@param type int ----@return self -function ProgressTimer:setType (type) end ----* Creates a progress timer with the sprite as the shape the timer goes through.
----* param sp The sprite as the shape the timer goes through.
----* return A ProgressTimer. ----@param sp cc.Sprite ----@return self -function ProgressTimer:create (sp) end ----* ----@param anchorPoint vec2_table ----@return self -function ProgressTimer:setAnchorPoint (anchorPoint) end ----* ----@param renderer cc.Renderer ----@param transform mat4_table ----@param flags unsigned_int ----@return self -function ProgressTimer:draw (renderer,transform,flags) end ----* ----@param color color3b_table ----@return self -function ProgressTimer:setColor (color) end ----* ----@return color3b_table -function ProgressTimer:getColor () end ----* ----@param opacity unsigned_char ----@return self -function ProgressTimer:setOpacity (opacity) end ----* ----@return unsigned_char -function ProgressTimer:getOpacity () end ----* js ctor ----@return self -function ProgressTimer:ProgressTimer () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ProgressTo.lua b/meta/3rd/Cocos4.0/library/cc/ProgressTo.lua deleted file mode 100644 index 9494199a..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ProgressTo.lua +++ /dev/null @@ -1,42 +0,0 @@ ----@meta - ----@class cc.ProgressTo :cc.ActionInterval -local ProgressTo={ } -cc.ProgressTo=ProgressTo - - - - ----* brief Initializes with a duration and destination percentage.
----* param duration Specify the duration of the ProgressTo action. It's a value in seconds.
----* param percent Specify the destination percentage.
----* return If the creation success, return true; otherwise, return false. ----@param duration float ----@param percent float ----@return boolean -function ProgressTo:initWithDuration (duration,percent) end ----* brief Create and initializes with a duration and a destination percentage.
----* param duration Specify the duration of the ProgressTo action. It's a value in seconds.
----* param percent Specify the destination percentage.
----* return If the creation success, return a pointer of ProgressTo action; otherwise, return nil. ----@param duration float ----@param percent float ----@return self -function ProgressTo:create (duration,percent) end ----* ----@param target cc.Node ----@return self -function ProgressTo:startWithTarget (target) end ----* ----@return self -function ProgressTo:clone () end ----* ----@return self -function ProgressTo:reverse () end ----* ----@param time float ----@return self -function ProgressTo:update (time) end ----* ----@return self -function ProgressTo:ProgressTo () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Properties.lua b/meta/3rd/Cocos4.0/library/cc/Properties.lua deleted file mode 100644 index 60882306..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Properties.lua +++ /dev/null @@ -1,229 +0,0 @@ ----@meta - ----@class cc.Properties -local Properties={ } -cc.Properties=Properties - - - - ----* Returns the value of a variable that is set in this Properties object.
----* Variables take on the format ${name} and are inherited from parent Property objects.
----* param name Name of the variable to get.
----* param defaultValue Value to return if the variable is not found.
----* return The value of the specified variable, or defaultValue if not found. ----@param name char ----@param defaultValue char ----@return char -function Properties:getVariable (name,defaultValue) end ----* Get the value of the given property as a string. This can always be retrieved,
----* whatever the intended type of the property.
----* param name The name of the property to interpret, or NULL to return the current property's value.
----* param defaultValue The default value to return if the specified property does not exist.
----* return The value of the given property as a string, or the empty string if no property with that name exists. ----@return char -function Properties:getString () end ----* Interpret the value of the given property as a long integer.
----* If the property does not exist, zero will be returned.
----* If the property exists but could not be scanned, an error will be logged and zero will be returned.
----* param name The name of the property to interpret, or NULL to return the current property's value.
----* return The value of the given property interpreted as a long.
----* Zero if the property does not exist or could not be scanned. ----@return long -function Properties:getLong () end ----@overload fun():self ----@overload fun(char:char,boolean:boolean,boolean:boolean):self ----@param id char ----@param searchNames boolean ----@param recurse boolean ----@return self -function Properties:getNamespace (id,searchNames,recurse) end ----* Gets the file path for the given property if the file exists.
----* This method will first search for the file relative to the working directory.
----* If the file is not found then it will search relative to the directory the bundle file is in.
----* param name The name of the property.
----* param path The string to copy the path to if the file exists.
----* return True if the property exists and the file exists, false otherwise.
----* script{ignore} ----@param name char ----@param path string ----@return boolean -function Properties:getPath (name,path) end ----* Interpret the value of the given property as a Matrix.
----* If the property does not exist, out will be set to the identity matrix.
----* If the property exists but could not be scanned, an error will be logged and out will be set
----* to the identity matrix.
----* param name The name of the property to interpret, or NULL to return the current property's value.
----* param out The matrix to set to this property's interpreted value.
----* return True on success, false if the property does not exist or could not be scanned. ----@param name char ----@param out mat4_table ----@return boolean -function Properties:getMat4 (name,out) end ----* Check if a property with the given name is specified in this Properties object.
----* param name The name of the property to query.
----* return True if the property exists, false otherwise. ----@param name char ----@return boolean -function Properties:exists (name) end ----* Sets the value of the property with the specified name.
----* If there is no property in this namespace with the current name,
----* one is added. Otherwise, the value of the first property with the
----* specified name is updated.
----* If name is NULL, the value current property (see getNextProperty) is
----* set, unless there is no current property, in which case false
----* is returned.
----* param name The name of the property to set.
----* param value The property value.
----* return True if the property was set, false otherwise. ----@param name char ----@param value char ----@return boolean -function Properties:setString (name,value) end ----* Get the ID of this Property's namespace. The ID should be a unique identifier,
----* but its uniqueness is not enforced.
----* return The ID of this Property's namespace. ----@return char -function Properties:getId () end ----* Rewind the getNextProperty() and getNextNamespace() iterators
----* to the beginning of the file. ----@return self -function Properties:rewind () end ----* Sets the value of the specified variable.
----* param name Name of the variable to set.
----* param value The value to set. ----@param name char ----@param value char ----@return self -function Properties:setVariable (name,value) end ----* Interpret the value of the given property as a boolean.
----* param name The name of the property to interpret, or NULL to return the current property's value.
----* param defaultValue the default value to return if the specified property does not exist within the properties file.
----* return true if the property exists and its value is "true", otherwise false. ----@return boolean -function Properties:getBool () end ----@overload fun(char:char,vec3_table1:vec4_table):self ----@overload fun(char:char,vec3_table:vec3_table):self ----@param name char ----@param out vec3_table ----@return boolean -function Properties:getColor (name,out) end ----* Returns the type of a property.
----* param name The name of the property to interpret, or NULL to return the current property's type.
----* return The type of the property. ----@return int -function Properties:getType () end ----* Get the next namespace. ----@return self -function Properties:getNextNamespace () end ----* Interpret the value of the given property as an integer.
----* If the property does not exist, zero will be returned.
----* If the property exists but could not be scanned, an error will be logged and zero will be returned.
----* param name The name of the property to interpret, or NULL to return the current property's value.
----* return The value of the given property interpreted as an integer.
----* Zero if the property does not exist or could not be scanned. ----@return int -function Properties:getInt () end ----* Interpret the value of the given property as a Vector3.
----* If the property does not exist, out will be set to Vector3(0.0f, 0.0f, 0.0f).
----* If the property exists but could not be scanned, an error will be logged and out will be set
----* to Vector3(0.0f, 0.0f, 0.0f).
----* param name The name of the property to interpret, or NULL to return the current property's value.
----* param out The vector to set to this property's interpreted value.
----* return True on success, false if the property does not exist or could not be scanned. ----@param name char ----@param out vec3_table ----@return boolean -function Properties:getVec3 (name,out) end ----* Interpret the value of the given property as a Vector2.
----* If the property does not exist, out will be set to Vector2(0.0f, 0.0f).
----* If the property exists but could not be scanned, an error will be logged and out will be set
----* to Vector2(0.0f, 0.0f).
----* param name The name of the property to interpret, or NULL to return the current property's value.
----* param out The vector to set to this property's interpreted value.
----* return True on success, false if the property does not exist or could not be scanned. ----@param name char ----@param out vec2_table ----@return boolean -function Properties:getVec2 (name,out) end ----* Interpret the value of the given property as a Vector4.
----* If the property does not exist, out will be set to Vector4(0.0f, 0.0f, 0.0f, 0.0f).
----* If the property exists but could not be scanned, an error will be logged and out will be set
----* to Vector4(0.0f, 0.0f, 0.0f, 0.0f).
----* param name The name of the property to interpret, or NULL to return the current property's value.
----* param out The vector to set to this property's interpreted value.
----* return True on success, false if the property does not exist or could not be scanned. ----@param name char ----@param out vec4_table ----@return boolean -function Properties:getVec4 (name,out) end ----* Get the name of the next property.
----* If a valid next property is returned, the value of the property can be
----* retrieved using any of the get methods in this class, passing NULL for the property name.
----* return The name of the next property, or NULL if there are no properties remaining. ----@return char -function Properties:getNextProperty () end ----* Interpret the value of the given property as a floating-point number.
----* If the property does not exist, zero will be returned.
----* If the property exists but could not be scanned, an error will be logged and zero will be returned.
----* param name The name of the property to interpret, or NULL to return the current property's value.
----* return The value of the given property interpreted as a float.
----* Zero if the property does not exist or could not be scanned. ----@return float -function Properties:getFloat () end ----* Interpret the value of the given property as a Quaternion specified as an axis angle.
----* If the property does not exist, out will be set to Quaternion().
----* If the property exists but could not be scanned, an error will be logged and out will be set
----* to Quaternion().
----* param name The name of the property to interpret, or NULL to return the current property's value.
----* param out The quaternion to set to this property's interpreted value.
----* return True on success, false if the property does not exist or could not be scanned. ----@param name char ----@param out cc.Quaternion ----@return boolean -function Properties:getQuaternionFromAxisAngle (name,out) end ----@overload fun(char:char,vec3_table1:vec4_table):self ----@overload fun(char:char,vec3_table:vec3_table):self ----@param str char ----@param out vec3_table ----@return boolean -function Properties:parseColor (str,out) end ----* Attempts to parse the specified string as a Vector3 value.
----* On error, false is returned and the output is set to all zero values.
----* param str The string to parse.
----* param out The value to populate if successful.
----* return True if a valid Vector3 was parsed, false otherwise. ----@param str char ----@param out vec3_table ----@return boolean -function Properties:parseVec3 (str,out) end ----* Attempts to parse the specified string as an axis-angle value.
----* The specified string is expected to contain four comma-separated
----* values, where the first three values represents the axis and the
----* fourth value represents the angle, in degrees.
----* On error, false is returned and the output is set to all zero values.
----* param str The string to parse.
----* param out A Quaternion populated with the orientation of the axis-angle, if successful.
----* return True if a valid axis-angle was parsed, false otherwise. ----@param str char ----@param out cc.Quaternion ----@return boolean -function Properties:parseAxisAngle (str,out) end ----* Attempts to parse the specified string as a Vector2 value.
----* On error, false is returned and the output is set to all zero values.
----* param str The string to parse.
----* param out The value to populate if successful.
----* return True if a valid Vector2 was parsed, false otherwise. ----@param str char ----@param out vec2_table ----@return boolean -function Properties:parseVec2 (str,out) end ----* Attempts to parse the specified string as a Vector4 value.
----* On error, false is returned and the output is set to all zero values.
----* param str The string to parse.
----* param out The value to populate if successful.
----* return True if a valid Vector4 was parsed, false otherwise. ----@param str char ----@param out vec4_table ----@return boolean -function Properties:parseVec4 (str,out) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ProtectedNode.lua b/meta/3rd/Cocos4.0/library/cc/ProtectedNode.lua deleted file mode 100644 index c77f3f74..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ProtectedNode.lua +++ /dev/null @@ -1,99 +0,0 @@ ----@meta - ----@class cc.ProtectedNode :cc.Node -local ProtectedNode={ } -cc.ProtectedNode=ProtectedNode - - - - ----@overload fun(cc.Node:cc.Node,int:int):self ----@overload fun(cc.Node:cc.Node):self ----@overload fun(cc.Node:cc.Node,int:int,int:int):self ----@param child cc.Node ----@param localZOrder int ----@param tag int ----@return self -function ProtectedNode:addProtectedChild (child,localZOrder,tag) end ----* ----@return self -function ProtectedNode:disableCascadeColor () end ----* Removes a child from the container by tag value. It will also cleanup all running actions depending on the cleanup parameter.
----* param tag An integer number that identifies a child node.
----* param cleanup true if all running actions and callbacks on the child node will be cleanup, false otherwise. ----@param tag int ----@param cleanup boolean ----@return self -function ProtectedNode:removeProtectedChildByTag (tag,cleanup) end ----* Reorders a child according to a new z value.
----* param child An already added child node. It MUST be already added.
----* param localZOrder Z order for drawing priority. Please refer to setLocalZOrder(int) ----@param child cc.Node ----@param localZOrder int ----@return self -function ProtectedNode:reorderProtectedChild (child,localZOrder) end ----* Removes all children from the container, and do a cleanup to all running actions depending on the cleanup parameter.
----* param cleanup true if all running actions on all children nodes should be cleanup, false otherwise.
----* js removeAllChildren
----* lua removeAllChildren ----@param cleanup boolean ----@return self -function ProtectedNode:removeAllProtectedChildrenWithCleanup (cleanup) end ----* ----@return self -function ProtectedNode:disableCascadeOpacity () end ----* Sorts the children array once before drawing, instead of every time when a child is added or reordered.
----* This approach can improves the performance massively.
----* note Don't call this manually unless a child added needs to be removed in the same frame ----@return self -function ProtectedNode:sortAllProtectedChildren () end ----* Gets a child from the container with its tag.
----* param tag An identifier to find the child node.
----* return a Node object whose tag equals to the input parameter. ----@param tag int ----@return cc.Node -function ProtectedNode:getProtectedChildByTag (tag) end ----* Removes a child from the container. It will also cleanup all running actions depending on the cleanup parameter.
----* param child The child node which will be removed.
----* param cleanup true if all running actions and callbacks on the child node will be cleanup, false otherwise. ----@param child cc.Node ----@param cleanup boolean ----@return self -function ProtectedNode:removeProtectedChild (child,cleanup) end ----* Removes all children from the container with a cleanup.
----* see `removeAllChildrenWithCleanup(bool)`. ----@return self -function ProtectedNode:removeAllProtectedChildren () end ----* Creates a ProtectedNode with no argument.
----* return A instance of ProtectedNode. ----@return self -function ProtectedNode:create () end ----* ----@param mask unsigned short ----@param applyChildren boolean ----@return self -function ProtectedNode:setCameraMask (mask,applyChildren) end ----* ----@param globalZOrder float ----@return self -function ProtectedNode:setGlobalZOrder (globalZOrder) end ----* js NA ----@param renderer cc.Renderer ----@param parentTransform mat4_table ----@param parentFlags unsigned_int ----@return self -function ProtectedNode:visit (renderer,parentTransform,parentFlags) end ----* ----@param parentOpacity unsigned_char ----@return self -function ProtectedNode:updateDisplayedOpacity (parentOpacity) end ----* ----@param parentColor color3b_table ----@return self -function ProtectedNode:updateDisplayedColor (parentColor) end ----* ----@return self -function ProtectedNode:cleanup () end ----* ----@return self -function ProtectedNode:ProtectedNode () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Ref.lua b/meta/3rd/Cocos4.0/library/cc/Ref.lua deleted file mode 100644 index 2814940e..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Ref.lua +++ /dev/null @@ -1,28 +0,0 @@ ----@meta - ----@class cc.Ref -local Ref={ } -cc.Ref=Ref - - - - ----* Releases the ownership immediately.
----* This decrements the Ref's reference count.
----* If the reference count reaches 0 after the decrement, this Ref is
----* destructed.
----* see retain, autorelease
----* js NA ----@return self -function Ref:release () end ----* Retains the ownership.
----* This increases the Ref's reference count.
----* see release, autorelease
----* js NA ----@return self -function Ref:retain () end ----* Returns the Ref's current reference count.
----* returns The Ref's reference count.
----* js NA ----@return unsigned_int -function Ref:getReferenceCount () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/RemoveSelf.lua b/meta/3rd/Cocos4.0/library/cc/RemoveSelf.lua deleted file mode 100644 index c794a5e7..00000000 --- a/meta/3rd/Cocos4.0/library/cc/RemoveSelf.lua +++ /dev/null @@ -1,31 +0,0 @@ ----@meta - ----@class cc.RemoveSelf :cc.ActionInstant -local RemoveSelf={ } -cc.RemoveSelf=RemoveSelf - - - - ----* init the action ----@param isNeedCleanUp boolean ----@return boolean -function RemoveSelf:init (isNeedCleanUp) end ----* Create the action.
----* param isNeedCleanUp Is need to clean up, the default value is true.
----* return An autoreleased RemoveSelf object. ----@return self -function RemoveSelf:create () end ----* ----@return self -function RemoveSelf:clone () end ----* param time In seconds. ----@param time float ----@return self -function RemoveSelf:update (time) end ----* ----@return self -function RemoveSelf:reverse () end ----* ----@return self -function RemoveSelf:RemoveSelf () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/RenderState.lua b/meta/3rd/Cocos4.0/library/cc/RenderState.lua deleted file mode 100644 index 40c0dcec..00000000 --- a/meta/3rd/Cocos4.0/library/cc/RenderState.lua +++ /dev/null @@ -1,18 +0,0 @@ ----@meta - ----@class cc.RenderState :cc.Ref -local RenderState={ } -cc.RenderState=RenderState - - - - ----* ----@return string -function RenderState:getName () end ----* Binds the render state for this RenderState and any of its parents, top-down,
----* for the given pass. ----@param pass cc.Pass ----@param d cc.MeshComman ----@return self -function RenderState:bindPass (pass,d) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/RenderTexture.lua b/meta/3rd/Cocos4.0/library/cc/RenderTexture.lua deleted file mode 100644 index 9b9a889b..00000000 --- a/meta/3rd/Cocos4.0/library/cc/RenderTexture.lua +++ /dev/null @@ -1,169 +0,0 @@ ----@meta - ----@class cc.RenderTexture :cc.Node -local RenderTexture={ } -cc.RenderTexture=RenderTexture - - - - ----* Used for grab part of screen to a texture.
----* param rtBegin The position of renderTexture on the fullRect.
----* param fullRect The total size of screen.
----* param fullViewport The total viewportSize. ----@param rtBegin vec2_table ----@param fullRect rect_table ----@param fullViewport rect_table ----@return self -function RenderTexture:setVirtualViewport (rtBegin,fullRect,fullViewport) end ----* Clears the texture with a specified stencil value.
----* param stencilValue A specified stencil value. ----@param stencilValue int ----@return self -function RenderTexture:clearStencil (stencilValue) end ----* Value for clearDepth. Valid only when "autoDraw" is true.
----* return Value for clearDepth. ----@return float -function RenderTexture:getClearDepth () end ----* Value for clear Stencil. Valid only when "autoDraw" is true.
----* return Value for clear Stencil. ----@return int -function RenderTexture:getClearStencil () end ----* Set Value for clear Stencil.
----* param clearStencil Value for clear Stencil. ----@param clearStencil int ----@return self -function RenderTexture:setClearStencil (clearStencil) end ----* Sets the Sprite being used.
----* param sprite A Sprite. ----@param sprite cc.Sprite ----@return self -function RenderTexture:setSprite (sprite) end ----* Gets the Sprite being used.
----* return A Sprite. ----@return cc.Sprite -function RenderTexture:getSprite () end ----* When enabled, it will render its children into the texture automatically. Disabled by default for compatibility reasons.
----* Will be enabled in the future.
----* return Return the autoDraw value. ----@return boolean -function RenderTexture:isAutoDraw () end ----@overload fun(string:string,int:int,boolean:boolean,function:function):self ----@overload fun(string:string,int1:boolean,boolean2:function):self ----@param fileName string ----@param format int ----@param isRGBA boolean ----@param callback function ----@return boolean -function RenderTexture:saveToFileAsNonPMA (fileName,format,isRGBA,callback) end ----* Flag: Use stack matrix computed from scene hierarchy or generate new modelView and projection matrix.
----* param keepMatrix Whether or not use stack matrix computed from scene hierarchy or generate new modelView and projection matrix.
----* js NA ----@param keepMatrix boolean ----@return self -function RenderTexture:setKeepMatrix (keepMatrix) end ----* Set flags.
----* param clearFlags set clear flags. ----@param clearFlags int ----@return self -function RenderTexture:setClearFlags (clearFlags) end ----* Starts grabbing. ----@return self -function RenderTexture:begin () end ----@overload fun(string:string,int:int,boolean:boolean,function:function):self ----@overload fun(string:string,int1:boolean,boolean2:function):self ----@param filename string ----@param format int ----@param isRGBA boolean ----@param callback function ----@return boolean -function RenderTexture:saveToFile (filename,format,isRGBA,callback) end ----* Set a valve to control whether or not render its children into the texture automatically.
----* param isAutoDraw Whether or not render its children into the texture automatically. ----@param isAutoDraw boolean ----@return self -function RenderTexture:setAutoDraw (isAutoDraw) end ----* Set color value.
----* param clearColor Color value. ----@param clearColor color4f_table ----@return self -function RenderTexture:setClearColor (clearColor) end ----* Ends grabbing.
----* lua endToLua ----@return self -function RenderTexture:endToLua () end ----@overload fun(float:float,float:float,float:float,float:float,float:float):self ----@overload fun(float:float,float:float,float:float,float:float):self ----@overload fun(float:float,float:float,float:float,float:float,float:float,int:int):self ----@param r float ----@param g float ----@param b float ----@param a float ----@param depthValue float ----@param stencilValue int ----@return self -function RenderTexture:beginWithClear (r,g,b,a,depthValue,stencilValue) end ----* Clears the texture with a specified depth value.
----* param depthValue A specified depth value. ----@param depthValue float ----@return self -function RenderTexture:clearDepth (depthValue) end ----* Clear color value. Valid only when "autoDraw" is true.
----* return Color value. ----@return color4f_table -function RenderTexture:getClearColor () end ----* Clears the texture with a color.
----* param r Red.
----* param g Green.
----* param b Blue.
----* param a Alpha. ----@param r float ----@param g float ----@param b float ----@param a float ----@return self -function RenderTexture:clear (r,g,b,a) end ----* Valid when "autoDraw" is true.
----* return Clear flags. ----@return int -function RenderTexture:getClearFlags () end ----* Set Value for clearDepth.
----* param clearDepth Value for clearDepth. ----@param clearDepth float ----@return self -function RenderTexture:setClearDepth (clearDepth) end ----@overload fun(int:int,int:int,int:int,int:int):self ----@overload fun(int:int,int:int,int:int):self ----@param w int ----@param h int ----@param format int ----@param depthStencilFormat int ----@return boolean -function RenderTexture:initWithWidthAndHeight (w,h,format,depthStencilFormat) end ----@overload fun(int:int,int:int,int:int):self ----@overload fun(int:int,int:int,int:int,int:int):self ----@overload fun(int:int,int:int):self ----@param w int ----@param h int ----@param format int ----@param depthStencilFormat int ----@return self -function RenderTexture:create (w,h,format,depthStencilFormat) end ----* ----@param renderer cc.Renderer ----@param transform mat4_table ----@param flags unsigned_int ----@return self -function RenderTexture:draw (renderer,transform,flags) end ----* ----@param renderer cc.Renderer ----@param parentTransform mat4_table ----@param parentFlags unsigned_int ----@return self -function RenderTexture:visit (renderer,parentTransform,parentFlags) end ----* FIXME: should be protected.
----* but due to a bug in PowerVR + Android,
----* the constructor is public again.
----* js ctor ----@return self -function RenderTexture:RenderTexture () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Renderer.lua b/meta/3rd/Cocos4.0/library/cc/Renderer.lua deleted file mode 100644 index 0e00c762..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Renderer.lua +++ /dev/null @@ -1,254 +0,0 @@ ----@meta - ----@class cc.Renderer -local Renderer={ } -cc.Renderer=Renderer - - - - ----* Get winding mode.
----* return The winding mode. ----@return int -function Renderer:getWinding () end ----* ----@return int -function Renderer:getDrawnVertices () end ----* Renders into the GLView all the queued `RenderCommand` objects ----@return self -function Renderer:render () end ----* Creates a render queue and returns its Id ----@return int -function Renderer:createRenderQueue () end ----* Get whether stencil test is enabled or not.
----* return true if stencil test is enabled, false otherwise. ----@return boolean -function Renderer:getStencilTest () end ----* Get the render target flag.
----* return The render target flag. ----@return int -function Renderer:getRenderTargetFlag () end ----* Get the clear flag.
----* return The clear flag. ----@return int -function Renderer:getClearFlag () end ----* Get stencil reference value set by `setStencilCompareFunction`.
----* return Stencil reference value.
----* see `setStencilCompareFunction(backend::CompareFunction func, unsigned int ref, unsigned int readMask)` ----@return unsigned_int -function Renderer:getStencilReferenceValue () end ----* Get stencil attachment.
----* return Stencil attachment. ----@return cc.Texture2D -function Renderer:getStencilAttachment () end ----* Fixed-function state
----* param x The x coordinate of the upper-left corner of the viewport.
----* param y The y coordinate of the upper-left corner of the viewport.
----* param w The width of the viewport, in pixels.
----* param h The height of the viewport, in pixels. ----@param x int ----@param y int ----@param w unsigned_int ----@param h unsigned_int ----@return self -function Renderer:setViewPort (x,y,w,h) end ----* Get the stencil readMask.
----* return Stencil read mask.
----* see `setStencilCompareFunction(backend::CompareFunction func, unsigned int ref, unsigned int readMask)` ----@return unsigned_int -function Renderer:getStencilReadMask () end ----* Get depth clear value.
----* return Depth clear value. ----@return float -function Renderer:getClearDepth () end ----* Set front and back function and reference value for stencil testing.
----* param func Specifies the stencil test function.
----* param ref Specifies the reference value for the stencil test.
----* readMask Specifies a mask that is ANDed with both the reference value and the stored stencil value when the test is done. ----@param func int ----@param ref unsigned_int ----@param readMask unsigned_int ----@return self -function Renderer:setStencilCompareFunction (func,ref,readMask) end ----* / Get viewport. ----@return cc.Viewport -function Renderer:getViewport () end ----* Get the index when the stencil buffer is cleared.
----* return The index used when the stencil buffer is cleared. ----@return unsigned_int -function Renderer:getClearStencil () end ----* Enable/disable stencil test.
----* param value true means enable stencil test, otherwise false. ----@param value boolean ----@return self -function Renderer:setStencilTest (value) end ----* / Get the action to take when the stencil test fails. ----@return int -function Renderer:getStencilFailureOperation () end ----* Get color attachment.
----* return Color attachment. ----@return cc.Texture2D -function Renderer:getColorAttachment () end ----@overload fun(cc.RenderCommand:cc.RenderCommand,int:int):self ----@overload fun(cc.RenderCommand:cc.RenderCommand):self ----@param command cc.RenderCommand ----@param renderQueueID int ----@return self -function Renderer:addCommand (command,renderQueueID) end ----* Enable/disable depth test.
----* param value true means enable depth test, otherwise false. ----@param value boolean ----@return self -function Renderer:setDepthTest (value) end ----* Fixed-function state
----* param x, y Specifies the lower left corner of the scissor box
----* param wdith Specifies the width of the scissor box
----* param height Specifies the height of the scissor box ----@param x float ----@param y float ----@param width float ----@param height float ----@return self -function Renderer:setScissorRect (x,y,width,height) end ----* Get whether depth test state is enabled or disabled.
----* return true if depth test is enabled, otherwise false. ----@return boolean -function Renderer:getDepthTest () end ----* ----@return self -function Renderer:init () end ----* Enable/disable to update depth buffer.
----* param value true means enable writing into the depth buffer, otherwise false. ----@param value boolean ----@return self -function Renderer:setDepthWrite (value) end ----* / Get the stencil action when the stencil test passes, but the depth test fails. ----@return int -function Renderer:getStencilPassDepthFailureOperation () end ----* Fixed-function state
----* param mode Controls if primitives are culled when front facing, back facing, or not culled at all. ----@param mode int ----@return self -function Renderer:setCullMode (mode) end ----* Pops a group from the render queue ----@return self -function Renderer:popGroup () end ----* Pushes a group into the render queue ----@param renderQueueID int ----@return self -function Renderer:pushGroup (renderQueueID) end ----* ----@return cc.ScissorRect -function Renderer:getScissorRect () end ----* ----@return boolean -function Renderer:getScissorTest () end ----* Get the stencil write mask.
----* return Stencil write mask.
----* see `setStencilWriteMask(unsigned int mask)` ----@return unsigned_int -function Renderer:getStencilWriteMask () end ----* ----@param number int ----@return self -function Renderer:addDrawnBatches (number) end ----* returns whether or not a rectangle is visible or not ----@param transform mat4_table ----@param size size_table ----@return boolean -function Renderer:checkVisibility (transform,size) end ----* Set front and back stencil test actions.
----* param stencilFailureOp Specifies the action to take when the stencil test fails.
----* param depthFailureOp Specifies the stencil action when the stencil test passes, but the depth test fails.
----* param stencilDepthPassOp Specifies the stencil action when both the stencil test and the depth test pass, or when the stencil test passes and either there is no depth buffer or depth testing is not enabled. ----@param stencilFailureOp int ----@param depthFailureOp int ----@param stencilDepthPassOp int ----@return self -function Renderer:setStencilOperation (stencilFailureOp,depthFailureOp,stencilDepthPassOp) end ----* Get whether writing to depth buffer is enabled or not.
----* return true if enable writing into the depth buffer, false otherwise. ----@return boolean -function Renderer:getDepthWrite () end ----* Get cull mode.
----* return The cull mode. ----@return int -function Renderer:getCullMode () end ----* / Get the stencil test function. ----@return int -function Renderer:getStencilCompareFunction () end ----* Get color clear value.
----* return Color clear value. ----@return color4f_table -function Renderer:getClearColor () end ----* Set depth compare function.
----* param func Specifies the value used for depth buffer comparisons. ----@param func int ----@return self -function Renderer:setDepthCompareFunction (func) end ----* Control the front and back writing of individual bits in the stencil planes.
----* param mask Specifies a bit mask to enable and disable writing of individual bits in the stencil planes. ----@param mask unsigned_int ----@return self -function Renderer:setStencilWriteMask (mask) end ----* / Get the stencil action when both the stencil test and the depth test pass, or when the stencil test passes and either there is no depth buffer or depth testing is not enabled. ----@return int -function Renderer:getStencilDepthPassOperation () end ----* Enable/disable scissor test.
----* param enabled true if enable scissor test, false otherwise. ----@param enabled boolean ----@return self -function Renderer:setScissorTest (enabled) end ----* Fixed-function state
----* param winding The winding order of front-facing primitives. ----@param winding int ----@return self -function Renderer:setWinding (winding) end ----* Set clear values for each attachment.
----* flags Flags to indicate which attachment clear value to be modified.
----* color The clear color value.
----* depth The clear depth value.
----* stencil The clear stencil value. ----@param flags int ----@param color color4f_table ----@param depth float ----@param stencil unsigned_int ----@param globalOrder float ----@return self -function Renderer:clear (flags,color,depth,stencil,globalOrder) end ----* Set render targets. If not set, will use default render targets. It will effect all commands.
----* flags Flags to indicate which attachment to be replaced.
----* colorAttachment The value to replace color attachment, only one color attachment supported now.
----* depthAttachment The value to repalce depth attachment.
----* stencilAttachment The value to replace stencil attachment. Depth attachment and stencil attachment
----* can be the same value. ----@param flags int ----@param colorAttachment cc.Texture2D ----@param depthAttachment cc.Texture2D ----@param stencilAttachment cc.Texture2D ----@return self -function Renderer:setRenderTarget (flags,colorAttachment,depthAttachment,stencilAttachment) end ----* Get depth attachment.
----* return Depth attachment. ----@return cc.Texture2D -function Renderer:getDepthAttachment () end ----* ----@param number int ----@return self -function Renderer:addDrawnVertices (number) end ----* Cleans all `RenderCommand`s in the queue ----@return self -function Renderer:clean () end ----* ----@return int -function Renderer:getDrawnBatches () end ----* ----@return self -function Renderer:clearDrawStats () end ----* Get depth compare function.
----* return Depth compare function. ----@return int -function Renderer:getDepthCompareFunction () end ----* Constructor. ----@return self -function Renderer:Renderer () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Repeat.lua b/meta/3rd/Cocos4.0/library/cc/Repeat.lua deleted file mode 100644 index 099ec2a9..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Repeat.lua +++ /dev/null @@ -1,54 +0,0 @@ ----@meta - ----@class cc.Repeat :cc.ActionInterval -local Repeat={ } -cc.Repeat=Repeat - - - - ----* Sets the inner action.
----* param action The inner action. ----@param action cc.FiniteTimeAction ----@return self -function Repeat:setInnerAction (action) end ----* initializes a Repeat action. Times is an unsigned integer between 1 and pow(2,30) ----@param pAction cc.FiniteTimeAction ----@param times unsigned_int ----@return boolean -function Repeat:initWithAction (pAction,times) end ----* Gets the inner action.
----* return The inner action. ----@return cc.FiniteTimeAction -function Repeat:getInnerAction () end ----* Creates a Repeat action. Times is an unsigned integer between 1 and pow(2,30).
----* param action The action needs to repeat.
----* param times The repeat times.
----* return An autoreleased Repeat object. ----@param action cc.FiniteTimeAction ----@param times unsigned_int ----@return self -function Repeat:create (action,times) end ----* ----@param target cc.Node ----@return self -function Repeat:startWithTarget (target) end ----* ----@return self -function Repeat:reverse () end ----* ----@return self -function Repeat:clone () end ----* ----@return self -function Repeat:stop () end ----* param dt In seconds. ----@param dt float ----@return self -function Repeat:update (dt) end ----* ----@return boolean -function Repeat:isDone () end ----* ----@return self -function Repeat:Repeat () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/RepeatForever.lua b/meta/3rd/Cocos4.0/library/cc/RepeatForever.lua deleted file mode 100644 index f4c0962a..00000000 --- a/meta/3rd/Cocos4.0/library/cc/RepeatForever.lua +++ /dev/null @@ -1,48 +0,0 @@ ----@meta - ----@class cc.RepeatForever :cc.ActionInterval -local RepeatForever={ } -cc.RepeatForever=RepeatForever - - - - ----* Sets the inner action.
----* param action The inner action. ----@param action cc.ActionInterval ----@return self -function RepeatForever:setInnerAction (action) end ----* initializes the action ----@param action cc.ActionInterval ----@return boolean -function RepeatForever:initWithAction (action) end ----* Gets the inner action.
----* return The inner action. ----@return cc.ActionInterval -function RepeatForever:getInnerAction () end ----* Creates the action.
----* param action The action need to repeat forever.
----* return An autoreleased RepeatForever object. ----@param action cc.ActionInterval ----@return self -function RepeatForever:create (action) end ----* ----@param target cc.Node ----@return self -function RepeatForever:startWithTarget (target) end ----* ----@return self -function RepeatForever:clone () end ----* ----@return boolean -function RepeatForever:isDone () end ----* ----@return self -function RepeatForever:reverse () end ----* param dt In seconds. ----@param dt float ----@return self -function RepeatForever:step (dt) end ----* ----@return self -function RepeatForever:RepeatForever () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ReuseGrid.lua b/meta/3rd/Cocos4.0/library/cc/ReuseGrid.lua deleted file mode 100644 index 8b727e8f..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ReuseGrid.lua +++ /dev/null @@ -1,34 +0,0 @@ ----@meta - ----@class cc.ReuseGrid :cc.ActionInstant -local ReuseGrid={ } -cc.ReuseGrid=ReuseGrid - - - - ----* brief Initializes an action with the number of times that the current grid will be reused.
----* param times Specify times the grid will be reused.
----* return If the initialization success, return true; otherwise, return false. ----@param times int ----@return boolean -function ReuseGrid:initWithTimes (times) end ----* brief Create an action with the number of times that the current grid will be reused.
----* param times Specify times the grid will be reused.
----* return Return a pointer of ReuseGrid. When the creation failed, return nil. ----@param times int ----@return self -function ReuseGrid:create (times) end ----* ----@param target cc.Node ----@return self -function ReuseGrid:startWithTarget (target) end ----* ----@return self -function ReuseGrid:clone () end ----* ----@return self -function ReuseGrid:reverse () end ----* ----@return self -function ReuseGrid:ReuseGrid () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Ripple3D.lua b/meta/3rd/Cocos4.0/library/cc/Ripple3D.lua deleted file mode 100644 index a49579c3..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Ripple3D.lua +++ /dev/null @@ -1,78 +0,0 @@ ----@meta - ----@class cc.Ripple3D :cc.Grid3DAction -local Ripple3D={ } -cc.Ripple3D=Ripple3D - - - - ----* brief Set the amplitude rate of ripple effect.
----* param fAmplitudeRate The amplitude rate of ripple effect. ----@param fAmplitudeRate float ----@return self -function Ripple3D:setAmplitudeRate (fAmplitudeRate) end ----* brief Initializes the action with center position, radius, number of waves, amplitude, a grid size and duration.
----* param duration Specify the duration of the Ripple3D action. It's a value in seconds.
----* param gridSize Specify the size of the grid.
----* param position Specify the center position of the ripple effect.
----* param radius Specify the radius of the ripple effect.
----* param waves Specify the waves count of the ripple effect.
----* param amplitude Specify the amplitude of the ripple effect.
----* return If the initialization success, return true; otherwise, return false. ----@param duration float ----@param gridSize size_table ----@param position vec2_table ----@param radius float ----@param waves unsigned_int ----@param amplitude float ----@return boolean -function Ripple3D:initWithDuration (duration,gridSize,position,radius,waves,amplitude) end ----* brief Get the amplitude rate of ripple effect.
----* return The amplitude rate of ripple effect. ----@return float -function Ripple3D:getAmplitudeRate () end ----* brief Set the amplitude of ripple effect.
----* param fAmplitude The amplitude of ripple effect. ----@param fAmplitude float ----@return self -function Ripple3D:setAmplitude (fAmplitude) end ----* brief Get the amplitude of ripple effect.
----* return The amplitude of ripple effect. ----@return float -function Ripple3D:getAmplitude () end ----* brief Set the center position of ripple effect.
----* param position The center position of ripple effect will be set. ----@param position vec2_table ----@return self -function Ripple3D:setPosition (position) end ----* brief Get the center position of ripple effect.
----* return The center position of ripple effect. ----@return vec2_table -function Ripple3D:getPosition () end ----* brief Create the action with center position, radius, number of waves, amplitude, a grid size and duration.
----* param duration Specify the duration of the Ripple3D action. It's a value in seconds.
----* param gridSize Specify the size of the grid.
----* param position Specify the center position of the ripple effect.
----* param radius Specify the radius of the ripple effect.
----* param waves Specify the waves count of the ripple effect.
----* param amplitude Specify the amplitude of the ripple effect.
----* return If the creation success, return a pointer of Ripple3D action; otherwise, return nil. ----@param duration float ----@param gridSize size_table ----@param position vec2_table ----@param radius float ----@param waves unsigned_int ----@param amplitude float ----@return self -function Ripple3D:create (duration,gridSize,position,radius,waves,amplitude) end ----* ----@return self -function Ripple3D:clone () end ----* ----@param time float ----@return self -function Ripple3D:update (time) end ----* ----@return self -function Ripple3D:Ripple3D () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/RotateBy.lua b/meta/3rd/Cocos4.0/library/cc/RotateBy.lua deleted file mode 100644 index 1e4a156e..00000000 --- a/meta/3rd/Cocos4.0/library/cc/RotateBy.lua +++ /dev/null @@ -1,42 +0,0 @@ ----@meta - ----@class cc.RotateBy :cc.ActionInterval -local RotateBy={ } -cc.RotateBy=RotateBy - - - - ----@overload fun(float:float,float:float,float:float):self ----@overload fun(float:float,float:float):self ----@overload fun(float:float,float1:vec3_table):self ----@param duration float ----@param deltaAngleZ_X float ----@param deltaAngleZ_Y float ----@return boolean -function RotateBy:initWithDuration (duration,deltaAngleZ_X,deltaAngleZ_Y) end ----@overload fun(float:float,float:float,float:float):self ----@overload fun(float:float,float:float):self ----@overload fun(float:float,float1:vec3_table):self ----@param duration float ----@param deltaAngleZ_X float ----@param deltaAngleZ_Y float ----@return self -function RotateBy:create (duration,deltaAngleZ_X,deltaAngleZ_Y) end ----* ----@param target cc.Node ----@return self -function RotateBy:startWithTarget (target) end ----* ----@return self -function RotateBy:clone () end ----* ----@return self -function RotateBy:reverse () end ----* param time In seconds. ----@param time float ----@return self -function RotateBy:update (time) end ----* ----@return self -function RotateBy:RotateBy () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/RotateTo.lua b/meta/3rd/Cocos4.0/library/cc/RotateTo.lua deleted file mode 100644 index ba78b870..00000000 --- a/meta/3rd/Cocos4.0/library/cc/RotateTo.lua +++ /dev/null @@ -1,41 +0,0 @@ ----@meta - ----@class cc.RotateTo :cc.ActionInterval -local RotateTo={ } -cc.RotateTo=RotateTo - - - - ----@overload fun(float:float,float1:vec3_table):self ----@overload fun(float:float,float:float,float:float):self ----@param duration float ----@param dstAngleX float ----@param dstAngleY float ----@return boolean -function RotateTo:initWithDuration (duration,dstAngleX,dstAngleY) end ----@overload fun(float:float,float:float):self ----@overload fun(float:float,float:float,float:float):self ----@overload fun(float:float,float1:vec3_table):self ----@param duration float ----@param dstAngleX float ----@param dstAngleY float ----@return self -function RotateTo:create (duration,dstAngleX,dstAngleY) end ----* ----@param target cc.Node ----@return self -function RotateTo:startWithTarget (target) end ----* ----@return self -function RotateTo:clone () end ----* ----@return self -function RotateTo:reverse () end ----* param time In seconds. ----@param time float ----@return self -function RotateTo:update (time) end ----* ----@return self -function RotateTo:RotateTo () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ScaleBy.lua b/meta/3rd/Cocos4.0/library/cc/ScaleBy.lua deleted file mode 100644 index 1913930e..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ScaleBy.lua +++ /dev/null @@ -1,31 +0,0 @@ ----@meta - ----@class cc.ScaleBy :cc.ScaleTo -local ScaleBy={ } -cc.ScaleBy=ScaleBy - - - - ----@overload fun(float:float,float:float,float:float):self ----@overload fun(float:float,float:float):self ----@overload fun(float:float,float:float,float:float,float:float):self ----@param duration float ----@param sx float ----@param sy float ----@param sz float ----@return self -function ScaleBy:create (duration,sx,sy,sz) end ----* ----@param target cc.Node ----@return self -function ScaleBy:startWithTarget (target) end ----* ----@return self -function ScaleBy:clone () end ----* ----@return self -function ScaleBy:reverse () end ----* ----@return self -function ScaleBy:ScaleBy () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ScaleTo.lua b/meta/3rd/Cocos4.0/library/cc/ScaleTo.lua deleted file mode 100644 index 3fc15b4f..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ScaleTo.lua +++ /dev/null @@ -1,44 +0,0 @@ ----@meta - ----@class cc.ScaleTo :cc.ActionInterval -local ScaleTo={ } -cc.ScaleTo=ScaleTo - - - - ----@overload fun(float:float,float:float,float:float):self ----@overload fun(float:float,float:float):self ----@overload fun(float:float,float:float,float:float,float:float):self ----@param duration float ----@param sx float ----@param sy float ----@param sz float ----@return boolean -function ScaleTo:initWithDuration (duration,sx,sy,sz) end ----@overload fun(float:float,float:float,float:float):self ----@overload fun(float:float,float:float):self ----@overload fun(float:float,float:float,float:float,float:float):self ----@param duration float ----@param sx float ----@param sy float ----@param sz float ----@return self -function ScaleTo:create (duration,sx,sy,sz) end ----* ----@param target cc.Node ----@return self -function ScaleTo:startWithTarget (target) end ----* ----@return self -function ScaleTo:clone () end ----* ----@return self -function ScaleTo:reverse () end ----* param time In seconds. ----@param time float ----@return self -function ScaleTo:update (time) end ----* ----@return self -function ScaleTo:ScaleTo () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Scene.lua b/meta/3rd/Cocos4.0/library/cc/Scene.lua deleted file mode 100644 index 0a44a14e..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Scene.lua +++ /dev/null @@ -1,75 +0,0 @@ ----@meta - ----@class cc.Scene :cc.Node -local Scene={ } -cc.Scene=Scene - - - - ----* ----@return boolean -function Scene:initWithPhysics () end ----* ----@return self -function Scene:setCameraOrderDirty () end ----* Render the scene.
----* param renderer The renderer use to render the scene.
----* param eyeTransform The AdditionalTransform of camera.
----* param eyeProjection The projection matrix of camera.
----* js NA ----@param renderer cc.Renderer ----@param eyeTransform mat4_table ----@param eyeProjection mat4_table ----@return self -function Scene:render (renderer,eyeTransform,eyeProjection) end ----* ----@param deltaTime float ----@return self -function Scene:stepPhysicsAndNavigation (deltaTime) end ----* ----@param event cc.EventCustom ----@return self -function Scene:onProjectionChanged (event) end ----* Get the physics world of the scene.
----* return The physics world of the scene.
----* js NA ----@return cc.PhysicsWorld -function Scene:getPhysicsWorld () end ----* ----@param size size_table ----@return boolean -function Scene:initWithSize (size) end ----* Get the default camera.
----* js NA
----* return The default camera of scene. ----@return cc.Camera -function Scene:getDefaultCamera () end ----* Creates a new Scene object with a predefined Size.
----* param size The predefined size of scene.
----* return An autoreleased Scene object.
----* js NA ----@param size size_table ----@return self -function Scene:createWithSize (size) end ----* Creates a new Scene object.
----* return An autoreleased Scene object. ----@return self -function Scene:create () end ----* Create a scene with physics.
----* return An autoreleased Scene object with physics.
----* js NA ----@return self -function Scene:createWithPhysics () end ----* ----@return boolean -function Scene:init () end ----* ----@return string -function Scene:getDescription () end ----* override function ----@return self -function Scene:removeAllChildren () end ----* ----@return self -function Scene:Scene () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Scheduler.lua b/meta/3rd/Cocos4.0/library/cc/Scheduler.lua deleted file mode 100644 index 93810725..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Scheduler.lua +++ /dev/null @@ -1,33 +0,0 @@ ----@meta - ----@class cc.Scheduler :cc.Ref -local Scheduler={ } -cc.Scheduler=Scheduler - - - - ----* Modifies the time of all scheduled callbacks.
----* You can use this property to create a 'slow motion' or 'fast forward' effect.
----* Default is 1.0. To create a 'slow motion' effect, use values below 1.0.
----* To create a 'fast forward' effect, use values higher than 1.0.
----* since v0.8
----* warning It will affect EVERY scheduled selector / action. ----@param timeScale float ----@return self -function Scheduler:setTimeScale (timeScale) end ----* Remove all pending functions queued to be performed with Scheduler::performFunctionInCocosThread
----* Functions unscheduled in this manner will not be executed
----* This function is thread safe
----* since v3.14
----* js NA ----@return self -function Scheduler:removeAllFunctionsToBePerformedInCocosThread () end ----* Gets the time scale of schedule callbacks.
----* see Scheduler::setTimeScale() ----@return float -function Scheduler:getTimeScale () end ----* Constructor
----* js ctor ----@return self -function Scheduler:Scheduler () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Sequence.lua b/meta/3rd/Cocos4.0/library/cc/Sequence.lua deleted file mode 100644 index 9624f70e..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Sequence.lua +++ /dev/null @@ -1,41 +0,0 @@ ----@meta - ----@class cc.Sequence :cc.ActionInterval -local Sequence={ } -cc.Sequence=Sequence - - - - ----* ----@param arrayOfActions array_table ----@return boolean -function Sequence:init (arrayOfActions) end ----* initializes the action ----@param pActionOne cc.FiniteTimeAction ----@param pActionTwo cc.FiniteTimeAction ----@return boolean -function Sequence:initWithTwoActions (pActionOne,pActionTwo) end ----* ----@param target cc.Node ----@return self -function Sequence:startWithTarget (target) end ----* ----@return self -function Sequence:reverse () end ----* ----@return self -function Sequence:clone () end ----* ----@return self -function Sequence:stop () end ----* param t In seconds. ----@param t float ----@return self -function Sequence:update (t) end ----* ----@return boolean -function Sequence:isDone () end ----* ----@return self -function Sequence:Sequence () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ShaderCache.lua b/meta/3rd/Cocos4.0/library/cc/ShaderCache.lua deleted file mode 100644 index e27a855b..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ShaderCache.lua +++ /dev/null @@ -1,30 +0,0 @@ ----@meta - ----@class cc.ShaderCache :cc.Ref -local ShaderCache={ } -cc.ShaderCache=ShaderCache - - - - ----* Remove all unused shaders. ----@return cc.backend.ShaderCache -function ShaderCache:removeUnusedShader () end ----* purges the cache. It releases the retained instance. ----@return cc.backend.ShaderCache -function ShaderCache:destroyInstance () end ----* Create a vertex shader module and add it to cache.
----* If it is created before, then just return the cached shader module.
----* param shaderSource The source code of the shader. ----@param shaderSource string ----@return cc.backend.ShaderModule -function ShaderCache:newVertexShaderModule (shaderSource) end ----* Create a fragment shader module.
----* If it is created before, then just return the cached shader module.
----* param shaderSource The source code of the shader. ----@param shaderSource string ----@return cc.backend.ShaderModule -function ShaderCache:newFragmentShaderModule (shaderSource) end ----* returns the shared instance ----@return cc.backend.ShaderCache -function ShaderCache:getInstance () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Shaky3D.lua b/meta/3rd/Cocos4.0/library/cc/Shaky3D.lua deleted file mode 100644 index 187c10cd..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Shaky3D.lua +++ /dev/null @@ -1,43 +0,0 @@ ----@meta - ----@class cc.Shaky3D :cc.Grid3DAction -local Shaky3D={ } -cc.Shaky3D=Shaky3D - - - - ----* brief Initializes the action with a range, shake Z vertices, grid size and duration.
----* param duration Specify the duration of the Shaky3D action. It's a value in seconds.
----* param gridSize Specify the size of the grid.
----* param range Specify the range of the shaky effect.
----* param shakeZ Specify whether shake on the z axis.
----* return If the Initialization success, return true; otherwise, return false. ----@param duration float ----@param gridSize size_table ----@param range int ----@param shakeZ boolean ----@return boolean -function Shaky3D:initWithDuration (duration,gridSize,range,shakeZ) end ----* brief Create the action with a range, shake Z vertices, a grid and duration.
----* param initWithDuration Specify the duration of the Shaky3D action. It's a value in seconds.
----* param gridSize Specify the size of the grid.
----* param range Specify the range of the shaky effect.
----* param shakeZ Specify whether shake on the z axis.
----* return If the creation success, return a pointer of Shaky3D action; otherwise, return nil. ----@param initWithDuration float ----@param gridSize size_table ----@param range int ----@param shakeZ boolean ----@return self -function Shaky3D:create (initWithDuration,gridSize,range,shakeZ) end ----* ----@return self -function Shaky3D:clone () end ----* ----@param time float ----@return self -function Shaky3D:update (time) end ----* ----@return self -function Shaky3D:Shaky3D () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ShakyTiles3D.lua b/meta/3rd/Cocos4.0/library/cc/ShakyTiles3D.lua deleted file mode 100644 index bdc5cc37..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ShakyTiles3D.lua +++ /dev/null @@ -1,43 +0,0 @@ ----@meta - ----@class cc.ShakyTiles3D :cc.TiledGrid3DAction -local ShakyTiles3D={ } -cc.ShakyTiles3D=ShakyTiles3D - - - - ----* brief Initializes the action with a range, shake Z vertices, grid size and duration.
----* param duration Specify the duration of the ShakyTiles3D action. It's a value in seconds.
----* param gridSize Specify the size of the grid.
----* param range Specify the range of the shaky effect.
----* param shakeZ Specify whether shake on the z axis.
----* return If the Initialization success, return true; otherwise, return false. ----@param duration float ----@param gridSize size_table ----@param range int ----@param shakeZ boolean ----@return boolean -function ShakyTiles3D:initWithDuration (duration,gridSize,range,shakeZ) end ----* brief Create the action with a range, shake Z vertices, a grid and duration.
----* param duration Specify the duration of the ShakyTiles3D action. It's a value in seconds.
----* param gridSize Specify the size of the grid.
----* param range Specify the range of the shaky effect.
----* param shakeZ Specify whether shake on the z axis.
----* return If the creation success, return a pointer of ShakyTiles3D action; otherwise, return nil. ----@param duration float ----@param gridSize size_table ----@param range int ----@param shakeZ boolean ----@return self -function ShakyTiles3D:create (duration,gridSize,range,shakeZ) end ----* ----@return self -function ShakyTiles3D:clone () end ----* ----@param time float ----@return self -function ShakyTiles3D:update (time) end ----* ----@return self -function ShakyTiles3D:ShakyTiles3D () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ShatteredTiles3D.lua b/meta/3rd/Cocos4.0/library/cc/ShatteredTiles3D.lua deleted file mode 100644 index 1fa5198e..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ShatteredTiles3D.lua +++ /dev/null @@ -1,43 +0,0 @@ ----@meta - ----@class cc.ShatteredTiles3D :cc.TiledGrid3DAction -local ShatteredTiles3D={ } -cc.ShatteredTiles3D=ShatteredTiles3D - - - - ----* brief Initializes the action with a range, shatter Z vertices, grid size and duration.
----* param duration Specify the duration of the ShatteredTiles3D action. It's a value in seconds.
----* param gridSize Specify the size of the grid.
----* param range Specify the range of the shatter effect.
----* param shatterZ Specify whether shake on the z axis.
----* return If the Initialization success, return true; otherwise, return false. ----@param duration float ----@param gridSize size_table ----@param range int ----@param shatterZ boolean ----@return boolean -function ShatteredTiles3D:initWithDuration (duration,gridSize,range,shatterZ) end ----* brief Create the action with a range, whether of not to shatter Z vertices, grid size and duration.
----* param duration Specify the duration of the ShatteredTiles3D action. It's a value in seconds.
----* param gridSize Specify the size of the grid.
----* param range Specify the range of the shatter effect.
----* param shatterZ Specify whether shatter on the z axis.
----* return If the creation success, return a pointer of ShatteredTiles3D action; otherwise, return nil. ----@param duration float ----@param gridSize size_table ----@param range int ----@param shatterZ boolean ----@return self -function ShatteredTiles3D:create (duration,gridSize,range,shatterZ) end ----* ----@return self -function ShatteredTiles3D:clone () end ----* ----@param time float ----@return self -function ShatteredTiles3D:update (time) end ----* ----@return self -function ShatteredTiles3D:ShatteredTiles3D () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Show.lua b/meta/3rd/Cocos4.0/library/cc/Show.lua deleted file mode 100644 index 6f35e4f2..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Show.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class cc.Show :cc.ActionInstant -local Show={ } -cc.Show=Show - - - - ----* Allocates and initializes the action.
----* return An autoreleased Show object. ----@return self -function Show:create () end ----* ----@return self -function Show:clone () end ----* param time In seconds. ----@param time float ----@return self -function Show:update (time) end ----* ----@return cc.ActionInstant -function Show:reverse () end ----* ----@return self -function Show:Show () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ShuffleTiles.lua b/meta/3rd/Cocos4.0/library/cc/ShuffleTiles.lua deleted file mode 100644 index 1fa121a3..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ShuffleTiles.lua +++ /dev/null @@ -1,47 +0,0 @@ ----@meta - ----@class cc.ShuffleTiles :cc.TiledGrid3DAction -local ShuffleTiles={ } -cc.ShuffleTiles=ShuffleTiles - - - - ----* brief Initializes the action with grid size, random seed and duration.
----* param duration Specify the duration of the ShuffleTiles action. It's a value in seconds.
----* param gridSize Specify the size of the grid.
----* param seed Specify the random seed.
----* return If the Initialization success, return true; otherwise, return false. ----@param duration float ----@param gridSize size_table ----@param seed unsigned_int ----@return boolean -function ShuffleTiles:initWithDuration (duration,gridSize,seed) end ----* ----@param pos size_table ----@return size_table -function ShuffleTiles:getDelta (pos) end ----* brief Create the action with grid size, random seed and duration.
----* param duration Specify the duration of the ShuffleTiles action. It's a value in seconds.
----* param gridSize Specify the size of the grid.
----* param seed Specify the random seed.
----* return If the creation success, return a pointer of ShuffleTiles action; otherwise, return nil. ----@param duration float ----@param gridSize size_table ----@param seed unsigned_int ----@return self -function ShuffleTiles:create (duration,gridSize,seed) end ----* ----@param target cc.Node ----@return self -function ShuffleTiles:startWithTarget (target) end ----* ----@return self -function ShuffleTiles:clone () end ----* ----@param time float ----@return self -function ShuffleTiles:update (time) end ----* ----@return self -function ShuffleTiles:ShuffleTiles () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Skeleton3D.lua b/meta/3rd/Cocos4.0/library/cc/Skeleton3D.lua deleted file mode 100644 index c5bd2fe7..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Skeleton3D.lua +++ /dev/null @@ -1,44 +0,0 @@ ----@meta - ----@class cc.Skeleton3D :cc.Ref -local Skeleton3D={ } -cc.Skeleton3D=Skeleton3D - - - - ----* remove all bones ----@return self -function Skeleton3D:removeAllBones () end ----* add bone ----@param bone cc.Bone3D ----@return self -function Skeleton3D:addBone (bone) end ----* ----@param id string ----@return cc.Bone3D -function Skeleton3D:getBoneByName (id) end ----* ----@param index int ----@return cc.Bone3D -function Skeleton3D:getRootBone (index) end ----* refresh bone world matrix ----@return self -function Skeleton3D:updateBoneMatrix () end ----* get bone ----@param index unsigned_int ----@return cc.Bone3D -function Skeleton3D:getBoneByIndex (index) end ----* get & set root bone ----@return int -function Skeleton3D:getRootCount () end ----* get bone index ----@param bone cc.Bone3D ----@return int -function Skeleton3D:getBoneIndex (bone) end ----* get total bone count ----@return int -function Skeleton3D:getBoneCount () end ----* ----@return self -function Skeleton3D:Skeleton3D () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/SkewBy.lua b/meta/3rd/Cocos4.0/library/cc/SkewBy.lua deleted file mode 100644 index 884969c6..00000000 --- a/meta/3rd/Cocos4.0/library/cc/SkewBy.lua +++ /dev/null @@ -1,38 +0,0 @@ ----@meta - ----@class cc.SkewBy :cc.SkewTo -local SkewBy={ } -cc.SkewBy=SkewBy - - - - ----* param t In seconds. ----@param t float ----@param sx float ----@param sy float ----@return boolean -function SkewBy:initWithDuration (t,sx,sy) end ----* Creates the action.
----* param t Duration time, in seconds.
----* param deltaSkewX Skew x delta angle.
----* param deltaSkewY Skew y delta angle.
----* return An autoreleased SkewBy object. ----@param t float ----@param deltaSkewX float ----@param deltaSkewY float ----@return self -function SkewBy:create (t,deltaSkewX,deltaSkewY) end ----* ----@param target cc.Node ----@return self -function SkewBy:startWithTarget (target) end ----* ----@return self -function SkewBy:clone () end ----* ----@return self -function SkewBy:reverse () end ----* ----@return self -function SkewBy:SkewBy () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/SkewTo.lua b/meta/3rd/Cocos4.0/library/cc/SkewTo.lua deleted file mode 100644 index 559be862..00000000 --- a/meta/3rd/Cocos4.0/library/cc/SkewTo.lua +++ /dev/null @@ -1,42 +0,0 @@ ----@meta - ----@class cc.SkewTo :cc.ActionInterval -local SkewTo={ } -cc.SkewTo=SkewTo - - - - ----* param t In seconds. ----@param t float ----@param sx float ----@param sy float ----@return boolean -function SkewTo:initWithDuration (t,sx,sy) end ----* Creates the action.
----* param t Duration time, in seconds.
----* param sx Skew x angle.
----* param sy Skew y angle.
----* return An autoreleased SkewTo object. ----@param t float ----@param sx float ----@param sy float ----@return self -function SkewTo:create (t,sx,sy) end ----* ----@param target cc.Node ----@return self -function SkewTo:startWithTarget (target) end ----* ----@return self -function SkewTo:clone () end ----* ----@return self -function SkewTo:reverse () end ----* param time In seconds. ----@param time float ----@return self -function SkewTo:update (time) end ----* ----@return self -function SkewTo:SkewTo () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Skybox.lua b/meta/3rd/Cocos4.0/library/cc/Skybox.lua deleted file mode 100644 index 46087487..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Skybox.lua +++ /dev/null @@ -1,47 +0,0 @@ ----@meta - ----@class cc.Skybox :cc.Node -local Skybox={ } -cc.Skybox=Skybox - - - - ----* reload sky box after GLESContext reconstructed. ----@return self -function Skybox:reload () end ----* initialize with texture path ----@param positive_x string ----@param negative_x string ----@param positive_y string ----@param negative_y string ----@param positive_z string ----@param negative_z string ----@return boolean -function Skybox:init (positive_x,negative_x,positive_y,negative_y,positive_z,negative_z) end ----* texture getter and setter ----@param e cc.TextureCub ----@return self -function Skybox:setTexture (e) end ----@overload fun(string:string,string:string,string:string,string:string,string:string,string:string):self ----@overload fun():self ----@param positive_x string ----@param negative_x string ----@param positive_y string ----@param negative_y string ----@param positive_z string ----@param negative_z string ----@return self -function Skybox:create (positive_x,negative_x,positive_y,negative_y,positive_z,negative_z) end ----* draw Skybox object ----@param renderer cc.Renderer ----@param transform mat4_table ----@param flags unsigned_int ----@return self -function Skybox:draw (renderer,transform,flags) end ----* init Skybox. ----@return boolean -function Skybox:init () end ----* Constructor. ----@return self -function Skybox:Skybox () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Spawn.lua b/meta/3rd/Cocos4.0/library/cc/Spawn.lua deleted file mode 100644 index 1547373c..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Spawn.lua +++ /dev/null @@ -1,38 +0,0 @@ ----@meta - ----@class cc.Spawn :cc.ActionInterval -local Spawn={ } -cc.Spawn=Spawn - - - - ----* ----@param arrayOfActions array_table ----@return boolean -function Spawn:init (arrayOfActions) end ----* initializes the Spawn action with the 2 actions to spawn ----@param action1 cc.FiniteTimeAction ----@param action2 cc.FiniteTimeAction ----@return boolean -function Spawn:initWithTwoActions (action1,action2) end ----* ----@param target cc.Node ----@return self -function Spawn:startWithTarget (target) end ----* ----@return self -function Spawn:clone () end ----* ----@return self -function Spawn:stop () end ----* ----@return self -function Spawn:reverse () end ----* param time In seconds. ----@param time float ----@return self -function Spawn:update (time) end ----* ----@return self -function Spawn:Spawn () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Speed.lua b/meta/3rd/Cocos4.0/library/cc/Speed.lua deleted file mode 100644 index df4e392a..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Speed.lua +++ /dev/null @@ -1,63 +0,0 @@ ----@meta - ----@class cc.Speed :cc.Action -local Speed={ } -cc.Speed=Speed - - - - ----* Replace the interior action.
----* param action The new action, it will replace the running action. ----@param action cc.ActionInterval ----@return self -function Speed:setInnerAction (action) end ----* Return the speed.
----* return The action speed. ----@return float -function Speed:getSpeed () end ----* Alter the speed of the inner function in runtime.
----* param speed Alter the speed of the inner function in runtime. ----@param speed float ----@return self -function Speed:setSpeed (speed) end ----* Initializes the action. ----@param action cc.ActionInterval ----@param speed float ----@return boolean -function Speed:initWithAction (action,speed) end ----* Return the interior action.
----* return The interior action. ----@return cc.ActionInterval -function Speed:getInnerAction () end ----* Create the action and set the speed.
----* param action An action.
----* param speed The action speed. ----@param action cc.ActionInterval ----@param speed float ----@return self -function Speed:create (action,speed) end ----* ----@param target cc.Node ----@return self -function Speed:startWithTarget (target) end ----* ----@return self -function Speed:reverse () end ----* ----@return self -function Speed:clone () end ----* ----@return self -function Speed:stop () end ----* param dt in seconds. ----@param dt float ----@return self -function Speed:step (dt) end ----* Return true if the action has finished.
----* return Is true if the action has finished. ----@return boolean -function Speed:isDone () end ----* ----@return self -function Speed:Speed () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/SplitCols.lua b/meta/3rd/Cocos4.0/library/cc/SplitCols.lua deleted file mode 100644 index 1af8372f..00000000 --- a/meta/3rd/Cocos4.0/library/cc/SplitCols.lua +++ /dev/null @@ -1,39 +0,0 @@ ----@meta - ----@class cc.SplitCols :cc.TiledGrid3DAction -local SplitCols={ } -cc.SplitCols=SplitCols - - - - ----* brief Initializes the action with the number columns and the duration.
----* param duration Specify the duration of the SplitCols action. It's a value in seconds.
----* param cols Specify the columns count should be split.
----* return If the creation success, return true; otherwise, return false. ----@param duration float ----@param cols unsigned_int ----@return boolean -function SplitCols:initWithDuration (duration,cols) end ----* brief Create the action with the number of columns and the duration.
----* param duration Specify the duration of the SplitCols action. It's a value in seconds.
----* param cols Specify the columns count should be split.
----* return If the creation success, return a pointer of SplitCols action; otherwise, return nil. ----@param duration float ----@param cols unsigned_int ----@return self -function SplitCols:create (duration,cols) end ----* ----@param target cc.Node ----@return self -function SplitCols:startWithTarget (target) end ----* ----@return self -function SplitCols:clone () end ----* param time in seconds ----@param time float ----@return self -function SplitCols:update (time) end ----* ----@return self -function SplitCols:SplitCols () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/SplitRows.lua b/meta/3rd/Cocos4.0/library/cc/SplitRows.lua deleted file mode 100644 index da2b8223..00000000 --- a/meta/3rd/Cocos4.0/library/cc/SplitRows.lua +++ /dev/null @@ -1,39 +0,0 @@ ----@meta - ----@class cc.SplitRows :cc.TiledGrid3DAction -local SplitRows={ } -cc.SplitRows=SplitRows - - - - ----* brief Initializes the action with the number rows and the duration.
----* param duration Specify the duration of the SplitRows action. It's a value in seconds.
----* param rows Specify the rows count should be split.
----* return If the creation success, return true; otherwise, return false. ----@param duration float ----@param rows unsigned_int ----@return boolean -function SplitRows:initWithDuration (duration,rows) end ----* brief Create the action with the number of rows and the duration.
----* param duration Specify the duration of the SplitRows action. It's a value in seconds.
----* param rows Specify the rows count should be split.
----* return If the creation success, return a pointer of SplitRows action; otherwise, return nil. ----@param duration float ----@param rows unsigned_int ----@return self -function SplitRows:create (duration,rows) end ----* ----@param target cc.Node ----@return self -function SplitRows:startWithTarget (target) end ----* ----@return self -function SplitRows:clone () end ----* ----@param time float ----@return self -function SplitRows:update (time) end ----* ----@return self -function SplitRows:SplitRows () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/SpotLight.lua b/meta/3rd/Cocos4.0/library/cc/SpotLight.lua deleted file mode 100644 index fc94c3dc..00000000 --- a/meta/3rd/Cocos4.0/library/cc/SpotLight.lua +++ /dev/null @@ -1,73 +0,0 @@ ----@meta - ----@class cc.SpotLight :cc.BaseLight -local SpotLight={ } -cc.SpotLight=SpotLight - - - - ----* Returns the range of point or spot light.
----* return The range of the point or spot light. ----@return float -function SpotLight:getRange () end ----* Sets the Direction in parent.
----* param dir The Direction in parent. ----@param dir vec3_table ----@return self -function SpotLight:setDirection (dir) end ----* get cos innerAngle ----@return float -function SpotLight:getCosInnerAngle () end ----* Returns the outer angle of the spot light (in radians). ----@return float -function SpotLight:getOuterAngle () end ----* Returns the inner angle the spot light (in radians). ----@return float -function SpotLight:getInnerAngle () end ----* Returns the Direction in parent. ----@return vec3_table -function SpotLight:getDirection () end ----* get cos outAngle ----@return float -function SpotLight:getCosOuterAngle () end ----* Sets the outer angle of a spot light (in radians).
----* param outerAngle The angle of spot light (in radians). ----@param outerAngle float ----@return self -function SpotLight:setOuterAngle (outerAngle) end ----* Sets the inner angle of a spot light (in radians).
----* param angle The angle of spot light (in radians). ----@param angle float ----@return self -function SpotLight:setInnerAngle (angle) end ----* Returns direction in world. ----@return vec3_table -function SpotLight:getDirectionInWorld () end ----* Sets the range of point or spot light.
----* param range The range of point or spot light. ----@param range float ----@return self -function SpotLight:setRange (range) end ----* Creates a spot light.
----* param direction The light's direction
----* param position The light's position
----* param color The light's color.
----* param innerAngle The light's inner angle (in radians).
----* param outerAngle The light's outer angle (in radians).
----* param range The light's range.
----* return The new spot light. ----@param direction vec3_table ----@param position vec3_table ----@param color color3b_table ----@param innerAngle float ----@param outerAngle float ----@param range float ----@return self -function SpotLight:create (direction,position,color,innerAngle,outerAngle,range) end ----* ----@return int -function SpotLight:getLightType () end ----* ----@return self -function SpotLight:SpotLight () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Sprite.lua b/meta/3rd/Cocos4.0/library/cc/Sprite.lua deleted file mode 100644 index 4a76c915..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Sprite.lua +++ /dev/null @@ -1,340 +0,0 @@ ----@meta - ----@class cc.Sprite :cc.Node@all parent class: Node,TextureProtocol -local Sprite={ } -cc.Sprite=Sprite - - - - ----@overload fun(string0:cc.SpriteFrame):self ----@overload fun(string:string):self ----@param spriteFrameName string ----@return self -function Sprite:setSpriteFrame (spriteFrameName) end ----@overload fun(string0:cc.Texture2D):self ----@overload fun(string:string):self ----@param filename string ----@return self -function Sprite:setTexture (filename) end ----* Returns the Texture2D object used by the sprite. ----@return cc.Texture2D -function Sprite:getTexture () end ----* Sets whether the sprite should be flipped vertically or not.
----* param flippedY true if the sprite should be flipped vertically, false otherwise. ----@param flippedY boolean ----@return self -function Sprite:setFlippedY (flippedY) end ----* Sets whether the sprite should be flipped horizontally or not.
----* param flippedX true if the sprite should be flipped horizontally, false otherwise. ----@param flippedX boolean ----@return self -function Sprite:setFlippedX (flippedX) end ----* / @} ----@return int -function Sprite:getResourceType () end ----* / @{/ @name Animation methods
----* Changes the display frame with animation name and index.
----* The animation name will be get from the AnimationCache. ----@param animationName string ----@param frameIndex unsigned_int ----@return self -function Sprite:setDisplayFrameWithAnimationName (animationName,frameIndex) end ----* Returns the batch node object if this sprite is rendered by SpriteBatchNode.
----* return The SpriteBatchNode object if this sprite is rendered by SpriteBatchNode,
----* nullptr if the sprite isn't used batch node. ----@return cc.SpriteBatchNode -function Sprite:getBatchNode () end ----* Gets the offset position of the sprite. Calculated automatically by editors like Zwoptex. ----@return vec2_table -function Sprite:getOffsetPosition () end ----* brief Returns the Cap Insets rect
----* return Scale9Sprite's cap inset. ----@return rect_table -function Sprite:getCenterRect () end ----* setCenterRectNormalized
----* Useful to implement "9 sliced" sprites.
----* The default value is (0,0) - (1,1), which means that only one "slice" will be used: From top-left (0,0) to bottom-right (1,1).
----* If the value is different than (0,0), (1,1), then the sprite will be sliced into a 3 x 3 grid. The four corners of this grid are applied without
----* performing any scaling. The upper- and lower-middle parts are scaled horizontally, and the left- and right-middle parts are scaled vertically.
----* The center is scaled in both directions.
----* Important: The scaling is based the Sprite's trimmed size.
----* Limitations: Does not work when the sprite is part of `SpriteBatchNode`. ----@param rect rect_table ----@return self -function Sprite:setCenterRectNormalized (rect) end ----* returns whether or not contentSize stretches the sprite's texture ----@return boolean -function Sprite:isStretchEnabled () end ----@overload fun(rect_table:rect_table,boolean:boolean,size_table:size_table):self ----@overload fun(rect_table:rect_table):self ----@param rect rect_table ----@param rotated boolean ----@param untrimmedSize size_table ----@return self -function Sprite:setTextureRect (rect,rotated,untrimmedSize) end ----* Initializes a sprite with an sprite frame name.
----* A SpriteFrame will be fetched from the SpriteFrameCache by name.
----* If the SpriteFrame doesn't exist it will raise an exception.
----* param spriteFrameName A key string that can fetched a valid SpriteFrame from SpriteFrameCache.
----* return True if the sprite is initialized properly, false otherwise. ----@param spriteFrameName string ----@return boolean -function Sprite:initWithSpriteFrameName (spriteFrameName) end ----* whether or not contentSize stretches the sprite's texture ----@param enabled boolean ----@return self -function Sprite:setStretchEnabled (enabled) end ----* Returns whether or not a SpriteFrame is being displayed. ----@param frame cc.SpriteFrame ----@return boolean -function Sprite:isFrameDisplayed (frame) end ----* Returns the index used on the TextureAtlas. ----@return unsigned_int -function Sprite:getAtlasIndex () end ----* Sets the weak reference of the TextureAtlas when the sprite is rendered using via SpriteBatchNode. ----@param textureAtlas cc.TextureAtlas ----@return self -function Sprite:setTextureAtlas (textureAtlas) end ----* Sets the batch node to sprite.
----* warning This method is not recommended for game developers. Sample code for using batch node
----* code
----* SpriteBatchNode *batch = SpriteBatchNode::create("Images/grossini_dance_atlas.png", 15);
----* Sprite *sprite = Sprite::createWithTexture(batch->getTexture(), Rect(0, 0, 57, 57));
----* batch->addChild(sprite);
----* layer->addChild(batch);
----* endcode ----@param spriteBatchNode cc.SpriteBatchNode ----@return self -function Sprite:setBatchNode (spriteBatchNode) end ----* js NA
----* lua NA ----@return cc.BlendFunc -function Sprite:getBlendFunc () end ----* ----@param rect rect_table ----@return self -function Sprite:setCenterRect (rect) end ----* Returns the current displayed frame. ----@return cc.SpriteFrame -function Sprite:getSpriteFrame () end ----* ----@return self -function Sprite:setVertexLayout () end ----* ----@param cleanup boolean ----@return self -function Sprite:removeAllChildrenWithCleanup (cleanup) end ----* ----@return string -function Sprite:getResourceName () end ----* Whether or not the Sprite needs to be updated in the Atlas.
----* return True if the sprite needs to be updated in the Atlas, false otherwise. ----@return boolean -function Sprite:isDirty () end ----* getCenterRectNormalized
----* Returns the CenterRect in normalized coordinates ----@return rect_table -function Sprite:getCenterRectNormalized () end ----* Sets the index used on the TextureAtlas.
----* warning Don't modify this value unless you know what you are doing. ----@param atlasIndex unsigned_int ----@return self -function Sprite:setAtlasIndex (atlasIndex) end ----@overload fun(cc.Texture2D:cc.Texture2D,rect_table:rect_table):self ----@overload fun(cc.Texture2D:cc.Texture2D):self ----@overload fun(cc.Texture2D:cc.Texture2D,rect_table:rect_table,boolean:boolean):self ----@param texture cc.Texture2D ----@param rect rect_table ----@param rotated boolean ----@return boolean -function Sprite:initWithTexture (texture,rect,rotated) end ----* Makes the Sprite to be updated in the Atlas. ----@param dirty boolean ----@return self -function Sprite:setDirty (dirty) end ----* Returns whether or not the texture rectangle is rotated. ----@return boolean -function Sprite:isTextureRectRotated () end ----* Returns the rect of the Sprite in points. ----@return rect_table -function Sprite:getTextureRect () end ----@overload fun(string:string,rect_table:rect_table):self ----@overload fun(string:string):self ----@param filename string ----@param rect rect_table ----@return boolean -function Sprite:initWithFile (filename,rect) end ----* / @{/ @name Functions inherited from TextureProtocol.
----* code
----* When this function bound into js or lua,the parameter will be changed.
----* In js: var setBlendFunc(var src, var dst).
----* In lua: local setBlendFunc(local src, local dst).
----* endcode ----@param blendFunc cc.BlendFunc ----@return self -function Sprite:setBlendFunc (blendFunc) end ----* ----@param vert char ----@param frag char ----@return self -function Sprite:updateShaders (vert,frag) end ----* Gets the weak reference of the TextureAtlas when the sprite is rendered using via SpriteBatchNode. ----@return cc.TextureAtlas -function Sprite:getTextureAtlas () end ----* Initializes a sprite with an SpriteFrame. The texture and rect in SpriteFrame will be applied on this sprite.
----* param spriteFrame A SpriteFrame object. It should includes a valid texture and a rect.
----* return True if the sprite is initialized properly, false otherwise. ----@param spriteFrame cc.SpriteFrame ----@return boolean -function Sprite:initWithSpriteFrame (spriteFrame) end ----* Returns the flag which indicates whether the sprite is flipped horizontally or not.
----* It only flips the texture of the sprite, and not the texture of the sprite's children.
----* Also, flipping the texture doesn't alter the anchorPoint.
----* If you want to flip the anchorPoint too, and/or to flip the children too use:
----* sprite->setScaleX(sprite->getScaleX() * -1);
----* return true if the sprite is flipped horizontally, false otherwise. ----@return boolean -function Sprite:isFlippedX () end ----* Return the flag which indicates whether the sprite is flipped vertically or not.
----* It only flips the texture of the sprite, and not the texture of the sprite's children.
----* Also, flipping the texture doesn't alter the anchorPoint.
----* If you want to flip the anchorPoint too, and/or to flip the children too use:
----* sprite->setScaleY(sprite->getScaleY() * -1);
----* return true if the sprite is flipped vertically, false otherwise. ----@return boolean -function Sprite:isFlippedY () end ----* Sets the vertex rect.
----* It will be called internally by setTextureRect.
----* Useful if you want to create 2x images from SD images in Retina Display.
----* Do not call it manually. Use setTextureRect instead. ----@param rect rect_table ----@return self -function Sprite:setVertexRect (rect) end ----@overload fun(cc.Texture2D:cc.Texture2D,rect_table:rect_table,boolean:boolean):self ----@overload fun(cc.Texture2D:cc.Texture2D):self ----@param texture cc.Texture2D ----@param rect rect_table ----@param rotated boolean ----@return self -function Sprite:createWithTexture (texture,rect,rotated) end ----* Creates a sprite with an sprite frame name.
----* A SpriteFrame will be fetched from the SpriteFrameCache by spriteFrameName param.
----* If the SpriteFrame doesn't exist it will raise an exception.
----* param spriteFrameName The name of sprite frame.
----* return An autoreleased sprite object. ----@param spriteFrameName string ----@return self -function Sprite:createWithSpriteFrameName (spriteFrameName) end ----* Creates a sprite with an sprite frame.
----* param spriteFrame A sprite frame which involves a texture and a rect.
----* return An autoreleased sprite object. ----@param spriteFrame cc.SpriteFrame ----@return self -function Sprite:createWithSpriteFrame (spriteFrame) end ----@overload fun(cc.Node:cc.Node,int:int,int2:string):self ----@overload fun(cc.Node:cc.Node,int:int,int:int):self ----@param child cc.Node ----@param zOrder int ----@param tag int ----@return self -function Sprite:addChild (child,zOrder,tag) end ----* ----@param anchor vec2_table ----@return self -function Sprite:setAnchorPoint (anchor) end ----* ----@param rotationX float ----@return self -function Sprite:setRotationSkewX (rotationX) end ----* ----@param scaleY float ----@return self -function Sprite:setScaleY (scaleY) end ----@overload fun(float:float):self ----@overload fun(float:float,float:float):self ----@param scaleX float ----@param scaleY float ----@return self -function Sprite:setScale (scaleX,scaleY) end ----* Set ProgramState ----@param programState cc.backend.ProgramState ----@return self -function Sprite:setProgramState (programState) end ----* ----@param size size_table ----@return self -function Sprite:setContentSize (size) end ----* ----@return boolean -function Sprite:isOpacityModifyRGB () end ----* ----@param modify boolean ----@return self -function Sprite:setOpacityModifyRGB (modify) end ----* ----@return boolean -function Sprite:init () end ----* ----@param rotation float ----@return self -function Sprite:setRotation (rotation) end ----* ----@param value boolean ----@return self -function Sprite:setIgnoreAnchorPointForPosition (value) end ----* ----@param renderer cc.Renderer ----@param transform mat4_table ----@param flags unsigned_int ----@return self -function Sprite:draw (renderer,transform,flags) end ----* / @{/ @name Functions inherited from Node. ----@param scaleX float ----@return self -function Sprite:setScaleX (scaleX) end ----* js NA ----@return string -function Sprite:getDescription () end ----* ----@param rotationY float ----@return self -function Sprite:setRotationSkewY (rotationY) end ----* Get current ProgramState ----@return cc.backend.ProgramState -function Sprite:getProgramState () end ----* ----@return self -function Sprite:sortAllChildren () end ----* ----@param child cc.Node ----@param zOrder int ----@return self -function Sprite:reorderChild (child,zOrder) end ----* ----@param positionZ float ----@return self -function Sprite:setPositionZ (positionZ) end ----* ----@param child cc.Node ----@param cleanup boolean ----@return self -function Sprite:removeChild (child,cleanup) end ----* Updates the quad according the rotation, position, scale values. ----@return self -function Sprite:updateTransform () end ----* ----@param sx float ----@return self -function Sprite:setSkewX (sx) end ----* ----@param sy float ----@return self -function Sprite:setSkewY (sy) end ----* ----@param bVisible boolean ----@return self -function Sprite:setVisible (bVisible) end ----* js ctor ----@return self -function Sprite:Sprite () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Sprite3D.lua b/meta/3rd/Cocos4.0/library/cc/Sprite3D.lua deleted file mode 100644 index a7929c0e..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Sprite3D.lua +++ /dev/null @@ -1,121 +0,0 @@ ----@meta - ----@class cc.Sprite3D :cc.Node@all parent class: Node,BlendProtocol -local Sprite3D={ } -cc.Sprite3D=Sprite3D - - - - ----* ----@param enable boolean ----@return self -function Sprite3D:setCullFaceEnabled (enable) end ----@overload fun(string0:cc.Texture2D):self ----@overload fun(string:string):self ----@param texFile string ----@return self -function Sprite3D:setTexture (texFile) end ----* ----@return unsigned_int -function Sprite3D:getLightMask () end ----* Adds a new material to a particular mesh of the sprite.
----* meshIndex is the mesh that will be applied to.
----* if meshIndex == -1, then it will be applied to all the meshes that belong to the sprite. ----@param meshIndex int ----@return cc.Material -function Sprite3D:getMaterial (meshIndex) end ----* ----@param side int ----@return self -function Sprite3D:setCullFace (side) end ----* Get meshes used in sprite 3d ----@return array_table -function Sprite3D:getMeshes () end ----* remove all attach nodes ----@return self -function Sprite3D:removeAllAttachNode () end ----@overload fun(cc.Material:cc.Material,int:int):self ----@overload fun(cc.Material:cc.Material):self ----@param material cc.Material ----@param meshIndex int ----@return self -function Sprite3D:setMaterial (material,meshIndex) end ----* get mesh ----@return cc.Mesh -function Sprite3D:getMesh () end ----* get mesh count ----@return int -function Sprite3D:getMeshCount () end ----* get Mesh by index ----@param index int ----@return cc.Mesh -function Sprite3D:getMeshByIndex (index) end ----* ----@return boolean -function Sprite3D:isForceDepthWrite () end ----* ----@return cc.BlendFunc -function Sprite3D:getBlendFunc () end ----* light mask getter & setter, light works only when _lightmask & light's flag is true, default value of _lightmask is 0xffff ----@param mask unsigned_int ----@return self -function Sprite3D:setLightMask (mask) end ----* get AttachNode by bone name, return nullptr if not exist ----@param boneName string ----@return cc.AttachNode -function Sprite3D:getAttachNode (boneName) end ----* ----@param blendFunc cc.BlendFunc ----@return self -function Sprite3D:setBlendFunc (blendFunc) end ----* force set this Sprite3D to 2D render queue ----@param force2D boolean ----@return self -function Sprite3D:setForce2DQueue (force2D) end ----* generate default material ----@return self -function Sprite3D:genMaterial () end ----* remove attach node ----@param boneName string ----@return self -function Sprite3D:removeAttachNode (boneName) end ----* ----@return cc.Skeleton3D -function Sprite3D:getSkeleton () end ----* Force to write to depth buffer, this is useful if you want to achieve effects like fading. ----@param value boolean ----@return self -function Sprite3D:setForceDepthWrite (value) end ----* get Mesh by Name, it returns the first one if there are more than one mesh with the same name ----@param name string ----@return cc.Mesh -function Sprite3D:getMeshByName (name) end ----@overload fun(string:string):self ----@overload fun():self ----@overload fun(string:string,string:string):self ----@param modelPath string ----@param texturePath string ----@return self -function Sprite3D:create (modelPath,texturePath) end ----* draw ----@param renderer cc.Renderer ----@param transform mat4_table ----@param flags unsigned_int ----@return self -function Sprite3D:draw (renderer,transform,flags) end ----* Executes an action, and returns the action that is executed. For Sprite3D special logic are needed to take care of Fading.
----* This node becomes the action's target. Refer to Action::getTarget()
----* warning Actions don't retain their target.
----* return An Action pointer ----@param action cc.Action ----@return cc.Action -function Sprite3D:runAction (action) end ----* set ProgramState, you should bind attributes by yourself ----@param programState cc.backend.ProgramState ----@return self -function Sprite3D:setProgramState (programState) end ----* Returns 2d bounding-box
----* Note: the bounding-box is just get from the AABB which as Z=0, so that is not very accurate. ----@return rect_table -function Sprite3D:getBoundingBox () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Sprite3DCache.lua b/meta/3rd/Cocos4.0/library/cc/Sprite3DCache.lua deleted file mode 100644 index 3b346ec5..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Sprite3DCache.lua +++ /dev/null @@ -1,25 +0,0 @@ ----@meta - ----@class cc.Sprite3DCache -local Sprite3DCache={ } -cc.Sprite3DCache=Sprite3DCache - - - - ----* remove the SpriteData from Sprite3D by given the specified key ----@param key string ----@return self -function Sprite3DCache:removeSprite3DData (key) end ----* remove all the SpriteData from Sprite3D ----@return self -function Sprite3DCache:removeAllSprite3DData () end ----* ----@return self -function Sprite3DCache:destroyInstance () end ----* get & destroy ----@return self -function Sprite3DCache:getInstance () end ----* ----@return self -function Sprite3DCache:Sprite3DCache () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Sprite3DMaterial.lua b/meta/3rd/Cocos4.0/library/cc/Sprite3DMaterial.lua deleted file mode 100644 index b1f947eb..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Sprite3DMaterial.lua +++ /dev/null @@ -1,38 +0,0 @@ ----@meta - ----@class cc.Sprite3DMaterial :cc.Material -local Sprite3DMaterial={ } -cc.Sprite3DMaterial=Sprite3DMaterial - - - - ----* Get material type
----* return Material type ----@return int -function Sprite3DMaterial:getMaterialType () end ----* Create material with file name, it creates material from cache if it is previously loaded
----* param path Path of material file
----* return Created material ----@param path string ----@return self -function Sprite3DMaterial:createWithFilename (path) end ----* Release all cached materials ----@return self -function Sprite3DMaterial:releaseCachedMaterial () end ----@overload fun():self ----@overload fun(int:int,boolean:boolean):self ----@param type int ----@param skinned boolean ----@return self -function Sprite3DMaterial:createBuiltInMaterial (type,skinned) end ----* Release all built in materials ----@return self -function Sprite3DMaterial:releaseBuiltInMaterial () end ----* ----@param programState cc.backend.ProgramState ----@return self -function Sprite3DMaterial:createWithProgramState (programState) end ----* Clone material ----@return cc.Material -function Sprite3DMaterial:clone () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/SpriteBatchNode.lua b/meta/3rd/Cocos4.0/library/cc/SpriteBatchNode.lua deleted file mode 100644 index 56dd97ce..00000000 --- a/meta/3rd/Cocos4.0/library/cc/SpriteBatchNode.lua +++ /dev/null @@ -1,191 +0,0 @@ ----@meta - ----@class cc.SpriteBatchNode :cc.Node@all parent class: Node,TextureProtocol -local SpriteBatchNode={ } -cc.SpriteBatchNode=SpriteBatchNode - - - - ----* Append the child.
----* param sprite A Sprite. ----@param sprite cc.Sprite ----@return self -function SpriteBatchNode:appendChild (sprite) end ----* ----@param reorder boolean ----@return self -function SpriteBatchNode:reorderBatch (reorder) end ----* ----@return cc.Texture2D -function SpriteBatchNode:getTexture () end ----* ----@param texture cc.Texture2D ----@return self -function SpriteBatchNode:setTexture (texture) end ----* Removes a child given a certain index. It will also cleanup the running actions depending on the cleanup parameter.
----* param index A certain index.
----* param doCleanup Whether or not to cleanup the running actions.
----* warning Removing a child from a SpriteBatchNode is very slow. ----@param index int ----@param doCleanup boolean ----@return self -function SpriteBatchNode:removeChildAtIndex (index,doCleanup) end ----* Remove a sprite from Atlas.
----* param sprite A Sprite. ----@param sprite cc.Sprite ----@return self -function SpriteBatchNode:removeSpriteFromAtlas (sprite) end ----* ----@param child cc.Sprite ----@param z int ----@param aTag int ----@return self -function SpriteBatchNode:addSpriteWithoutQuad (child,z,aTag) end ----* Get the nearest index from the sprite in z.
----* param sprite The parent sprite.
----* param z Z order for drawing priority.
----* return Index. ----@param sprite cc.Sprite ----@param z int ----@return int -function SpriteBatchNode:atlasIndexForChild (sprite,z) end ----* Increase the Atlas Capacity. ----@return self -function SpriteBatchNode:increaseAtlasCapacity () end ----* Get the Min image block index,in all child.
----* param sprite The parent sprite.
----* return Index. ----@param sprite cc.Sprite ----@return int -function SpriteBatchNode:lowestAtlasIndexInChild (sprite) end ----* lua NA ----@return cc.BlendFunc -function SpriteBatchNode:getBlendFunc () end ----* initializes a SpriteBatchNode with a texture2d and capacity of children.
----* The capacity will be increased in 33% in runtime if it runs out of space. ----@param tex cc.Texture2D ----@param capacity int ----@return boolean -function SpriteBatchNode:initWithTexture (tex,capacity) end ----* Sets the TextureAtlas object.
----* param textureAtlas The TextureAtlas object. ----@param textureAtlas cc.TextureAtlas ----@return self -function SpriteBatchNode:setTextureAtlas (textureAtlas) end ----* reserves capacity for the batch node.
----* If the current capacity is bigger, nothing happens.
----* otherwise, a new capacity is allocated ----@param newCapacity int ----@return self -function SpriteBatchNode:reserveCapacity (newCapacity) end ----* js NA ----@param cleanup boolean ----@return self -function SpriteBatchNode:removeAllChildrenWithCleanup (cleanup) end ----* Inserts a quad at a certain index into the texture atlas. The Sprite won't be added into the children array.
----* This method should be called only when you are dealing with very big AtlasSprite and when most of the Sprite won't be updated.
----* For example: a tile map (TMXMap) or a label with lots of characters (LabelBMFont). ----@param sprite cc.Sprite ----@param index int ----@return self -function SpriteBatchNode:insertQuadFromSprite (sprite,index) end ----* initializes a SpriteBatchNode with a file image (.png, .jpeg, .pvr, etc) and a capacity of children.
----* The capacity will be increased in 33% in runtime if it runs out of space.
----* The file will be loaded using the TextureMgr.
----* js init
----* lua init ----@param fileImage string ----@param capacity int ----@return boolean -function SpriteBatchNode:initWithFile (fileImage,capacity) end ----* code
----* When this function bound into js or lua,the parameter will be changed.
----* In js: var setBlendFunc(var src, var dst).
----* endcode
----* lua NA ----@param blendFunc cc.BlendFunc ----@return self -function SpriteBatchNode:setBlendFunc (blendFunc) end ----* Rebuild index with a sprite all child.
----* param parent The parent sprite.
----* param index The child index.
----* return Index. ----@param parent cc.Sprite ----@param index int ----@return int -function SpriteBatchNode:rebuildIndexInOrder (parent,index) end ----* Returns the TextureAtlas object.
----* return The TextureAtlas object. ----@return cc.TextureAtlas -function SpriteBatchNode:getTextureAtlas () end ----* Get the Max image block index,in all child.
----* param sprite The parent sprite.
----* return Index. ----@param sprite cc.Sprite ----@return int -function SpriteBatchNode:highestAtlasIndexInChild (sprite) end ----* Creates a SpriteBatchNode with a file image (.png, .jpeg, .pvr, etc) and capacity of children.
----* The capacity will be increased in 33% in runtime if it runs out of space.
----* The file will be loaded using the TextureMgr.
----* param fileImage A file image (.png, .jpeg, .pvr, etc).
----* param capacity The capacity of children.
----* return Return an autorelease object. ----@param fileImage string ----@param capacity int ----@return self -function SpriteBatchNode:create (fileImage,capacity) end ----* Creates a SpriteBatchNode with a texture2d and capacity of children.
----* The capacity will be increased in 33% in runtime if it runs out of space.
----* param tex A texture2d.
----* param capacity The capacity of children.
----* return Return an autorelease object. ----@param tex cc.Texture2D ----@param capacity int ----@return self -function SpriteBatchNode:createWithTexture (tex,capacity) end ----@overload fun(cc.Node:cc.Node,int:int,int2:string):self ----@overload fun(cc.Node:cc.Node,int:int,int:int):self ----@param child cc.Node ----@param zOrder int ----@param tag int ----@return self -function SpriteBatchNode:addChild (child,zOrder,tag) end ----* js NA ----@param renderer cc.Renderer ----@param transform mat4_table ----@param flags unsigned_int ----@return self -function SpriteBatchNode:draw (renderer,transform,flags) end ----* js NA ----@return string -function SpriteBatchNode:getDescription () end ----* js NA ----@param renderer cc.Renderer ----@param parentTransform mat4_table ----@param parentFlags unsigned_int ----@return self -function SpriteBatchNode:visit (renderer,parentTransform,parentFlags) end ----* ----@return self -function SpriteBatchNode:sortAllChildren () end ----* ----@param child cc.Node ----@param cleanup boolean ----@return self -function SpriteBatchNode:removeChild (child,cleanup) end ----* ----@return boolean -function SpriteBatchNode:init () end ----* Set ProgramState ----@param programState cc.backend.ProgramState ----@return self -function SpriteBatchNode:setProgramState (programState) end ----* ----@param child cc.Node ----@param zOrder int ----@return self -function SpriteBatchNode:reorderChild (child,zOrder) end ----* js ctor ----@return self -function SpriteBatchNode:SpriteBatchNode () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/SpriteFrame.lua b/meta/3rd/Cocos4.0/library/cc/SpriteFrame.lua deleted file mode 100644 index 9c4bf522..00000000 --- a/meta/3rd/Cocos4.0/library/cc/SpriteFrame.lua +++ /dev/null @@ -1,156 +0,0 @@ ----@meta - ----@class cc.SpriteFrame :cc.Ref -local SpriteFrame={ } -cc.SpriteFrame=SpriteFrame - - - - ----* Set anchor point of the frame.
----* param anchorPoint The anchor point of the sprite frame. ----@param anchorPoint vec2_table ----@return self -function SpriteFrame:setAnchorPoint (anchorPoint) end ----* Set texture of the frame, the texture is retained.
----* param pobTexture The texture of the sprite frame. ----@param pobTexture cc.Texture2D ----@return self -function SpriteFrame:setTexture (pobTexture) end ----* Get texture of the frame.
----* return The texture of the sprite frame. ----@return cc.Texture2D -function SpriteFrame:getTexture () end ----* Set offset of the frame.
----* param offsetInPixels The offset of the sprite frame, in pixels. ----@param offsetInPixels vec2_table ----@return self -function SpriteFrame:setOffsetInPixels (offsetInPixels) end ----* Get original size of the trimmed image.
----* return The original size of the trimmed image, in pixels. ----@return size_table -function SpriteFrame:getOriginalSizeInPixels () end ----* Set original size of the trimmed image.
----* param sizeInPixels The original size of the trimmed image. ----@param sizeInPixels size_table ----@return self -function SpriteFrame:setOriginalSize (sizeInPixels) end ----* Get center rect of the frame.
----* Useful to create 9-slice sprites
----* return The center rect of the sprite frame in points ----@return rect_table -function SpriteFrame:getCenterRect () end ----* Set rect of the sprite frame.
----* param rectInPixels The rect of the sprite frame, in pixels. ----@param rectInPixels rect_table ----@return self -function SpriteFrame:setRectInPixels (rectInPixels) end ----* Get rect of the frame.
----* return The rect of the sprite frame. ----@return rect_table -function SpriteFrame:getRect () end ----* setCenterRect
----* Useful to implement "9 sliced" sprites.
----* The sprite will be sliced into a 3 x 3 grid. The four corners of this grid are applied without
----* performing any scaling. The upper- and lower-middle parts are scaled horizontally, and the left- and right-middle parts are scaled vertically.
----* The center is scaled in both directions.
----* Important: The scaling is based the Sprite's trimmed size.
----* Limitations: Does not work when the sprite is part of `SpriteBatchNode`.
----* param centerRect the Rect in points ----@param centerRect rect_table ----@return self -function SpriteFrame:setCenterRectInPixels (centerRect) end ----* Set offset of the frame.
----* param offsets The offset of the sprite frame. ----@param offsets vec2_table ----@return self -function SpriteFrame:setOffset (offsets) end ----@overload fun(string:string,rect_table:rect_table,boolean:boolean,vec2_table:vec2_table,size_table:size_table):self ----@overload fun(string:string,rect_table:rect_table):self ----@param filename string ----@param rect rect_table ----@param rotated boolean ----@param offset vec2_table ----@param originalSize size_table ----@return boolean -function SpriteFrame:initWithTextureFilename (filename,rect,rotated,offset,originalSize) end ----* Set rect of the frame.
----* param rect The rect of the sprite. ----@param rect rect_table ----@return self -function SpriteFrame:setRect (rect) end ----@overload fun(cc.Texture2D:cc.Texture2D,rect_table:rect_table,boolean:boolean,vec2_table:vec2_table,size_table:size_table):self ----@overload fun(cc.Texture2D:cc.Texture2D,rect_table:rect_table):self ----@param pobTexture cc.Texture2D ----@param rect rect_table ----@param rotated boolean ----@param offset vec2_table ----@param originalSize size_table ----@return boolean -function SpriteFrame:initWithTexture (pobTexture,rect,rotated,offset,originalSize) end ----* Get original size of the trimmed image.
----* return The original size of the trimmed image. ----@return size_table -function SpriteFrame:getOriginalSize () end ----* ----@return self -function SpriteFrame:clone () end ----* Get rect of the sprite frame.
----* return The rect of the sprite frame, in pixels. ----@return rect_table -function SpriteFrame:getRectInPixels () end ----* Is the sprite frame rotated or not.
----* return Is rotated if true. ----@return boolean -function SpriteFrame:isRotated () end ----* hasCenterRect
----* return Whether or not it has a centerRect ----@return boolean -function SpriteFrame:hasCenterRect () end ----* Set rotated of the sprite frame.
----* param rotated Rotated the sprite frame if true. ----@param rotated boolean ----@return self -function SpriteFrame:setRotated (rotated) end ----* Get offset of the frame.
----* return The offset of the sprite frame. ----@return vec2_table -function SpriteFrame:getOffset () end ----* Set original size of the trimmed image.
----* param sizeInPixels The original size of the trimmed image, in pixels. ----@param sizeInPixels size_table ----@return self -function SpriteFrame:setOriginalSizeInPixels (sizeInPixels) end ----* Get anchor point of the frame.
----* return The anchor point of the sprite frame. ----@return vec2_table -function SpriteFrame:getAnchorPoint () end ----* Check if anchor point is defined for the frame.
----* return true if anchor point is available. ----@return boolean -function SpriteFrame:hasAnchorPoint () end ----* Get offset of the frame.
----* return The offset of the sprite frame, in pixels. ----@return vec2_table -function SpriteFrame:getOffsetInPixels () end ----@overload fun(string:string,rect_table:rect_table,boolean:boolean,vec2_table:vec2_table,size_table:size_table):self ----@overload fun(string:string,rect_table:rect_table):self ----@param filename string ----@param rect rect_table ----@param rotated boolean ----@param offset vec2_table ----@param originalSize size_table ----@return self -function SpriteFrame:create (filename,rect,rotated,offset,originalSize) end ----@overload fun(cc.Texture2D:cc.Texture2D,rect_table:rect_table,boolean:boolean,vec2_table:vec2_table,size_table:size_table):self ----@overload fun(cc.Texture2D:cc.Texture2D,rect_table:rect_table):self ----@param pobTexture cc.Texture2D ----@param rect rect_table ----@param rotated boolean ----@param offset vec2_table ----@param originalSize size_table ----@return self -function SpriteFrame:createWithTexture (pobTexture,rect,rotated,offset,originalSize) end ----* lua NA ----@return self -function SpriteFrame:SpriteFrame () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/SpriteFrameCache.lua b/meta/3rd/Cocos4.0/library/cc/SpriteFrameCache.lua deleted file mode 100644 index ae3b3307..00000000 --- a/meta/3rd/Cocos4.0/library/cc/SpriteFrameCache.lua +++ /dev/null @@ -1,109 +0,0 @@ ----@meta - ----@class cc.SpriteFrameCache :cc.Ref -local SpriteFrameCache={ } -cc.SpriteFrameCache=SpriteFrameCache - - - - ----* ----@param plist string ----@return boolean -function SpriteFrameCache:reloadTexture (plist) end ----* Adds multiple Sprite Frames from a plist file content. The texture will be associated with the created sprite frames.
----* js NA
----* lua addSpriteFrames
----* param plist_content Plist file content string.
----* param texture Texture pointer. ----@param plist_content string ----@param texture cc.Texture2D ----@return self -function SpriteFrameCache:addSpriteFramesWithFileContent (plist_content,texture) end ----* Adds an sprite frame with a given name.
----* If the name already exists, then the contents of the old name will be replaced with the new one.
----* param frame A certain sprite frame.
----* param frameName The name of the sprite frame. ----@param frame cc.SpriteFrame ----@param frameName string ----@return self -function SpriteFrameCache:addSpriteFrame (frame,frameName) end ----@overload fun(string:string,cc.Texture2D1:string):self ----@overload fun(string:string):self ----@overload fun(string:string,cc.Texture2D:cc.Texture2D):self ----@param plist string ----@param texture cc.Texture2D ----@return self -function SpriteFrameCache:addSpriteFramesWithFile (plist,texture) end ----* Returns an Sprite Frame that was previously added.
----* If the name is not found it will return nil.
----* You should retain the returned copy if you are going to use it.
----* js getSpriteFrame
----* lua getSpriteFrame
----* param name A certain sprite frame name.
----* return The sprite frame. ----@param name string ----@return cc.SpriteFrame -function SpriteFrameCache:getSpriteFrameByName (name) end ----* Removes multiple Sprite Frames from a plist file.
----* Sprite Frames stored in this file will be removed.
----* It is convenient to call this method when a specific texture needs to be removed.
----* since v0.99.5
----* param plist The name of the plist that needs to removed. ----@param plist string ----@return self -function SpriteFrameCache:removeSpriteFramesFromFile (plist) end ----* Initialize method.
----* return if success return true. ----@return boolean -function SpriteFrameCache:init () end ----* Purges the dictionary of loaded sprite frames.
----* Call this method if you receive the "Memory Warning".
----* In the short term: it will free some resources preventing your app from being killed.
----* In the medium term: it will allocate more resources.
----* In the long term: it will be the same. ----@return self -function SpriteFrameCache:removeSpriteFrames () end ----* Removes unused sprite frames.
----* Sprite Frames that have a retain count of 1 will be deleted.
----* It is convenient to call this method after when starting a new Scene.
----* js NA ----@return self -function SpriteFrameCache:removeUnusedSpriteFrames () end ----* Removes multiple Sprite Frames from a plist file content.
----* Sprite Frames stored in this file will be removed.
----* It is convenient to call this method when a specific texture needs to be removed.
----* param plist_content The string of the plist content that needs to removed.
----* js NA ----@param plist_content string ----@return self -function SpriteFrameCache:removeSpriteFramesFromFileContent (plist_content) end ----* Deletes an sprite frame from the sprite frame cache.
----* param name The name of the sprite frame that needs to removed. ----@param name string ----@return self -function SpriteFrameCache:removeSpriteFrameByName (name) end ----* Check if multiple Sprite Frames from a plist file have been loaded.
----* js NA
----* lua NA
----* param plist Plist file name.
----* return True if the file is loaded. ----@param plist string ----@return boolean -function SpriteFrameCache:isSpriteFramesWithFileLoaded (plist) end ----* Removes all Sprite Frames associated with the specified textures.
----* It is convenient to call this method when a specific texture needs to be removed.
----* since v0.995.
----* param texture The texture that needs to removed. ----@param texture cc.Texture2D ----@return self -function SpriteFrameCache:removeSpriteFramesFromTexture (texture) end ----* Destroys the cache. It releases all the Sprite Frames and the retained instance.
----* js NA ----@return self -function SpriteFrameCache:destroyInstance () end ----* Returns the shared instance of the Sprite Frame cache.
----* return The instance of the Sprite Frame Cache.
----* js NA ----@return self -function SpriteFrameCache:getInstance () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/StopGrid.lua b/meta/3rd/Cocos4.0/library/cc/StopGrid.lua deleted file mode 100644 index 446323cf..00000000 --- a/meta/3rd/Cocos4.0/library/cc/StopGrid.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class cc.StopGrid :cc.ActionInstant -local StopGrid={ } -cc.StopGrid=StopGrid - - - - ----* brief Create a StopGrid Action.
----* return Return a pointer of StopGrid. When the creation failed, return nil. ----@return self -function StopGrid:create () end ----* ----@param target cc.Node ----@return self -function StopGrid:startWithTarget (target) end ----* ----@return self -function StopGrid:clone () end ----* ----@return self -function StopGrid:reverse () end ----* ----@return self -function StopGrid:StopGrid () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TMXLayer.lua b/meta/3rd/Cocos4.0/library/cc/TMXLayer.lua deleted file mode 100644 index 718603b9..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TMXLayer.lua +++ /dev/null @@ -1,144 +0,0 @@ ----@meta - ----@class cc.TMXLayer :cc.SpriteBatchNode -local TMXLayer={ } -cc.TMXLayer=TMXLayer - - - - ----* Returns the position in points of a given tile coordinate.
----* param tileCoordinate The tile coordinate.
----* return The position in points of a given tile coordinate. ----@param tileCoordinate vec2_table ----@return vec2_table -function TMXLayer:getPositionAt (tileCoordinate) end ----* Set layer orientation, which is the same as the map orientation.
----* param orientation Layer orientation,which is the same as the map orientation. ----@param orientation int ----@return self -function TMXLayer:setLayerOrientation (orientation) end ----* Dealloc the map that contains the tile position from memory.
----* Unless you want to know at runtime the tiles positions, you can safely call this method.
----* If you are going to call layer->tileGIDAt() then, don't release the map. ----@return self -function TMXLayer:releaseMap () end ----* Size of the layer in tiles.
----* return Size of the layer in tiles. ----@return size_table -function TMXLayer:getLayerSize () end ----* Set the size of the map's tile.
----* param size The size of the map's tile. ----@param size size_table ----@return self -function TMXLayer:setMapTileSize (size) end ----* Layer orientation, which is the same as the map orientation.
----* return Layer orientation, which is the same as the map orientation. ----@return int -function TMXLayer:getLayerOrientation () end ----* Set an Properties from to layer.
----* param properties It is used to set the layer Properties. ----@param properties map_table ----@return self -function TMXLayer:setProperties (properties) end ----* Set the layer name.
----* param layerName The layer name. ----@param layerName string ----@return self -function TMXLayer:setLayerName (layerName) end ----* Removes a tile at given tile coordinate.
----* param tileCoordinate The tile coordinate. ----@param tileCoordinate vec2_table ----@return self -function TMXLayer:removeTileAt (tileCoordinate) end ----* Initializes a TMXLayer with a tileset info, a layer info and a map info.
----* param tilesetInfo An tileset info.
----* param layerInfo A layer info.
----* param mapInfo A map info.
----* return If initializes successfully, it will return true. ----@param tilesetInfo cc.TMXTilesetInfo ----@param layerInfo cc.TMXLayerInfo ----@param mapInfo cc.TMXMapInfo ----@return boolean -function TMXLayer:initWithTilesetInfo (tilesetInfo,layerInfo,mapInfo) end ----* Creates the tiles. ----@return self -function TMXLayer:setupTiles () end ----@overload fun(unsigned_int:unsigned_int,vec2_table:vec2_table,int:int):self ----@overload fun(unsigned_int:unsigned_int,vec2_table:vec2_table):self ----@param gid unsigned_int ----@param tileCoordinate vec2_table ----@param flags int ----@return self -function TMXLayer:setTileGID (gid,tileCoordinate,flags) end ----* Size of the map's tile (could be different from the tile's size).
----* return The size of the map's tile. ----@return size_table -function TMXLayer:getMapTileSize () end ----* Return the value for the specific property name.
----* param propertyName The specific property name.
----* return Return the value for the specific property name. ----@param propertyName string ----@return cc.Value -function TMXLayer:getProperty (propertyName) end ----* Set size of the layer in tiles.
----* param size Size of the layer in tiles. ----@param size size_table ----@return self -function TMXLayer:setLayerSize (size) end ----* Get the layer name.
----* return The layer name. ----@return string -function TMXLayer:getLayerName () end ----* Set tileset information for the layer.
----* param info The tileset information for the layer.
----* js NA ----@param info cc.TMXTilesetInfo ----@return self -function TMXLayer:setTileSet (info) end ----* Tileset information for the layer.
----* return Tileset information for the layer. ----@return cc.TMXTilesetInfo -function TMXLayer:getTileSet () end ----@overload fun():self ----@overload fun():self ----@return map_table -function TMXLayer:getProperties () end ----* Returns the tile (Sprite) at a given a tile coordinate.
----* The returned Sprite will be already added to the TMXLayer. Don't add it again.
----* The Sprite can be treated like any other Sprite: rotated, scaled, translated, opacity, color, etc.
----* You can remove either by calling:
----* - layer->removeChild(sprite, cleanup);
----* - or layer->removeTileAt(Vec2(x,y));
----* param tileCoordinate A tile coordinate.
----* return Returns the tile (Sprite) at a given a tile coordinate. ----@param tileCoordinate vec2_table ----@return cc.Sprite -function TMXLayer:getTileAt (tileCoordinate) end ----* Creates a TMXLayer with an tileset info, a layer info and a map info.
----* param tilesetInfo An tileset info.
----* param layerInfo A layer info.
----* param mapInfo A map info.
----* return An autorelease object. ----@param tilesetInfo cc.TMXTilesetInfo ----@param layerInfo cc.TMXLayerInfo ----@param mapInfo cc.TMXMapInfo ----@return self -function TMXLayer:create (tilesetInfo,layerInfo,mapInfo) end ----* ----@param child cc.Node ----@param zOrder int ----@param tag int ----@return self -function TMXLayer:addChild (child,zOrder,tag) end ----* js NA ----@return string -function TMXLayer:getDescription () end ----* ----@param child cc.Node ----@param cleanup boolean ----@return self -function TMXLayer:removeChild (child,cleanup) end ----* js ctor ----@return self -function TMXLayer:TMXLayer () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TMXLayerInfo.lua b/meta/3rd/Cocos4.0/library/cc/TMXLayerInfo.lua deleted file mode 100644 index 734d52d3..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TMXLayerInfo.lua +++ /dev/null @@ -1,19 +0,0 @@ ----@meta - ----@class cc.TMXLayerInfo :cc.Ref -local TMXLayerInfo={ } -cc.TMXLayerInfo=TMXLayerInfo - - - - ----* ----@param properties map_table ----@return self -function TMXLayerInfo:setProperties (properties) end ----* ----@return map_table -function TMXLayerInfo:getProperties () end ----* js ctor ----@return self -function TMXLayerInfo:TMXLayerInfo () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TMXMapInfo.lua b/meta/3rd/Cocos4.0/library/cc/TMXMapInfo.lua deleted file mode 100644 index ffb02745..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TMXMapInfo.lua +++ /dev/null @@ -1,164 +0,0 @@ ----@meta - ----@class cc.TMXMapInfo -local TMXMapInfo={ } -cc.TMXMapInfo=TMXMapInfo - - - - ----* ----@param currentString string ----@return self -function TMXMapInfo:setCurrentString (currentString) end ----* / map hexsidelength ----@return int -function TMXMapInfo:getHexSideLength () end ----* ----@param tileSize size_table ----@return self -function TMXMapInfo:setTileSize (tileSize) end ----* / map orientation ----@return int -function TMXMapInfo:getOrientation () end ----* ----@param groups array_table ----@return self -function TMXMapInfo:setObjectGroups (groups) end ----* ----@param layers array_table ----@return self -function TMXMapInfo:setLayers (layers) end ----* initializes parsing of an XML file, either a tmx (Map) file or tsx (Tileset) file ----@param xmlFilename string ----@return boolean -function TMXMapInfo:parseXMLFile (xmlFilename) end ----* / parent element ----@return int -function TMXMapInfo:getParentElement () end ----* ----@param fileName string ----@return self -function TMXMapInfo:setTMXFileName (fileName) end ----* ----@param xmlString string ----@return boolean -function TMXMapInfo:parseXMLString (xmlString) end ----@overload fun():self ----@overload fun():self ----@return array_table -function TMXMapInfo:getLayers () end ----* / map staggeraxis ----@return int -function TMXMapInfo:getStaggerAxis () end ----* ----@param hexSideLength int ----@return self -function TMXMapInfo:setHexSideLength (hexSideLength) end ----* initializes a TMX format with a tmx file ----@param tmxFile string ----@return boolean -function TMXMapInfo:initWithTMXFile (tmxFile) end ----* / parent GID ----@return int -function TMXMapInfo:getParentGID () end ----@overload fun():self ----@overload fun():self ----@return array_table -function TMXMapInfo:getTilesets () end ----* ----@param element int ----@return self -function TMXMapInfo:setParentElement (element) end ----* initializes a TMX format with an XML string and a TMX resource path ----@param tmxString string ----@param resourcePath string ----@return boolean -function TMXMapInfo:initWithXML (tmxString,resourcePath) end ----* ----@param gid int ----@return self -function TMXMapInfo:setParentGID (gid) end ----* / layer attribs ----@return int -function TMXMapInfo:getLayerAttribs () end ----* / tiles width & height ----@return size_table -function TMXMapInfo:getTileSize () end ----* ----@return map_table -function TMXMapInfo:getTileProperties () end ----* / is storing characters? ----@return boolean -function TMXMapInfo:isStoringCharacters () end ----* ----@return string -function TMXMapInfo:getExternalTilesetFileName () end ----@overload fun():self ----@overload fun():self ----@return array_table -function TMXMapInfo:getObjectGroups () end ----* ----@return string -function TMXMapInfo:getTMXFileName () end ----* ----@param staggerIndex int ----@return self -function TMXMapInfo:setStaggerIndex (staggerIndex) end ----* ----@param properties map_table ----@return self -function TMXMapInfo:setProperties (properties) end ----* ----@param orientation int ----@return self -function TMXMapInfo:setOrientation (orientation) end ----* ----@param tileProperties map_table ----@return self -function TMXMapInfo:setTileProperties (tileProperties) end ----* ----@param mapSize size_table ----@return self -function TMXMapInfo:setMapSize (mapSize) end ----* ----@return string -function TMXMapInfo:getCurrentString () end ----* ----@param storingCharacters boolean ----@return self -function TMXMapInfo:setStoringCharacters (storingCharacters) end ----* ----@param staggerAxis int ----@return self -function TMXMapInfo:setStaggerAxis (staggerAxis) end ----* / map width & height ----@return size_table -function TMXMapInfo:getMapSize () end ----* ----@param tilesets array_table ----@return self -function TMXMapInfo:setTilesets (tilesets) end ----@overload fun():self ----@overload fun():self ----@return map_table -function TMXMapInfo:getProperties () end ----* / map stagger index ----@return int -function TMXMapInfo:getStaggerIndex () end ----* ----@param layerAttribs int ----@return self -function TMXMapInfo:setLayerAttribs (layerAttribs) end ----* creates a TMX Format with a tmx file ----@param tmxFile string ----@return self -function TMXMapInfo:create (tmxFile) end ----* creates a TMX Format with an XML string and a TMX resource path ----@param tmxString string ----@param resourcePath string ----@return self -function TMXMapInfo:createWithXML (tmxString,resourcePath) end ----* js ctor ----@return self -function TMXMapInfo:TMXMapInfo () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TMXObjectGroup.lua b/meta/3rd/Cocos4.0/library/cc/TMXObjectGroup.lua deleted file mode 100644 index 9e6088d7..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TMXObjectGroup.lua +++ /dev/null @@ -1,61 +0,0 @@ ----@meta - ----@class cc.TMXObjectGroup :cc.Ref -local TMXObjectGroup={ } -cc.TMXObjectGroup=TMXObjectGroup - - - - ----* Sets the offset position of child objects.
----* param offset The offset position of child objects. ----@param offset vec2_table ----@return self -function TMXObjectGroup:setPositionOffset (offset) end ----* Return the value for the specific property name.
----* param propertyName The specific property name.
----* return Return the value for the specific property name.
----* js NA ----@param propertyName string ----@return cc.Value -function TMXObjectGroup:getProperty (propertyName) end ----* Gets the offset position of child objects.
----* return The offset position of child objects. ----@return vec2_table -function TMXObjectGroup:getPositionOffset () end ----* Return the dictionary for the specific object name.
----* It will return the 1st object found on the array for the given name.
----* return Return the dictionary for the specific object name. ----@param objectName string ----@return map_table -function TMXObjectGroup:getObject (objectName) end ----@overload fun():self ----@overload fun():self ----@return array_table -function TMXObjectGroup:getObjects () end ----* Set the group name.
----* param groupName A string,it is used to set the group name. ----@param groupName string ----@return self -function TMXObjectGroup:setGroupName (groupName) end ----@overload fun():self ----@overload fun():self ----@return map_table -function TMXObjectGroup:getProperties () end ----* Get the group name.
----* return The group name. ----@return string -function TMXObjectGroup:getGroupName () end ----* Sets the list of properties.
----* param properties The list of properties. ----@param properties map_table ----@return self -function TMXObjectGroup:setProperties (properties) end ----* Sets the array of the objects.
----* param objects The array of the objects. ----@param objects array_table ----@return self -function TMXObjectGroup:setObjects (objects) end ----* js ctor ----@return self -function TMXObjectGroup:TMXObjectGroup () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TMXTiledMap.lua b/meta/3rd/Cocos4.0/library/cc/TMXTiledMap.lua deleted file mode 100644 index 50a1c5ed..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TMXTiledMap.lua +++ /dev/null @@ -1,109 +0,0 @@ ----@meta - ----@class cc.TMXTiledMap :cc.Node -local TMXTiledMap={ } -cc.TMXTiledMap=TMXTiledMap - - - - ----* Set the object groups.
----* param groups The object groups. ----@param groups array_table ----@return self -function TMXTiledMap:setObjectGroups (groups) end ----* Return the value for the specific property name.
----* param propertyName The specific property name.
----* return Return the value for the specific property name. ----@param propertyName string ----@return cc.Value -function TMXTiledMap:getProperty (propertyName) end ----* ----@return int -function TMXTiledMap:getLayerNum () end ----* Set the map's size property measured in tiles.
----* param mapSize The map's size property measured in tiles. ----@param mapSize size_table ----@return self -function TMXTiledMap:setMapSize (mapSize) end ----* Return the TMXObjectGroup for the specific group.
----* param groupName The group Name.
----* return A Type of TMXObjectGroup. ----@param groupName string ----@return cc.TMXObjectGroup -function TMXTiledMap:getObjectGroup (groupName) end ----@overload fun():self ----@overload fun():self ----@return array_table -function TMXTiledMap:getObjectGroups () end ----* ----@return string -function TMXTiledMap:getResourceFile () end ----* initializes a TMX Tiled Map with a TMX file ----@param tmxFile string ----@return boolean -function TMXTiledMap:initWithTMXFile (tmxFile) end ----* The tiles's size property measured in pixels.
----* return The tiles's size property measured in pixels. ----@return size_table -function TMXTiledMap:getTileSize () end ----* The map's size property measured in tiles.
----* return The map's size property measured in tiles. ----@return size_table -function TMXTiledMap:getMapSize () end ----* initializes a TMX Tiled Map with a TMX formatted XML string and a path to TMX resources ----@param tmxString string ----@param resourcePath string ----@return boolean -function TMXTiledMap:initWithXML (tmxString,resourcePath) end ----* Properties.
----* return Properties. ----@return map_table -function TMXTiledMap:getProperties () end ----* Set the tiles's size property measured in pixels.
----* param tileSize The tiles's size property measured in pixels. ----@param tileSize size_table ----@return self -function TMXTiledMap:setTileSize (tileSize) end ----* Set the properties.
----* param properties A Type of ValueMap to set the properties. ----@param properties map_table ----@return self -function TMXTiledMap:setProperties (properties) end ----* Return the TMXLayer for the specific layer.
----* param layerName A specific layer.
----* return The TMXLayer for the specific layer. ----@param layerName string ----@return cc.TMXLayer -function TMXTiledMap:getLayer (layerName) end ----* Map orientation.
----* return Map orientation. ----@return int -function TMXTiledMap:getMapOrientation () end ----* Set map orientation.
----* param mapOrientation The map orientation. ----@param mapOrientation int ----@return self -function TMXTiledMap:setMapOrientation (mapOrientation) end ----* Creates a TMX Tiled Map with a TMX file.
----* param tmxFile A TMX file.
----* return An autorelease object. ----@param tmxFile string ----@return self -function TMXTiledMap:create (tmxFile) end ----* Initializes a TMX Tiled Map with a TMX formatted XML string and a path to TMX resources.
----* param tmxString A TMX formatted XML string.
----* param resourcePath The path to TMX resources.
----* return An autorelease object.
----* js NA ----@param tmxString string ----@param resourcePath string ----@return self -function TMXTiledMap:createWithXML (tmxString,resourcePath) end ----* Get the description.
----* js NA ----@return string -function TMXTiledMap:getDescription () end ----* js ctor ----@return self -function TMXTiledMap:TMXTiledMap () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TMXTilesetInfo.lua b/meta/3rd/Cocos4.0/library/cc/TMXTilesetInfo.lua deleted file mode 100644 index d6427059..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TMXTilesetInfo.lua +++ /dev/null @@ -1,16 +0,0 @@ ----@meta - ----@class cc.TMXTilesetInfo :cc.Ref -local TMXTilesetInfo={ } -cc.TMXTilesetInfo=TMXTilesetInfo - - - - ----* ----@param gid unsigned_int ----@return rect_table -function TMXTilesetInfo:getRectForGID (gid) end ----* js ctor ----@return self -function TMXTilesetInfo:TMXTilesetInfo () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TableView.lua b/meta/3rd/Cocos4.0/library/cc/TableView.lua deleted file mode 100644 index f7465ff7..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TableView.lua +++ /dev/null @@ -1,84 +0,0 @@ ----@meta - ----@class cc.TableView :ccui.ScrollView@all parent class: ScrollView,ScrollViewDelegate -local TableView={ } -cc.TableView=TableView - - - - ----* Updates the content of the cell at a given index.
----* param idx index to find a cell ----@param idx int ----@return self -function TableView:updateCellAtIndex (idx) end ----* determines how cell is ordered and filled in the view. ----@param order int ----@return self -function TableView:setVerticalFillOrder (order) end ----* ----@return self -function TableView:_updateContentSize () end ----* ----@return int -function TableView:getVerticalFillOrder () end ----* Removes a cell at a given index
----* param idx index to find a cell ----@param idx int ----@return self -function TableView:removeCellAtIndex (idx) end ----* ----@param size size_table ----@param container cc.Node ----@return boolean -function TableView:initWithViewSize (size,container) end ----* ----@param view cc.ScrollView ----@return self -function TableView:scrollViewDidScroll (view) end ----* reloads data from data source. the view will be refreshed. ----@return self -function TableView:reloadData () end ----* ----@param view cc.ScrollView ----@return self -function TableView:scrollViewDidZoom (view) end ----* Inserts a new cell at a given index
----* param idx location to insert ----@param idx int ----@return self -function TableView:insertCellAtIndex (idx) end ----* Returns an existing cell at a given index. Returns nil if a cell is nonexistent at the moment of query.
----* param idx index
----* return a cell at a given index ----@param idx int ----@return cc.TableViewCell -function TableView:cellAtIndex (idx) end ----* Dequeues a free cell if available. nil if not.
----* return free cell ----@return cc.TableViewCell -function TableView:dequeueCell () end ----* ----@param pTouch cc.Touch ----@param pEvent cc.Event ----@return self -function TableView:onTouchMoved (pTouch,pEvent) end ----* ----@param pTouch cc.Touch ----@param pEvent cc.Event ----@return self -function TableView:onTouchEnded (pTouch,pEvent) end ----* ----@param pTouch cc.Touch ----@param pEvent cc.Event ----@return self -function TableView:onTouchCancelled (pTouch,pEvent) end ----* ----@param pTouch cc.Touch ----@param pEvent cc.Event ----@return boolean -function TableView:onTouchBegan (pTouch,pEvent) end ----* js ctor
----* lua new ----@return self -function TableView:TableView () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TableViewCell.lua b/meta/3rd/Cocos4.0/library/cc/TableViewCell.lua deleted file mode 100644 index 15b6f772..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TableViewCell.lua +++ /dev/null @@ -1,25 +0,0 @@ ----@meta - ----@class cc.TableViewCell :cc.Node -local TableViewCell={ } -cc.TableViewCell=TableViewCell - - - - ----* Cleans up any resources linked to this cell and resets idx property. ----@return self -function TableViewCell:reset () end ----* The index used internally by SWTableView and its subclasses ----@return int -function TableViewCell:getIdx () end ----* ----@param uIdx int ----@return self -function TableViewCell:setIdx (uIdx) end ----* ----@return self -function TableViewCell:create () end ----* ----@return self -function TableViewCell:TableViewCell () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TargetedAction.lua b/meta/3rd/Cocos4.0/library/cc/TargetedAction.lua deleted file mode 100644 index f3d88acf..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TargetedAction.lua +++ /dev/null @@ -1,51 +0,0 @@ ----@meta - ----@class cc.TargetedAction :cc.ActionInterval -local TargetedAction={ } -cc.TargetedAction=TargetedAction - - - - ----@overload fun():cc.Node ----@overload fun():cc.Node ----@return cc.Node -function TargetedAction:getForcedTarget () end ----* Init an action with the specified action and forced target ----@param target cc.Node ----@param action cc.FiniteTimeAction ----@return boolean -function TargetedAction:initWithTarget (target,action) end ----* Sets the target that the action will be forced to run with.
----* param forcedTarget The target that the action will be forced to run with. ----@param forcedTarget cc.Node ----@return self -function TargetedAction:setForcedTarget (forcedTarget) end ----* Create an action with the specified action and forced target.
----* param target The target needs to override.
----* param action The action needs to override.
----* return An autoreleased TargetedAction object. ----@param target cc.Node ----@param action cc.FiniteTimeAction ----@return self -function TargetedAction:create (target,action) end ----* ----@param target cc.Node ----@return self -function TargetedAction:startWithTarget (target) end ----* ----@return self -function TargetedAction:clone () end ----* ----@return self -function TargetedAction:stop () end ----* ----@return self -function TargetedAction:reverse () end ----* param time In seconds. ----@param time float ----@return self -function TargetedAction:update (time) end ----* ----@return self -function TargetedAction:TargetedAction () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Technique.lua b/meta/3rd/Cocos4.0/library/cc/Technique.lua deleted file mode 100644 index 0c21dd2c..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Technique.lua +++ /dev/null @@ -1,44 +0,0 @@ ----@meta - ----@class cc.Technique :cc.Ref -local Technique={ } -cc.Technique=Technique - - - - ----* Returns the number of Passes in the Technique ----@return int -function Technique:getPassCount () end ----* ----@param material cc.Material ----@return self -function Technique:setMaterial (material) end ----* Returns a new clone of the Technique ----@return self -function Technique:clone () end ----* Adds a new pass to the Technique.
----* Order matters. First added, first rendered ----@param pass cc.Pass ----@return self -function Technique:addPass (pass) end ----* Returns the list of passes ----@return array_table -function Technique:getPasses () end ----* Returns the name of the Technique ----@return string -function Technique:getName () end ----* Returns the Pass at given index ----@param index int ----@return cc.Pass -function Technique:getPassByIndex (index) end ----* Creates a new Technique with a GLProgramState.
----* Method added to support legacy code ----@param parent cc.Material ----@param state cc.backend.ProgramState ----@return self -function Technique:createWithProgramState (parent,state) end ----* ----@param parent cc.Material ----@return self -function Technique:create (parent) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Terrain.lua b/meta/3rd/Cocos4.0/library/cc/Terrain.lua deleted file mode 100644 index cf489926..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Terrain.lua +++ /dev/null @@ -1,111 +0,0 @@ ----@meta - ----@class cc.Terrain :cc.Node -local Terrain={ } -cc.Terrain=Terrain - - - - ----* initialize heightMap data ----@param heightMap string ----@return boolean -function Terrain:initHeightMap (heightMap) end ----* set the MaxDetailAmount. ----@param maxValue int ----@return self -function Terrain:setMaxDetailMapAmount (maxValue) end ----* show the wireline instead of the surface,Debug Use only.
----* Note only support desktop platform ----@param boolValue boolean ----@return self -function Terrain:setDrawWire (boolValue) end ----* get the terrain's height data ----@return array_table -function Terrain:getHeightData () end ----* set the Detail Map ----@param index unsigned_int ----@param detailMap cc.Terrain.DetailMap ----@return self -function Terrain:setDetailMap (index,detailMap) end ----* reset the heightmap data. ----@param heightMap string ----@return self -function Terrain:resetHeightMap (heightMap) end ----* set directional light for the terrain
----* param lightDir The direction of directional light, Note that lightDir is in the terrain's local space. Most of the time terrain is placed at (0,0,0) and without rotation, so lightDir is also in the world space. ----@param lightDir vec3_table ----@return self -function Terrain:setLightDir (lightDir) end ----* set the alpha map ----@param newAlphaMapTexture cc.Texture2D ----@return self -function Terrain:setAlphaMap (newAlphaMapTexture) end ----* set the skirt height ratio ----@param ratio float ----@return self -function Terrain:setSkirtHeightRatio (ratio) end ----* Convert a world Space position (X,Z) to terrain space position (X,Z) ----@param worldSpace vec2_table ----@return vec2_table -function Terrain:convertToTerrainSpace (worldSpace) end ----* initialize alphaMap ,detailMaps textures ----@return boolean -function Terrain:initTextures () end ----* initialize all Properties which terrain need ----@return boolean -function Terrain:initProperties () end ----* ----@param parameter cc.Terrain.TerrainData ----@param fixedType int ----@return boolean -function Terrain:initWithTerrainData (parameter,fixedType) end ----* Set threshold distance of each LOD level,must equal or greater than the chunk size
----* Note when invoke initHeightMap, the LOD distance will be automatic calculated. ----@param lod1 float ----@param lod2 float ----@param lod3 float ----@return self -function Terrain:setLODDistance (lod1,lod2,lod3) end ----* get the terrain's size ----@return size_table -function Terrain:getTerrainSize () end ----* get the normal of the specified position in terrain
----* return the normal vector of the specified position of the terrain.
----* note the fast normal calculation may not get precise normal vector. ----@param pixelX int ----@param pixelY int ----@return vec3_table -function Terrain:getNormal (pixelX,pixelY) end ----* ----@return self -function Terrain:reload () end ----* get height from the raw height filed ----@param pixelX int ----@param pixelY int ----@return float -function Terrain:getImageHeight (pixelX,pixelY) end ----* set light map texture ----@param fileName string ----@return self -function Terrain:setLightMap (fileName) end ----* Switch frustum Culling Flag
----* Note frustum culling will remarkable improve your terrain rendering performance. ----@param boolValue boolean ----@return self -function Terrain:setIsEnableFrustumCull (boolValue) end ----* get the terrain's minimal height. ----@return float -function Terrain:getMinHeight () end ----* get the terrain's maximal height. ----@return float -function Terrain:getMaxHeight () end ----* ----@param renderer cc.Renderer ----@param transform mat4_table ----@param flags unsigned_int ----@return self -function Terrain:draw (renderer,transform,flags) end ----* ----@return self -function Terrain:Terrain () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Texture2D.lua b/meta/3rd/Cocos4.0/library/cc/Texture2D.lua deleted file mode 100644 index 96de66d8..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Texture2D.lua +++ /dev/null @@ -1,154 +0,0 @@ ----@meta - ----@class cc.Texture2D :cc.Ref -local Texture2D={ } -cc.Texture2D=Texture2D - - - - ----* Gets max T. ----@return float -function Texture2D:getMaxT () end ----* ----@param alphaTexture cc.Texture2D ----@return self -function Texture2D:setAlphaTexture (alphaTexture) end ----* Returns the pixel format.
----* since v2.0 ----@return char -function Texture2D:getStringForFormat () end ----@overload fun(cc.Image:cc.Image,int:int):self ----@overload fun(cc.Image:cc.Image):self ----@param image cc.Image ----@param format int ----@return boolean -function Texture2D:initWithImage (image,format) end ----* Gets max S. ----@return float -function Texture2D:getMaxS () end ----* Whether or not the texture has their Alpha premultiplied. ----@return boolean -function Texture2D:hasPremultipliedAlpha () end ----* Gets the height of the texture in pixels. ----@return int -function Texture2D:getPixelsHigh () end ----* ----@return boolean -function Texture2D:getAlphaTextureName () end ----@overload fun(int:int):self ----@overload fun():self ----@param format int ----@return unsigned_int -function Texture2D:getBitsPerPixelForFormat (format) end ----* Sets max S. ----@param maxS float ----@return self -function Texture2D:setMaxS (maxS) end ----@overload fun(char:char,string1:cc.FontDefinition):self ----@overload fun(char:char,string:string,float:float,size_table:size_table,int:int,int:int,boolean:boolean,int:int):self ----@param text char ----@param fontName string ----@param fontSize float ----@param dimensions size_table ----@param hAlignment int ----@param vAlignment int ----@param enableWrap boolean ----@param overflow int ----@return boolean -function Texture2D:initWithString (text,fontName,fontSize,dimensions,hAlignment,vAlignment,enableWrap,overflow) end ----* Sets max T. ----@param maxT float ----@return self -function Texture2D:setMaxT (maxT) end ----* ----@return string -function Texture2D:getPath () end ----* Draws a texture inside a rect. ----@param rect rect_table ----@param globalZOrder float ----@return self -function Texture2D:drawInRect (rect,globalZOrder) end ----* ----@return boolean -function Texture2D:isRenderTarget () end ----* Get the texture content size. ----@return size_table -function Texture2D:getContentSize () end ----* Sets alias texture parameters:
----* - GL_TEXTURE_MIN_FILTER = GL_NEAREST
----* - GL_TEXTURE_MAG_FILTER = GL_NEAREST
----* warning Calling this method could allocate additional texture memory.
----* since v0.8 ----@return self -function Texture2D:setAliasTexParameters () end ----* Sets antialias texture parameters:
----* - GL_TEXTURE_MIN_FILTER = GL_LINEAR
----* - GL_TEXTURE_MAG_FILTER = GL_LINEAR
----* warning Calling this method could allocate additional texture memory.
----* since v0.8 ----@return self -function Texture2D:setAntiAliasTexParameters () end ----* Generates mipmap images for the texture.
----* It only works if the texture size is POT (power of 2).
----* since v0.99.0 ----@return self -function Texture2D:generateMipmap () end ----* ----@return self -function Texture2D:getAlphaTexture () end ----* Gets the pixel format of the texture. ----@return int -function Texture2D:getPixelFormat () end ----* ----@return cc.backend.TextureBackend -function Texture2D:getBackendTexture () end ----* Get content size. ----@return size_table -function Texture2D:getContentSizeInPixels () end ----* Gets the width of the texture in pixels. ----@return int -function Texture2D:getPixelsWide () end ----* Drawing extensions to make it easy to draw basic quads using a Texture2D object.
----* These functions require GL_TEXTURE_2D and both GL_VERTEX_ARRAY and GL_TEXTURE_COORD_ARRAY client states to be enabled.
----* Draws a texture at a given point. ----@param point vec2_table ----@param globalZOrder float ----@return self -function Texture2D:drawAtPoint (point,globalZOrder) end ----* Whether or not the texture has mip maps. ----@return boolean -function Texture2D:hasMipmaps () end ----* ----@param renderTarget boolean ----@return self -function Texture2D:setRenderTarget (renderTarget) end ----* ----@param texture cc.backend.TextureBackend ----@param preMultipliedAlpha boolean ----@return boolean -function Texture2D:initWithBackendTexture (texture,preMultipliedAlpha) end ----* sets the default pixel format for UIImagescontains alpha channel.
----* param format
----* If the UIImage contains alpha channel, then the options are:
----* - generate 32-bit textures: backend::PixelFormat::RGBA8888 (default one)
----* - generate 24-bit textures: backend::PixelFormat::RGB888
----* - generate 16-bit textures: backend::PixelFormat::RGBA4444
----* - generate 16-bit textures: backend::PixelFormat::RGB5A1
----* - generate 16-bit textures: backend::PixelFormat::RGB565
----* - generate 8-bit textures: backend::PixelFormat::A8 (only use it if you use just 1 color)
----* How does it work ?
----* - If the image is an RGBA (with Alpha) then the default pixel format will be used (it can be a 8-bit, 16-bit or 32-bit texture)
----* - If the image is an RGB (without Alpha) then: If the default pixel format is RGBA8888 then a RGBA8888 (32-bit) will be used. Otherwise a RGB565 (16-bit texture) will be used.
----* This parameter is not valid for PVR / PVR.CCZ images.
----* since v0.8 ----@param format int ----@return self -function Texture2D:setDefaultAlphaPixelFormat (format) end ----* Returns the alpha pixel format.
----* since v0.8 ----@return int -function Texture2D:getDefaultAlphaPixelFormat () end ----* js ctor ----@return self -function Texture2D:Texture2D () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TextureCache.lua b/meta/3rd/Cocos4.0/library/cc/TextureCache.lua deleted file mode 100644 index 55753f10..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TextureCache.lua +++ /dev/null @@ -1,101 +0,0 @@ ----@meta - ----@class cc.TextureCache :cc.Ref -local TextureCache={ } -cc.TextureCache=TextureCache - - - - ----* Reload texture from the image file.
----* If the file image hasn't loaded before, load it.
----* Otherwise the texture will be reloaded from the file image.
----* param fileName It's the related/absolute path of the file image.
----* return True if the reloading is succeed, otherwise return false. ----@param fileName string ----@return boolean -function TextureCache:reloadTexture (fileName) end ----* Unbind all bound image asynchronous load callbacks.
----* since v3.1 ----@return self -function TextureCache:unbindAllImageAsync () end ----* Deletes a texture from the cache given a its key name.
----* param key It's the related/absolute path of the file image.
----* since v0.99.4 ----@param key string ----@return self -function TextureCache:removeTextureForKey (key) end ----* Purges the dictionary of loaded textures.
----* Call this method if you receive the "Memory Warning".
----* In the short term: it will free some resources preventing your app from being killed.
----* In the medium term: it will allocate more resources.
----* In the long term: it will be the same. ----@return self -function TextureCache:removeAllTextures () end ----* js NA
----* lua NA ----@return string -function TextureCache:getDescription () end ----* Output to CCLOG the current contents of this TextureCache.
----* This will attempt to calculate the size of each texture, and the total texture memory in use.
----* since v1.0 ----@return string -function TextureCache:getCachedTextureInfo () end ----@overload fun(cc.Image:cc.Image,string:string):cc.Texture2D ----@overload fun(cc.Image0:string):cc.Texture2D ----@param image cc.Image ----@param key string ----@return cc.Texture2D -function TextureCache:addImage (image,key) end ----* Unbind a specified bound image asynchronous callback.
----* In the case an object who was bound to an image asynchronous callback was destroyed before the callback is invoked,
----* the object always need to unbind this callback manually.
----* param filename It's the related/absolute path of the file image.
----* since v3.1 ----@param filename string ----@return self -function TextureCache:unbindImageAsync (filename) end ----* Returns an already created texture. Returns nil if the texture doesn't exist.
----* param key It's the related/absolute path of the file image.
----* since v0.99.5 ----@param key string ----@return cc.Texture2D -function TextureCache:getTextureForKey (key) end ----* Get the file path of the texture
----* param texture A Texture2D object pointer.
----* return The full path of the file. ----@param texture cc.Texture2D ----@return string -function TextureCache:getTextureFilePath (texture) end ----* Reload texture from a new file.
----* This function is mainly for editor, won't suggest use it in game for performance reason.
----* param srcName Original texture file name.
----* param dstName New texture file name.
----* since v3.10 ----@param srcName string ----@param dstName string ----@return self -function TextureCache:renameTextureWithKey (srcName,dstName) end ----* Removes unused textures.
----* Textures that have a retain count of 1 will be deleted.
----* It is convenient to call this method after when starting a new Scene.
----* since v0.8 ----@return self -function TextureCache:removeUnusedTextures () end ----* Deletes a texture from the cache given a texture. ----@param texture cc.Texture2D ----@return self -function TextureCache:removeTexture (texture) end ----* Called by director, please do not called outside. ----@return self -function TextureCache:waitForQuit () end ----* ----@param suffix string ----@return self -function TextureCache:setETC1AlphaFileSuffix (suffix) end ----* ----@return string -function TextureCache:getETC1AlphaFileSuffix () end ----* js ctor ----@return self -function TextureCache:TextureCache () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TextureCube.lua b/meta/3rd/Cocos4.0/library/cc/TextureCube.lua deleted file mode 100644 index b51d2a9c..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TextureCube.lua +++ /dev/null @@ -1,39 +0,0 @@ ----@meta - ----@class cc.TextureCube :cc.Ref -local TextureCube={ } -cc.TextureCube=TextureCube - - - - ----* reload texture cube after GLESContext reconstructed. ----@return boolean -function TextureCube:reloadTexture () end ----* ----@return cc.backend.TextureBackend -function TextureCube:getBackendTexture () end ----* Sets the min filter, mag filter, wrap s and wrap t texture parameters.
----* If the texture size is NPOT (non power of 2), then in can only use GL_CLAMP_TO_EDGE in GL_TEXTURE_WRAP_{S,T}. ----@param r cc.backend.SamplerDescripto ----@return self -function TextureCube:setTexParameters (r) end ----* create cube texture from 6 textures.
----* param positive_x texture for the right side of the texture cube face.
----* param negative_x texture for the up side of the texture cube face.
----* param positive_y texture for the top side of the texture cube face
----* param negative_y texture for the bottom side of the texture cube face
----* param positive_z texture for the forward side of the texture cube face.
----* param negative_z texture for the rear side of the texture cube face.
----* return A new texture cube inited with given parameters. ----@param positive_x string ----@param negative_x string ----@param positive_y string ----@param negative_y string ----@param positive_z string ----@param negative_z string ----@return self -function TextureCube:create (positive_x,negative_x,positive_y,negative_y,positive_z,negative_z) end ----* Constructor. ----@return self -function TextureCube:TextureCube () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TileMapAtlas.lua b/meta/3rd/Cocos4.0/library/cc/TileMapAtlas.lua deleted file mode 100644 index ba326bb0..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TileMapAtlas.lua +++ /dev/null @@ -1,42 +0,0 @@ ----@meta - ----@class cc.TileMapAtlas :cc.AtlasNode -local TileMapAtlas={ } -cc.TileMapAtlas=TileMapAtlas - - - - ----* initializes a TileMap with a tile file (atlas) with a map file and the width and height of each tile in points.
----* The file will be loaded using the TextureMgr. ----@param tile string ----@param mapFile string ----@param tileWidth int ----@param tileHeight int ----@return boolean -function TileMapAtlas:initWithTileFile (tile,mapFile,tileWidth,tileHeight) end ----* dealloc the map from memory ----@return self -function TileMapAtlas:releaseMap () end ----* Returns a tile from position x,y.
----* For the moment only channel R is used ----@param position vec2_table ----@return color3b_table -function TileMapAtlas:getTileAt (position) end ----* sets a tile at position x,y.
----* For the moment only channel R is used ----@param tile color3b_table ----@param position vec2_table ----@return self -function TileMapAtlas:setTile (tile,position) end ----* creates a TileMap with a tile file (atlas) with a map file and the width and height of each tile in points.
----* The tile file will be loaded using the TextureMgr. ----@param tile string ----@param mapFile string ----@param tileWidth int ----@param tileHeight int ----@return self -function TileMapAtlas:create (tile,mapFile,tileWidth,tileHeight) end ----* js ctor ----@return self -function TileMapAtlas:TileMapAtlas () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TiledGrid3D.lua b/meta/3rd/Cocos4.0/library/cc/TiledGrid3D.lua deleted file mode 100644 index 1e0d7d72..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TiledGrid3D.lua +++ /dev/null @@ -1,28 +0,0 @@ ----@meta - ----@class cc.TiledGrid3D :cc.GridBase -local TiledGrid3D={ } -cc.TiledGrid3D=TiledGrid3D - - - - ----@overload fun(size_table:size_table,cc.Texture2D1:rect_table):self ----@overload fun(size_table:size_table):self ----@overload fun(size_table:size_table,cc.Texture2D:cc.Texture2D,boolean:boolean):self ----@overload fun(size_table:size_table,cc.Texture2D:cc.Texture2D,boolean:boolean,rect_table:rect_table):self ----@param gridSize size_table ----@param texture cc.Texture2D ----@param flipped boolean ----@param rect rect_table ----@return self -function TiledGrid3D:create (gridSize,texture,flipped,rect) end ----* ----@return self -function TiledGrid3D:calculateVertexPoints () end ----* Implementations for interfaces in base class. ----@return self -function TiledGrid3D:blit () end ----* ----@return self -function TiledGrid3D:reuse () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TiledGrid3DAction.lua b/meta/3rd/Cocos4.0/library/cc/TiledGrid3DAction.lua deleted file mode 100644 index 5f65f5bb..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TiledGrid3DAction.lua +++ /dev/null @@ -1,15 +0,0 @@ ----@meta - ----@class cc.TiledGrid3DAction :cc.GridAction -local TiledGrid3DAction={ } -cc.TiledGrid3DAction=TiledGrid3DAction - - - - ----* ----@return self -function TiledGrid3DAction:clone () end ----* returns the grid ----@return cc.GridBase -function TiledGrid3DAction:getGrid () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Timer.lua b/meta/3rd/Cocos4.0/library/cc/Timer.lua deleted file mode 100644 index e7078c8a..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Timer.lua +++ /dev/null @@ -1,35 +0,0 @@ ----@meta - ----@class cc.Timer :cc.Ref -local Timer={ } -cc.Timer=Timer - - - - ----* ----@param seconds float ----@param _repeat unsigned_int ----@param delay float ----@return self -function Timer:setupTimerWithInterval (seconds,_repeat,delay) end ----* triggers the timer ----@param dt float ----@return self -function Timer:update (dt) end ----* ----@return boolean -function Timer:isAborted () end ----* ----@return boolean -function Timer:isExhausted () end ----* ----@param dt float ----@return self -function Timer:trigger (dt) end ----* ----@return self -function Timer:cancel () end ----* ----@return self -function Timer:setAborted () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TintBy.lua b/meta/3rd/Cocos4.0/library/cc/TintBy.lua deleted file mode 100644 index 14c6f298..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TintBy.lua +++ /dev/null @@ -1,45 +0,0 @@ ----@meta - ----@class cc.TintBy :cc.ActionInterval -local TintBy={ } -cc.TintBy=TintBy - - - - ----* initializes the action with duration and color ----@param duration float ----@param deltaRed short ----@param deltaGreen short ----@param deltaBlue short ----@return boolean -function TintBy:initWithDuration (duration,deltaRed,deltaGreen,deltaBlue) end ----* Creates an action with duration and color.
----* param duration Duration time, in seconds.
----* param deltaRed Delta red color.
----* param deltaGreen Delta green color.
----* param deltaBlue Delta blue color.
----* return An autoreleased TintBy object. ----@param duration float ----@param deltaRed short ----@param deltaGreen short ----@param deltaBlue short ----@return self -function TintBy:create (duration,deltaRed,deltaGreen,deltaBlue) end ----* ----@param target cc.Node ----@return self -function TintBy:startWithTarget (target) end ----* ----@return self -function TintBy:clone () end ----* ----@return self -function TintBy:reverse () end ----* param time In seconds. ----@param time float ----@return self -function TintBy:update (time) end ----* ----@return self -function TintBy:TintBy () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TintTo.lua b/meta/3rd/Cocos4.0/library/cc/TintTo.lua deleted file mode 100644 index 90421783..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TintTo.lua +++ /dev/null @@ -1,41 +0,0 @@ ----@meta - ----@class cc.TintTo :cc.ActionInterval -local TintTo={ } -cc.TintTo=TintTo - - - - ----* initializes the action with duration and color ----@param duration float ----@param red unsigned_char ----@param green unsigned_char ----@param blue unsigned_char ----@return boolean -function TintTo:initWithDuration (duration,red,green,blue) end ----@overload fun(float:float,unsigned_char1:color3b_table):self ----@overload fun(float:float,unsigned_char:unsigned_char,unsigned_char:unsigned_char,unsigned_char:unsigned_char):self ----@param duration float ----@param red unsigned_char ----@param green unsigned_char ----@param blue unsigned_char ----@return self -function TintTo:create (duration,red,green,blue) end ----* ----@param target cc.Node ----@return self -function TintTo:startWithTarget (target) end ----* ----@return self -function TintTo:clone () end ----* ----@return self -function TintTo:reverse () end ----* param time In seconds. ----@param time float ----@return self -function TintTo:update (time) end ----* ----@return self -function TintTo:TintTo () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/ToggleVisibility.lua b/meta/3rd/Cocos4.0/library/cc/ToggleVisibility.lua deleted file mode 100644 index 905a91d0..00000000 --- a/meta/3rd/Cocos4.0/library/cc/ToggleVisibility.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class cc.ToggleVisibility :cc.ActionInstant -local ToggleVisibility={ } -cc.ToggleVisibility=ToggleVisibility - - - - ----* Allocates and initializes the action.
----* return An autoreleased ToggleVisibility object. ----@return self -function ToggleVisibility:create () end ----* ----@return self -function ToggleVisibility:clone () end ----* param time In seconds. ----@param time float ----@return self -function ToggleVisibility:update (time) end ----* ----@return self -function ToggleVisibility:reverse () end ----* ----@return self -function ToggleVisibility:ToggleVisibility () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Touch.lua b/meta/3rd/Cocos4.0/library/cc/Touch.lua deleted file mode 100644 index a862efbf..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Touch.lua +++ /dev/null @@ -1,64 +0,0 @@ ----@meta - ----@class cc.Touch :cc.Ref -local Touch={ } -cc.Touch=Touch - - - - ----* Returns the previous touch location in screen coordinates.
----* return The previous touch location in screen coordinates. ----@return vec2_table -function Touch:getPreviousLocationInView () end ----* Returns the current touch location in OpenGL coordinates.
----* return The current touch location in OpenGL coordinates. ----@return vec2_table -function Touch:getLocation () end ----* Returns the delta of 2 current touches locations in screen coordinates.
----* return The delta of 2 current touches locations in screen coordinates. ----@return vec2_table -function Touch:getDelta () end ----* Returns the start touch location in screen coordinates.
----* return The start touch location in screen coordinates. ----@return vec2_table -function Touch:getStartLocationInView () end ----* Returns the current touch force for 3d touch.
----* return The current touch force for 3d touch. ----@return float -function Touch:getCurrentForce () end ----* Returns the start touch location in OpenGL coordinates.
----* return The start touch location in OpenGL coordinates. ----@return vec2_table -function Touch:getStartLocation () end ----* Get touch id.
----* js getId
----* lua getId
----* return The id of touch. ----@return int -function Touch:getID () end ----@overload fun(int:int,float:float,float:float,float:float,float:float):self ----@overload fun(int:int,float:float,float:float):self ----@param id int ----@param x float ----@param y float ----@param force float ----@param maxForce float ----@return self -function Touch:setTouchInfo (id,x,y,force,maxForce) end ----* Returns the maximum touch force for 3d touch.
----* return The maximum touch force for 3d touch. ----@return float -function Touch:getMaxForce () end ----* Returns the current touch location in screen coordinates.
----* return The current touch location in screen coordinates. ----@return vec2_table -function Touch:getLocationInView () end ----* Returns the previous touch location in OpenGL coordinates.
----* return The previous touch location in OpenGL coordinates. ----@return vec2_table -function Touch:getPreviousLocation () end ----* Constructor.
----* js ctor ----@return self -function Touch:Touch () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TransitionCrossFade.lua b/meta/3rd/Cocos4.0/library/cc/TransitionCrossFade.lua deleted file mode 100644 index 2015fda8..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TransitionCrossFade.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class cc.TransitionCrossFade :cc.TransitionScene -local TransitionCrossFade={ } -cc.TransitionCrossFade=TransitionCrossFade - - - - ----* Creates a transition with duration and incoming scene.
----* param t Duration time, in seconds.
----* param scene A given scene.
----* return A autoreleased TransitionCrossFade object. ----@param t float ----@param scene cc.Scene ----@return self -function TransitionCrossFade:create (t,scene) end ----* lua NA ----@param renderer cc.Renderer ----@param transform mat4_table ----@param flags unsigned_int ----@return self -function TransitionCrossFade:draw (renderer,transform,flags) end ----* ----@return self -function TransitionCrossFade:TransitionCrossFade () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TransitionEaseScene.lua b/meta/3rd/Cocos4.0/library/cc/TransitionEaseScene.lua deleted file mode 100644 index 7f4bdb72..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TransitionEaseScene.lua +++ /dev/null @@ -1,16 +0,0 @@ ----@meta - ----@class cc.TransitionEaseScene -local TransitionEaseScene={ } -cc.TransitionEaseScene=TransitionEaseScene - - - - ----* Returns the Ease action that will be performed on a linear action.
----* since v0.8.2
----* param action A given interval action.
----* return The Ease action that will be performed on a linear action. ----@param action cc.ActionInterval ----@return cc.ActionInterval -function TransitionEaseScene:easeActionWithAction (action) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TransitionFade.lua b/meta/3rd/Cocos4.0/library/cc/TransitionFade.lua deleted file mode 100644 index 20ed7ed1..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TransitionFade.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class cc.TransitionFade :cc.TransitionScene -local TransitionFade={ } -cc.TransitionFade=TransitionFade - - - - ----@overload fun(float:float,cc.Scene:cc.Scene):self ----@overload fun(float:float,cc.Scene:cc.Scene,color3b_table:color3b_table):self ----@param t float ----@param scene cc.Scene ----@param color color3b_table ----@return boolean -function TransitionFade:initWithDuration (t,scene,color) end ----@overload fun(float:float,cc.Scene:cc.Scene):self ----@overload fun(float:float,cc.Scene:cc.Scene,color3b_table:color3b_table):self ----@param duration float ----@param scene cc.Scene ----@param color color3b_table ----@return self -function TransitionFade:create (duration,scene,color) end ----* ----@return self -function TransitionFade:TransitionFade () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TransitionFadeBL.lua b/meta/3rd/Cocos4.0/library/cc/TransitionFadeBL.lua deleted file mode 100644 index c92a3116..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TransitionFadeBL.lua +++ /dev/null @@ -1,24 +0,0 @@ ----@meta - ----@class cc.TransitionFadeBL :cc.TransitionFadeTR -local TransitionFadeBL={ } -cc.TransitionFadeBL=TransitionFadeBL - - - - ----* Creates a transition with duration and incoming scene.
----* param t Duration time, in seconds.
----* param scene A given scene.
----* return A autoreleased TransitionFadeBL object. ----@param t float ----@param scene cc.Scene ----@return self -function TransitionFadeBL:create (t,scene) end ----* ----@param size size_table ----@return cc.ActionInterval -function TransitionFadeBL:actionWithSize (size) end ----* ----@return self -function TransitionFadeBL:TransitionFadeBL () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TransitionFadeDown.lua b/meta/3rd/Cocos4.0/library/cc/TransitionFadeDown.lua deleted file mode 100644 index 16909432..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TransitionFadeDown.lua +++ /dev/null @@ -1,24 +0,0 @@ ----@meta - ----@class cc.TransitionFadeDown :cc.TransitionFadeTR -local TransitionFadeDown={ } -cc.TransitionFadeDown=TransitionFadeDown - - - - ----* Creates a transition with duration and incoming scene.
----* param t Duration time, in seconds.
----* param scene A given scene.
----* return A autoreleased TransitionFadeDown object. ----@param t float ----@param scene cc.Scene ----@return self -function TransitionFadeDown:create (t,scene) end ----* ----@param size size_table ----@return cc.ActionInterval -function TransitionFadeDown:actionWithSize (size) end ----* ----@return self -function TransitionFadeDown:TransitionFadeDown () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TransitionFadeTR.lua b/meta/3rd/Cocos4.0/library/cc/TransitionFadeTR.lua deleted file mode 100644 index 82ec16fb..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TransitionFadeTR.lua +++ /dev/null @@ -1,36 +0,0 @@ ----@meta - ----@class cc.TransitionFadeTR :cc.TransitionScene@all parent class: TransitionScene,TransitionEaseScene -local TransitionFadeTR={ } -cc.TransitionFadeTR=TransitionFadeTR - - - - ----* ----@param action cc.ActionInterval ----@return cc.ActionInterval -function TransitionFadeTR:easeActionWithAction (action) end ----* Returns the action that will be performed with size.
----* param size A given size.
----* return The action that will be performed. ----@param size size_table ----@return cc.ActionInterval -function TransitionFadeTR:actionWithSize (size) end ----* Creates a transition with duration and incoming scene.
----* param t Duration time, in seconds.
----* param scene A given scene.
----* return A autoreleased TransitionFadeTR object. ----@param t float ----@param scene cc.Scene ----@return self -function TransitionFadeTR:create (t,scene) end ----* ----@param renderer cc.Renderer ----@param transform mat4_table ----@param flags unsigned_int ----@return self -function TransitionFadeTR:draw (renderer,transform,flags) end ----* ----@return self -function TransitionFadeTR:TransitionFadeTR () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TransitionFadeUp.lua b/meta/3rd/Cocos4.0/library/cc/TransitionFadeUp.lua deleted file mode 100644 index d0e59d42..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TransitionFadeUp.lua +++ /dev/null @@ -1,24 +0,0 @@ ----@meta - ----@class cc.TransitionFadeUp :cc.TransitionFadeTR -local TransitionFadeUp={ } -cc.TransitionFadeUp=TransitionFadeUp - - - - ----* Creates a transition with duration and incoming scene.
----* param t Duration time, in seconds.
----* param scene A given scene.
----* return A autoreleased TransitionFadeUp object. ----@param t float ----@param scene cc.Scene ----@return self -function TransitionFadeUp:create (t,scene) end ----* ----@param size size_table ----@return cc.ActionInterval -function TransitionFadeUp:actionWithSize (size) end ----* ----@return self -function TransitionFadeUp:TransitionFadeUp () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TransitionFlipAngular.lua b/meta/3rd/Cocos4.0/library/cc/TransitionFlipAngular.lua deleted file mode 100644 index 2b684e54..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TransitionFlipAngular.lua +++ /dev/null @@ -1,19 +0,0 @@ ----@meta - ----@class cc.TransitionFlipAngular :cc.TransitionSceneOriented -local TransitionFlipAngular={ } -cc.TransitionFlipAngular=TransitionFlipAngular - - - - ----@overload fun(float:float,cc.Scene:cc.Scene):self ----@overload fun(float:float,cc.Scene:cc.Scene,int:int):self ----@param t float ----@param s cc.Scene ----@param o int ----@return self -function TransitionFlipAngular:create (t,s,o) end ----* ----@return self -function TransitionFlipAngular:TransitionFlipAngular () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TransitionFlipX.lua b/meta/3rd/Cocos4.0/library/cc/TransitionFlipX.lua deleted file mode 100644 index 17b84c98..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TransitionFlipX.lua +++ /dev/null @@ -1,19 +0,0 @@ ----@meta - ----@class cc.TransitionFlipX :cc.TransitionSceneOriented -local TransitionFlipX={ } -cc.TransitionFlipX=TransitionFlipX - - - - ----@overload fun(float:float,cc.Scene:cc.Scene):self ----@overload fun(float:float,cc.Scene:cc.Scene,int:int):self ----@param t float ----@param s cc.Scene ----@param o int ----@return self -function TransitionFlipX:create (t,s,o) end ----* ----@return self -function TransitionFlipX:TransitionFlipX () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TransitionFlipY.lua b/meta/3rd/Cocos4.0/library/cc/TransitionFlipY.lua deleted file mode 100644 index 0594172d..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TransitionFlipY.lua +++ /dev/null @@ -1,19 +0,0 @@ ----@meta - ----@class cc.TransitionFlipY :cc.TransitionSceneOriented -local TransitionFlipY={ } -cc.TransitionFlipY=TransitionFlipY - - - - ----@overload fun(float:float,cc.Scene:cc.Scene):self ----@overload fun(float:float,cc.Scene:cc.Scene,int:int):self ----@param t float ----@param s cc.Scene ----@param o int ----@return self -function TransitionFlipY:create (t,s,o) end ----* ----@return self -function TransitionFlipY:TransitionFlipY () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TransitionJumpZoom.lua b/meta/3rd/Cocos4.0/library/cc/TransitionJumpZoom.lua deleted file mode 100644 index bbce19bd..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TransitionJumpZoom.lua +++ /dev/null @@ -1,20 +0,0 @@ ----@meta - ----@class cc.TransitionJumpZoom :cc.TransitionScene -local TransitionJumpZoom={ } -cc.TransitionJumpZoom=TransitionJumpZoom - - - - ----* Creates a transition with duration and incoming scene.
----* param t Duration time, in seconds.
----* param scene A given scene.
----* return A autoreleased TransitionJumpZoom object. ----@param t float ----@param scene cc.Scene ----@return self -function TransitionJumpZoom:create (t,scene) end ----* ----@return self -function TransitionJumpZoom:TransitionJumpZoom () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TransitionMoveInB.lua b/meta/3rd/Cocos4.0/library/cc/TransitionMoveInB.lua deleted file mode 100644 index 8b99a21b..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TransitionMoveInB.lua +++ /dev/null @@ -1,20 +0,0 @@ ----@meta - ----@class cc.TransitionMoveInB :cc.TransitionMoveInL -local TransitionMoveInB={ } -cc.TransitionMoveInB=TransitionMoveInB - - - - ----* Creates a transition with duration and incoming scene.
----* param t Duration time, in seconds.
----* param scene A given scene.
----* return A autoreleased TransitionMoveInB object. ----@param t float ----@param scene cc.Scene ----@return self -function TransitionMoveInB:create (t,scene) end ----* ----@return self -function TransitionMoveInB:TransitionMoveInB () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TransitionMoveInL.lua b/meta/3rd/Cocos4.0/library/cc/TransitionMoveInL.lua deleted file mode 100644 index 7c84908f..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TransitionMoveInL.lua +++ /dev/null @@ -1,28 +0,0 @@ ----@meta - ----@class cc.TransitionMoveInL :cc.TransitionScene@all parent class: TransitionScene,TransitionEaseScene -local TransitionMoveInL={ } -cc.TransitionMoveInL=TransitionMoveInL - - - - ----* Returns the action that will be performed.
----* return The action that will be performed. ----@return cc.ActionInterval -function TransitionMoveInL:action () end ----* ----@param action cc.ActionInterval ----@return cc.ActionInterval -function TransitionMoveInL:easeActionWithAction (action) end ----* Creates a transition with duration and incoming scene.
----* param t Duration time, in seconds.
----* param scene A given scene.
----* return A autoreleased TransitionMoveInL object. ----@param t float ----@param scene cc.Scene ----@return self -function TransitionMoveInL:create (t,scene) end ----* ----@return self -function TransitionMoveInL:TransitionMoveInL () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TransitionMoveInR.lua b/meta/3rd/Cocos4.0/library/cc/TransitionMoveInR.lua deleted file mode 100644 index 88a5dc8b..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TransitionMoveInR.lua +++ /dev/null @@ -1,20 +0,0 @@ ----@meta - ----@class cc.TransitionMoveInR :cc.TransitionMoveInL -local TransitionMoveInR={ } -cc.TransitionMoveInR=TransitionMoveInR - - - - ----* Creates a transition with duration and incoming scene.
----* param t Duration time, in seconds.
----* param scene A given scene.
----* return A autoreleased TransitionMoveInR object. ----@param t float ----@param scene cc.Scene ----@return self -function TransitionMoveInR:create (t,scene) end ----* ----@return self -function TransitionMoveInR:TransitionMoveInR () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TransitionMoveInT.lua b/meta/3rd/Cocos4.0/library/cc/TransitionMoveInT.lua deleted file mode 100644 index b6ecc183..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TransitionMoveInT.lua +++ /dev/null @@ -1,20 +0,0 @@ ----@meta - ----@class cc.TransitionMoveInT :cc.TransitionMoveInL -local TransitionMoveInT={ } -cc.TransitionMoveInT=TransitionMoveInT - - - - ----* Creates a transition with duration and incoming scene.
----* param t Duration time, in seconds.
----* param scene A given scene.
----* return A autoreleased TransitionMoveInT object. ----@param t float ----@param scene cc.Scene ----@return self -function TransitionMoveInT:create (t,scene) end ----* ----@return self -function TransitionMoveInT:TransitionMoveInT () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TransitionPageTurn.lua b/meta/3rd/Cocos4.0/library/cc/TransitionPageTurn.lua deleted file mode 100644 index fe75e962..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TransitionPageTurn.lua +++ /dev/null @@ -1,48 +0,0 @@ ----@meta - ----@class cc.TransitionPageTurn :cc.TransitionScene -local TransitionPageTurn={ } -cc.TransitionPageTurn=TransitionPageTurn - - - - ----* Returns the action that will be performed with size.
----* param vector A given size.
----* return The action that will be performed. ----@param vector size_table ----@return cc.ActionInterval -function TransitionPageTurn:actionWithSize (vector) end ----* Creates a base transition with duration and incoming scene.
----* If back is true then the effect is reversed to appear as if the incoming
----* scene is being turned from left over the outgoing scene.
----* param t Duration time, in seconds.
----* param scene A given scene.
----* param backwards If back is true then the effect is reversed to appear as if the incoming scene is being turned from left over the outgoing scene.
----* return True if initialize success. ----@param t float ----@param scene cc.Scene ----@param backwards boolean ----@return boolean -function TransitionPageTurn:initWithDuration (t,scene,backwards) end ----* Creates a base transition with duration and incoming scene.
----* If back is true then the effect is reversed to appear as if the incoming
----* scene is being turned from left over the outgoing scene.
----* param t Duration time, in seconds.
----* param scene A given scene.
----* param backwards If back is true then the effect is reversed to appear as if the incoming scene is being turned from left over the outgoing scene.
----* return An autoreleased TransitionPageTurn object. ----@param t float ----@param scene cc.Scene ----@param backwards boolean ----@return self -function TransitionPageTurn:create (t,scene,backwards) end ----* ----@param renderer cc.Renderer ----@param transform mat4_table ----@param flags unsigned_int ----@return self -function TransitionPageTurn:draw (renderer,transform,flags) end ----* js ctor ----@return self -function TransitionPageTurn:TransitionPageTurn () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TransitionProgress.lua b/meta/3rd/Cocos4.0/library/cc/TransitionProgress.lua deleted file mode 100644 index 0e788373..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TransitionProgress.lua +++ /dev/null @@ -1,20 +0,0 @@ ----@meta - ----@class cc.TransitionProgress :cc.TransitionScene -local TransitionProgress={ } -cc.TransitionProgress=TransitionProgress - - - - ----* Creates a transition with duration and incoming scene.
----* param t Duration time, in seconds.
----* param scene A given scene.
----* return An autoreleased TransitionProgress object. ----@param t float ----@param scene cc.Scene ----@return self -function TransitionProgress:create (t,scene) end ----* ----@return self -function TransitionProgress:TransitionProgress () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TransitionProgressHorizontal.lua b/meta/3rd/Cocos4.0/library/cc/TransitionProgressHorizontal.lua deleted file mode 100644 index 4da6689d..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TransitionProgressHorizontal.lua +++ /dev/null @@ -1,20 +0,0 @@ ----@meta - ----@class cc.TransitionProgressHorizontal :cc.TransitionProgress -local TransitionProgressHorizontal={ } -cc.TransitionProgressHorizontal=TransitionProgressHorizontal - - - - ----* Creates a transition with duration and incoming scene.
----* param t Duration time, in seconds.
----* param scene A given scene.
----* return An autoreleased TransitionProgressHorizontal object. ----@param t float ----@param scene cc.Scene ----@return self -function TransitionProgressHorizontal:create (t,scene) end ----* js ctor ----@return self -function TransitionProgressHorizontal:TransitionProgressHorizontal () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TransitionProgressInOut.lua b/meta/3rd/Cocos4.0/library/cc/TransitionProgressInOut.lua deleted file mode 100644 index 07190fc4..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TransitionProgressInOut.lua +++ /dev/null @@ -1,20 +0,0 @@ ----@meta - ----@class cc.TransitionProgressInOut :cc.TransitionProgress -local TransitionProgressInOut={ } -cc.TransitionProgressInOut=TransitionProgressInOut - - - - ----* Creates a transition with duration and incoming scene.
----* param t Duration time, in seconds.
----* param scene A given scene.
----* return An autoreleased TransitionProgressInOut object. ----@param t float ----@param scene cc.Scene ----@return self -function TransitionProgressInOut:create (t,scene) end ----* js ctor ----@return self -function TransitionProgressInOut:TransitionProgressInOut () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TransitionProgressOutIn.lua b/meta/3rd/Cocos4.0/library/cc/TransitionProgressOutIn.lua deleted file mode 100644 index 3c3eec85..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TransitionProgressOutIn.lua +++ /dev/null @@ -1,20 +0,0 @@ ----@meta - ----@class cc.TransitionProgressOutIn :cc.TransitionProgress -local TransitionProgressOutIn={ } -cc.TransitionProgressOutIn=TransitionProgressOutIn - - - - ----* Creates a transition with duration and incoming scene.
----* param t Duration time, in seconds.
----* param scene A given scene.
----* return An autoreleased TransitionProgressOutIn object. ----@param t float ----@param scene cc.Scene ----@return self -function TransitionProgressOutIn:create (t,scene) end ----* js ctor ----@return self -function TransitionProgressOutIn:TransitionProgressOutIn () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TransitionProgressRadialCCW.lua b/meta/3rd/Cocos4.0/library/cc/TransitionProgressRadialCCW.lua deleted file mode 100644 index 66045707..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TransitionProgressRadialCCW.lua +++ /dev/null @@ -1,20 +0,0 @@ ----@meta - ----@class cc.TransitionProgressRadialCCW :cc.TransitionProgress -local TransitionProgressRadialCCW={ } -cc.TransitionProgressRadialCCW=TransitionProgressRadialCCW - - - - ----* Creates a transition with duration and incoming scene.
----* param t Duration time, in seconds.
----* param scene A given scene.
----* return An autoreleased TransitionProgressRadialCCW object. ----@param t float ----@param scene cc.Scene ----@return self -function TransitionProgressRadialCCW:create (t,scene) end ----* js ctor ----@return self -function TransitionProgressRadialCCW:TransitionProgressRadialCCW () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TransitionProgressRadialCW.lua b/meta/3rd/Cocos4.0/library/cc/TransitionProgressRadialCW.lua deleted file mode 100644 index ce6682e7..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TransitionProgressRadialCW.lua +++ /dev/null @@ -1,20 +0,0 @@ ----@meta - ----@class cc.TransitionProgressRadialCW :cc.TransitionProgress -local TransitionProgressRadialCW={ } -cc.TransitionProgressRadialCW=TransitionProgressRadialCW - - - - ----* Creates a transition with duration and incoming scene.
----* param t Duration time, in seconds.
----* param scene A given scene.
----* return An autoreleased TransitionProgressRadialCW object. ----@param t float ----@param scene cc.Scene ----@return self -function TransitionProgressRadialCW:create (t,scene) end ----* js ctor ----@return self -function TransitionProgressRadialCW:TransitionProgressRadialCW () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TransitionProgressVertical.lua b/meta/3rd/Cocos4.0/library/cc/TransitionProgressVertical.lua deleted file mode 100644 index 4bdf31dc..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TransitionProgressVertical.lua +++ /dev/null @@ -1,20 +0,0 @@ ----@meta - ----@class cc.TransitionProgressVertical :cc.TransitionProgress -local TransitionProgressVertical={ } -cc.TransitionProgressVertical=TransitionProgressVertical - - - - ----* Creates a transition with duration and incoming scene.
----* param t Duration time, in seconds.
----* param scene A given scene.
----* return An autoreleased TransitionProgressVertical object. ----@param t float ----@param scene cc.Scene ----@return self -function TransitionProgressVertical:create (t,scene) end ----* js ctor ----@return self -function TransitionProgressVertical:TransitionProgressVertical () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TransitionRotoZoom.lua b/meta/3rd/Cocos4.0/library/cc/TransitionRotoZoom.lua deleted file mode 100644 index 4c94d87f..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TransitionRotoZoom.lua +++ /dev/null @@ -1,20 +0,0 @@ ----@meta - ----@class cc.TransitionRotoZoom :cc.TransitionScene -local TransitionRotoZoom={ } -cc.TransitionRotoZoom=TransitionRotoZoom - - - - ----* Creates a transition with duration and incoming scene.
----* param t Duration time, in seconds.
----* param scene A given scene.
----* return A autoreleased TransitionRotoZoom object. ----@param t float ----@param scene cc.Scene ----@return self -function TransitionRotoZoom:create (t,scene) end ----* ----@return self -function TransitionRotoZoom:TransitionRotoZoom () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TransitionScene.lua b/meta/3rd/Cocos4.0/library/cc/TransitionScene.lua deleted file mode 100644 index 110aec3d..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TransitionScene.lua +++ /dev/null @@ -1,46 +0,0 @@ ----@meta - ----@class cc.TransitionScene :cc.Scene -local TransitionScene={ } -cc.TransitionScene=TransitionScene - - - - ----* ----@return cc.Scene -function TransitionScene:getInScene () end ----* Called after the transition finishes. ----@return self -function TransitionScene:finish () end ----* initializes a transition with duration and incoming scene ----@param t float ----@param scene cc.Scene ----@return boolean -function TransitionScene:initWithDuration (t,scene) end ----* ----@return float -function TransitionScene:getDuration () end ----* Used by some transitions to hide the outer scene. ----@return self -function TransitionScene:hideOutShowIn () end ----* Creates a base transition with duration and incoming scene.
----* param t Duration time, in seconds.
----* param scene A given scene.
----* return A autoreleased TransitionScene object. ----@param t float ----@param scene cc.Scene ----@return self -function TransitionScene:create (t,scene) end ----* ----@param renderer cc.Renderer ----@param transform mat4_table ----@param flags unsigned_int ----@return self -function TransitionScene:draw (renderer,transform,flags) end ----* ----@return self -function TransitionScene:cleanup () end ----* ----@return self -function TransitionScene:TransitionScene () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TransitionSceneOriented.lua b/meta/3rd/Cocos4.0/library/cc/TransitionSceneOriented.lua deleted file mode 100644 index 903a6a52..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TransitionSceneOriented.lua +++ /dev/null @@ -1,28 +0,0 @@ ----@meta - ----@class cc.TransitionSceneOriented :cc.TransitionScene -local TransitionSceneOriented={ } -cc.TransitionSceneOriented=TransitionSceneOriented - - - - ----* initializes a transition with duration and incoming scene ----@param t float ----@param scene cc.Scene ----@param orientation int ----@return boolean -function TransitionSceneOriented:initWithDuration (t,scene,orientation) end ----* Creates a transition with duration, incoming scene and orientation.
----* param t Duration time, in seconds.
----* param scene A given scene.
----* param orientation A given orientation: LeftOver, RightOver, UpOver, DownOver.
----* return A autoreleased TransitionSceneOriented object. ----@param t float ----@param scene cc.Scene ----@param orientation int ----@return self -function TransitionSceneOriented:create (t,scene,orientation) end ----* ----@return self -function TransitionSceneOriented:TransitionSceneOriented () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TransitionShrinkGrow.lua b/meta/3rd/Cocos4.0/library/cc/TransitionShrinkGrow.lua deleted file mode 100644 index 55106958..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TransitionShrinkGrow.lua +++ /dev/null @@ -1,24 +0,0 @@ ----@meta - ----@class cc.TransitionShrinkGrow :cc.TransitionScene@all parent class: TransitionScene,TransitionEaseScene -local TransitionShrinkGrow={ } -cc.TransitionShrinkGrow=TransitionShrinkGrow - - - - ----* ----@param action cc.ActionInterval ----@return cc.ActionInterval -function TransitionShrinkGrow:easeActionWithAction (action) end ----* Creates a transition with duration and incoming scene.
----* param t Duration time, in seconds.
----* param scene A given scene.
----* return A autoreleased TransitionShrinkGrow object. ----@param t float ----@param scene cc.Scene ----@return self -function TransitionShrinkGrow:create (t,scene) end ----* ----@return self -function TransitionShrinkGrow:TransitionShrinkGrow () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TransitionSlideInB.lua b/meta/3rd/Cocos4.0/library/cc/TransitionSlideInB.lua deleted file mode 100644 index 4179b479..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TransitionSlideInB.lua +++ /dev/null @@ -1,23 +0,0 @@ ----@meta - ----@class cc.TransitionSlideInB :cc.TransitionSlideInL -local TransitionSlideInB={ } -cc.TransitionSlideInB=TransitionSlideInB - - - - ----* Creates a transition with duration and incoming scene.
----* param t Duration time, in seconds.
----* param scene A given scene.
----* return A autoreleased TransitionSlideInB object. ----@param t float ----@param scene cc.Scene ----@return self -function TransitionSlideInB:create (t,scene) end ----* returns the action that will be performed by the incoming and outgoing scene ----@return cc.ActionInterval -function TransitionSlideInB:action () end ----* ----@return self -function TransitionSlideInB:TransitionSlideInB () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TransitionSlideInL.lua b/meta/3rd/Cocos4.0/library/cc/TransitionSlideInL.lua deleted file mode 100644 index 49af57b3..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TransitionSlideInL.lua +++ /dev/null @@ -1,28 +0,0 @@ ----@meta - ----@class cc.TransitionSlideInL :cc.TransitionScene@all parent class: TransitionScene,TransitionEaseScene -local TransitionSlideInL={ } -cc.TransitionSlideInL=TransitionSlideInL - - - - ----* Returns the action that will be performed by the incoming and outgoing scene.
----* return The action that will be performed by the incoming and outgoing scene. ----@return cc.ActionInterval -function TransitionSlideInL:action () end ----* ----@param action cc.ActionInterval ----@return cc.ActionInterval -function TransitionSlideInL:easeActionWithAction (action) end ----* Creates a transition with duration and incoming scene.
----* param t Duration time, in seconds.
----* param scene A given scene.
----* return A autoreleased TransitionSlideInL object. ----@param t float ----@param scene cc.Scene ----@return self -function TransitionSlideInL:create (t,scene) end ----* ----@return self -function TransitionSlideInL:TransitionSlideInL () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TransitionSlideInR.lua b/meta/3rd/Cocos4.0/library/cc/TransitionSlideInR.lua deleted file mode 100644 index 5b21e0a7..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TransitionSlideInR.lua +++ /dev/null @@ -1,23 +0,0 @@ ----@meta - ----@class cc.TransitionSlideInR :cc.TransitionSlideInL -local TransitionSlideInR={ } -cc.TransitionSlideInR=TransitionSlideInR - - - - ----* Creates a transition with duration and incoming scene.
----* param t Duration time, in seconds.
----* param scene A given scene.
----* return A autoreleased TransitionSlideInR object. ----@param t float ----@param scene cc.Scene ----@return self -function TransitionSlideInR:create (t,scene) end ----* Returns the action that will be performed by the incoming and outgoing scene. ----@return cc.ActionInterval -function TransitionSlideInR:action () end ----* ----@return self -function TransitionSlideInR:TransitionSlideInR () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TransitionSlideInT.lua b/meta/3rd/Cocos4.0/library/cc/TransitionSlideInT.lua deleted file mode 100644 index d5b1f773..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TransitionSlideInT.lua +++ /dev/null @@ -1,23 +0,0 @@ ----@meta - ----@class cc.TransitionSlideInT :cc.TransitionSlideInL -local TransitionSlideInT={ } -cc.TransitionSlideInT=TransitionSlideInT - - - - ----* Creates a transition with duration and incoming scene.
----* param t Duration time, in seconds.
----* param scene A given scene.
----* return A autoreleased TransitionSlideInT object. ----@param t float ----@param scene cc.Scene ----@return self -function TransitionSlideInT:create (t,scene) end ----* returns the action that will be performed by the incoming and outgoing scene ----@return cc.ActionInterval -function TransitionSlideInT:action () end ----* ----@return self -function TransitionSlideInT:TransitionSlideInT () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TransitionSplitCols.lua b/meta/3rd/Cocos4.0/library/cc/TransitionSplitCols.lua deleted file mode 100644 index 73dd6759..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TransitionSplitCols.lua +++ /dev/null @@ -1,34 +0,0 @@ ----@meta - ----@class cc.TransitionSplitCols :cc.TransitionScene@all parent class: TransitionScene,TransitionEaseScene -local TransitionSplitCols={ } -cc.TransitionSplitCols=TransitionSplitCols - - - - ----* Returns the action that will be performed.
----* return The action that will be performed. ----@return cc.ActionInterval -function TransitionSplitCols:action () end ----* ----@param action cc.ActionInterval ----@return cc.ActionInterval -function TransitionSplitCols:easeActionWithAction (action) end ----* Creates a transition with duration and incoming scene.
----* param t Duration time, in seconds.
----* param scene A given scene.
----* return A autoreleased TransitionSplitCols object. ----@param t float ----@param scene cc.Scene ----@return self -function TransitionSplitCols:create (t,scene) end ----* ----@param renderer cc.Renderer ----@param transform mat4_table ----@param flags unsigned_int ----@return self -function TransitionSplitCols:draw (renderer,transform,flags) end ----* ----@return self -function TransitionSplitCols:TransitionSplitCols () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TransitionSplitRows.lua b/meta/3rd/Cocos4.0/library/cc/TransitionSplitRows.lua deleted file mode 100644 index c7d2fd42..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TransitionSplitRows.lua +++ /dev/null @@ -1,23 +0,0 @@ ----@meta - ----@class cc.TransitionSplitRows :cc.TransitionSplitCols -local TransitionSplitRows={ } -cc.TransitionSplitRows=TransitionSplitRows - - - - ----* Creates a transition with duration and incoming scene.
----* param t Duration time, in seconds.
----* param scene A given scene.
----* return A autoreleased TransitionSplitRows object. ----@param t float ----@param scene cc.Scene ----@return self -function TransitionSplitRows:create (t,scene) end ----* ----@return cc.ActionInterval -function TransitionSplitRows:action () end ----* ----@return self -function TransitionSplitRows:TransitionSplitRows () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TransitionTurnOffTiles.lua b/meta/3rd/Cocos4.0/library/cc/TransitionTurnOffTiles.lua deleted file mode 100644 index f0a18701..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TransitionTurnOffTiles.lua +++ /dev/null @@ -1,30 +0,0 @@ ----@meta - ----@class cc.TransitionTurnOffTiles :cc.TransitionScene@all parent class: TransitionScene,TransitionEaseScene -local TransitionTurnOffTiles={ } -cc.TransitionTurnOffTiles=TransitionTurnOffTiles - - - - ----* ----@param action cc.ActionInterval ----@return cc.ActionInterval -function TransitionTurnOffTiles:easeActionWithAction (action) end ----* Creates a transition with duration and incoming scene.
----* param t Duration time, in seconds.
----* param scene A given scene.
----* return A autoreleased TransitionTurnOffTiles object. ----@param t float ----@param scene cc.Scene ----@return self -function TransitionTurnOffTiles:create (t,scene) end ----* js NA ----@param renderer cc.Renderer ----@param transform mat4_table ----@param flags unsigned_int ----@return self -function TransitionTurnOffTiles:draw (renderer,transform,flags) end ----* ----@return self -function TransitionTurnOffTiles:TransitionTurnOffTiles () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TransitionZoomFlipAngular.lua b/meta/3rd/Cocos4.0/library/cc/TransitionZoomFlipAngular.lua deleted file mode 100644 index 18240a6c..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TransitionZoomFlipAngular.lua +++ /dev/null @@ -1,19 +0,0 @@ ----@meta - ----@class cc.TransitionZoomFlipAngular :cc.TransitionSceneOriented -local TransitionZoomFlipAngular={ } -cc.TransitionZoomFlipAngular=TransitionZoomFlipAngular - - - - ----@overload fun(float:float,cc.Scene:cc.Scene):self ----@overload fun(float:float,cc.Scene:cc.Scene,int:int):self ----@param t float ----@param s cc.Scene ----@param o int ----@return self -function TransitionZoomFlipAngular:create (t,s,o) end ----* ----@return self -function TransitionZoomFlipAngular:TransitionZoomFlipAngular () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TransitionZoomFlipX.lua b/meta/3rd/Cocos4.0/library/cc/TransitionZoomFlipX.lua deleted file mode 100644 index 21618e93..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TransitionZoomFlipX.lua +++ /dev/null @@ -1,19 +0,0 @@ ----@meta - ----@class cc.TransitionZoomFlipX :cc.TransitionSceneOriented -local TransitionZoomFlipX={ } -cc.TransitionZoomFlipX=TransitionZoomFlipX - - - - ----@overload fun(float:float,cc.Scene:cc.Scene):self ----@overload fun(float:float,cc.Scene:cc.Scene,int:int):self ----@param t float ----@param s cc.Scene ----@param o int ----@return self -function TransitionZoomFlipX:create (t,s,o) end ----* ----@return self -function TransitionZoomFlipX:TransitionZoomFlipX () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TransitionZoomFlipY.lua b/meta/3rd/Cocos4.0/library/cc/TransitionZoomFlipY.lua deleted file mode 100644 index 0371ccf6..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TransitionZoomFlipY.lua +++ /dev/null @@ -1,19 +0,0 @@ ----@meta - ----@class cc.TransitionZoomFlipY :cc.TransitionSceneOriented -local TransitionZoomFlipY={ } -cc.TransitionZoomFlipY=TransitionZoomFlipY - - - - ----@overload fun(float:float,cc.Scene:cc.Scene):self ----@overload fun(float:float,cc.Scene:cc.Scene,int:int):self ----@param t float ----@param s cc.Scene ----@param o int ----@return self -function TransitionZoomFlipY:create (t,s,o) end ----* ----@return self -function TransitionZoomFlipY:TransitionZoomFlipY () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/TurnOffTiles.lua b/meta/3rd/Cocos4.0/library/cc/TurnOffTiles.lua deleted file mode 100644 index 41bb79e2..00000000 --- a/meta/3rd/Cocos4.0/library/cc/TurnOffTiles.lua +++ /dev/null @@ -1,50 +0,0 @@ ----@meta - ----@class cc.TurnOffTiles :cc.TiledGrid3DAction -local TurnOffTiles={ } -cc.TurnOffTiles=TurnOffTiles - - - - ----* brief Show the tile at specified position.
----* param pos The position index of the tile should be shown. ----@param pos vec2_table ----@return self -function TurnOffTiles:turnOnTile (pos) end ----* brief Hide the tile at specified position.
----* param pos The position index of the tile should be hide. ----@param pos vec2_table ----@return self -function TurnOffTiles:turnOffTile (pos) end ----* brief Initializes the action with grid size, random seed and duration.
----* param duration Specify the duration of the TurnOffTiles action. It's a value in seconds.
----* param gridSize Specify the size of the grid.
----* param seed Specify the random seed.
----* return If the Initialization success, return true; otherwise, return false. ----@param duration float ----@param gridSize size_table ----@param seed unsigned_int ----@return boolean -function TurnOffTiles:initWithDuration (duration,gridSize,seed) end ----@overload fun(float:float,size_table:size_table,unsigned_int:unsigned_int):self ----@overload fun(float:float,size_table:size_table):self ----@param duration float ----@param gridSize size_table ----@param seed unsigned_int ----@return self -function TurnOffTiles:create (duration,gridSize,seed) end ----* ----@param target cc.Node ----@return self -function TurnOffTiles:startWithTarget (target) end ----* ----@return self -function TurnOffTiles:clone () end ----* ----@param time float ----@return self -function TurnOffTiles:update (time) end ----* ----@return self -function TurnOffTiles:TurnOffTiles () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Twirl.lua b/meta/3rd/Cocos4.0/library/cc/Twirl.lua deleted file mode 100644 index cf839c24..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Twirl.lua +++ /dev/null @@ -1,74 +0,0 @@ ----@meta - ----@class cc.Twirl :cc.Grid3DAction -local Twirl={ } -cc.Twirl=Twirl - - - - ----* brief Set the amplitude rate of the effect.
----* param amplitudeRate The value of amplitude rate will be set. ----@param amplitudeRate float ----@return self -function Twirl:setAmplitudeRate (amplitudeRate) end ----* brief Initializes the action with center position, number of twirls, amplitude, a grid size and duration.
----* param duration Specify the duration of the Twirl action. It's a value in seconds.
----* param gridSize Specify the size of the grid.
----* param position Specify the center position of the twirl action.
----* param twirls Specify the twirls count of the Twirl action.
----* param amplitude Specify the amplitude of the Twirl action.
----* return If the initialization success, return true; otherwise, return false. ----@param duration float ----@param gridSize size_table ----@param position vec2_table ----@param twirls unsigned_int ----@param amplitude float ----@return boolean -function Twirl:initWithDuration (duration,gridSize,position,twirls,amplitude) end ----* brief Get the amplitude rate of the effect.
----* return Return the amplitude rate of the effect. ----@return float -function Twirl:getAmplitudeRate () end ----* brief Set the amplitude to the effect.
----* param amplitude The value of amplitude will be set. ----@param amplitude float ----@return self -function Twirl:setAmplitude (amplitude) end ----* brief Get the amplitude of the effect.
----* return Return the amplitude of the effect. ----@return float -function Twirl:getAmplitude () end ----* brief Set the center position of twirl action.
----* param position The center position of twirl action will be set. ----@param position vec2_table ----@return self -function Twirl:setPosition (position) end ----* brief Get the center position of twirl action.
----* return The center position of twirl action. ----@return vec2_table -function Twirl:getPosition () end ----* brief Create the action with center position, number of twirls, amplitude, a grid size and duration.
----* param duration Specify the duration of the Twirl action. It's a value in seconds.
----* param gridSize Specify the size of the grid.
----* param position Specify the center position of the twirl action.
----* param twirls Specify the twirls count of the Twirl action.
----* param amplitude Specify the amplitude of the Twirl action.
----* return If the creation success, return a pointer of Twirl action; otherwise, return nil. ----@param duration float ----@param gridSize size_table ----@param position vec2_table ----@param twirls unsigned_int ----@param amplitude float ----@return self -function Twirl:create (duration,gridSize,position,twirls,amplitude) end ----* ----@return self -function Twirl:clone () end ----* ----@param time float ----@return self -function Twirl:update (time) end ----* ----@return self -function Twirl:Twirl () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/UserDefault.lua b/meta/3rd/Cocos4.0/library/cc/UserDefault.lua deleted file mode 100644 index 40778719..00000000 --- a/meta/3rd/Cocos4.0/library/cc/UserDefault.lua +++ /dev/null @@ -1,101 +0,0 @@ ----@meta - ----@class cc.UserDefault -local UserDefault={ } -cc.UserDefault=UserDefault - - - - ----* Set integer value by key.
----* param key The key to set.
----* param value A integer value to set to the key.
----* js NA ----@param key char ----@param value int ----@return self -function UserDefault:setIntegerForKey (key,value) end ----* delete any value by key,
----* param key The key to delete value.
----* js NA ----@param key char ----@return self -function UserDefault:deleteValueForKey (key) end ----@overload fun(char:char,float:float):self ----@overload fun(char:char):self ----@param key char ----@param defaultValue float ----@return float -function UserDefault:getFloatForKey (key,defaultValue) end ----@overload fun(char:char,boolean:boolean):self ----@overload fun(char:char):self ----@param key char ----@param defaultValue boolean ----@return boolean -function UserDefault:getBoolForKey (key,defaultValue) end ----* Set double value by key.
----* param key The key to set.
----* param value A double value to set to the key.
----* js NA ----@param key char ----@param value double ----@return self -function UserDefault:setDoubleForKey (key,value) end ----* Set float value by key.
----* param key The key to set.
----* param value A float value to set to the key.
----* js NA ----@param key char ----@param value float ----@return self -function UserDefault:setFloatForKey (key,value) end ----@overload fun(char:char,string:string):self ----@overload fun(char:char):self ----@param key char ----@param defaultValue string ----@return string -function UserDefault:getStringForKey (key,defaultValue) end ----* Set string value by key.
----* param key The key to set.
----* param value A string value to set to the key.
----* js NA ----@param key char ----@param value string ----@return self -function UserDefault:setStringForKey (key,value) end ----* You should invoke this function to save values set by setXXXForKey().
----* js NA ----@return self -function UserDefault:flush () end ----@overload fun(char:char,int:int):self ----@overload fun(char:char):self ----@param key char ----@param defaultValue int ----@return int -function UserDefault:getIntegerForKey (key,defaultValue) end ----@overload fun(char:char,double:double):self ----@overload fun(char:char):self ----@param key char ----@param defaultValue double ----@return double -function UserDefault:getDoubleForKey (key,defaultValue) end ----* Set bool value by key.
----* param key The key to set.
----* param value A bool value to set to the key.
----* js NA ----@param key char ----@param value boolean ----@return self -function UserDefault:setBoolForKey (key,value) end ----* js NA ----@return self -function UserDefault:destroyInstance () end ----* All supported platforms other iOS & Android use xml file to save values. This function is return the file path of the xml path.
----* js NA ----@return string -function UserDefault:getXMLFilePath () end ----* All supported platforms other iOS & Android use xml file to save values. This function checks whether the xml file exists or not.
----* return True if the xml file exists, false if not.
----* js NA ----@return boolean -function UserDefault:isXMLFileExist () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Waves.lua b/meta/3rd/Cocos4.0/library/cc/Waves.lua deleted file mode 100644 index 725bd16d..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Waves.lua +++ /dev/null @@ -1,69 +0,0 @@ ----@meta - ----@class cc.Waves :cc.Grid3DAction -local Waves={ } -cc.Waves=Waves - - - - ----* brief Set the amplitude rate of the effect.
----* param amplitudeRate The value of amplitude rate will be set. ----@param amplitudeRate float ----@return self -function Waves:setAmplitudeRate (amplitudeRate) end ----* brief Initializes the action with amplitude, horizontal sin, vertical sin, grid size, waves count and duration.
----* param duration Specify the duration of the Waves action. It's a value in seconds.
----* param gridSize Specify the size of the grid.
----* param waves Specify the waves count of the Waves action.
----* param amplitude Specify the amplitude of the Waves action.
----* param horizontal Specify whether waves on horizontal.
----* param vertical Specify whether waves on vertical.
----* return If the initialization success, return true; otherwise, return false. ----@param duration float ----@param gridSize size_table ----@param waves unsigned_int ----@param amplitude float ----@param horizontal boolean ----@param vertical boolean ----@return boolean -function Waves:initWithDuration (duration,gridSize,waves,amplitude,horizontal,vertical) end ----* brief Get the amplitude of the effect.
----* return Return the amplitude of the effect. ----@return float -function Waves:getAmplitude () end ----* brief Get the amplitude rate of the effect.
----* return Return the amplitude rate of the effect. ----@return float -function Waves:getAmplitudeRate () end ----* brief Set the amplitude to the effect.
----* param amplitude The value of amplitude will be set. ----@param amplitude float ----@return self -function Waves:setAmplitude (amplitude) end ----* brief Create the action with amplitude, horizontal sin, vertical sin, grid size, waves count and duration.
----* param duration Specify the duration of the Waves action. It's a value in seconds.
----* param gridSize Specify the size of the grid.
----* param waves Specify the waves count of the Waves action.
----* param amplitude Specify the amplitude of the Waves action.
----* param horizontal Specify whether waves on horizontal.
----* param vertical Specify whether waves on vertical.
----* return If the creation success, return a pointer of Waves action; otherwise, return nil. ----@param duration float ----@param gridSize size_table ----@param waves unsigned_int ----@param amplitude float ----@param horizontal boolean ----@param vertical boolean ----@return self -function Waves:create (duration,gridSize,waves,amplitude,horizontal,vertical) end ----* ----@return self -function Waves:clone () end ----* ----@param time float ----@return self -function Waves:update (time) end ----* ----@return self -function Waves:Waves () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/Waves3D.lua b/meta/3rd/Cocos4.0/library/cc/Waves3D.lua deleted file mode 100644 index 918acfe4..00000000 --- a/meta/3rd/Cocos4.0/library/cc/Waves3D.lua +++ /dev/null @@ -1,61 +0,0 @@ ----@meta - ----@class cc.Waves3D :cc.Grid3DAction -local Waves3D={ } -cc.Waves3D=Waves3D - - - - ----* brief Set the amplitude rate of the effect.
----* param amplitudeRate The value of amplitude rate will be set. ----@param amplitudeRate float ----@return self -function Waves3D:setAmplitudeRate (amplitudeRate) end ----* brief Initializes an action with duration, grid size, waves and amplitude.
----* param duration Specify the duration of the Waves3D action. It's a value in seconds.
----* param gridSize Specify the size of the grid.
----* param waves Specify the waves count of the Waves3D action.
----* param amplitude Specify the amplitude of the Waves3D action.
----* return If the initialization success, return true; otherwise, return false. ----@param duration float ----@param gridSize size_table ----@param waves unsigned_int ----@param amplitude float ----@return boolean -function Waves3D:initWithDuration (duration,gridSize,waves,amplitude) end ----* brief Get the amplitude of the effect.
----* return Return the amplitude of the effect. ----@return float -function Waves3D:getAmplitude () end ----* brief Get the amplitude rate of the effect.
----* return Return the amplitude rate of the effect. ----@return float -function Waves3D:getAmplitudeRate () end ----* brief Set the amplitude to the effect.
----* param amplitude The value of amplitude will be set. ----@param amplitude float ----@return self -function Waves3D:setAmplitude (amplitude) end ----* brief Create an action with duration, grid size, waves and amplitude.
----* param duration Specify the duration of the Waves3D action. It's a value in seconds.
----* param gridSize Specify the size of the grid.
----* param waves Specify the waves count of the Waves3D action.
----* param amplitude Specify the amplitude of the Waves3D action.
----* return If the creation success, return a pointer of Waves3D action; otherwise, return nil. ----@param duration float ----@param gridSize size_table ----@param waves unsigned_int ----@param amplitude float ----@return self -function Waves3D:create (duration,gridSize,waves,amplitude) end ----* ----@return self -function Waves3D:clone () end ----* ----@param time float ----@return self -function Waves3D:update (time) end ----* ----@return self -function Waves3D:Waves3D () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/cc/WavesTiles3D.lua b/meta/3rd/Cocos4.0/library/cc/WavesTiles3D.lua deleted file mode 100644 index 4b404e0b..00000000 --- a/meta/3rd/Cocos4.0/library/cc/WavesTiles3D.lua +++ /dev/null @@ -1,61 +0,0 @@ ----@meta - ----@class cc.WavesTiles3D :cc.TiledGrid3DAction -local WavesTiles3D={ } -cc.WavesTiles3D=WavesTiles3D - - - - ----* brief Set the amplitude rate of the effect.
----* param amplitudeRate The value of amplitude rate will be set. ----@param amplitudeRate float ----@return self -function WavesTiles3D:setAmplitudeRate (amplitudeRate) end ----* brief Initializes an action with duration, grid size, waves count and amplitude.
----* param duration Specify the duration of the WavesTiles3D action. It's a value in seconds.
----* param gridSize Specify the size of the grid.
----* param waves Specify the waves count of the WavesTiles3D action.
----* param amplitude Specify the amplitude of the WavesTiles3D action.
----* return If the initialization success, return true; otherwise, return false. ----@param duration float ----@param gridSize size_table ----@param waves unsigned_int ----@param amplitude float ----@return boolean -function WavesTiles3D:initWithDuration (duration,gridSize,waves,amplitude) end ----* brief Get the amplitude of the effect.
----* return Return the amplitude of the effect. ----@return float -function WavesTiles3D:getAmplitude () end ----* brief Get the amplitude rate of the effect.
----* return Return the amplitude rate of the effect. ----@return float -function WavesTiles3D:getAmplitudeRate () end ----* brief Set the amplitude to the effect.
----* param amplitude The value of amplitude will be set. ----@param amplitude float ----@return self -function WavesTiles3D:setAmplitude (amplitude) end ----* brief Create the action with a number of waves, the waves amplitude, the grid size and the duration.
----* param duration Specify the duration of the WavesTiles3D action. It's a value in seconds.
----* param gridSize Specify the size of the grid.
----* param waves Specify the waves count of the WavesTiles3D action.
----* param amplitude Specify the amplitude of the WavesTiles3D action.
----* return If the creation success, return a pointer of WavesTiles3D action; otherwise, return nil. ----@param duration float ----@param gridSize size_table ----@param waves unsigned_int ----@param amplitude float ----@return self -function WavesTiles3D:create (duration,gridSize,waves,amplitude) end ----* ----@return self -function WavesTiles3D:clone () end ----* ----@param time float ----@return self -function WavesTiles3D:update (time) end ----* ----@return self -function WavesTiles3D:WavesTiles3D () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccb/Program.lua b/meta/3rd/Cocos4.0/library/ccb/Program.lua deleted file mode 100644 index 01759b99..00000000 --- a/meta/3rd/Cocos4.0/library/ccb/Program.lua +++ /dev/null @@ -1,54 +0,0 @@ ----@meta - ----@class ccb.Program :cc.Ref -local Program={ } -ccb.Program=Program - - - - ----* Get maximum vertex location.
----* return Maximum vertex locaiton. ----@return int -function Program:getMaxVertexLocation () end ----* Get maximum fragment location.
----* return Maximum fragment location. ----@return int -function Program:getMaxFragmentLocation () end ----* Get fragment shader.
----* Fragment shader. ----@return string -function Program:getFragmentShader () end ----* Get uniform buffer size in bytes that can hold all the uniforms.
----* param stage Specifies the shader stage. The symbolic constant can be either VERTEX or FRAGMENT.
----* return The uniform buffer size in bytes. ----@param stage int ----@return unsigned_int -function Program:getUniformBufferSize (stage) end ----@overload fun(string0:int):self ----@overload fun(string:string):self ----@param uniform string ----@return cc.backend.UniformLocation -function Program:getUniformLocation (uniform) end ----* Get engine built-in program type.
----* return The built-in program type. ----@return int -function Program:getProgramType () end ----* Get active vertex attributes.
----* return Active vertex attributes. key is active attribute name, Value is corresponding attribute info. ----@return map_table -function Program:getActiveAttributes () end ----@overload fun(string0:int):self ----@overload fun(string:string):self ----@param name string ----@return int -function Program:getAttributeLocation (name) end ----* Get vertex shader.
----* return Vertex shader. ----@return string -function Program:getVertexShader () end ----* Get engine built-in program.
----* param type Specifies the built-in program type. ----@param type int ----@return cc.backend.Program -function Program:getBuiltinProgram (type) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccb/ProgramState.lua b/meta/3rd/Cocos4.0/library/ccb/ProgramState.lua deleted file mode 100644 index 942a120a..00000000 --- a/meta/3rd/Cocos4.0/library/ccb/ProgramState.lua +++ /dev/null @@ -1,43 +0,0 @@ ----@meta - ----@class ccb.ProgramState :cc.Ref -local ProgramState={ } -ccb.ProgramState=ProgramState - - - - ----* Set texture.
----* param uniformLocation Specifies texture location.
----* param slot Specifies texture slot selector.
----* param texture Specifies a pointer to backend texture. ----@param uniformLocation cc.backend.UniformLocation ----@param slot unsigned_int ----@param texture cc.backend.TextureBackend ----@return cc.backend.ProgramState -function ProgramState:setTexture (uniformLocation,slot,texture) end ----* Deep clone ProgramState ----@return cc.backend.ProgramState -function ProgramState:clone () end ----* Sets a uniform auto-binding.
----* This method parses the passed in autoBinding string and attempts to convert it
----* to an enumeration value. If it matches to one of the predefined strings, it will create a
----* callback to get the correct value at runtime.
----* param uniformName The name of the material parameter to store an auto-binding for.
----* param autoBinding A string matching one of the built-in AutoBinding enum constants. ----@param uniformName string ----@param autoBinding string ----@return cc.backend.ProgramState -function ProgramState:setParameterAutoBinding (uniformName,autoBinding) end ----* Get the program object. ----@return cc.backend.Program -function ProgramState:getProgram () end ----@overload fun(string0:int):self ----@overload fun(string:string):self ----@param name string ----@return int -function ProgramState:getAttributeLocation (name) end ----* param program Specifies the program. ----@param program cc.backend.Program ----@return cc.backend.ProgramState -function ProgramState:ProgramState (program) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccb/Texture2DBackend.lua b/meta/3rd/Cocos4.0/library/ccb/Texture2DBackend.lua deleted file mode 100644 index a06988b7..00000000 --- a/meta/3rd/Cocos4.0/library/ccb/Texture2DBackend.lua +++ /dev/null @@ -1,73 +0,0 @@ ----@meta - ----@class ccb.Texture2DBackend :ccb.TextureBackend -local Texture2DBackend={ } -ccb.Texture2DBackend=Texture2DBackend - - - - ----* Get texture height.
----* return Texture height. ----@return unsigned_int -function Texture2DBackend:getHeight () end ----* Get texture width.
----* return Texture width. ----@return unsigned_int -function Texture2DBackend:getWidth () end ----* Update a two-dimensional texture image
----* param data Specifies a pointer to the image data in memory.
----* param width Specifies the width of the texture image.
----* param height Specifies the height of the texture image.
----* param level Specifies the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. ----@param data unsigned_char ----@param width unsigned_int ----@param height unsigned_int ----@param level unsigned_int ----@return cc.backend.Texture2DBackend -function Texture2DBackend:updateData (data,width,height,level) end ----* Update a two-dimensional texture image in a compressed format
----* param data Specifies a pointer to the compressed image data in memory.
----* param width Specifies the width of the texture image.
----* param height Specifies the height of the texture image.
----* param dataLen Specifies the totoal size of compressed image in bytes.
----* param level Specifies the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image. ----@param data unsigned_char ----@param width unsigned_int ----@param height unsigned_int ----@param dataLen unsigned_int ----@param level unsigned_int ----@return cc.backend.Texture2DBackend -function Texture2DBackend:updateCompressedData (data,width,height,dataLen,level) end ----* Update a two-dimensional texture subimage
----* param xoffset Specifies a texel offset in the x direction within the texture array.
----* param yoffset Specifies a texel offset in the y direction within the texture array.
----* param width Specifies the width of the texture subimage.
----* param height Specifies the height of the texture subimage.
----* param level Specifies the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image.
----* param data Specifies a pointer to the image data in memory. ----@param xoffset unsigned_int ----@param yoffset unsigned_int ----@param width unsigned_int ----@param height unsigned_int ----@param level unsigned_int ----@param data unsigned_char ----@return cc.backend.Texture2DBackend -function Texture2DBackend:updateSubData (xoffset,yoffset,width,height,level,data) end ----* Update a two-dimensional texture subimage in a compressed format
----* param xoffset Specifies a texel offset in the x direction within the texture array.
----* param yoffset Specifies a texel offset in the y direction within the texture array.
----* param width Specifies the width of the texture subimage.
----* param height Specifies the height of the texture subimage.
----* param dataLen Specifies the totoal size of compressed subimage in bytes.
----* param level Specifies the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image.
----* param data Specifies a pointer to the compressed image data in memory. ----@param xoffset unsigned_int ----@param yoffset unsigned_int ----@param width unsigned_int ----@param height unsigned_int ----@param dataLen unsigned_int ----@param level unsigned_int ----@param data unsigned_char ----@return cc.backend.Texture2DBackend -function Texture2DBackend:updateCompressedSubData (xoffset,yoffset,width,height,dataLen,level,data) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccb/TextureBackend.lua b/meta/3rd/Cocos4.0/library/ccb/TextureBackend.lua deleted file mode 100644 index e880e7cd..00000000 --- a/meta/3rd/Cocos4.0/library/ccb/TextureBackend.lua +++ /dev/null @@ -1,51 +0,0 @@ ----@meta - ----@class ccb.TextureBackend :cc.Ref -local TextureBackend={ } -ccb.TextureBackend=TextureBackend - - - - ----* Get texture format.
----* return Texture format. ----@return int -function TextureBackend:getTextureFormat () end ----* Get texture type. Symbolic constant value can be either TEXTURE_2D or TEXTURE_CUBE.
----* return Texture type. ----@return int -function TextureBackend:getTextureType () end ----* Update sampler
----* param sampler Specifies the sampler descriptor. ----@param sampler cc.backend.SamplerDescriptor ----@return cc.backend.TextureBackend -function TextureBackend:updateSamplerDescriptor (sampler) end ----* Update texture description.
----* param descriptor Specifies texture and sampler descriptor. ----@param descriptor cc.backend.TextureDescriptor ----@return cc.backend.TextureBackend -function TextureBackend:updateTextureDescriptor (descriptor) end ----* Get texture usage. Symbolic constant can be READ, WRITE or RENDER_TARGET.
----* return Texture usage. ----@return int -function TextureBackend:getTextureUsage () end ----* Check if mipmap had generated before.
----* return true if the mipmap has always generated before, otherwise false. ----@return boolean -function TextureBackend:hasMipmaps () end ----* / Generate mipmaps. ----@return cc.backend.TextureBackend -function TextureBackend:generateMipmaps () end ----* Read a block of pixels from the drawable texture
----* param x,y Specify the window coordinates of the first pixel that is read from the drawable texture. This location is the lower left corner of a rectangular block of pixels.
----* param width,height Specify the dimensions of the pixel rectangle. width and height of one correspond to a single pixel.
----* param flipImage Specifies if needs to flip the image.
----* param callback Specifies a call back function to deal with the image. ----@param x unsigned_int ----@param y unsigned_int ----@param width unsigned_int ----@param height unsigned_int ----@param flipImage boolean ----@param callback function ----@return cc.backend.TextureBackend -function TextureBackend:getBytes (x,y,width,height,flipImage,callback) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccb/TextureCubemapBackend.lua b/meta/3rd/Cocos4.0/library/ccb/TextureCubemapBackend.lua deleted file mode 100644 index ff64c23c..00000000 --- a/meta/3rd/Cocos4.0/library/ccb/TextureCubemapBackend.lua +++ /dev/null @@ -1,16 +0,0 @@ ----@meta - ----@class ccb.TextureCubemapBackend :ccb.TextureBackend -local TextureCubemapBackend={ } -ccb.TextureCubemapBackend=TextureCubemapBackend - - - - ----* Update texutre cube data in give slice side.
----* param side Specifies which slice texture of cube to be update.
----* param data Specifies a pointer to the image data in memory. ----@param side int ----@param data void ----@return cc.backend.TextureCubemapBackend -function TextureCubemapBackend:updateFaceData (side,data) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccb/VertexLayout.lua b/meta/3rd/Cocos4.0/library/ccb/VertexLayout.lua deleted file mode 100644 index 2c379aa1..00000000 --- a/meta/3rd/Cocos4.0/library/ccb/VertexLayout.lua +++ /dev/null @@ -1,42 +0,0 @@ ----@meta - ----@class ccb.VertexLayout -local VertexLayout={ } -ccb.VertexLayout=VertexLayout - - - - ----* Get vertex step function. Default value is VERTEX.
----* return Vertex step function.
----* note Used in metal. ----@return int -function VertexLayout:getVertexStepMode () end ----* Check if vertex layout has been set. ----@return boolean -function VertexLayout:isValid () end ----* Set stride of vertices.
----* param stride Specifies the distance between the data of two vertices, in bytes. ----@param stride unsigned_int ----@return cc.backend.VertexLayout -function VertexLayout:setLayout (stride) end ----* Set attribute values to name.
----* param name Specifies the attribute name.
----* param index Specifies the index of the generic vertex attribute to be modified.
----* param format Specifies how the vertex attribute data is laid out in memory.
----* param offset Specifies the byte offset to the first component of the first generic vertex attribute.
----* param needToBeNormallized Specifies whether fixed-point data values should be normalized (true) or converted directly as fixed-point values (false) when they are accessed. ----@param name string ----@param index unsigned_int ----@param format int ----@param offset unsigned_int ----@param needToBeNormallized boolean ----@return cc.backend.VertexLayout -function VertexLayout:setAttribute (name,index,format,offset,needToBeNormallized) end ----* Get the distance between the data of two vertices, in bytes.
----* return The distance between the data of two vertices, in bytes. ----@return unsigned_int -function VertexLayout:getStride () end ----* ----@return cc.backend.VertexLayout -function VertexLayout:VertexLayout () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/ActionFadeFrame.lua b/meta/3rd/Cocos4.0/library/ccs/ActionFadeFrame.lua deleted file mode 100644 index 12934b00..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/ActionFadeFrame.lua +++ /dev/null @@ -1,27 +0,0 @@ ----@meta - ----@class ccs.ActionFadeFrame :ccs.ActionFrame -local ActionFadeFrame={ } -ccs.ActionFadeFrame=ActionFadeFrame - - - - ----* Gets the fade action opacity.
----* return the fade action opacity. ----@return int -function ActionFadeFrame:getOpacity () end ----* Gets the ActionInterval of ActionFrame.
----* param duration the duration time of ActionFrame
----* return ActionInterval ----@param duration float ----@return cc.ActionInterval -function ActionFadeFrame:getAction (duration) end ----* Changes the fade action opacity.
----* param opacity the fade action opacity ----@param opacity int ----@return self -function ActionFadeFrame:setOpacity (opacity) end ----* Default constructor ----@return self -function ActionFadeFrame:ActionFadeFrame () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/ActionFrame.lua b/meta/3rd/Cocos4.0/library/ccs/ActionFrame.lua deleted file mode 100644 index 1443e921..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/ActionFrame.lua +++ /dev/null @@ -1,59 +0,0 @@ ----@meta - ----@class ccs.ActionFrame :cc.Ref -local ActionFrame={ } -ccs.ActionFrame=ActionFrame - - - - ----@overload fun(float:float,ccs.ActionFrame:ccs.ActionFrame):self ----@overload fun(float:float):self ----@param duration float ----@param srcFrame ccs.ActionFrame ----@return cc.ActionInterval -function ActionFrame:getAction (duration,srcFrame) end ----* Gets the type of action frame
----* return the type of action frame ----@return int -function ActionFrame:getFrameType () end ----* Changes the time of action frame
----* param fTime the time of action frame ----@param fTime float ----@return self -function ActionFrame:setFrameTime (fTime) end ----* Changes the easing type.
----* param easingType the easing type. ----@param easingType int ----@return self -function ActionFrame:setEasingType (easingType) end ----* Gets the time of action frame
----* return fTime the time of action frame ----@return float -function ActionFrame:getFrameTime () end ----* Gets the index of action frame
----* return the index of action frame ----@return int -function ActionFrame:getFrameIndex () end ----* Changes the type of action frame
----* param frameType the type of action frame ----@param frameType int ----@return self -function ActionFrame:setFrameType (frameType) end ----* Changes the index of action frame
----* param index the index of action frame ----@param index int ----@return self -function ActionFrame:setFrameIndex (index) end ----* Set the ActionInterval easing parameter.
----* param parameter the parameter for frame ease ----@param parameter array_table ----@return self -function ActionFrame:setEasingParameter (parameter) end ----* Gets the easing type.
----* return the easing type. ----@return int -function ActionFrame:getEasingType () end ----* Default constructor ----@return self -function ActionFrame:ActionFrame () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/ActionManagerEx.lua b/meta/3rd/Cocos4.0/library/ccs/ActionManagerEx.lua deleted file mode 100644 index 4d33ba4b..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/ActionManagerEx.lua +++ /dev/null @@ -1,48 +0,0 @@ ----@meta - ----@class ccs.ActionManagerEx :cc.Ref -local ActionManagerEx={ } -ccs.ActionManagerEx=ActionManagerEx - - - - ----* Stop an Action with a name.
----* param jsonName UI file name
----* param actionName action name in the UIfile.
----* return ActionObject which named as the param name ----@param jsonName char ----@param actionName char ----@return ccs.ActionObject -function ActionManagerEx:stopActionByName (jsonName,actionName) end ----* Gets an ActionObject with a name.
----* param jsonName UI file name
----* param actionName action name in the UI file.
----* return ActionObject which named as the param name ----@param jsonName char ----@param actionName char ----@return ccs.ActionObject -function ActionManagerEx:getActionByName (jsonName,actionName) end ----* ----@return int -function ActionManagerEx:getStudioVersionNumber () end ----@overload fun(char:char,char:char,cc.CallFunc:cc.CallFunc):self ----@overload fun(char:char,char:char):self ----@param jsonName char ----@param actionName char ----@param func cc.CallFunc ----@return ccs.ActionObject -function ActionManagerEx:playActionByName (jsonName,actionName,func) end ----* Release all actions. ----@return self -function ActionManagerEx:releaseActions () end ----* Purges ActionManager point.
----* js purge
----* lua destroyActionManager ----@return self -function ActionManagerEx:destroyInstance () end ----* Gets the static instance of ActionManager.
----* js getInstance
----* lua getInstance ----@return self -function ActionManagerEx:getInstance () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/ActionMoveFrame.lua b/meta/3rd/Cocos4.0/library/ccs/ActionMoveFrame.lua deleted file mode 100644 index 5deb7bfd..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/ActionMoveFrame.lua +++ /dev/null @@ -1,27 +0,0 @@ ----@meta - ----@class ccs.ActionMoveFrame :ccs.ActionFrame -local ActionMoveFrame={ } -ccs.ActionMoveFrame=ActionMoveFrame - - - - ----* Changes the move action position.
----* param the move action position. ----@param pos vec2_table ----@return self -function ActionMoveFrame:setPosition (pos) end ----* Gets the ActionInterval of ActionFrame.
----* param duration the duration time of ActionFrame
----* return ActionInterval ----@param duration float ----@return cc.ActionInterval -function ActionMoveFrame:getAction (duration) end ----* Gets the move action position.
----* return the move action position. ----@return vec2_table -function ActionMoveFrame:getPosition () end ----* Default constructor ----@return self -function ActionMoveFrame:ActionMoveFrame () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/ActionObject.lua b/meta/3rd/Cocos4.0/library/ccs/ActionObject.lua deleted file mode 100644 index b9c73f30..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/ActionObject.lua +++ /dev/null @@ -1,85 +0,0 @@ ----@meta - ----@class ccs.ActionObject :cc.Ref -local ActionObject={ } -ccs.ActionObject=ActionObject - - - - ----* Sets the current time of frame.
----* param fTime the current time of frame ----@param fTime float ----@return self -function ActionObject:setCurrentTime (fTime) end ----* Pause the action. ----@return self -function ActionObject:pause () end ----* Sets name for object
----* param name name of object ----@param name char ----@return self -function ActionObject:setName (name) end ----* Sets the time interval of frame.
----* param fTime the time interval of frame ----@param fTime float ----@return self -function ActionObject:setUnitTime (fTime) end ----* Gets the total time of frame.
----* return the total time of frame ----@return float -function ActionObject:getTotalTime () end ----* Gets name of object
----* return name of object ----@return char -function ActionObject:getName () end ----* Stop the action. ----@return self -function ActionObject:stop () end ----@overload fun(cc.CallFunc:cc.CallFunc):self ----@overload fun():self ----@param func cc.CallFunc ----@return self -function ActionObject:play (func) end ----* Gets the current time of frame.
----* return the current time of frame ----@return float -function ActionObject:getCurrentTime () end ----* Removes a ActionNode which play the action.
----* param node the ActionNode which play the action ----@param node ccs.ActionNode ----@return self -function ActionObject:removeActionNode (node) end ----* Gets if the action will loop play.
----* return that if the action will loop play ----@return boolean -function ActionObject:getLoop () end ----* Adds a ActionNode to play the action.
----* param node the ActionNode which will play the action ----@param node ccs.ActionNode ----@return self -function ActionObject:addActionNode (node) end ----* Gets the time interval of frame.
----* return the time interval of frame ----@return float -function ActionObject:getUnitTime () end ----* Return if the action is playing.
----* return true if the action is playing, false the otherwise ----@return boolean -function ActionObject:isPlaying () end ----* ----@param fTime float ----@return self -function ActionObject:updateToFrameByTime (fTime) end ----* Sets if the action will loop play.
----* param bLoop that if the action will loop play ----@param bLoop boolean ----@return self -function ActionObject:setLoop (bLoop) end ----* ----@param dt float ----@return self -function ActionObject:simulationActionUpdate (dt) end ----* Default constructor ----@return self -function ActionObject:ActionObject () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/ActionRotationFrame.lua b/meta/3rd/Cocos4.0/library/ccs/ActionRotationFrame.lua deleted file mode 100644 index 656e27f6..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/ActionRotationFrame.lua +++ /dev/null @@ -1,27 +0,0 @@ ----@meta - ----@class ccs.ActionRotationFrame :ccs.ActionFrame -local ActionRotationFrame={ } -ccs.ActionRotationFrame=ActionRotationFrame - - - - ----* Changes rotate action rotation.
----* param rotation rotate action rotation. ----@param rotation float ----@return self -function ActionRotationFrame:setRotation (rotation) end ----@overload fun(float:float,ccs.ActionFrame:ccs.ActionFrame):cc.ActionInterval ----@overload fun(float:float):cc.ActionInterval ----@param duration float ----@param srcFrame ccs.ActionFrame ----@return cc.ActionInterval -function ActionRotationFrame:getAction (duration,srcFrame) end ----* Gets the rotate action rotation.
----* return the rotate action rotation. ----@return float -function ActionRotationFrame:getRotation () end ----* Default constructor ----@return self -function ActionRotationFrame:ActionRotationFrame () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/ActionScaleFrame.lua b/meta/3rd/Cocos4.0/library/ccs/ActionScaleFrame.lua deleted file mode 100644 index 638e1a77..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/ActionScaleFrame.lua +++ /dev/null @@ -1,36 +0,0 @@ ----@meta - ----@class ccs.ActionScaleFrame :ccs.ActionFrame -local ActionScaleFrame={ } -ccs.ActionScaleFrame=ActionScaleFrame - - - - ----* Changes the scale action scaleY.
----* param rotation the scale action scaleY. ----@param scaleY float ----@return self -function ActionScaleFrame:setScaleY (scaleY) end ----* Changes the scale action scaleX.
----* param the scale action scaleX. ----@param scaleX float ----@return self -function ActionScaleFrame:setScaleX (scaleX) end ----* Gets the scale action scaleY.
----* return the scale action scaleY. ----@return float -function ActionScaleFrame:getScaleY () end ----* Gets the scale action scaleX.
----* return the scale action scaleX. ----@return float -function ActionScaleFrame:getScaleX () end ----* Gets the ActionInterval of ActionFrame.
----* param duration the duration time of ActionFrame
----* return ActionInterval ----@param duration float ----@return cc.ActionInterval -function ActionScaleFrame:getAction (duration) end ----* Default constructor ----@return self -function ActionScaleFrame:ActionScaleFrame () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/ActionTimeline.lua b/meta/3rd/Cocos4.0/library/ccs/ActionTimeline.lua deleted file mode 100644 index 71987d4a..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/ActionTimeline.lua +++ /dev/null @@ -1,165 +0,0 @@ ----@meta - ----@class ccs.ActionTimeline :cc.Action@all parent class: Action,PlayableProtocol -local ActionTimeline={ } -ccs.ActionTimeline=ActionTimeline - - - - ----* ----@return self -function ActionTimeline:clearFrameEndCallFuncs () end ----* add a frame end call back to animation's end frame
----* param animationName @addFrameEndCallFunc, make the animationName as funcKey
----* param func the callback function ----@param animationName string ----@param func function ----@return self -function ActionTimeline:setAnimationEndCallFunc (animationName,func) end ----* add Timeline to ActionTimeline ----@param timeline ccs.Timeline ----@return self -function ActionTimeline:addTimeline (timeline) end ----* Get current frame. ----@return int -function ActionTimeline:getCurrentFrame () end ----* Start frame index of this action ----@return int -function ActionTimeline:getStartFrame () end ----* Pause the animation. ----@return self -function ActionTimeline:pause () end ----* / @{/ @name implement Playable Protocol ----@return self -function ActionTimeline:start () end ----* ----@return boolean -function ActionTimeline:init () end ----* ----@param timeline ccs.Timeline ----@return self -function ActionTimeline:removeTimeline (timeline) end ----* ----@return self -function ActionTimeline:clearFrameEventCallFunc () end ----* Last frame callback will call when arriving last frame ----@param listener function ----@return self -function ActionTimeline:setLastFrameCallFunc (listener) end ----* ----@return array_table -function ActionTimeline:getTimelines () end ----* ----@param animationName string ----@param loop boolean ----@return self -function ActionTimeline:play (animationName,loop) end ----* ----@param animationName string ----@return ccs.AnimationInfo -function ActionTimeline:getAnimationInfo (animationName) end ----* Resume the animation. ----@return self -function ActionTimeline:resume () end ----* add a callback function after played frameIndex
----* param frameIndex the frame index call back after
----* param funcKey for identity the callback function
----* param func the callback function ----@param frameIndex int ----@param funcKey string ----@param func function ----@return self -function ActionTimeline:addFrameEndCallFunc (frameIndex,funcKey,func) end ----* ----@param animationName string ----@return self -function ActionTimeline:removeAnimationInfo (animationName) end ----* Get current animation speed. ----@return float -function ActionTimeline:getTimeSpeed () end ----* AnimationInfo ----@param animationInfo ccs.AnimationInfo ----@return self -function ActionTimeline:addAnimationInfo (animationInfo) end ----* ----@return int -function ActionTimeline:getDuration () end ----* Goto the specified frame index, and pause at this index.
----* param startIndex The animation will pause at this index. ----@param startIndex int ----@return self -function ActionTimeline:gotoFrameAndPause (startIndex) end ----* Whether or not Action is playing. ----@return boolean -function ActionTimeline:isPlaying () end ----* ----@param frameIndex int ----@return self -function ActionTimeline:removeFrameEndCallFuncs (frameIndex) end ----@overload fun(int:int,int1:boolean):self ----@overload fun(int:int):self ----@overload fun(int:int,int:int,int2:boolean):self ----@overload fun(int:int,int:int,int:int,boolean:boolean):self ----@param startIndex int ----@param endIndex int ----@param currentFrameIndex int ----@param loop boolean ----@return self -function ActionTimeline:gotoFrameAndPlay (startIndex,endIndex,currentFrameIndex,loop) end ----* ----@param animationName string ----@return boolean -function ActionTimeline:IsAnimationInfoExists (animationName) end ----* End frame of this action.
----* When action play to this frame, if action is not loop, then it will stop,
----* or it will play from start frame again. ----@return int -function ActionTimeline:getEndFrame () end ----* Set the animation speed, this will speed up or slow down the speed. ----@param speed float ----@return self -function ActionTimeline:setTimeSpeed (speed) end ----* ----@return self -function ActionTimeline:clearLastFrameCallFunc () end ----* duration of the whole action ----@param duration int ----@return self -function ActionTimeline:setDuration (duration) end ----* Set current frame index, this will cause action plays to this frame. ----@param frameIndex int ----@return self -function ActionTimeline:setCurrentFrame (frameIndex) end ----* ----@param frameIndex int ----@param funcKey string ----@return self -function ActionTimeline:removeFrameEndCallFunc (frameIndex,funcKey) end ----* ----@return self -function ActionTimeline:create () end ----* ----@param target cc.Node ----@return self -function ActionTimeline:startWithTarget (target) end ----* Returns a reverse of ActionTimeline.
----* Not implement yet. ----@return self -function ActionTimeline:reverse () end ----* Returns a clone of ActionTimeline ----@return self -function ActionTimeline:clone () end ----* ----@return self -function ActionTimeline:stop () end ----* ----@param delta float ----@return self -function ActionTimeline:step (delta) end ----* ----@return boolean -function ActionTimeline:isDone () end ----* ----@return self -function ActionTimeline:ActionTimeline () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/ActionTimelineCache.lua b/meta/3rd/Cocos4.0/library/ccs/ActionTimelineCache.lua deleted file mode 100644 index 36d0afba..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/ActionTimelineCache.lua +++ /dev/null @@ -1,56 +0,0 @@ ----@meta - ----@class ccs.ActionTimelineCache -local ActionTimelineCache={ } -ccs.ActionTimelineCache=ActionTimelineCache - - - - ----* Clone a action with the specified name from the container. ----@param fileName string ----@return ccs.ActionTimeline -function ActionTimelineCache:createActionFromJson (fileName) end ----* ----@param fileName string ----@return ccs.ActionTimeline -function ActionTimelineCache:createActionWithFlatBuffersFile (fileName) end ----* ----@param fileName string ----@return ccs.ActionTimeline -function ActionTimelineCache:loadAnimationActionWithFlatBuffersFile (fileName) end ----* ----@param fileName string ----@param content string ----@return ccs.ActionTimeline -function ActionTimelineCache:createActionFromContent (fileName,content) end ----* ----@return self -function ActionTimelineCache:purge () end ----* ----@return self -function ActionTimelineCache:init () end ----* ----@param fileName string ----@param content string ----@return ccs.ActionTimeline -function ActionTimelineCache:loadAnimationActionWithContent (fileName,content) end ----* ----@param fileName string ----@return ccs.ActionTimeline -function ActionTimelineCache:loadAnimationActionWithFile (fileName) end ----* Remove action with filename, and also remove other resource relate with this file ----@param fileName string ----@return self -function ActionTimelineCache:removeAction (fileName) end ----* ----@param fileName string ----@return ccs.ActionTimeline -function ActionTimelineCache:createActionWithFlatBuffersForSimulator (fileName) end ----* Destroys the singleton ----@return self -function ActionTimelineCache:destroyInstance () end ----* ----@param fileName string ----@return ccs.ActionTimeline -function ActionTimelineCache:createAction (fileName) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/ActionTimelineData.lua b/meta/3rd/Cocos4.0/library/ccs/ActionTimelineData.lua deleted file mode 100644 index 3cce40a6..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/ActionTimelineData.lua +++ /dev/null @@ -1,27 +0,0 @@ ----@meta - ----@class ccs.ActionTimelineData :cc.Ref -local ActionTimelineData={ } -ccs.ActionTimelineData=ActionTimelineData - - - - ----* ----@param actionTag int ----@return self -function ActionTimelineData:setActionTag (actionTag) end ----* ----@param actionTag int ----@return boolean -function ActionTimelineData:init (actionTag) end ----* ----@return int -function ActionTimelineData:getActionTag () end ----* ----@param actionTag int ----@return self -function ActionTimelineData:create (actionTag) end ----* ----@return self -function ActionTimelineData:ActionTimelineData () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/ActionTimelineNode.lua b/meta/3rd/Cocos4.0/library/ccs/ActionTimelineNode.lua deleted file mode 100644 index 373e5643..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/ActionTimelineNode.lua +++ /dev/null @@ -1,39 +0,0 @@ ----@meta - ----@class ccs.ActionTimelineNode :cc.Node -local ActionTimelineNode={ } -ccs.ActionTimelineNode=ActionTimelineNode - - - - ----* ----@return cc.Node -function ActionTimelineNode:getRoot () end ----* ----@return ccs.ActionTimeline -function ActionTimelineNode:getActionTimeline () end ----* ----@param action ccs.ActionTimeline ----@return self -function ActionTimelineNode:setActionTimeline (action) end ----* ----@param root cc.Node ----@param action ccs.ActionTimeline ----@return boolean -function ActionTimelineNode:init (root,action) end ----* ----@param root cc.Node ----@return self -function ActionTimelineNode:setRoot (root) end ----* ----@param root cc.Node ----@param action ccs.ActionTimeline ----@return self -function ActionTimelineNode:create (root,action) end ----* ----@return boolean -function ActionTimelineNode:init () end ----* ----@return self -function ActionTimelineNode:ActionTimelineNode () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/ActionTintFrame.lua b/meta/3rd/Cocos4.0/library/ccs/ActionTintFrame.lua deleted file mode 100644 index 79d08383..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/ActionTintFrame.lua +++ /dev/null @@ -1,27 +0,0 @@ ----@meta - ----@class ccs.ActionTintFrame :ccs.ActionFrame -local ActionTintFrame={ } -ccs.ActionTintFrame=ActionTintFrame - - - - ----* Gets the tint action color.
----* return the tint action color. ----@return color3b_table -function ActionTintFrame:getColor () end ----* Gets the ActionInterval of ActionFrame.
----* param duration the duration time of ActionFrame
----* return ActionInterval ----@param duration float ----@return cc.ActionInterval -function ActionTintFrame:getAction (duration) end ----* Changes the tint action color.
----* param ccolor the tint action color ----@param ccolor color3b_table ----@return self -function ActionTintFrame:setColor (ccolor) end ----* Default constructor ----@return self -function ActionTintFrame:ActionTintFrame () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/AlphaFrame.lua b/meta/3rd/Cocos4.0/library/ccs/AlphaFrame.lua deleted file mode 100644 index 6cea459b..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/AlphaFrame.lua +++ /dev/null @@ -1,25 +0,0 @@ ----@meta - ----@class ccs.AlphaFrame :ccs.Frame -local AlphaFrame={ } -ccs.AlphaFrame=AlphaFrame - - - - ----* ----@return unsigned_char -function AlphaFrame:getAlpha () end ----* ----@param alpha unsigned_char ----@return self -function AlphaFrame:setAlpha (alpha) end ----* ----@return self -function AlphaFrame:create () end ----* ----@return ccs.Frame -function AlphaFrame:clone () end ----* ----@return self -function AlphaFrame:AlphaFrame () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/AnchorPointFrame.lua b/meta/3rd/Cocos4.0/library/ccs/AnchorPointFrame.lua deleted file mode 100644 index bcda480d..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/AnchorPointFrame.lua +++ /dev/null @@ -1,25 +0,0 @@ ----@meta - ----@class ccs.AnchorPointFrame :ccs.Frame -local AnchorPointFrame={ } -ccs.AnchorPointFrame=AnchorPointFrame - - - - ----* ----@param point vec2_table ----@return self -function AnchorPointFrame:setAnchorPoint (point) end ----* ----@return vec2_table -function AnchorPointFrame:getAnchorPoint () end ----* ----@return self -function AnchorPointFrame:create () end ----* ----@return ccs.Frame -function AnchorPointFrame:clone () end ----* ----@return self -function AnchorPointFrame:AnchorPointFrame () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/AnimationData.lua b/meta/3rd/Cocos4.0/library/ccs/AnimationData.lua deleted file mode 100644 index be213ea8..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/AnimationData.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class ccs.AnimationData :cc.Ref -local AnimationData={ } -ccs.AnimationData=AnimationData - - - - ----* ----@param movementName string ----@return ccs.MovementData -function AnimationData:getMovement (movementName) end ----* ----@return int -function AnimationData:getMovementCount () end ----* ----@param movData ccs.MovementData ----@return self -function AnimationData:addMovement (movData) end ----* ----@return self -function AnimationData:create () end ----* js ctor ----@return self -function AnimationData:AnimationData () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/Armature.lua b/meta/3rd/Cocos4.0/library/ccs/Armature.lua deleted file mode 100644 index c5b6dc1a..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/Armature.lua +++ /dev/null @@ -1,139 +0,0 @@ ----@meta - ----@class ccs.Armature :cc.Node@all parent class: Node,BlendProtocol -local Armature={ } -ccs.Armature=Armature - - - - ----* Get a bone with the specified name
----* param name The bone's name you want to get ----@param name string ----@return ccs.Bone -function Armature:getBone (name) end ----* Change a bone's parent with the specified parent name.
----* param bone The bone you want to change parent
----* param parentName The new parent's name. ----@param bone ccs.Bone ----@param parentName string ----@return self -function Armature:changeBoneParent (bone,parentName) end ----* ----@param animation ccs.ArmatureAnimation ----@return self -function Armature:setAnimation (animation) end ----* ----@param x float ----@param y float ----@return ccs.Bone -function Armature:getBoneAtPoint (x,y) end ----* ----@return boolean -function Armature:getArmatureTransformDirty () end ----* ----@param version float ----@return self -function Armature:setVersion (version) end ----* Set contentsize and Calculate anchor point. ----@return self -function Armature:updateOffsetPoint () end ----* ----@return ccs.Bone -function Armature:getParentBone () end ----* Remove a bone with the specified name. If recursion it will also remove child Bone recursionly.
----* param bone The bone you want to remove
----* param recursion Determine whether remove the bone's child recursion. ----@param bone ccs.Bone ----@param recursion boolean ----@return self -function Armature:removeBone (bone,recursion) end ----* ----@return ccs.BatchNode -function Armature:getBatchNode () end ----@overload fun(string:string,ccs.Bone:ccs.Bone):self ----@overload fun(string:string):self ----@param name string ----@param parentBone ccs.Bone ----@return boolean -function Armature:init (name,parentBone) end ----* ----@param parentBone ccs.Bone ----@return self -function Armature:setParentBone (parentBone) end ----* ----@param batchNode ccs.BatchNode ----@return self -function Armature:setBatchNode (batchNode) end ----* js NA
----* lua NA ----@return cc.BlendFunc -function Armature:getBlendFunc () end ----* ----@param armatureData ccs.ArmatureData ----@return self -function Armature:setArmatureData (armatureData) end ----* Add a Bone to this Armature,
----* param bone The Bone you want to add to Armature
----* param parentName The parent Bone's name you want to add to . If it's nullptr, then set Armature to its parent ----@param bone ccs.Bone ----@param parentName string ----@return self -function Armature:addBone (bone,parentName) end ----* ----@return ccs.ArmatureData -function Armature:getArmatureData () end ----* ----@return float -function Armature:getVersion () end ----* ----@return ccs.ArmatureAnimation -function Armature:getAnimation () end ----* ----@return vec2_table -function Armature:getOffsetPoints () end ----* js NA
----* lua NA ----@param blendFunc cc.BlendFunc ----@return self -function Armature:setBlendFunc (blendFunc) end ----* Get Armature's bone dictionary
----* return Armature's bone dictionary ----@return map_table -function Armature:getBoneDic () end ----@overload fun(string:string):self ----@overload fun():self ----@overload fun(string:string,ccs.Bone:ccs.Bone):self ----@param name string ----@param parentBone ccs.Bone ----@return self -function Armature:create (name,parentBone) end ----* ----@param point vec2_table ----@return self -function Armature:setAnchorPoint (point) end ----* ----@param renderer cc.Renderer ----@param transform mat4_table ----@param flags unsigned_int ----@return self -function Armature:draw (renderer,transform,flags) end ----* ----@return vec2_table -function Armature:getAnchorPointInPoints () end ----* ----@param dt float ----@return self -function Armature:update (dt) end ----* Init the empty armature ----@return boolean -function Armature:init () end ----* ----@return mat4_table -function Armature:getNodeToParentTransform () end ----* This boundingBox will calculate all bones' boundingBox every time ----@return rect_table -function Armature:getBoundingBox () end ----* js ctor ----@return self -function Armature:Armature () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/ArmatureAnimation.lua b/meta/3rd/Cocos4.0/library/ccs/ArmatureAnimation.lua deleted file mode 100644 index a27dca21..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/ArmatureAnimation.lua +++ /dev/null @@ -1,103 +0,0 @@ ----@meta - ----@class ccs.ArmatureAnimation -local ArmatureAnimation={ } -ccs.ArmatureAnimation=ArmatureAnimation - - - - ----* ----@return float -function ArmatureAnimation:getSpeedScale () end ----* Play animation by animation name.
----* param animationName The animation name you want to play
----* param durationTo The frames between two animation changing-over.
----* It's meaning is changing to this animation need how many frames
----* -1 : use the value from MovementData get from flash design panel
----* param loop Whether the animation is loop
----* loop < 0 : use the value from MovementData get from flash design panel
----* loop = 0 : this animation is not loop
----* loop > 0 : this animation is loop ----@param animationName string ----@param durationTo int ----@param loop int ----@return self -function ArmatureAnimation:play (animationName,durationTo,loop) end ----* Go to specified frame and pause current movement. ----@param frameIndex int ----@return self -function ArmatureAnimation:gotoAndPause (frameIndex) end ----* ----@param movementIndexes array_table ----@param durationTo int ----@param loop boolean ----@return self -function ArmatureAnimation:playWithIndexes (movementIndexes,durationTo,loop) end ----* ----@param data ccs.AnimationData ----@return self -function ArmatureAnimation:setAnimationData (data) end ----* Scale animation play speed.
----* param animationScale Scale value ----@param speedScale float ----@return self -function ArmatureAnimation:setSpeedScale (speedScale) end ----* ----@return ccs.AnimationData -function ArmatureAnimation:getAnimationData () end ----* Go to specified frame and play current movement.
----* You need first switch to the movement you want to play, then call this function.
----* example : playByIndex(0);
----* gotoAndPlay(0);
----* playByIndex(1);
----* gotoAndPlay(0);
----* gotoAndPlay(15); ----@param frameIndex int ----@return self -function ArmatureAnimation:gotoAndPlay (frameIndex) end ----* Init with a Armature
----* param armature The Armature ArmatureAnimation will bind to ----@param armature ccs.Armature ----@return boolean -function ArmatureAnimation:init (armature) end ----* ----@param movementNames array_table ----@param durationTo int ----@param loop boolean ----@return self -function ArmatureAnimation:playWithNames (movementNames,durationTo,loop) end ----* Get movement count ----@return int -function ArmatureAnimation:getMovementCount () end ----* ----@param animationIndex int ----@param durationTo int ----@param loop int ----@return self -function ArmatureAnimation:playWithIndex (animationIndex,durationTo,loop) end ----* Get current movementID
----* return The name of current movement ----@return string -function ArmatureAnimation:getCurrentMovementID () end ----* Create with a Armature
----* param armature The Armature ArmatureAnimation will bind to ----@param armature ccs.Armature ----@return self -function ArmatureAnimation:create (armature) end ----* Pause the Process ----@return self -function ArmatureAnimation:pause () end ----* Stop the Process ----@return self -function ArmatureAnimation:stop () end ----* ----@param dt float ----@return self -function ArmatureAnimation:update (dt) end ----* Resume the Process ----@return self -function ArmatureAnimation:resume () end ----* js ctor ----@return self -function ArmatureAnimation:ArmatureAnimation () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/ArmatureData.lua b/meta/3rd/Cocos4.0/library/ccs/ArmatureData.lua deleted file mode 100644 index 6fcdc0d8..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/ArmatureData.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class ccs.ArmatureData :cc.Ref -local ArmatureData={ } -ccs.ArmatureData=ArmatureData - - - - ----* ----@param boneData ccs.BoneData ----@return self -function ArmatureData:addBoneData (boneData) end ----* ----@return boolean -function ArmatureData:init () end ----* ----@param boneName string ----@return ccs.BoneData -function ArmatureData:getBoneData (boneName) end ----* ----@return self -function ArmatureData:create () end ----* js ctor ----@return self -function ArmatureData:ArmatureData () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/ArmatureDataManager.lua b/meta/3rd/Cocos4.0/library/ccs/ArmatureDataManager.lua deleted file mode 100644 index be1883c6..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/ArmatureDataManager.lua +++ /dev/null @@ -1,104 +0,0 @@ ----@meta - ----@class ccs.ArmatureDataManager :cc.Ref -local ArmatureDataManager={ } -ccs.ArmatureDataManager=ArmatureDataManager - - - - ----* brief remove animation data
----* param id the id of the animation data ----@param id string ----@return self -function ArmatureDataManager:removeAnimationData (id) end ----* Add armature data
----* param id The id of the armature data
----* param armatureData ArmatureData * ----@param id string ----@param armatureData ccs.ArmatureData ----@param configFilePath string ----@return self -function ArmatureDataManager:addArmatureData (id,armatureData,configFilePath) end ----@overload fun(string:string,string:string,string:string):self ----@overload fun(string:string):self ----@param imagePath string ----@param plistPath string ----@param configFilePath string ----@return self -function ArmatureDataManager:addArmatureFileInfo (imagePath,plistPath,configFilePath) end ----* ----@param configFilePath string ----@return self -function ArmatureDataManager:removeArmatureFileInfo (configFilePath) end ----* ----@return map_table -function ArmatureDataManager:getTextureDatas () end ----* brief get texture data
----* param id the id of the texture data you want to get
----* return TextureData * ----@param id string ----@return ccs.TextureData -function ArmatureDataManager:getTextureData (id) end ----* brief get armature data
----* param id the id of the armature data you want to get
----* return ArmatureData * ----@param id string ----@return ccs.ArmatureData -function ArmatureDataManager:getArmatureData (id) end ----* brief get animation data from _animationDatas(Dictionary)
----* param id the id of the animation data you want to get
----* return AnimationData * ----@param id string ----@return ccs.AnimationData -function ArmatureDataManager:getAnimationData (id) end ----* brief add animation data
----* param id the id of the animation data
----* return AnimationData * ----@param id string ----@param animationData ccs.AnimationData ----@param configFilePath string ----@return self -function ArmatureDataManager:addAnimationData (id,animationData,configFilePath) end ----* Init ArmatureDataManager ----@return boolean -function ArmatureDataManager:init () end ----* brief remove armature data
----* param id the id of the armature data you want to get ----@param id string ----@return self -function ArmatureDataManager:removeArmatureData (id) end ----* ----@return map_table -function ArmatureDataManager:getArmatureDatas () end ----* brief remove texture data
----* param id the id of the texture data you want to get ----@param id string ----@return self -function ArmatureDataManager:removeTextureData (id) end ----* brief add texture data
----* param id the id of the texture data
----* return TextureData * ----@param id string ----@param textureData ccs.TextureData ----@param configFilePath string ----@return self -function ArmatureDataManager:addTextureData (id,textureData,configFilePath) end ----* ----@return map_table -function ArmatureDataManager:getAnimationDatas () end ----* brief Judge whether or not need auto load sprite file ----@return boolean -function ArmatureDataManager:isAutoLoadSpriteFile () end ----* brief Add sprite frame to CCSpriteFrameCache, it will save display name and it's relative image name ----@param plistPath string ----@param imagePath string ----@param configFilePath string ----@return self -function ArmatureDataManager:addSpriteFrameFromFile (plistPath,imagePath,configFilePath) end ----* ----@return self -function ArmatureDataManager:destroyInstance () end ----* ----@return self -function ArmatureDataManager:getInstance () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/ArmatureDisplayData.lua b/meta/3rd/Cocos4.0/library/ccs/ArmatureDisplayData.lua deleted file mode 100644 index b6092573..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/ArmatureDisplayData.lua +++ /dev/null @@ -1,15 +0,0 @@ ----@meta - ----@class ccs.ArmatureDisplayData :ccs.DisplayData -local ArmatureDisplayData={ } -ccs.ArmatureDisplayData=ArmatureDisplayData - - - - ----* ----@return self -function ArmatureDisplayData:create () end ----* js ctor ----@return self -function ArmatureDisplayData:ArmatureDisplayData () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/BaseData.lua b/meta/3rd/Cocos4.0/library/ccs/BaseData.lua deleted file mode 100644 index 3a417041..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/BaseData.lua +++ /dev/null @@ -1,22 +0,0 @@ ----@meta - ----@class ccs.BaseData :cc.Ref -local BaseData={ } -ccs.BaseData=BaseData - - - - ----* ----@return color4b_table -function BaseData:getColor () end ----* ----@param color color4b_table ----@return self -function BaseData:setColor (color) end ----* ----@return self -function BaseData:create () end ----* js ctor ----@return self -function BaseData:BaseData () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/BatchNode.lua b/meta/3rd/Cocos4.0/library/ccs/BatchNode.lua deleted file mode 100644 index a73467aa..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/BatchNode.lua +++ /dev/null @@ -1,33 +0,0 @@ ----@meta - ----@class ccs.BatchNode :cc.Node -local BatchNode={ } -ccs.BatchNode=BatchNode - - - - ----* ----@return self -function BatchNode:create () end ----@overload fun(cc.Node:cc.Node,int:int,int2:string):self ----@overload fun(cc.Node:cc.Node,int:int,int:int):self ----@param pChild cc.Node ----@param zOrder int ----@param tag int ----@return self -function BatchNode:addChild (pChild,zOrder,tag) end ----* js NA ----@return boolean -function BatchNode:init () end ----* ----@param renderer cc.Renderer ----@param transform mat4_table ----@param flags unsigned_int ----@return self -function BatchNode:draw (renderer,transform,flags) end ----* ----@param child cc.Node ----@param cleanup boolean ----@return self -function BatchNode:removeChild (child,cleanup) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/BlendFuncFrame.lua b/meta/3rd/Cocos4.0/library/ccs/BlendFuncFrame.lua deleted file mode 100644 index 10c1a4eb..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/BlendFuncFrame.lua +++ /dev/null @@ -1,25 +0,0 @@ ----@meta - ----@class ccs.BlendFuncFrame :ccs.Frame -local BlendFuncFrame={ } -ccs.BlendFuncFrame=BlendFuncFrame - - - - ----* ----@return cc.BlendFunc -function BlendFuncFrame:getBlendFunc () end ----* ----@param blendFunc cc.BlendFunc ----@return self -function BlendFuncFrame:setBlendFunc (blendFunc) end ----* ----@return self -function BlendFuncFrame:create () end ----* ----@return ccs.Frame -function BlendFuncFrame:clone () end ----* ----@return self -function BlendFuncFrame:BlendFuncFrame () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/Bone.lua b/meta/3rd/Cocos4.0/library/ccs/Bone.lua deleted file mode 100644 index a69c9323..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/Bone.lua +++ /dev/null @@ -1,167 +0,0 @@ ----@meta - ----@class ccs.Bone :cc.Node -local Bone={ } -ccs.Bone=Bone - - - - ----* ----@return boolean -function Bone:isTransformDirty () end ----* ----@param blendFunc cc.BlendFunc ----@return self -function Bone:setBlendFunc (blendFunc) end ----* ----@return boolean -function Bone:isIgnoreMovementBoneData () end ----* Update zorder ----@return self -function Bone:updateZOrder () end ----* ----@return cc.Node -function Bone:getDisplayRenderNode () end ----* ----@return boolean -function Bone:isBlendDirty () end ----* Add a child to this bone, and it will let this child call setParent(Bone *parent) function to set self to it's parent
----* param child the child you want to add ----@param child ccs.Bone ----@return self -function Bone:addChildBone (child) end ----* ----@return ccs.BaseData -function Bone:getWorldInfo () end ----* ----@return ccs.Tween -function Bone:getTween () end ----* Get parent bone
----* return parent bone ----@return self -function Bone:getParentBone () end ----* Update color to render display ----@return self -function Bone:updateColor () end ----* ----@param dirty boolean ----@return self -function Bone:setTransformDirty (dirty) end ----* ----@return int -function Bone:getDisplayRenderNodeType () end ----* ----@param index int ----@return self -function Bone:removeDisplay (index) end ----* ----@param boneData ccs.BoneData ----@return self -function Bone:setBoneData (boneData) end ----* Initializes a Bone with the specified name
----* param name Bone's name. ----@param name string ----@return boolean -function Bone:init (name) end ----* Set parent bone.
----* If parent is null, then also remove this bone from armature.
----* It will not set the Armature, if you want to add the bone to a Armature, you should use Armature::addBone(Bone *bone, const char* parentName).
----* param parent the parent bone.
----* nullptr : remove this bone from armature ----@param parent ccs.Bone ----@return self -function Bone:setParentBone (parent) end ----@overload fun(ccs.DisplayData0:cc.Node,int:int):self ----@overload fun(ccs.DisplayData:ccs.DisplayData,int:int):self ----@param displayData ccs.DisplayData ----@param index int ----@return self -function Bone:addDisplay (displayData,index) end ----* ----@return cc.BlendFunc -function Bone:getBlendFunc () end ----* Remove itself from its parent.
----* param recursion whether or not to remove childBone's display ----@param recursion boolean ----@return self -function Bone:removeFromParent (recursion) end ----* ----@return ccs.ColliderDetector -function Bone:getColliderDetector () end ----* ----@return ccs.Armature -function Bone:getChildArmature () end ----* ----@return ccs.FrameData -function Bone:getTweenData () end ----* ----@param index int ----@param force boolean ----@return self -function Bone:changeDisplayWithIndex (index,force) end ----* ----@param name string ----@param force boolean ----@return self -function Bone:changeDisplayWithName (name,force) end ----* ----@param armature ccs.Armature ----@return self -function Bone:setArmature (armature) end ----* ----@param dirty boolean ----@return self -function Bone:setBlendDirty (dirty) end ----* Removes a child Bone
----* param bone the bone you want to remove ----@param bone ccs.Bone ----@param recursion boolean ----@return self -function Bone:removeChildBone (bone,recursion) end ----* ----@param childArmature ccs.Armature ----@return self -function Bone:setChildArmature (childArmature) end ----* ----@return mat4_table -function Bone:getNodeToArmatureTransform () end ----* ----@return ccs.DisplayManager -function Bone:getDisplayManager () end ----* ----@return ccs.Armature -function Bone:getArmature () end ----* ----@return ccs.BoneData -function Bone:getBoneData () end ----@overload fun(string:string):self ----@overload fun():self ----@param name string ----@return self -function Bone:create (name) end ----* ----@return mat4_table -function Bone:getNodeToWorldTransform () end ----* ----@param zOrder int ----@return self -function Bone:setLocalZOrder (zOrder) end ----* ----@param delta float ----@return self -function Bone:update (delta) end ----* ----@param parentOpacity unsigned_char ----@return self -function Bone:updateDisplayedOpacity (parentOpacity) end ----* Initializes an empty Bone with nothing init. ----@return boolean -function Bone:init () end ----* ----@param parentColor color3b_table ----@return self -function Bone:updateDisplayedColor (parentColor) end ----* js ctor ----@return self -function Bone:Bone () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/BoneData.lua b/meta/3rd/Cocos4.0/library/ccs/BoneData.lua deleted file mode 100644 index bea88fac..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/BoneData.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class ccs.BoneData :ccs.BaseData -local BoneData={ } -ccs.BoneData=BoneData - - - - ----* ----@param index int ----@return ccs.DisplayData -function BoneData:getDisplayData (index) end ----* ----@return boolean -function BoneData:init () end ----* ----@param displayData ccs.DisplayData ----@return self -function BoneData:addDisplayData (displayData) end ----* ----@return self -function BoneData:create () end ----* js ctor ----@return self -function BoneData:BoneData () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/BoneNode.lua b/meta/3rd/Cocos4.0/library/ccs/BoneNode.lua deleted file mode 100644 index ad68dcb9..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/BoneNode.lua +++ /dev/null @@ -1,132 +0,0 @@ ----@meta - ----@class ccs.BoneNode :cc.Node@all parent class: Node,BlendProtocol -local BoneNode={ } -ccs.BoneNode=BoneNode - - - - ----* ----@return float -function BoneNode:getDebugDrawWidth () end ----@overload fun():self ----@overload fun():self ----@return array_table -function BoneNode:getChildBones () end ----* ----@return cc.BlendFunc -function BoneNode:getBlendFunc () end ----* brief: get all bones in this bone tree ----@return array_table -function BoneNode:getAllSubBones () end ----* ----@param blendFunc cc.BlendFunc ----@return self -function BoneNode:setBlendFunc (blendFunc) end ----* ----@param isDebugDraw boolean ----@return self -function BoneNode:setDebugDrawEnabled (isDebugDraw) end ----* get displayings rect in self transform ----@return rect_table -function BoneNode:getVisibleSkinsRect () end ----* brief: get all skins in this bone tree ----@return array_table -function BoneNode:getAllSubSkins () end ----@overload fun(cc.Node0:string,boolean:boolean):self ----@overload fun(cc.Node:cc.Node,boolean:boolean):self ----@param skin cc.Node ----@param hideOthers boolean ----@return self -function BoneNode:displaySkin (skin,hideOthers) end ----* ----@return boolean -function BoneNode:isDebugDrawEnabled () end ----@overload fun(cc.Node:cc.Node,boolean:boolean,boolean:boolean):self ----@overload fun(cc.Node:cc.Node,boolean:boolean):self ----@param skin cc.Node ----@param display boolean ----@param hideOthers boolean ----@return self -function BoneNode:addSkin (skin,display,hideOthers) end ----* ----@return ccs.SkeletonNode -function BoneNode:getRootSkeletonNode () end ----* ----@param length float ----@return self -function BoneNode:setDebugDrawLength (length) end ----@overload fun():self ----@overload fun():self ----@return array_table -function BoneNode:getSkins () end ----* ----@return array_table -function BoneNode:getVisibleSkins () end ----* ----@param width float ----@return self -function BoneNode:setDebugDrawWidth (width) end ----* ----@return float -function BoneNode:getDebugDrawLength () end ----* ----@param color color4f_table ----@return self -function BoneNode:setDebugDrawColor (color) end ----* ----@return color4f_table -function BoneNode:getDebugDrawColor () end ----@overload fun(int:int):self ----@overload fun():self ----@param length int ----@return self -function BoneNode:create (length) end ----@overload fun(cc.Node:cc.Node,int:int,string2:int):self ----@overload fun(cc.Node:cc.Node,int:int,string:string):self ----@param child cc.Node ----@param localZOrder int ----@param name string ----@return self -function BoneNode:addChild (child,localZOrder,name) end ----* ----@param renderer cc.Renderer ----@param transform mat4_table ----@param flags unsigned_int ----@return self -function BoneNode:draw (renderer,transform,flags) end ----* ----@param name string ----@return self -function BoneNode:setName (name) end ----* ----@param anchorPoint vec2_table ----@return self -function BoneNode:setAnchorPoint (anchorPoint) end ----* ----@param localZOrder int ----@return self -function BoneNode:setLocalZOrder (localZOrder) end ----* ----@param child cc.Node ----@param cleanup boolean ----@return self -function BoneNode:removeChild (child,cleanup) end ----* ----@return boolean -function BoneNode:init () end ----* ----@return rect_table -function BoneNode:getBoundingBox () end ----* ----@param contentSize size_table ----@return self -function BoneNode:setContentSize (contentSize) end ----* ----@param visible boolean ----@return self -function BoneNode:setVisible (visible) end ----* ----@return self -function BoneNode:BoneNode () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/ColorFrame.lua b/meta/3rd/Cocos4.0/library/ccs/ColorFrame.lua deleted file mode 100644 index 27bedcdd..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/ColorFrame.lua +++ /dev/null @@ -1,25 +0,0 @@ ----@meta - ----@class ccs.ColorFrame :ccs.Frame -local ColorFrame={ } -ccs.ColorFrame=ColorFrame - - - - ----* ----@return color3b_table -function ColorFrame:getColor () end ----* ----@param color color3b_table ----@return self -function ColorFrame:setColor (color) end ----* ----@return self -function ColorFrame:create () end ----* ----@return ccs.Frame -function ColorFrame:clone () end ----* ----@return self -function ColorFrame:ColorFrame () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/ComAttribute.lua b/meta/3rd/Cocos4.0/library/ccs/ComAttribute.lua deleted file mode 100644 index 34cf9270..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/ComAttribute.lua +++ /dev/null @@ -1,66 +0,0 @@ ----@meta - ----@class ccs.ComAttribute :cc.Component -local ComAttribute={ } -ccs.ComAttribute=ComAttribute - - - - ----* ----@param key string ----@param def float ----@return float -function ComAttribute:getFloat (key,def) end ----* ----@param key string ----@param def string ----@return string -function ComAttribute:getString (key,def) end ----* ----@param key string ----@param value float ----@return self -function ComAttribute:setFloat (key,value) end ----* ----@param key string ----@param value string ----@return self -function ComAttribute:setString (key,value) end ----* ----@param key string ----@param def boolean ----@return boolean -function ComAttribute:getBool (key,def) end ----* ----@param key string ----@param value int ----@return self -function ComAttribute:setInt (key,value) end ----* ----@param jsonFile string ----@return boolean -function ComAttribute:parse (jsonFile) end ----* ----@param key string ----@param def int ----@return int -function ComAttribute:getInt (key,def) end ----* ----@param key string ----@param value boolean ----@return self -function ComAttribute:setBool (key,value) end ----* ----@return self -function ComAttribute:create () end ----* ----@return cc.Ref -function ComAttribute:createInstance () end ----* ----@return boolean -function ComAttribute:init () end ----* ----@param r void ----@return boolean -function ComAttribute:serialize (r) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/ComAudio.lua b/meta/3rd/Cocos4.0/library/ccs/ComAudio.lua deleted file mode 100644 index d198e2ef..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/ComAudio.lua +++ /dev/null @@ -1,134 +0,0 @@ ----@meta - ----@class ccs.ComAudio :cc.Component@all parent class: Component,PlayableProtocol -local ComAudio={ } -ccs.ComAudio=ComAudio - - - - ----* ----@return self -function ComAudio:stopAllEffects () end ----* ----@return float -function ComAudio:getEffectsVolume () end ----* ----@param nSoundId unsigned_int ----@return self -function ComAudio:stopEffect (nSoundId) end ----* ----@return float -function ComAudio:getBackgroundMusicVolume () end ----* ----@return boolean -function ComAudio:willPlayBackgroundMusic () end ----* ----@param volume float ----@return self -function ComAudio:setBackgroundMusicVolume (volume) end ----* / @{/ @name implement Playable Protocol ----@return self -function ComAudio:start () end ----@overload fun():self ----@overload fun(boolean:boolean):self ----@param bReleaseData boolean ----@return self -function ComAudio:stopBackgroundMusic (bReleaseData) end ----* ----@return self -function ComAudio:pauseBackgroundMusic () end ----* ----@return boolean -function ComAudio:isBackgroundMusicPlaying () end ----* ----@return boolean -function ComAudio:isLoop () end ----* ----@return self -function ComAudio:resumeAllEffects () end ----* ----@return self -function ComAudio:pauseAllEffects () end ----* ----@param pszFilePath char ----@return self -function ComAudio:preloadBackgroundMusic (pszFilePath) end ----@overload fun(char:char):self ----@overload fun(char:char,boolean:boolean):self ----@overload fun():self ----@param pszFilePath char ----@param bLoop boolean ----@return self -function ComAudio:playBackgroundMusic (pszFilePath,bLoop) end ----* ----@return self -function ComAudio:stop () end ----* lua endToLua ----@return self -function ComAudio:endToLua () end ----@overload fun(char:char):self ----@overload fun(char:char,boolean:boolean):self ----@overload fun():self ----@param pszFilePath char ----@param bLoop boolean ----@return unsigned_int -function ComAudio:playEffect (pszFilePath,bLoop) end ----* ----@param pszFilePath char ----@return self -function ComAudio:preloadEffect (pszFilePath) end ----* ----@param bLoop boolean ----@return self -function ComAudio:setLoop (bLoop) end ----* ----@param pszFilePath char ----@return self -function ComAudio:unloadEffect (pszFilePath) end ----* ----@return self -function ComAudio:rewindBackgroundMusic () end ----* ----@param nSoundId unsigned_int ----@return self -function ComAudio:pauseEffect (nSoundId) end ----* ----@return self -function ComAudio:resumeBackgroundMusic () end ----* ----@param pszFilePath char ----@return self -function ComAudio:setFile (pszFilePath) end ----* ----@param volume float ----@return self -function ComAudio:setEffectsVolume (volume) end ----* ----@return char -function ComAudio:getFile () end ----* ----@param nSoundId unsigned_int ----@return self -function ComAudio:resumeEffect (nSoundId) end ----* ----@return self -function ComAudio:create () end ----* ----@return cc.Ref -function ComAudio:createInstance () end ----* js NA
----* lua NA ----@return self -function ComAudio:onRemove () end ----* ----@param r void ----@return boolean -function ComAudio:serialize (r) end ----* ----@return boolean -function ComAudio:init () end ----* js NA
----* lua NA ----@return self -function ComAudio:onAdd () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/ComController.lua b/meta/3rd/Cocos4.0/library/ccs/ComController.lua deleted file mode 100644 index 49c7deae..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/ComController.lua +++ /dev/null @@ -1,33 +0,0 @@ ----@meta - ----@class ccs.ComController :cc.Component@all parent class: Component,InputDelegate -local ComController={ } -ccs.ComController=ComController - - - - ----* ----@return self -function ComController:create () end ----* ----@return cc.Ref -function ComController:createInstance () end ----* js NA
----* lua NA ----@return self -function ComController:onRemove () end ----* ----@param delta float ----@return self -function ComController:update (delta) end ----* ----@return boolean -function ComController:init () end ----* js NA
----* lua NA ----@return self -function ComController:onAdd () end ----* js ctor ----@return self -function ComController:ComController () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/ComExtensionData.lua b/meta/3rd/Cocos4.0/library/ccs/ComExtensionData.lua deleted file mode 100644 index 8136debb..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/ComExtensionData.lua +++ /dev/null @@ -1,43 +0,0 @@ ----@meta - ----@class ccs.ComExtensionData :cc.Component -local ComExtensionData={ } -ccs.ComExtensionData=ComExtensionData - - - - ----* ----@param actionTag int ----@return self -function ComExtensionData:setActionTag (actionTag) end ----* ----@return string -function ComExtensionData:getCustomProperty () end ----* ----@return int -function ComExtensionData:getActionTag () end ----* ----@param customProperty string ----@return self -function ComExtensionData:setCustomProperty (customProperty) end ----* ----@return self -function ComExtensionData:create () end ----* ----@return cc.Ref -function ComExtensionData:createInstance () end ----* ----@return boolean -function ComExtensionData:init () end ----* js NA
----* lua NA ----@return self -function ComExtensionData:onRemove () end ----* js NA
----* lua NA ----@return self -function ComExtensionData:onAdd () end ----* ----@return self -function ComExtensionData:ComExtensionData () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/ComRender.lua b/meta/3rd/Cocos4.0/library/ccs/ComRender.lua deleted file mode 100644 index 9600711c..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/ComRender.lua +++ /dev/null @@ -1,37 +0,0 @@ ----@meta - ----@class ccs.ComRender :cc.Component -local ComRender={ } -ccs.ComRender=ComRender - - - - ----* ----@param node cc.Node ----@return self -function ComRender:setNode (node) end ----* ----@return cc.Node -function ComRender:getNode () end ----@overload fun(cc.Node:cc.Node,char:char):self ----@overload fun():self ----@param node cc.Node ----@param comName char ----@return self -function ComRender:create (node,comName) end ----* ----@return cc.Ref -function ComRender:createInstance () end ----* ----@param r void ----@return boolean -function ComRender:serialize (r) end ----* js NA
----* lua NA ----@return self -function ComRender:onRemove () end ----* js NA
----* lua NA ----@return self -function ComRender:onAdd () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/ContourData.lua b/meta/3rd/Cocos4.0/library/ccs/ContourData.lua deleted file mode 100644 index 2bbb1fd6..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/ContourData.lua +++ /dev/null @@ -1,22 +0,0 @@ ----@meta - ----@class ccs.ContourData :cc.Ref -local ContourData={ } -ccs.ContourData=ContourData - - - - ----* ----@return boolean -function ContourData:init () end ----* ----@param vertex vec2_table ----@return self -function ContourData:addVertex (vertex) end ----* ----@return self -function ContourData:create () end ----* js ctor ----@return self -function ContourData:ContourData () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/DisplayData.lua b/meta/3rd/Cocos4.0/library/ccs/DisplayData.lua deleted file mode 100644 index 91233cd2..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/DisplayData.lua +++ /dev/null @@ -1,23 +0,0 @@ ----@meta - ----@class ccs.DisplayData :cc.Ref -local DisplayData={ } -ccs.DisplayData=DisplayData - - - - ----* ----@param displayData ccs.DisplayData ----@return self -function DisplayData:copy (displayData) end ----* ----@param displayName string ----@return string -function DisplayData:changeDisplayToTexture (displayName) end ----* ----@return self -function DisplayData:create () end ----* js ctor ----@return self -function DisplayData:DisplayData () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/DisplayManager.lua b/meta/3rd/Cocos4.0/library/ccs/DisplayManager.lua deleted file mode 100644 index 64fa7b3a..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/DisplayManager.lua +++ /dev/null @@ -1,92 +0,0 @@ ----@meta - ----@class ccs.DisplayManager :cc.Ref -local DisplayManager={ } -ccs.DisplayManager=DisplayManager - - - - ----* ----@return cc.Node -function DisplayManager:getDisplayRenderNode () end ----* ----@return vec2_table -function DisplayManager:getAnchorPointInPoints () end ----* ----@return int -function DisplayManager:getDisplayRenderNodeType () end ----* ----@param index int ----@return self -function DisplayManager:removeDisplay (index) end ----* ----@param force boolean ----@return self -function DisplayManager:setForceChangeDisplay (force) end ----* ----@param bone ccs.Bone ----@return boolean -function DisplayManager:init (bone) end ----* ----@return size_table -function DisplayManager:getContentSize () end ----* ----@return rect_table -function DisplayManager:getBoundingBox () end ----@overload fun(ccs.DisplayData0:cc.Node,int:int):self ----@overload fun(ccs.DisplayData:ccs.DisplayData,int:int):self ----@param displayData ccs.DisplayData ----@param index int ----@return self -function DisplayManager:addDisplay (displayData,index) end ----@overload fun(float:float,float:float):self ----@overload fun(float0:vec2_table):self ----@param x float ----@param y float ----@return boolean -function DisplayManager:containPoint (x,y) end ----* Change display by index. You can just use this method to change display in the display list.
----* The display list is just used for this bone, and it is the displays you may use in every frame.
----* Note : if index is the same with prev index, the method will not effect
----* param index The index of the display you want to change
----* param force If true, then force change display to specified display, or current display will set to display index edit in the flash every key frame. ----@param index int ----@param force boolean ----@return self -function DisplayManager:changeDisplayWithIndex (index,force) end ----* ----@param name string ----@param force boolean ----@return self -function DisplayManager:changeDisplayWithName (name,force) end ----* ----@return boolean -function DisplayManager:isForceChangeDisplay () end ----* ----@return int -function DisplayManager:getCurrentDisplayIndex () end ----* ----@return vec2_table -function DisplayManager:getAnchorPoint () end ----* ----@return array_table -function DisplayManager:getDecorativeDisplayList () end ----* Determines if the display is visible
----* see setVisible(bool)
----* return true if the node is visible, false if the node is hidden. ----@return boolean -function DisplayManager:isVisible () end ----* Sets whether the display is visible
----* The default value is true, a node is default to visible
----* param visible true if the node is visible, false if the node is hidden. ----@param visible boolean ----@return self -function DisplayManager:setVisible (visible) end ----* ----@param bone ccs.Bone ----@return self -function DisplayManager:create (bone) end ----* ----@return self -function DisplayManager:DisplayManager () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/EventFrame.lua b/meta/3rd/Cocos4.0/library/ccs/EventFrame.lua deleted file mode 100644 index 6b7e3262..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/EventFrame.lua +++ /dev/null @@ -1,32 +0,0 @@ ----@meta - ----@class ccs.EventFrame :ccs.Frame -local EventFrame={ } -ccs.EventFrame=EventFrame - - - - ----* ----@param event string ----@return self -function EventFrame:setEvent (event) end ----* ----@return self -function EventFrame:init () end ----* ----@return string -function EventFrame:getEvent () end ----* ----@return self -function EventFrame:create () end ----* ----@return ccs.Frame -function EventFrame:clone () end ----* ----@param node cc.Node ----@return self -function EventFrame:setNode (node) end ----* ----@return self -function EventFrame:EventFrame () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/Frame.lua b/meta/3rd/Cocos4.0/library/ccs/Frame.lua deleted file mode 100644 index 174224b7..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/Frame.lua +++ /dev/null @@ -1,61 +0,0 @@ ----@meta - ----@class ccs.Frame :cc.Ref -local Frame={ } -ccs.Frame=Frame - - - - ----* ----@return self -function Frame:clone () end ----* ----@param tweenType int ----@return self -function Frame:setTweenType (tweenType) end ----* ----@param node cc.Node ----@return self -function Frame:setNode (node) end ----* ----@param timeline ccs.Timeline ----@return self -function Frame:setTimeline (timeline) end ----* ----@return boolean -function Frame:isEnterWhenPassed () end ----* ----@return int -function Frame:getTweenType () end ----* ----@return array_table -function Frame:getEasingParams () end ----* ----@param easingParams array_table ----@return self -function Frame:setEasingParams (easingParams) end ----* ----@return unsigned_int -function Frame:getFrameIndex () end ----* ----@param percent float ----@return self -function Frame:apply (percent) end ----* ----@return boolean -function Frame:isTween () end ----* ----@param frameIndex unsigned_int ----@return self -function Frame:setFrameIndex (frameIndex) end ----* ----@param tween boolean ----@return self -function Frame:setTween (tween) end ----* ----@return ccs.Timeline -function Frame:getTimeline () end ----* ----@return cc.Node -function Frame:getNode () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/FrameData.lua b/meta/3rd/Cocos4.0/library/ccs/FrameData.lua deleted file mode 100644 index 5e867fb6..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/FrameData.lua +++ /dev/null @@ -1,19 +0,0 @@ ----@meta - ----@class ccs.FrameData :ccs.BaseData -local FrameData={ } -ccs.FrameData=FrameData - - - - ----* ----@param baseData ccs.BaseData ----@return self -function FrameData:copy (baseData) end ----* ----@return self -function FrameData:create () end ----* js ctor ----@return self -function FrameData:FrameData () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/GUIReader.lua b/meta/3rd/Cocos4.0/library/ccs/GUIReader.lua deleted file mode 100644 index b39b65ef..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/GUIReader.lua +++ /dev/null @@ -1,34 +0,0 @@ ----@meta - ----@class ccs.GUIReader :cc.Ref -local GUIReader={ } -ccs.GUIReader=GUIReader - - - - ----* ----@param strFilePath string ----@return self -function GUIReader:setFilePath (strFilePath) end ----* ----@param fileName char ----@return ccui.Widget -function GUIReader:widgetFromJsonFile (fileName) end ----* ----@return string -function GUIReader:getFilePath () end ----* ----@param fileName char ----@return ccui.Widget -function GUIReader:widgetFromBinaryFile (fileName) end ----* ----@param str char ----@return int -function GUIReader:getVersionInteger (str) end ----* ----@return self -function GUIReader:destroyInstance () end ----* ----@return self -function GUIReader:getInstance () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/InnerActionFrame.lua b/meta/3rd/Cocos4.0/library/ccs/InnerActionFrame.lua deleted file mode 100644 index ea5002ea..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/InnerActionFrame.lua +++ /dev/null @@ -1,54 +0,0 @@ ----@meta - ----@class ccs.InnerActionFrame :ccs.Frame -local InnerActionFrame={ } -ccs.InnerActionFrame=InnerActionFrame - - - - ----* ----@return int -function InnerActionFrame:getEndFrameIndex () end ----* ----@return int -function InnerActionFrame:getStartFrameIndex () end ----* ----@return int -function InnerActionFrame:getInnerActionType () end ----* ----@param frameIndex int ----@return self -function InnerActionFrame:setEndFrameIndex (frameIndex) end ----* ----@param isEnterWithName boolean ----@return self -function InnerActionFrame:setEnterWithName (isEnterWithName) end ----* ----@param frameIndex int ----@return self -function InnerActionFrame:setSingleFrameIndex (frameIndex) end ----* ----@param frameIndex int ----@return self -function InnerActionFrame:setStartFrameIndex (frameIndex) end ----* ----@return int -function InnerActionFrame:getSingleFrameIndex () end ----* ----@param type int ----@return self -function InnerActionFrame:setInnerActionType (type) end ----* ----@param animationNamed string ----@return self -function InnerActionFrame:setAnimationName (animationNamed) end ----* ----@return self -function InnerActionFrame:create () end ----* ----@return ccs.Frame -function InnerActionFrame:clone () end ----* ----@return self -function InnerActionFrame:InnerActionFrame () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/MovementBoneData.lua b/meta/3rd/Cocos4.0/library/ccs/MovementBoneData.lua deleted file mode 100644 index 9a04a3c8..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/MovementBoneData.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class ccs.MovementBoneData :cc.Ref -local MovementBoneData={ } -ccs.MovementBoneData=MovementBoneData - - - - ----* ----@return boolean -function MovementBoneData:init () end ----* ----@param index int ----@return ccs.FrameData -function MovementBoneData:getFrameData (index) end ----* ----@param frameData ccs.FrameData ----@return self -function MovementBoneData:addFrameData (frameData) end ----* ----@return self -function MovementBoneData:create () end ----* js ctor ----@return self -function MovementBoneData:MovementBoneData () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/MovementData.lua b/meta/3rd/Cocos4.0/library/ccs/MovementData.lua deleted file mode 100644 index b7cda9fd..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/MovementData.lua +++ /dev/null @@ -1,23 +0,0 @@ ----@meta - ----@class ccs.MovementData :cc.Ref -local MovementData={ } -ccs.MovementData=MovementData - - - - ----* ----@param boneName string ----@return ccs.MovementBoneData -function MovementData:getMovementBoneData (boneName) end ----* ----@param movBoneData ccs.MovementBoneData ----@return self -function MovementData:addMovementBoneData (movBoneData) end ----* ----@return self -function MovementData:create () end ----* js ctor ----@return self -function MovementData:MovementData () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/ParticleDisplayData.lua b/meta/3rd/Cocos4.0/library/ccs/ParticleDisplayData.lua deleted file mode 100644 index 895a932e..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/ParticleDisplayData.lua +++ /dev/null @@ -1,15 +0,0 @@ ----@meta - ----@class ccs.ParticleDisplayData :ccs.DisplayData -local ParticleDisplayData={ } -ccs.ParticleDisplayData=ParticleDisplayData - - - - ----* ----@return self -function ParticleDisplayData:create () end ----* js ctor ----@return self -function ParticleDisplayData:ParticleDisplayData () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/PlayableFrame.lua b/meta/3rd/Cocos4.0/library/ccs/PlayableFrame.lua deleted file mode 100644 index 861a22e4..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/PlayableFrame.lua +++ /dev/null @@ -1,25 +0,0 @@ ----@meta - ----@class ccs.PlayableFrame :ccs.Frame -local PlayableFrame={ } -ccs.PlayableFrame=PlayableFrame - - - - ----* ----@param playact string ----@return self -function PlayableFrame:setPlayableAct (playact) end ----* ----@return string -function PlayableFrame:getPlayableAct () end ----* ----@return self -function PlayableFrame:create () end ----* ----@return ccs.Frame -function PlayableFrame:clone () end ----* ----@return self -function PlayableFrame:PlayableFrame () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/PositionFrame.lua b/meta/3rd/Cocos4.0/library/ccs/PositionFrame.lua deleted file mode 100644 index c9aa38be..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/PositionFrame.lua +++ /dev/null @@ -1,39 +0,0 @@ ----@meta - ----@class ccs.PositionFrame :ccs.Frame -local PositionFrame={ } -ccs.PositionFrame=PositionFrame - - - - ----* ----@return float -function PositionFrame:getX () end ----* ----@return float -function PositionFrame:getY () end ----* ----@param position vec2_table ----@return self -function PositionFrame:setPosition (position) end ----* ----@param x float ----@return self -function PositionFrame:setX (x) end ----* ----@param y float ----@return self -function PositionFrame:setY (y) end ----* ----@return vec2_table -function PositionFrame:getPosition () end ----* ----@return self -function PositionFrame:create () end ----* ----@return ccs.Frame -function PositionFrame:clone () end ----* ----@return self -function PositionFrame:PositionFrame () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/RotationFrame.lua b/meta/3rd/Cocos4.0/library/ccs/RotationFrame.lua deleted file mode 100644 index ca2f9652..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/RotationFrame.lua +++ /dev/null @@ -1,25 +0,0 @@ ----@meta - ----@class ccs.RotationFrame :ccs.Frame -local RotationFrame={ } -ccs.RotationFrame=RotationFrame - - - - ----* ----@param rotation float ----@return self -function RotationFrame:setRotation (rotation) end ----* ----@return float -function RotationFrame:getRotation () end ----* ----@return self -function RotationFrame:create () end ----* ----@return ccs.Frame -function RotationFrame:clone () end ----* ----@return self -function RotationFrame:RotationFrame () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/RotationSkewFrame.lua b/meta/3rd/Cocos4.0/library/ccs/RotationSkewFrame.lua deleted file mode 100644 index e7baa172..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/RotationSkewFrame.lua +++ /dev/null @@ -1,18 +0,0 @@ ----@meta - ----@class ccs.RotationSkewFrame :ccs.SkewFrame -local RotationSkewFrame={ } -ccs.RotationSkewFrame=RotationSkewFrame - - - - ----* ----@return self -function RotationSkewFrame:create () end ----* ----@return ccs.Frame -function RotationSkewFrame:clone () end ----* ----@return self -function RotationSkewFrame:RotationSkewFrame () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/ScaleFrame.lua b/meta/3rd/Cocos4.0/library/ccs/ScaleFrame.lua deleted file mode 100644 index 00c2d9a4..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/ScaleFrame.lua +++ /dev/null @@ -1,36 +0,0 @@ ----@meta - ----@class ccs.ScaleFrame :ccs.Frame -local ScaleFrame={ } -ccs.ScaleFrame=ScaleFrame - - - - ----* ----@param scaleY float ----@return self -function ScaleFrame:setScaleY (scaleY) end ----* ----@param scaleX float ----@return self -function ScaleFrame:setScaleX (scaleX) end ----* ----@return float -function ScaleFrame:getScaleY () end ----* ----@return float -function ScaleFrame:getScaleX () end ----* ----@param scale float ----@return self -function ScaleFrame:setScale (scale) end ----* ----@return self -function ScaleFrame:create () end ----* ----@return ccs.Frame -function ScaleFrame:clone () end ----* ----@return self -function ScaleFrame:ScaleFrame () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/SceneReader.lua b/meta/3rd/Cocos4.0/library/ccs/SceneReader.lua deleted file mode 100644 index e9692b80..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/SceneReader.lua +++ /dev/null @@ -1,35 +0,0 @@ ----@meta - ----@class ccs.SceneReader -local SceneReader={ } -ccs.SceneReader=SceneReader - - - - ----* ----@param selector function ----@return self -function SceneReader:setTarget (selector) end ----* ----@param fileName string ----@param attachComponent int ----@return cc.Node -function SceneReader:createNodeWithSceneFile (fileName,attachComponent) end ----* ----@return int -function SceneReader:getAttachComponentType () end ----* ----@param nTag int ----@return cc.Node -function SceneReader:getNodeByTag (nTag) end ----* js purge
----* lua destroySceneReader ----@return self -function SceneReader:destroyInstance () end ----* ----@return char -function SceneReader:sceneReaderVersion () end ----* ----@return self -function SceneReader:getInstance () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/SkeletonNode.lua b/meta/3rd/Cocos4.0/library/ccs/SkeletonNode.lua deleted file mode 100644 index b467be90..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/SkeletonNode.lua +++ /dev/null @@ -1,40 +0,0 @@ ----@meta - ----@class ccs.SkeletonNode :ccs.BoneNode -local SkeletonNode={ } -ccs.SkeletonNode=SkeletonNode - - - - ----* get bonenode in skeleton node by bone name ----@param boneName string ----@return ccs.BoneNode -function SkeletonNode:getBoneNode (boneName) end ----@overload fun(map_table0:string):self ----@overload fun(map_table:map_table):self ----@param boneSkinNameMap map_table ----@return self -function SkeletonNode:changeSkins (boneSkinNameMap) end ----* brief: add a boneSkinNameMap as a SkinGroup named groupName
----* param: groupName, key
----* param: boneSkinNameMap, map ----@param groupName string ----@param boneSkinNameMap map_table ----@return self -function SkeletonNode:addSkinGroup (groupName,boneSkinNameMap) end ----* get All bones in this skeleton, ----@return map_table -function SkeletonNode:getAllSubBonesMap () end ----* ----@return self -function SkeletonNode:create () end ----* ----@return rect_table -function SkeletonNode:getBoundingBox () end ----* ----@return boolean -function SkeletonNode:init () end ----* ----@return self -function SkeletonNode:SkeletonNode () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/SkewFrame.lua b/meta/3rd/Cocos4.0/library/ccs/SkewFrame.lua deleted file mode 100644 index a8285224..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/SkewFrame.lua +++ /dev/null @@ -1,32 +0,0 @@ ----@meta - ----@class ccs.SkewFrame :ccs.Frame -local SkewFrame={ } -ccs.SkewFrame=SkewFrame - - - - ----* ----@return float -function SkewFrame:getSkewY () end ----* ----@param skewx float ----@return self -function SkewFrame:setSkewX (skewx) end ----* ----@param skewy float ----@return self -function SkewFrame:setSkewY (skewy) end ----* ----@return float -function SkewFrame:getSkewX () end ----* ----@return self -function SkewFrame:create () end ----* ----@return ccs.Frame -function SkewFrame:clone () end ----* ----@return self -function SkewFrame:SkewFrame () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/Skin.lua b/meta/3rd/Cocos4.0/library/ccs/Skin.lua deleted file mode 100644 index dfc24f15..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/Skin.lua +++ /dev/null @@ -1,57 +0,0 @@ ----@meta - ----@class ccs.Skin :cc.Sprite -local Skin={ } -ccs.Skin=Skin - - - - ----* ----@return ccs.Bone -function Skin:getBone () end ----* ----@return mat4_table -function Skin:getNodeToWorldTransformAR () end ----* ----@return string -function Skin:getDisplayName () end ----* ----@return self -function Skin:updateArmatureTransform () end ----* ----@param bone ccs.Bone ----@return self -function Skin:setBone (bone) end ----@overload fun(string:string):self ----@overload fun():self ----@param pszFileName string ----@return self -function Skin:create (pszFileName) end ----* ----@param pszSpriteFrameName string ----@return self -function Skin:createWithSpriteFrameName (pszSpriteFrameName) end ----* ----@param renderer cc.Renderer ----@param transform mat4_table ----@param flags unsigned_int ----@return self -function Skin:draw (renderer,transform,flags) end ----* ----@return mat4_table -function Skin:getNodeToWorldTransform () end ----* ----@param spriteFrameName string ----@return boolean -function Skin:initWithSpriteFrameName (spriteFrameName) end ----* ----@param filename string ----@return boolean -function Skin:initWithFile (filename) end ----* ----@return self -function Skin:updateTransform () end ----* js ctor ----@return self -function Skin:Skin () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/SpriteDisplayData.lua b/meta/3rd/Cocos4.0/library/ccs/SpriteDisplayData.lua deleted file mode 100644 index 84649ab3..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/SpriteDisplayData.lua +++ /dev/null @@ -1,19 +0,0 @@ ----@meta - ----@class ccs.SpriteDisplayData :ccs.DisplayData -local SpriteDisplayData={ } -ccs.SpriteDisplayData=SpriteDisplayData - - - - ----* ----@param displayData ccs.DisplayData ----@return self -function SpriteDisplayData:copy (displayData) end ----* ----@return self -function SpriteDisplayData:create () end ----* js ctor ----@return self -function SpriteDisplayData:SpriteDisplayData () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/TextureData.lua b/meta/3rd/Cocos4.0/library/ccs/TextureData.lua deleted file mode 100644 index 2fbb79d9..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/TextureData.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class ccs.TextureData :cc.Ref -local TextureData={ } -ccs.TextureData=TextureData - - - - ----* ----@param index int ----@return ccs.ContourData -function TextureData:getContourData (index) end ----* ----@return boolean -function TextureData:init () end ----* ----@param contourData ccs.ContourData ----@return self -function TextureData:addContourData (contourData) end ----* ----@return self -function TextureData:create () end ----* js ctor ----@return self -function TextureData:TextureData () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/TextureFrame.lua b/meta/3rd/Cocos4.0/library/ccs/TextureFrame.lua deleted file mode 100644 index 7e3a5aab..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/TextureFrame.lua +++ /dev/null @@ -1,29 +0,0 @@ ----@meta - ----@class ccs.TextureFrame :ccs.Frame -local TextureFrame={ } -ccs.TextureFrame=TextureFrame - - - - ----* ----@return string -function TextureFrame:getTextureName () end ----* ----@param textureName string ----@return self -function TextureFrame:setTextureName (textureName) end ----* ----@return self -function TextureFrame:create () end ----* ----@return ccs.Frame -function TextureFrame:clone () end ----* ----@param node cc.Node ----@return self -function TextureFrame:setNode (node) end ----* ----@return self -function TextureFrame:TextureFrame () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/Timeline.lua b/meta/3rd/Cocos4.0/library/ccs/Timeline.lua deleted file mode 100644 index d73c7aa6..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/Timeline.lua +++ /dev/null @@ -1,63 +0,0 @@ ----@meta - ----@class ccs.Timeline :cc.Ref -local Timeline={ } -ccs.Timeline=Timeline - - - - ----* ----@return self -function Timeline:clone () end ----* ----@param frameIndex int ----@return self -function Timeline:gotoFrame (frameIndex) end ----* ----@param node cc.Node ----@return self -function Timeline:setNode (node) end ----* ----@return ccs.ActionTimeline -function Timeline:getActionTimeline () end ----* ----@param frame ccs.Frame ----@param index int ----@return self -function Timeline:insertFrame (frame,index) end ----* ----@param tag int ----@return self -function Timeline:setActionTag (tag) end ----* ----@param frame ccs.Frame ----@return self -function Timeline:addFrame (frame) end ----* ----@return array_table -function Timeline:getFrames () end ----* ----@return int -function Timeline:getActionTag () end ----* ----@return cc.Node -function Timeline:getNode () end ----* ----@param frame ccs.Frame ----@return self -function Timeline:removeFrame (frame) end ----* ----@param action ccs.ActionTimeline ----@return self -function Timeline:setActionTimeline (action) end ----* ----@param frameIndex int ----@return self -function Timeline:stepToFrame (frameIndex) end ----* ----@return self -function Timeline:create () end ----* ----@return self -function Timeline:Timeline () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/Tween.lua b/meta/3rd/Cocos4.0/library/ccs/Tween.lua deleted file mode 100644 index 58f978bf..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/Tween.lua +++ /dev/null @@ -1,58 +0,0 @@ ----@meta - ----@class ccs.Tween -local Tween={ } -ccs.Tween=Tween - - - - ----* ----@return ccs.ArmatureAnimation -function Tween:getAnimation () end ----* ----@param frameIndex int ----@return self -function Tween:gotoAndPause (frameIndex) end ----* Start the Process
----* param movementBoneData the MovementBoneData include all FrameData
----* param durationTo the number of frames changing to this animation needs.
----* param durationTween the number of frames this animation actual last.
----* param loop whether the animation is loop
----* loop < 0 : use the value from MovementData get from Action Editor
----* loop = 0 : this animation is not loop
----* loop > 0 : this animation is loop
----* param tweenEasing tween easing is used for calculate easing effect
----* TWEEN_EASING_MAX : use the value from MovementData get from Action Editor
----* -1 : fade out
----* 0 : line
----* 1 : fade in
----* 2 : fade in and out ----@param movementBoneData ccs.MovementBoneData ----@param durationTo int ----@param durationTween int ----@param loop int ----@param tweenEasing int ----@return self -function Tween:play (movementBoneData,durationTo,durationTween,loop,tweenEasing) end ----* ----@param frameIndex int ----@return self -function Tween:gotoAndPlay (frameIndex) end ----* Init with a Bone
----* param bone the Bone Tween will bind to ----@param bone ccs.Bone ----@return boolean -function Tween:init (bone) end ----* ----@param animation ccs.ArmatureAnimation ----@return self -function Tween:setAnimation (animation) end ----* Create with a Bone
----* param bone the Bone Tween will bind to ----@param bone ccs.Bone ----@return self -function Tween:create (bone) end ----* ----@return self -function Tween:Tween () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/VisibleFrame.lua b/meta/3rd/Cocos4.0/library/ccs/VisibleFrame.lua deleted file mode 100644 index 25dd30d6..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/VisibleFrame.lua +++ /dev/null @@ -1,25 +0,0 @@ ----@meta - ----@class ccs.VisibleFrame :ccs.Frame -local VisibleFrame={ } -ccs.VisibleFrame=VisibleFrame - - - - ----* ----@return boolean -function VisibleFrame:isVisible () end ----* ----@param visible boolean ----@return self -function VisibleFrame:setVisible (visible) end ----* ----@return self -function VisibleFrame:create () end ----* ----@return ccs.Frame -function VisibleFrame:clone () end ----* ----@return self -function VisibleFrame:VisibleFrame () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccs/ZOrderFrame.lua b/meta/3rd/Cocos4.0/library/ccs/ZOrderFrame.lua deleted file mode 100644 index b0d4d1eb..00000000 --- a/meta/3rd/Cocos4.0/library/ccs/ZOrderFrame.lua +++ /dev/null @@ -1,25 +0,0 @@ ----@meta - ----@class ccs.ZOrderFrame :ccs.Frame -local ZOrderFrame={ } -ccs.ZOrderFrame=ZOrderFrame - - - - ----* ----@return int -function ZOrderFrame:getZOrder () end ----* ----@param zorder int ----@return self -function ZOrderFrame:setZOrder (zorder) end ----* ----@return self -function ZOrderFrame:create () end ----* ----@return ccs.Frame -function ZOrderFrame:clone () end ----* ----@return self -function ZOrderFrame:ZOrderFrame () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccui/AbstractCheckButton.lua b/meta/3rd/Cocos4.0/library/ccui/AbstractCheckButton.lua deleted file mode 100644 index 2a2ae13c..00000000 --- a/meta/3rd/Cocos4.0/library/ccui/AbstractCheckButton.lua +++ /dev/null @@ -1,133 +0,0 @@ ----@meta - ----@class ccui.AbstractCheckButton :ccui.Widget -local AbstractCheckButton={ } -ccui.AbstractCheckButton=AbstractCheckButton - - - - ----* ----@return cc.ResourceData -function AbstractCheckButton:getCrossDisabledFile () end ----* ----@return cc.ResourceData -function AbstractCheckButton:getBackDisabledFile () end ----* Load background selected state texture for check button.
----* param backGroundSelected The background selected state image name.
----* param texType @see `Widget::TextureResType` ----@param backGroundSelected string ----@param texType int ----@return self -function AbstractCheckButton:loadTextureBackGroundSelected (backGroundSelected,texType) end ----* Load background disabled state texture for checkbox.
----* param backGroundDisabled The background disabled state texture name.
----* param texType @see `Widget::TextureResType` ----@param backGroundDisabled string ----@param texType int ----@return self -function AbstractCheckButton:loadTextureBackGroundDisabled (backGroundDisabled,texType) end ----* ----@return cc.ResourceData -function AbstractCheckButton:getCrossNormalFile () end ----* Change CheckBox state.
----* Set to true will cause the CheckBox's state to "selected", false otherwise.
----* param selected Set to true will change CheckBox to selected state, false otherwise. ----@param selected boolean ----@return self -function AbstractCheckButton:setSelected (selected) end ----* ----@return cc.ResourceData -function AbstractCheckButton:getBackPressedFile () end ----* brief Return the sprite instance of front cross when disabled
----* return the sprite instance of front cross when disabled ----@return cc.Sprite -function AbstractCheckButton:getRendererFrontCrossDisabled () end ----* brief Return the sprite instance of background
----* return the sprite instance of background. ----@return cc.Sprite -function AbstractCheckButton:getRendererBackground () end ----* Load cross texture for check button.
----* param crossTextureName The cross texture name.
----* param texType @see `Widget::TextureResType` ----@param crossTextureName string ----@param texType int ----@return self -function AbstractCheckButton:loadTextureFrontCross (crossTextureName,texType) end ----* brief Return the sprite instance of background when disabled
----* return the sprite instance of background when disabled ----@return cc.Sprite -function AbstractCheckButton:getRendererBackgroundDisabled () end ----* Query whether CheckBox is selected or not.
----* return true means "selected", false otherwise. ----@return boolean -function AbstractCheckButton:isSelected () end ----* ----@param backGround string ----@param backGroundSelected string ----@param cross string ----@param backGroundDisabled string ----@param frontCrossDisabled string ----@param texType int ----@return boolean -function AbstractCheckButton:init (backGround,backGroundSelected,cross,backGroundDisabled,frontCrossDisabled,texType) end ----* ----@return cc.ResourceData -function AbstractCheckButton:getBackNormalFile () end ----* Load all textures for initializing a check button.
----* param background The background image name.
----* param backgroundSelected The background selected image name.
----* param cross The cross image name.
----* param backgroundDisabled The background disabled state texture.
----* param frontCrossDisabled The front cross disabled state image name.
----* param texType @see `Widget::TextureResType` ----@param background string ----@param backgroundSelected string ----@param cross string ----@param backgroundDisabled string ----@param frontCrossDisabled string ----@param texType int ----@return self -function AbstractCheckButton:loadTextures (background,backgroundSelected,cross,backgroundDisabled,frontCrossDisabled,texType) end ----* brief Return a zoom scale
----* return A zoom scale of Checkbox.
----* since v3.3 ----@return float -function AbstractCheckButton:getZoomScale () end ----* brief Return the sprite instance of front cross
----* return the sprite instance of front cross ----@return cc.Sprite -function AbstractCheckButton:getRendererFrontCross () end ----* brief Return the sprite instance of background when selected
----* return the sprite instance of background when selected ----@return cc.Sprite -function AbstractCheckButton:getRendererBackgroundSelected () end ----* Load background texture for check button.
----* param backGround The background image name.
----* param type @see `Widget::TextureResType` ----@param backGround string ----@param type int ----@return self -function AbstractCheckButton:loadTextureBackGround (backGround,type) end ----* When user pressed the CheckBox, the button will zoom to a scale.
----* The final scale of the CheckBox equals (CheckBox original scale + _zoomScale)
----* since v3.3 ----@param scale float ----@return self -function AbstractCheckButton:setZoomScale (scale) end ----* Load frontcross disabled texture for checkbox.
----* param frontCrossDisabled The front cross disabled state texture name.
----* param texType @see `Widget::TextureResType` ----@param frontCrossDisabled string ----@param texType int ----@return self -function AbstractCheckButton:loadTextureFrontCrossDisabled (frontCrossDisabled,texType) end ----* ----@return cc.Node -function AbstractCheckButton:getVirtualRenderer () end ----* ----@return boolean -function AbstractCheckButton:init () end ----* ----@return size_table -function AbstractCheckButton:getVirtualRendererSize () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccui/Button.lua b/meta/3rd/Cocos4.0/library/ccui/Button.lua deleted file mode 100644 index 7d68bd91..00000000 --- a/meta/3rd/Cocos4.0/library/ccui/Button.lua +++ /dev/null @@ -1,226 +0,0 @@ ----@meta - ----@class ccui.Button :ccui.Widget -local Button={ } -ccui.Button=Button - - - - ----* ----@return size_table -function Button:getNormalTextureSize () end ----* Query the button title content.
----* return Get the button's title content. ----@return string -function Button:getTitleText () end ----* replaces the current Label node with a new one ----@param label cc.Label ----@return self -function Button:setTitleLabel (label) end ----* Change the font size of button's title
----* param size Title font size in float. ----@param size float ----@return self -function Button:setTitleFontSize (size) end ----* ----@return self -function Button:resetPressedRender () end ----* Enable scale9 renderer.
----* param enable Set to true will use scale9 renderer, false otherwise. ----@param enable boolean ----@return self -function Button:setScale9Enabled (enable) end ----* ----@return self -function Button:resetDisabledRender () end ----* Return the inner title renderer of Button.
----* return The button title.
----* since v3.3 ----@return cc.Label -function Button:getTitleRenderer () end ----* brief Return the nine-patch sprite of clicked state
----* return the nine-patch sprite of clicked state
----* since v3.9 ----@return ccui.Scale9Sprite -function Button:getRendererClicked () end ----* ----@return cc.ResourceData -function Button:getDisabledFile () end ----* brief Return a zoom scale
----* return the zoom scale in float
----* since v3.3 ----@return float -function Button:getZoomScale () end ----* Return the capInsets of disabled state scale9sprite.
----* return The disabled scale9 renderer capInsets. ----@return rect_table -function Button:getCapInsetsDisabledRenderer () end ----* Change the color of button's title.
----* param color The title color in Color3B. ----@param color color3b_table ----@return self -function Button:setTitleColor (color) end ----* ----@return cc.ResourceData -function Button:getNormalFile () end ----* ----@return self -function Button:resetNormalRender () end ----* brief Return the nine-patch sprite of disabled state
----* return the nine-patch sprite of disabled state
----* since v3.9 ----@return ccui.Scale9Sprite -function Button:getRendererDisabled () end ----* Sets capInsets for button, only the disabled state scale9 renderer will be affected.
----* param capInsets capInsets in Rect. ----@param capInsets rect_table ----@return self -function Button:setCapInsetsDisabledRenderer (capInsets) end ----* Sets capInsets for button.
----* The capInset affects all button scale9 renderer only if `setScale9Enabled(true)` is called
----* param capInsets capInset in Rect. ----@param capInsets rect_table ----@return self -function Button:setCapInsets (capInsets) end ----* Load disabled state texture for button.
----* param disabled dark state texture.
----* param texType @see `TextureResType` ----@param disabled string ----@param texType int ----@return self -function Button:loadTextureDisabled (disabled,texType) end ----* ----@param normalImage string ----@param selectedImage string ----@param disableImage string ----@param texType int ----@return boolean -function Button:init (normalImage,selectedImage,disableImage,texType) end ----* Change the content of button's title.
----* param text The title in std::string. ----@param text string ----@return self -function Button:setTitleText (text) end ----* Sets capInsets for button, only the normal state scale9 renderer will be affected.
----* param capInsets capInsets in Rect. ----@param capInsets rect_table ----@return self -function Button:setCapInsetsNormalRenderer (capInsets) end ----* Load selected state texture for button.
----* param selected selected state texture.
----* param texType @see `TextureResType` ----@param selected string ----@param texType int ----@return self -function Button:loadTexturePressed (selected,texType) end ----* Change the font name of button's title
----* param fontName a font name string. ----@param fontName string ----@return self -function Button:setTitleFontName (fontName) end ----* Return the capInsets of normal state scale9sprite.
----* return The normal scale9 renderer capInsets. ----@return rect_table -function Button:getCapInsetsNormalRenderer () end ----@overload fun(int:int,int:int):self ----@overload fun(int:int):self ----@param hAlignment int ----@param vAlignment int ----@return self -function Button:setTitleAlignment (hAlignment,vAlignment) end ----* Return the capInsets of pressed state scale9sprite.
----* return The pressed scale9 renderer capInsets. ----@return rect_table -function Button:getCapInsetsPressedRenderer () end ----* Load textures for button.
----* param normal normal state texture name.
----* param selected selected state texture name.
----* param disabled disabled state texture name.
----* param texType @see `TextureResType` ----@param normal string ----@param selected string ----@param disabled string ----@param texType int ----@return self -function Button:loadTextures (normal,selected,disabled,texType) end ----* Query whether button is using scale9 renderer or not.
----* return whether button use scale9 renderer or not. ----@return boolean -function Button:isScale9Enabled () end ----* Load normal state texture for button.
----* param normal normal state texture.
----* param texType @see `TextureResType` ----@param normal string ----@param texType int ----@return self -function Button:loadTextureNormal (normal,texType) end ----* Sets capInsets for button, only the pressed state scale9 renderer will be affected.
----* param capInsets capInsets in Rect ----@param capInsets rect_table ----@return self -function Button:setCapInsetsPressedRenderer (capInsets) end ----* ----@return cc.ResourceData -function Button:getPressedFile () end ----* returns the current Label being used ----@return cc.Label -function Button:getTitleLabel () end ----* Query the font size of button title
----* return font size in float. ----@return float -function Button:getTitleFontSize () end ----* brief Return the nine-patch sprite of normal state
----* return the nine-patch sprite of normal state
----* since v3.9 ----@return ccui.Scale9Sprite -function Button:getRendererNormal () end ----* Query the font name of button's title
----* return font name in std::string ----@return string -function Button:getTitleFontName () end ----* Query the button title color.
----* return Color3B of button title. ----@return color3b_table -function Button:getTitleColor () end ----* Enable zooming action when button is pressed.
----* param enabled Set to true will enable zoom effect, false otherwise. ----@param enabled boolean ----@return self -function Button:setPressedActionEnabled (enabled) end ----* @brief When user pressed the button, the button will zoom to a scale.
----* The final scale of the button equals (button original scale + _zoomScale)
----* since v3.3 ----@param scale float ----@return self -function Button:setZoomScale (scale) end ----@overload fun(string:string,string:string,string:string,int:int):self ----@overload fun():self ----@param normalImage string ----@param selectedImage string ----@param disableImage string ----@param texType int ----@return self -function Button:create (normalImage,selectedImage,disableImage,texType) end ----* ----@return cc.Ref -function Button:createInstance () end ----* ----@return cc.Node -function Button:getVirtualRenderer () end ----* ----@return boolean -function Button:init () end ----* ----@return string -function Button:getDescription () end ----* ----@return size_table -function Button:getVirtualRendererSize () end ----* ----@param ignore boolean ----@return self -function Button:ignoreContentAdaptWithSize (ignore) end ----* Default constructor. ----@return self -function Button:Button () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccui/CheckBox.lua b/meta/3rd/Cocos4.0/library/ccui/CheckBox.lua deleted file mode 100644 index b4079bfb..00000000 --- a/meta/3rd/Cocos4.0/library/ccui/CheckBox.lua +++ /dev/null @@ -1,35 +0,0 @@ ----@meta - ----@class ccui.CheckBox :ccui.AbstractCheckButton -local CheckBox={ } -ccui.CheckBox=CheckBox - - - - ----* Add a callback function which would be called when checkbox is selected or unselected.
----* param callback A std::function with type @see `ccCheckBoxCallback` ----@param callback function ----@return self -function CheckBox:addEventListener (callback) end ----@overload fun(string:string,string:string,string:string,string:string,string:string,int:int):self ----@overload fun():self ----@overload fun(string:string,string:string,string2:int):self ----@param backGround string ----@param backGroundSelected string ----@param cross string ----@param backGroundDisabled string ----@param frontCrossDisabled string ----@param texType int ----@return self -function CheckBox:create (backGround,backGroundSelected,cross,backGroundDisabled,frontCrossDisabled,texType) end ----* ----@return cc.Ref -function CheckBox:createInstance () end ----* ----@return string -function CheckBox:getDescription () end ----* Default constructor.
----* lua new ----@return self -function CheckBox:CheckBox () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccui/EditBox.lua b/meta/3rd/Cocos4.0/library/ccui/EditBox.lua deleted file mode 100644 index 1cd1fb9b..00000000 --- a/meta/3rd/Cocos4.0/library/ccui/EditBox.lua +++ /dev/null @@ -1,323 +0,0 @@ ----@meta - ----@class ccui.EditBox :ccui.Widget@all parent class: Widget,IMEDelegate -local EditBox={ } -ccui.EditBox=EditBox - - - - ----* Get the font size.
----* return The font size. ----@return int -function EditBox:getFontSize () end ----* js NA
----* lua NA ----@param info cc.IMEKeyboardNotificationInfo ----@return self -function EditBox:keyboardDidShow (info) end ----* Sets the maximum input length of the edit box.
----* Setting this value enables multiline input mode by default.
----* Available on Android, iOS and Windows Phone.
----* param maxLength The maximum length. ----@param maxLength int ----@return self -function EditBox:setMaxLength (maxLength) end ----* ----@return self -function EditBox:openKeyboard () end ----* Set the font size.
----* param fontSize The font size. ----@param fontSize int ----@return self -function EditBox:setFontSize (fontSize) end ----* Get the text entered in the edit box.
----* return The text entered in the edit box. ----@return char -function EditBox:getText () end ----* Get the input mode of the edit box.
----* return One of the EditBox::InputMode constants. ----@return int -function EditBox:getInputMode () end ----@overload fun(size_table:size_table,ccui.Scale9Sprite:ccui.Scale9Sprite):self ----@overload fun(size_table:size_table,ccui.Scale9Sprite1:string,ccui.Scale9Sprite2:int):self ----@overload fun(size_table:size_table,ccui.Scale9Sprite:ccui.Scale9Sprite,ccui.Scale9Sprite:ccui.Scale9Sprite,ccui.Scale9Sprite:ccui.Scale9Sprite):self ----@param size size_table ----@param normalSprite ccui.Scale9Sprite ----@param pressedSprite ccui.Scale9Sprite ----@param disabledSprite ccui.Scale9Sprite ----@return boolean -function EditBox:initWithSizeAndBackgroundSprite (size,normalSprite,pressedSprite,disabledSprite) end ----* Get the placeholder's font name. only system font is allowed.
----* return The font name. ----@return char -function EditBox:getPlaceholderFontName () end ----* js NA
----* lua NA ----@param info cc.IMEKeyboardNotificationInfo ----@return self -function EditBox:keyboardDidHide (info) end ----* Set the placeholder's font name. only system font is allowed.
----* param pFontName The font name. ----@param pFontName char ----@return self -function EditBox:setPlaceholderFontName (pFontName) end ----* Get the placeholder's font size.
----* return The font size. ----@return int -function EditBox:getPlaceholderFontSize () end ----* Return the capInsets of disabled state scale9sprite.
----* return The disabled scale9 renderer capInsets. ----@return rect_table -function EditBox:getCapInsetsDisabledRenderer () end ----* Get a text in the edit box that acts as a placeholder when an
----* edit box is empty. ----@return char -function EditBox:getPlaceHolder () end ----* Set the font name. Only system font is allowed.
----* param pFontName The font name. ----@param pFontName char ----@return self -function EditBox:setFontName (pFontName) end ----* Registers a script function that will be called for EditBox events.
----* This handler will be removed automatically after onExit() called.
----* code
----* -- lua sample
----* local function editboxEventHandler(eventType)
----* if eventType == "began" then
----* -- triggered when an edit box gains focus after keyboard is shown
----* elseif eventType == "ended" then
----* -- triggered when an edit box loses focus after keyboard is hidden.
----* elseif eventType == "changed" then
----* -- triggered when the edit box text was changed.
----* elseif eventType == "return" then
----* -- triggered when the return button was pressed or the outside area of keyboard was touched.
----* end
----* end
----* local editbox = EditBox:create(Size(...), Scale9Sprite:create(...))
----* editbox = registerScriptEditBoxHandler(editboxEventHandler)
----* endcode
----* param handler A number that indicates a lua function.
----* js NA
----* lua NA ----@param handler int ----@return self -function EditBox:registerScriptEditBoxHandler (handler) end ----* Sets capInsets for edit box, only the disabled state scale9 renderer will be affected.
----* param capInsets capInsets in Rect. ----@param capInsets rect_table ----@return self -function EditBox:setCapInsetsDisabledRenderer (capInsets) end ----* Set the placeholder's font size.
----* param fontSize The font size. ----@param fontSize int ----@return self -function EditBox:setPlaceholderFontSize (fontSize) end ----* Load disabled state texture for edit box.
----* param disabled dark state texture.
----* param texType @see `TextureResType` ----@param disabled string ----@param texType int ----@return self -function EditBox:loadTextureDisabled (disabled,texType) end ----* Set the input mode of the edit box.
----* param inputMode One of the EditBox::InputMode constants. ----@param inputMode int ----@return self -function EditBox:setInputMode (inputMode) end ----* Unregisters a script function that will be called for EditBox events.
----* js NA
----* lua NA ----@return self -function EditBox:unregisterScriptEditBoxHandler () end ----* js NA
----* lua NA ----@param info cc.IMEKeyboardNotificationInfo ----@return self -function EditBox:keyboardWillShow (info) end ----@overload fun(color3b_table0:color4b_table):self ----@overload fun(color3b_table:color3b_table):self ----@param color color3b_table ----@return self -function EditBox:setPlaceholderFontColor (color) end ----* Get the return type that are to be applied to the edit box.
----* return One of the EditBox::KeyboardReturnType constants. ----@return int -function EditBox:getReturnType () end ----@overload fun(color3b_table0:color4b_table):self ----@overload fun(color3b_table:color3b_table):self ----@param color color3b_table ----@return self -function EditBox:setFontColor (color) end ----* Get the font name.
----* return The font name. ----@return char -function EditBox:getFontName () end ----* js NA
----* lua NA ----@param info cc.IMEKeyboardNotificationInfo ----@return self -function EditBox:keyboardWillHide (info) end ----* Sets capInsets for edit box, only the normal state scale9 renderer will be affected.
----* param capInsets capInsets in Rect. ----@param capInsets rect_table ----@return self -function EditBox:setCapInsetsNormalRenderer (capInsets) end ----* Load pressed state texture for edit box.
----* param pressed pressed state texture.
----* param texType @see `TextureResType` ----@param pressed string ----@param texType int ----@return self -function EditBox:loadTexturePressed (pressed,texType) end ----* Get the font color of the widget's text. ----@return color4b_table -function EditBox:getFontColor () end ----* Get the input flags that are to be applied to the edit box.
----* return One of the EditBox::InputFlag constants. ----@return int -function EditBox:getInputFlag () end ----* Init edit box with specified size. This method should be invoked right after constructor.
----* param size The size of edit box.
----* param normalImage normal state texture name.
----* param pressedImage pressed state texture name.
----* param disabledImage disabled state texture name.
----* return Whether initialization is successfully or not. ----@param size size_table ----@param normalImage string ----@param pressedImage string ----@param disabledImage string ----@param texType int ----@return boolean -function EditBox:initWithSizeAndTexture (size,normalImage,pressedImage,disabledImage,texType) end ----* Get the text horizontal alignment. ----@return int -function EditBox:getTextHorizontalAlignment () end ----* Return the capInsets of normal state scale9sprite.
----* return The normal scale9 renderer capInsets. ----@return rect_table -function EditBox:getCapInsetsNormalRenderer () end ----* Return the capInsets of pressed state scale9sprite.
----* return The pressed scale9 renderer capInsets. ----@return rect_table -function EditBox:getCapInsetsPressedRenderer () end ----* get a script Handler
----* js NA
----* lua NA ----@return int -function EditBox:getScriptEditBoxHandler () end ----* Load textures for edit box.
----* param normal normal state texture name.
----* param pressed pressed state texture name.
----* param disabled disabled state texture name.
----* param texType @see `TextureResType` ----@param normal string ----@param pressed string ----@param disabled string ----@param texType int ----@return self -function EditBox:loadTextures (normal,pressed,disabled,texType) end ----* Set a text in the edit box that acts as a placeholder when an
----* edit box is empty.
----* param pText The given text. ----@param pText char ----@return self -function EditBox:setPlaceHolder (pText) end ----* Set the input flags that are to be applied to the edit box.
----* param inputFlag One of the EditBox::InputFlag constants. ----@param inputFlag int ----@return self -function EditBox:setInputFlag (inputFlag) end ----* Set the return type that are to be applied to the edit box.
----* param returnType One of the EditBox::KeyboardReturnType constants. ----@param returnType int ----@return self -function EditBox:setReturnType (returnType) end ----* Load normal state texture for edit box.
----* param normal normal state texture.
----* param texType @see `TextureResType` ----@param normal string ----@param texType int ----@return self -function EditBox:loadTextureNormal (normal,texType) end ----* Gets the maximum input length of the edit box.
----* return Maximum input length. ----@return int -function EditBox:getMaxLength () end ----* Sets capInsets for edit box, only the pressed state scale9 renderer will be affected.
----* param capInsets capInsets in Rect ----@param capInsets rect_table ----@return self -function EditBox:setCapInsetsPressedRenderer (capInsets) end ----* Set the text entered in the edit box.
----* param pText The given text. ----@param pText char ----@return self -function EditBox:setText (pText) end ----* Set the placeholder's font. Only system font is allowed.
----* param pFontName The font name.
----* param fontSize The font size. ----@param pFontName char ----@param fontSize int ----@return self -function EditBox:setPlaceholderFont (pFontName,fontSize) end ----* Get the font color of the placeholder text when the edit box is empty. ----@return color4b_table -function EditBox:getPlaceholderFontColor () end ----* Sets capInsets for edit box.
----* param capInsets capInset in Rect. ----@param capInsets rect_table ----@return self -function EditBox:setCapInsets (capInsets) end ----* Set the font. Only system font is allowed.
----* param pFontName The font name.
----* param fontSize The font size. ----@param pFontName char ----@param fontSize int ----@return self -function EditBox:setFont (pFontName,fontSize) end ----* Set the text horizontal alignment. ----@param alignment int ----@return self -function EditBox:setTextHorizontalAlignment (alignment) end ----@overload fun(size_table:size_table,string:string,string2:int):self ----@overload fun(size_table:size_table,string1:ccui.Scale9Sprite,string2:ccui.Scale9Sprite,string3:ccui.Scale9Sprite):self ----@overload fun(size_table:size_table,string:string,string:string,string:string,int:int):self ----@param size size_table ----@param normalImage string ----@param pressedImage string ----@param disabledImage string ----@param texType int ----@return self -function EditBox:create (size,normalImage,pressedImage,disabledImage,texType) end ----* ----@param anchorPoint vec2_table ----@return self -function EditBox:setAnchorPoint (anchorPoint) end ----* js NA
----* lua NA ----@param renderer cc.Renderer ----@param parentTransform mat4_table ----@param parentFlags unsigned_int ----@return self -function EditBox:draw (renderer,parentTransform,parentFlags) end ----* Returns the "class name" of widget. ----@return string -function EditBox:getDescription () end ----* ----@param pos vec2_table ----@return self -function EditBox:setPosition (pos) end ----* ----@param visible boolean ----@return self -function EditBox:setVisible (visible) end ----* ----@param size size_table ----@return self -function EditBox:setContentSize (size) end ----* Constructor.
----* js ctor
----* lua new ----@return self -function EditBox:EditBox () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccui/HBox.lua b/meta/3rd/Cocos4.0/library/ccui/HBox.lua deleted file mode 100644 index 1bf9ae87..00000000 --- a/meta/3rd/Cocos4.0/library/ccui/HBox.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class ccui.HBox :ccui.Layout -local HBox={ } -ccui.HBox=HBox - - - - ----* ----@param size size_table ----@return boolean -function HBox:initWithSize (size) end ----@overload fun(size_table:size_table):self ----@overload fun():self ----@param size size_table ----@return self -function HBox:create (size) end ----* ----@return boolean -function HBox:init () end ----* Default constructor
----* js ctor
----* lua new ----@return self -function HBox:HBox () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccui/Helper.lua b/meta/3rd/Cocos4.0/library/ccui/Helper.lua deleted file mode 100644 index 742cdcce..00000000 --- a/meta/3rd/Cocos4.0/library/ccui/Helper.lua +++ /dev/null @@ -1,73 +0,0 @@ ----@meta - ----@class ccui.Helper -local Helper={ } -ccui.Helper=Helper - - - - ----* brief Get a UTF8 substring from a std::string with a given start position and length
----* Sample: std::string str = "中国中国中国"; substr = getSubStringOfUTF8String(str,0,2) will = "中国"
----* param str The source string.
----* param start The start position of the substring.
----* param length The length of the substring in UTF8 count
----* return a UTF8 substring
----* js NA ----@param str string ----@param start unsigned_int ----@param length unsigned_int ----@return string -function Helper:getSubStringOfUTF8String (str,start,length) end ----* brief Convert a node's boundingBox rect into screen coordinates.
----* param node Any node pointer.
----* return A Rect in screen coordinates. ----@param node cc.Node ----@return rect_table -function Helper:convertBoundingBoxToScreen (node) end ----* Change the active property of Layout's @see `LayoutComponent`
----* param active A boolean value. ----@param active boolean ----@return self -function Helper:changeLayoutSystemActiveState (active) end ----* Find a widget with a specific action tag from root widget
----* This search will be recursive through all child widgets.
----* param root The be searched root widget.
----* param tag The widget action's tag.
----* return Widget instance pointer. ----@param root ccui.Widget ----@param tag int ----@return ccui.Widget -function Helper:seekActionWidgetByActionTag (root,tag) end ----* Find a widget with a specific name from root widget.
----* This search will be recursive through all child widgets.
----* param root The be searched root widget.
----* param name The widget name.
----* return Widget instance pointer. ----@param root ccui.Widget ----@param name string ----@return ccui.Widget -function Helper:seekWidgetByName (root,name) end ----* Find a widget with a specific tag from root widget.
----* This search will be recursive through all child widgets.
----* param root The be searched root widget.
----* param tag The widget tag.
----* return Widget instance pointer. ----@param root ccui.Widget ----@param tag int ----@return ccui.Widget -function Helper:seekWidgetByTag (root,tag) end ----* brief restrict capInsetSize, when the capInsets's width is larger than the textureSize, it will restrict to 0,
----* the height goes the same way as width.
----* param capInsets A user defined capInsets.
----* param textureSize The size of a scale9enabled texture
----* return a restricted capInset. ----@param capInsets rect_table ----@param textureSize size_table ----@return rect_table -function Helper:restrictCapInsetRect (capInsets,textureSize) end ----* Refresh object and it's children layout state
----* param rootNode A Node* or Node* descendant instance pointer. ----@param rootNode cc.Node ----@return self -function Helper:doLayout (rootNode) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccui/ImageView.lua b/meta/3rd/Cocos4.0/library/ccui/ImageView.lua deleted file mode 100644 index 0297e1ae..00000000 --- a/meta/3rd/Cocos4.0/library/ccui/ImageView.lua +++ /dev/null @@ -1,92 +0,0 @@ ----@meta - ----@class ccui.ImageView :ccui.Widget@all parent class: Widget,BlendProtocol -local ImageView={ } -ccui.ImageView=ImageView - - - - ----* Returns the blending function that is currently being used.
----* return A BlendFunc structure with source and destination factor which specified pixel arithmetic.
----* js NA
----* lua NA ----@return cc.BlendFunc -function ImageView:getBlendFunc () end ----* Load texture for imageview.
----* param fileName file name of texture.
----* param texType @see `Widget::TextureResType` ----@param fileName string ----@param texType int ----@return self -function ImageView:loadTexture (fileName,texType) end ----* Sets the source blending function.
----* param blendFunc A structure with source and destination factor to specify pixel arithmetic. e.g. {BlendFactor::ONE, BlendFactor::ONE}, {BlendFactor::SRC_ALPHA, BlendFactor::ONE_MINUS_SRC_ALPHA}.
----* js NA
----* lua NA ----@param blendFunc cc.BlendFunc ----@return self -function ImageView:setBlendFunc (blendFunc) end ----* ----@param imageFileName string ----@param texType int ----@return boolean -function ImageView:init (imageFileName,texType) end ----* Enable scale9 renderer.
----* param enabled Set to true will use scale9 renderer, false otherwise. ----@param enabled boolean ----@return self -function ImageView:setScale9Enabled (enabled) end ----* Updates the texture rect of the ImageView in points.
----* It will call setTextureRect:rotated:untrimmedSize with rotated = NO, and utrimmedSize = rect.size. ----@param rect rect_table ----@return self -function ImageView:setTextureRect (rect) end ----* Sets capInsets for imageview.
----* The capInsets affects the ImageView's renderer only if `setScale9Enabled(true)` is called.
----* param capInsets capinsets for imageview ----@param capInsets rect_table ----@return self -function ImageView:setCapInsets (capInsets) end ----* ----@return cc.ResourceData -function ImageView:getRenderFile () end ----* Get ImageView's capInsets size.
----* return Query capInsets size in Rect
----* see `setCapInsets(const Rect&)` ----@return rect_table -function ImageView:getCapInsets () end ----* Query whether button is using scale9 renderer or not.
----* return whether button use scale9 renderer or not. ----@return boolean -function ImageView:isScale9Enabled () end ----@overload fun(string:string,int:int):self ----@overload fun():self ----@param imageFileName string ----@param texType int ----@return self -function ImageView:create (imageFileName,texType) end ----* ----@return cc.Ref -function ImageView:createInstance () end ----* ----@return cc.Node -function ImageView:getVirtualRenderer () end ----* ----@return boolean -function ImageView:init () end ----* ----@return string -function ImageView:getDescription () end ----* ----@return size_table -function ImageView:getVirtualRendererSize () end ----* ----@param ignore boolean ----@return self -function ImageView:ignoreContentAdaptWithSize (ignore) end ----* Default constructor
----* js ctor
----* lua new ----@return self -function ImageView:ImageView () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccui/Layout.lua b/meta/3rd/Cocos4.0/library/ccui/Layout.lua deleted file mode 100644 index ca634f28..00000000 --- a/meta/3rd/Cocos4.0/library/ccui/Layout.lua +++ /dev/null @@ -1,220 +0,0 @@ ----@meta - ----@class ccui.Layout :ccui.Widget@all parent class: Widget,LayoutProtocol -local Layout={ } -ccui.Layout=Layout - - - - ----* Sets background color vector for layout.
----* This setting only take effect when layout's color type is BackGroundColorType::GRADIENT
----* param vector The color vector in `Vec2`. ----@param vector vec2_table ----@return self -function Layout:setBackGroundColorVector (vector) end ----* Change the clipping type of layout.
----* On default, the clipping type is `ClippingType::STENCIL`.
----* see `ClippingType`
----* param type The clipping type of layout. ----@param type int ----@return self -function Layout:setClippingType (type) end ----* Sets Color Type for layout's background
----* param type @see `BackGroundColorType` ----@param type int ----@return self -function Layout:setBackGroundColorType (type) end ----* If a layout is loop focused which means that the focus movement will be inside the layout
----* param loop pass true to let the focus movement loop inside the layout ----@param loop boolean ----@return self -function Layout:setLoopFocus (loop) end ----* Set layout's background image color.
----* param color Background color value in `Color3B`. ----@param color color3b_table ----@return self -function Layout:setBackGroundImageColor (color) end ----* Get the layout's background color vector.
----* return Background color vector. ----@return vec2_table -function Layout:getBackGroundColorVector () end ----* see `setClippingType(ClippingType)` ----@return int -function Layout:getClippingType () end ----* ----@return cc.ResourceData -function Layout:getRenderFile () end ----* return If focus loop is enabled, then it will return true, otherwise it returns false. The default value is false. ----@return boolean -function Layout:isLoopFocus () end ----* Remove the background image of layout. ----@return self -function Layout:removeBackGroundImage () end ----* Get the layout's background color opacity.
----* return Background color opacity value. ----@return unsigned_char -function Layout:getBackGroundColorOpacity () end ----* Gets if layout is clipping enabled.
----* return if layout is clipping enabled. ----@return boolean -function Layout:isClippingEnabled () end ----* Set opacity of background image.
----* param opacity Background image opacity in GLubyte. ----@param opacity unsigned_char ----@return self -function Layout:setBackGroundImageOpacity (opacity) end ----* Sets a background image for layout.
----* param fileName image file path.
----* param texType @see TextureResType. ----@param fileName string ----@param texType int ----@return self -function Layout:setBackGroundImage (fileName,texType) end ----@overload fun(color3b_table:color3b_table,color3b_table:color3b_table):self ----@overload fun(color3b_table:color3b_table):self ----@param startColor color3b_table ----@param endColor color3b_table ----@return self -function Layout:setBackGroundColor (startColor,endColor) end ----* request to refresh widget layout ----@return self -function Layout:requestDoLayout () end ----* Query background image's capInsets size.
----* return The background image capInsets. ----@return rect_table -function Layout:getBackGroundImageCapInsets () end ----* Query the layout's background color.
----* return Background color in Color3B. ----@return color3b_table -function Layout:getBackGroundColor () end ----* Toggle layout clipping.
----* If you do need clipping, you pass true to this function.
----* param enabled Pass true to enable clipping, false otherwise. ----@param enabled boolean ----@return self -function Layout:setClippingEnabled (enabled) end ----* Get color of layout's background image.
----* return Layout's background image color. ----@return color3b_table -function Layout:getBackGroundImageColor () end ----* Query background image scale9 enable status.
----* return Whether background image is scale9 enabled or not. ----@return boolean -function Layout:isBackGroundImageScale9Enabled () end ----* Query the layout's background color type.
----* return The layout's background color type. ----@return int -function Layout:getBackGroundColorType () end ----* Get the gradient background end color.
----* return Gradient background end color value. ----@return color3b_table -function Layout:getBackGroundEndColor () end ----* Sets background color opacity of layout.
----* param opacity The opacity in `GLubyte`. ----@param opacity unsigned_char ----@return self -function Layout:setBackGroundColorOpacity (opacity) end ----* Get the opacity of layout's background image.
----* return The opacity of layout's background image. ----@return unsigned_char -function Layout:getBackGroundImageOpacity () end ----* return To query whether the layout will pass the focus to its children or not. The default value is true ----@return boolean -function Layout:isPassFocusToChild () end ----* Sets a background image capinsets for layout, it only affects the scale9 enabled background image
----* param capInsets The capInsets in Rect. ----@param capInsets rect_table ----@return self -function Layout:setBackGroundImageCapInsets (capInsets) end ----* Gets background image texture size.
----* return background image texture size. ----@return size_table -function Layout:getBackGroundImageTextureSize () end ----* force refresh widget layout ----@return self -function Layout:forceDoLayout () end ----* Query layout type.
----* return Get the layout type. ----@return int -function Layout:getLayoutType () end ----* param pass To specify whether the layout pass its focus to its child ----@param pass boolean ----@return self -function Layout:setPassFocusToChild (pass) end ----* Get the gradient background start color.
----* return Gradient background start color value. ----@return color3b_table -function Layout:getBackGroundStartColor () end ----* Enable background image scale9 rendering.
----* param enabled True means enable scale9 rendering for background image, false otherwise. ----@param enabled boolean ----@return self -function Layout:setBackGroundImageScale9Enabled (enabled) end ----* Change the layout type.
----* param type Layout type. ----@param type int ----@return self -function Layout:setLayoutType (type) end ----* Create a empty layout. ----@return self -function Layout:create () end ----* ----@return cc.Ref -function Layout:createInstance () end ----@overload fun(cc.Node:cc.Node,int:int):self ----@overload fun(cc.Node:cc.Node):self ----@overload fun(cc.Node:cc.Node,int:int,string2:int):self ----@overload fun(cc.Node:cc.Node,int:int,string:string):self ----@param child cc.Node ----@param localZOrder int ----@param name string ----@return self -function Layout:addChild (child,localZOrder,name) end ----* Returns the "class name" of widget. ----@return string -function Layout:getDescription () end ----* Removes all children from the container, and do a cleanup to all running actions depending on the cleanup parameter.
----* param cleanup true if all running actions on all children nodes should be cleanup, false otherwise.
----* js removeAllChildren
----* lua removeAllChildren ----@param cleanup boolean ----@return self -function Layout:removeAllChildrenWithCleanup (cleanup) end ----* Removes all children from the container with a cleanup.
----* see `removeAllChildrenWithCleanup(bool)` ----@return self -function Layout:removeAllChildren () end ----* When a widget is in a layout, you could call this method to get the next focused widget within a specified direction.
----* If the widget is not in a layout, it will return itself
----* param direction the direction to look for the next focused widget in a layout
----* param current the current focused widget
----* return the next focused widget in a layout ----@param direction int ----@param current ccui.Widget ----@return ccui.Widget -function Layout:findNextFocusedWidget (direction,current) end ----* ----@param child cc.Node ----@param cleanup boolean ----@return self -function Layout:removeChild (child,cleanup) end ----* ----@return boolean -function Layout:init () end ----* Override function. Set camera mask, the node is visible by the camera whose camera flag & node's camera mask is true.
----* param mask Mask being set
----* param applyChildren If true call this function recursively from this node to its children. ----@param mask unsigned short ----@param applyChildren boolean ----@return self -function Layout:setCameraMask (mask,applyChildren) end ----* ----@param globalZOrder float ----@return self -function Layout:setGlobalZOrder (globalZOrder) end ----* Default constructor
----* js ctor
----* lua new ----@return self -function Layout:Layout () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccui/LayoutComponent.lua b/meta/3rd/Cocos4.0/library/ccui/LayoutComponent.lua deleted file mode 100644 index 32f71986..00000000 --- a/meta/3rd/Cocos4.0/library/ccui/LayoutComponent.lua +++ /dev/null @@ -1,251 +0,0 @@ ----@meta - ----@class ccui.LayoutComponent :cc.Component -local LayoutComponent={ } -ccui.LayoutComponent=LayoutComponent - - - - ----* Toggle enable stretch width.
----* param isUsed True if enable stretch width, false otherwise. ----@param isUsed boolean ----@return self -function LayoutComponent:setStretchWidthEnabled (isUsed) end ----* Change percent width of owner.
----* param percentWidth Percent Width in float. ----@param percentWidth float ----@return self -function LayoutComponent:setPercentWidth (percentWidth) end ----* Query the anchor position.
----* return Anchor position to it's parent ----@return vec2_table -function LayoutComponent:getAnchorPosition () end ----* Toggle position percentX enabled.
----* param isUsed True if enable position percentX, false otherwise. ----@param isUsed boolean ----@return self -function LayoutComponent:setPositionPercentXEnabled (isUsed) end ----* Toggle enable stretch height.
----* param isUsed True if stretch height is enabled, false otherwise. ----@param isUsed boolean ----@return self -function LayoutComponent:setStretchHeightEnabled (isUsed) end ----* Toggle active enabled of LayoutComponent's owner.
----* param enable True if active layout component, false otherwise. ----@param enable boolean ----@return self -function LayoutComponent:setActiveEnabled (enable) end ----* Query the right margin of owner relative to its parent.
----* return Right margin in float. ----@return float -function LayoutComponent:getRightMargin () end ----* Query owner's content size.
----* return Owner's content size. ----@return size_table -function LayoutComponent:getSize () end ----* Change the anchor position to it's parent.
----* param point A value in (x,y) format. ----@param point vec2_table ----@return self -function LayoutComponent:setAnchorPosition (point) end ----* Refresh layout of the owner. ----@return self -function LayoutComponent:refreshLayout () end ----* Query whether percent width is enabled or not.
----* return True if percent width is enabled, false, otherwise. ----@return boolean -function LayoutComponent:isPercentWidthEnabled () end ----* Change element's vertical dock type.
----* param vEage Vertical dock type @see `VerticalEdge`. ----@param vEage int ----@return self -function LayoutComponent:setVerticalEdge (vEage) end ----* Query the top margin of owner relative to its parent.
----* return Top margin in float. ----@return float -function LayoutComponent:getTopMargin () end ----* Change content size width of owner.
----* param width Content size width in float. ----@param width float ----@return self -function LayoutComponent:setSizeWidth (width) end ----* Query the percent content size value.
----* return Percent (x,y) in Vec2. ----@return vec2_table -function LayoutComponent:getPercentContentSize () end ----* Query element vertical dock type.
----* return Vertical dock type. ----@return int -function LayoutComponent:getVerticalEdge () end ----* Toggle enable percent width.
----* param isUsed True if percent width is enabled, false otherwise. ----@param isUsed boolean ----@return self -function LayoutComponent:setPercentWidthEnabled (isUsed) end ----* Query whether stretch width is enabled or not.
----* return True if stretch width is enabled, false otherwise. ----@return boolean -function LayoutComponent:isStretchWidthEnabled () end ----* Change left margin of owner relative to its parent.
----* param margin Margin in float. ----@param margin float ----@return self -function LayoutComponent:setLeftMargin (margin) end ----* Query content size width of owner.
----* return Content size width in float. ----@return float -function LayoutComponent:getSizeWidth () end ----* Toggle position percentY enabled.
----* param isUsed True if position percentY is enabled, false otherwise. ----@param isUsed boolean ----@return self -function LayoutComponent:setPositionPercentYEnabled (isUsed) end ----* Query size height of owner.
----* return Size height in float. ----@return float -function LayoutComponent:getSizeHeight () end ----* Query the position percentY Y value.
----* return Position percent Y value in float. ----@return float -function LayoutComponent:getPositionPercentY () end ----* Query the position percent X value.
----* return Position percent X value in float. ----@return float -function LayoutComponent:getPositionPercentX () end ----* Change the top margin of owner relative to its parent.
----* param margin Margin in float. ----@param margin float ----@return self -function LayoutComponent:setTopMargin (margin) end ----* Query percent height of owner.
----* return Percent height in float. ----@return float -function LayoutComponent:getPercentHeight () end ----* Query whether use percent content size or not.
----* return True if using percent content size, false otherwise. ----@return boolean -function LayoutComponent:getUsingPercentContentSize () end ----* Change position percentY value.
----* param percentMargin Margin in float. ----@param percentMargin float ----@return self -function LayoutComponent:setPositionPercentY (percentMargin) end ----* Change position percent X value.
----* param percentMargin Margin in float. ----@param percentMargin float ----@return self -function LayoutComponent:setPositionPercentX (percentMargin) end ----* Change right margin of owner relative to its parent.
----* param margin Margin in float. ----@param margin float ----@return self -function LayoutComponent:setRightMargin (margin) end ----* Whether position percentY is enabled or not.
----* see `setPositionPercentYEnabled`
----* return True if position percentY is enabled, false otherwise. ----@return boolean -function LayoutComponent:isPositionPercentYEnabled () end ----* Change percent height value of owner.
----* param percentHeight Percent height in float. ----@param percentHeight float ----@return self -function LayoutComponent:setPercentHeight (percentHeight) end ----* Toggle enable percent only.
----* param enable True if percent only is enabled, false otherwise. ----@param enable boolean ----@return self -function LayoutComponent:setPercentOnlyEnabled (enable) end ----* Change element's horizontal dock type.
----* param hEage Horizontal dock type @see `HorizontalEdge` ----@param hEage int ----@return self -function LayoutComponent:setHorizontalEdge (hEage) end ----* Change the position of component owner.
----* param position A position in (x,y) ----@param position vec2_table ----@return self -function LayoutComponent:setPosition (position) end ----* Percent content size is used to adapt node's content size based on parent's content size.
----* If set to true then node's content size will be changed based on the value set by @see setPercentContentSize
----* param isUsed True to enable percent content size, false otherwise. ----@param isUsed boolean ----@return self -function LayoutComponent:setUsingPercentContentSize (isUsed) end ----* Query left margin of owner relative to its parent.
----* return Left margin in float. ----@return float -function LayoutComponent:getLeftMargin () end ----* Query the owner's position.
----* return The owner's position. ----@return vec2_table -function LayoutComponent:getPosition () end ----* Change size height of owner.
----* param height Size height in float. ----@param height float ----@return self -function LayoutComponent:setSizeHeight (height) end ----* Whether position percentX is enabled or not.
----* return True if position percentX is enable, false otherwise. ----@return boolean -function LayoutComponent:isPositionPercentXEnabled () end ----* Query the bottom margin of owner relative to its parent.
----* return Bottom margin in float. ----@return float -function LayoutComponent:getBottomMargin () end ----* Toggle enable percent height.
----* param isUsed True if percent height is enabled, false otherwise. ----@param isUsed boolean ----@return self -function LayoutComponent:setPercentHeightEnabled (isUsed) end ----* Set percent content size.
----* The value should be [0-1], 0 means the child's content size will be 0
----* and 1 means the child's content size is the same as its parents.
----* param percent The percent (x,y) of the node in [0-1] scope. ----@param percent vec2_table ----@return self -function LayoutComponent:setPercentContentSize (percent) end ----* Query whether percent height is enabled or not.
----* return True if percent height is enabled, false otherwise. ----@return boolean -function LayoutComponent:isPercentHeightEnabled () end ----* Query percent width of owner.
----* return percent width in float. ----@return float -function LayoutComponent:getPercentWidth () end ----* Query element horizontal dock type.
----* return Horizontal dock type. ----@return int -function LayoutComponent:getHorizontalEdge () end ----* Query whether stretch height is enabled or not.
----* return True if stretch height is enabled, false otherwise. ----@return boolean -function LayoutComponent:isStretchHeightEnabled () end ----* Change the bottom margin of owner relative to its parent.
----* param margin in float. ----@param margin float ----@return self -function LayoutComponent:setBottomMargin (margin) end ----* Change the content size of owner.
----* param size Content size in @see `Size`. ----@param size size_table ----@return self -function LayoutComponent:setSize (size) end ----* ----@return self -function LayoutComponent:create () end ----* Bind a LayoutComponent to a specified node.
----* If the node has already binded a LayoutComponent named __LAYOUT_COMPONENT_NAME, just return the LayoutComponent.
----* Otherwise, create a new LayoutComponent and bind the LayoutComponent to the node.
----* param node A Node* instance pointer.
----* return The binded LayoutComponent instance pointer. ----@param node cc.Node ----@return self -function LayoutComponent:bindLayoutComponent (node) end ----* ----@return boolean -function LayoutComponent:init () end ----* Default constructor
----* lua new ----@return self -function LayoutComponent:LayoutComponent () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccui/LayoutParameter.lua b/meta/3rd/Cocos4.0/library/ccui/LayoutParameter.lua deleted file mode 100644 index 72769f8e..00000000 --- a/meta/3rd/Cocos4.0/library/ccui/LayoutParameter.lua +++ /dev/null @@ -1,35 +0,0 @@ ----@meta - ----@class ccui.LayoutParameter :cc.Ref -local LayoutParameter={ } -ccui.LayoutParameter=LayoutParameter - - - - ----* Create a copy of original LayoutParameter.
----* return A LayoutParameter pointer. ----@return self -function LayoutParameter:clone () end ----* Gets LayoutParameterType of LayoutParameter.
----* see LayoutParameterType.
----* return LayoutParameterType ----@return int -function LayoutParameter:getLayoutType () end ----* Create a cloned instance of LayoutParameter.
----* return A LayoutParameter pointer. ----@return self -function LayoutParameter:createCloneInstance () end ----* Copy all the member field from argument LayoutParameter to self.
----* param model A LayoutParameter instance. ----@param model ccui.LayoutParameter ----@return self -function LayoutParameter:copyProperties (model) end ----* Create a empty LayoutParameter.
----* return A autorelease LayoutParameter instance. ----@return self -function LayoutParameter:create () end ----* Default constructor.
----* lua new ----@return self -function LayoutParameter:LayoutParameter () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccui/LinearLayoutParameter.lua b/meta/3rd/Cocos4.0/library/ccui/LinearLayoutParameter.lua deleted file mode 100644 index 10adc000..00000000 --- a/meta/3rd/Cocos4.0/library/ccui/LinearLayoutParameter.lua +++ /dev/null @@ -1,35 +0,0 @@ ----@meta - ----@class ccui.LinearLayoutParameter :ccui.LayoutParameter -local LinearLayoutParameter={ } -ccui.LinearLayoutParameter=LinearLayoutParameter - - - - ----* Sets LinearGravity parameter for LayoutParameter.
----* see LinearGravity
----* param gravity Gravity in LinearGravity. ----@param gravity int ----@return self -function LinearLayoutParameter:setGravity (gravity) end ----* Gets LinearGravity parameter for LayoutParameter.
----* see LinearGravity
----* return LinearGravity ----@return int -function LinearLayoutParameter:getGravity () end ----* Create a empty LinearLayoutParameter instance.
----* return A initialized LayoutParameter which is marked as "autorelease". ----@return self -function LinearLayoutParameter:create () end ----* ----@return ccui.LayoutParameter -function LinearLayoutParameter:createCloneInstance () end ----* ----@param model ccui.LayoutParameter ----@return self -function LinearLayoutParameter:copyProperties (model) end ----* Default constructor.
----* lua new ----@return self -function LinearLayoutParameter:LinearLayoutParameter () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccui/ListView.lua b/meta/3rd/Cocos4.0/library/ccui/ListView.lua deleted file mode 100644 index 56bd28d4..00000000 --- a/meta/3rd/Cocos4.0/library/ccui/ListView.lua +++ /dev/null @@ -1,305 +0,0 @@ ----@meta - ----@class ccui.ListView :ccui.ScrollView -local ListView={ } -ccui.ListView=ListView - - - - ----* Set the gravity of ListView.
----* see `ListViewGravity` ----@param gravity int ----@return self -function ListView:setGravity (gravity) end ----* Removes the last item of ListView. ----@return self -function ListView:removeLastItem () end ----* Get the left padding in ListView
----* return Left padding in float ----@return float -function ListView:getLeftPadding () end ----* brief Query the center item
----* return An item instance. ----@return ccui.Widget -function ListView:getCenterItemInCurrentView () end ----* brief Query current selected widget's index.
----* return An index of a selected item. ----@return int -function ListView:getCurSelectedIndex () end ----* Get the time in seconds to scroll between items.
----* return The time in seconds to scroll between items
----* see setScrollDuration(float) ----@return float -function ListView:getScrollDuration () end ----* Query whether the magnetic out of boundary is allowed. ----@return boolean -function ListView:getMagneticAllowedOutOfBoundary () end ----* brief Query margin between each item in ListView.
----* return A margin in float. ----@return float -function ListView:getItemsMargin () end ----@overload fun(int:int,vec2_table:vec2_table,vec2_table:vec2_table,float:float):self ----@overload fun(int:int,vec2_table:vec2_table,vec2_table:vec2_table):self ----@param itemIndex int ----@param positionRatioInView vec2_table ----@param itemAnchorPoint vec2_table ----@param timeInSec float ----@return self -function ListView:scrollToItem (itemIndex,positionRatioInView,itemAnchorPoint,timeInSec) end ----* brief Jump to specific item
----* param itemIndex Specifies the item's index
----* param positionRatioInView Specifies the position with ratio in list view's content size.
----* param itemAnchorPoint Specifies an anchor point of each item for position to calculate distance. ----@param itemIndex int ----@param positionRatioInView vec2_table ----@param itemAnchorPoint vec2_table ----@return self -function ListView:jumpToItem (itemIndex,positionRatioInView,itemAnchorPoint) end ----* Change padding with top padding
----* param t Top padding in float ----@param t float ----@return self -function ListView:setTopPadding (t) end ----* Return the index of specified widget.
----* param item A widget pointer.
----* return The index of a given widget in ListView. ----@param item ccui.Widget ----@return int -function ListView:getIndex (item) end ----* Insert a custom item into the end of ListView.
----* param item An item in `Widget*`. ----@param item ccui.Widget ----@return self -function ListView:pushBackCustomItem (item) end ----* brief Set current selected widget's index and call TouchEventType::ENDED event.
----* param itemIndex A index of a selected item. ----@param itemIndex int ----@return self -function ListView:setCurSelectedIndex (itemIndex) end ----* Insert a default item(create by cloning model) into listview at a give index.
----* param index An index in ssize_t. ----@param index int ----@return self -function ListView:insertDefaultItem (index) end ----* Set magnetic type of ListView.
----* see `MagneticType` ----@param magneticType int ----@return self -function ListView:setMagneticType (magneticType) end ----* Set magnetic allowed out of boundary. ----@param magneticAllowedOutOfBoundary boolean ----@return self -function ListView:setMagneticAllowedOutOfBoundary (magneticAllowedOutOfBoundary) end ----* Add an event click callback to ListView, then one item of Listview is clicked, the callback will be called.
----* param callback A callback function with type of `ccListViewCallback`. ----@param callback function ----@return self -function ListView:addEventListener (callback) end ----* ----@return self -function ListView:doLayout () end ----* brief Query the topmost item in horizontal list
----* return An item instance. ----@return ccui.Widget -function ListView:getTopmostItemInCurrentView () end ----* Change padding with left, top, right, and bottom padding.
----* param l Left padding in float.
----* param t Top margin in float.
----* param r Right margin in float.
----* param b Bottom margin in float. ----@param l float ----@param t float ----@param r float ----@param b float ----@return self -function ListView:setPadding (l,t,r,b) end ----* brief Remove all items in current ListView. ----@return self -function ListView:removeAllItems () end ----* Get the right padding in ListView
----* return Right padding in float ----@return float -function ListView:getRightPadding () end ----* brief Query the bottommost item in horizontal list
----* return An item instance. ----@return ccui.Widget -function ListView:getBottommostItemInCurrentView () end ----* Return all items in a ListView.
----* returns A vector of widget pointers. ----@return array_table -function ListView:getItems () end ----* brief Query the leftmost item in horizontal list
----* return An item instance. ----@return ccui.Widget -function ListView:getLeftmostItemInCurrentView () end ----* Set the margin between each item in ListView.
----* param margin A margin in float. ----@param margin float ----@return self -function ListView:setItemsMargin (margin) end ----* Get magnetic type of ListView. ----@return int -function ListView:getMagneticType () end ----* Return an item at a given index.
----* param index A given index in ssize_t.
----* return A widget instance. ----@param index int ----@return ccui.Widget -function ListView:getItem (index) end ----* Remove an item at given index.
----* param index A given index in ssize_t. ----@param index int ----@return self -function ListView:removeItem (index) end ----* Get the top padding in ListView
----* return Top padding in float ----@return float -function ListView:getTopPadding () end ----* Insert a default item(create by a cloned model) at the end of the listview. ----@return self -function ListView:pushBackDefaultItem () end ----* Change padding with left padding
----* param l Left padding in float. ----@param l float ----@return self -function ListView:setLeftPadding (l) end ----* brief Query the closest item to a specific position in inner container.
----* param targetPosition Specifies the target position in inner container's coordinates.
----* param itemAnchorPoint Specifies an anchor point of each item for position to calculate distance.
----* return An item instance if list view is not empty. Otherwise, returns null. ----@param targetPosition vec2_table ----@param itemAnchorPoint vec2_table ----@return ccui.Widget -function ListView:getClosestItemToPosition (targetPosition,itemAnchorPoint) end ----* Change padding with bottom padding
----* param b Bottom padding in float ----@param b float ----@return self -function ListView:setBottomPadding (b) end ----* Set the time in seconds to scroll between items.
----* Subsequent calls of function 'scrollToItem', will take 'time' seconds for scrolling.
----* param time The seconds needed to scroll between two items. 'time' must be >= 0
----* see scrollToItem(ssize_t, const Vec2&, const Vec2&) ----@param time float ----@return self -function ListView:setScrollDuration (time) end ----* brief Query the closest item to a specific position in current view.
----* For instance, to find the item in the center of view, call 'getClosestItemToPositionInCurrentView(Vec2::ANCHOR_MIDDLE, Vec2::ANCHOR_MIDDLE)'.
----* param positionRatioInView Specifies the target position with ratio in list view's content size.
----* param itemAnchorPoint Specifies an anchor point of each item for position to calculate distance.
----* return An item instance if list view is not empty. Otherwise, returns null. ----@param positionRatioInView vec2_table ----@param itemAnchorPoint vec2_table ----@return ccui.Widget -function ListView:getClosestItemToPositionInCurrentView (positionRatioInView,itemAnchorPoint) end ----* brief Query the rightmost item in horizontal list
----* return An item instance. ----@return ccui.Widget -function ListView:getRightmostItemInCurrentView () end ----* Change padding with right padding
----* param r Right padding in float ----@param r float ----@return self -function ListView:setRightPadding (r) end ----* Set an item model for listview.
----* When calling `pushBackDefaultItem`, the model will be used as a blueprint and new model copy will be inserted into ListView.
----* param model Model in `Widget*`. ----@param model ccui.Widget ----@return self -function ListView:setItemModel (model) end ----* Get the bottom padding in ListView
----* return Bottom padding in float ----@return float -function ListView:getBottomPadding () end ----* brief Insert a custom widget into ListView at a given index.
----* param item A widget pointer to be inserted.
----* param index A given index in ssize_t. ----@param item ccui.Widget ----@param index int ----@return self -function ListView:insertCustomItem (item,index) end ----* Create an empty ListView.
----* return A ListView instance. ----@return self -function ListView:create () end ----* ----@return cc.Ref -function ListView:createInstance () end ----@overload fun(cc.Node:cc.Node,int:int):self ----@overload fun(cc.Node:cc.Node):self ----@overload fun(cc.Node:cc.Node,int:int,string2:int):self ----@overload fun(cc.Node:cc.Node,int:int,string:string):self ----@param child cc.Node ----@param zOrder int ----@param name string ----@return self -function ListView:addChild (child,zOrder,name) end ----* Override functions ----@return self -function ListView:jumpToBottom () end ----* ----@return boolean -function ListView:init () end ----* Changes scroll direction of scrollview.
----* Direction Direction::VERTICAL means vertical scroll, Direction::HORIZONTAL means horizontal scroll.
----* param dir Set the list view's scroll direction. ----@param dir int ----@return self -function ListView:setDirection (dir) end ----* ----@return self -function ListView:jumpToTopRight () end ----* ----@return self -function ListView:jumpToLeft () end ----* ----@param cleanup boolean ----@return self -function ListView:removeAllChildrenWithCleanup (cleanup) end ----* ----@return self -function ListView:requestDoLayout () end ----* ----@return self -function ListView:removeAllChildren () end ----* ----@return self -function ListView:jumpToTopLeft () end ----* ----@param child cc.Node ----@param cleanup boolean ----@return self -function ListView:removeChild (child,cleanup) end ----* ----@return self -function ListView:jumpToBottomRight () end ----* ----@return self -function ListView:jumpToTop () end ----* ----@return self -function ListView:jumpToBottomLeft () end ----* ----@param percent vec2_table ----@return self -function ListView:jumpToPercentBothDirection (percent) end ----* ----@param percent float ----@return self -function ListView:jumpToPercentHorizontal (percent) end ----* ----@return self -function ListView:jumpToRight () end ----* ----@return string -function ListView:getDescription () end ----* ----@param percent float ----@return self -function ListView:jumpToPercentVertical (percent) end ----* Default constructor
----* js ctor
----* lua new ----@return self -function ListView:ListView () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccui/LoadingBar.lua b/meta/3rd/Cocos4.0/library/ccui/LoadingBar.lua deleted file mode 100644 index 9f2cfbf4..00000000 --- a/meta/3rd/Cocos4.0/library/ccui/LoadingBar.lua +++ /dev/null @@ -1,87 +0,0 @@ ----@meta - ----@class ccui.LoadingBar :ccui.Widget -local LoadingBar={ } -ccui.LoadingBar=LoadingBar - - - - ----* Changes the progress value of LoadingBar.
----* param percent Percent value from 1 to 100. ----@param percent float ----@return self -function LoadingBar:setPercent (percent) end ----* Load texture for LoadingBar.
----* param texture File name of texture.
----* param texType Texture resource type,@see TextureResType. ----@param texture string ----@param texType int ----@return self -function LoadingBar:loadTexture (texture,texType) end ----* Change the progress direction of LoadingBar.
----* see Direction `LEFT` means progress left to right, `RIGHT` otherwise.
----* param direction Direction ----@param direction int ----@return self -function LoadingBar:setDirection (direction) end ----* ----@return cc.ResourceData -function LoadingBar:getRenderFile () end ----* Enable scale9 renderer.
----* param enabled Set to true will use scale9 renderer, false otherwise. ----@param enabled boolean ----@return self -function LoadingBar:setScale9Enabled (enabled) end ----* Set capInsets for LoadingBar.
----* This setting only take effect when enable scale9 renderer.
----* param capInsets CapInset in `Rect`. ----@param capInsets rect_table ----@return self -function LoadingBar:setCapInsets (capInsets) end ----* Get the progress direction of LoadingBar.
----* see Direction `LEFT` means progress left to right, `RIGHT` otherwise.
----* return LoadingBar progress direction. ----@return int -function LoadingBar:getDirection () end ----* brief Query LoadingBar's capInsets.
----* return CapInsets of LoadingBar. ----@return rect_table -function LoadingBar:getCapInsets () end ----* brief Query whether LoadingBar is using scale9 renderer or not.
----* return Whether LoadingBar uses scale9 renderer or not. ----@return boolean -function LoadingBar:isScale9Enabled () end ----* Get the progress value of LoadingBar.
----* return Progress value from 1 to 100. ----@return float -function LoadingBar:getPercent () end ----@overload fun(string:string,int1:float):self ----@overload fun():self ----@overload fun(string:string,int:int,float:float):self ----@param textureName string ----@param texType int ----@param percentage float ----@return self -function LoadingBar:create (textureName,texType,percentage) end ----* ----@return cc.Ref -function LoadingBar:createInstance () end ----* ----@return cc.Node -function LoadingBar:getVirtualRenderer () end ----* ----@return string -function LoadingBar:getDescription () end ----* ----@return size_table -function LoadingBar:getVirtualRendererSize () end ----* ----@param ignore boolean ----@return self -function LoadingBar:ignoreContentAdaptWithSize (ignore) end ----* Default constructor.
----* js ctor
----* lua new ----@return self -function LoadingBar:LoadingBar () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccui/PageView.lua b/meta/3rd/Cocos4.0/library/ccui/PageView.lua deleted file mode 100644 index 98f6b6a3..00000000 --- a/meta/3rd/Cocos4.0/library/ccui/PageView.lua +++ /dev/null @@ -1,180 +0,0 @@ ----@meta - ----@class ccui.PageView :ccui.ListView -local PageView={ } -ccui.PageView=PageView - - - - ----* brief Set space between page indicator's index nodes.
----* param spaceBetweenIndexNodes Space between nodes in pixel. ----@param spaceBetweenIndexNodes float ----@return self -function PageView:setIndicatorSpaceBetweenIndexNodes (spaceBetweenIndexNodes) end ----* Insert a page into PageView at a given index.
----* param page Page to be inserted.
----* param idx A given index. ----@param page ccui.Widget ----@param idx int ----@return self -function PageView:insertPage (page,idx) end ----* brief Set opacity of page indicator's index nodes.
----* param opacity New indicator node opacity. ----@param opacity unsigned_char ----@return self -function PageView:setIndicatorIndexNodesOpacity (opacity) end ----* brief Set opacity of page indicator's selected index.
----* param color New opacity for selected (current) index. ----@param opacity unsigned_char ----@return self -function PageView:setIndicatorSelectedIndexOpacity (opacity) end ----* brief Remove all pages of the PageView. ----@return self -function PageView:removeAllPages () end ----* ----@param epsilon float ----@return self -function PageView:setAutoScrollStopEpsilon (epsilon) end ----* brief Set scale of page indicator's index nodes.
----* param indexNodesScale Scale of index nodes. ----@param indexNodesScale float ----@return self -function PageView:setIndicatorIndexNodesScale (indexNodesScale) end ----* brief Toggle page indicator enabled.
----* param enabled True if enable page indicator, false otherwise. ----@param enabled boolean ----@return self -function PageView:setIndicatorEnabled (enabled) end ----* brief Set color of page indicator's selected index.
----* param color New color for selected (current) index. ----@param color color3b_table ----@return self -function PageView:setIndicatorSelectedIndexColor (color) end ----* brief Add a page turn callback to PageView, then when one page is turning, the callback will be called.
----* param callback A page turning callback. ----@param callback function ----@return self -function PageView:addEventListener (callback) end ----* brief Get the page indicator's position.
----* return positionAsAnchorPoint ----@return vec2_table -function PageView:getIndicatorPosition () end ----* Jump to a page with a given index without scrolling.
----* This is the different between scrollToPage.
----* param index A given index in PageView. Index start from 0 to pageCount -1. ----@param index int ----@return self -function PageView:setCurrentPageIndex (index) end ----* brief Get the color of page indicator's index nodes.
----* return color ----@return color3b_table -function PageView:getIndicatorIndexNodesColor () end ----* brief Get the color of page indicator's selected index.
----* return color ----@return color3b_table -function PageView:getIndicatorSelectedIndexColor () end ----* brief Get scale of page indicator's index nodes.
----* return indexNodesScale ----@return float -function PageView:getIndicatorIndexNodesScale () end ----* brief Set the page indicator's position in page view.
----* param position The position in page view ----@param position vec2_table ----@return self -function PageView:setIndicatorPosition (position) end ----* brief Get the opacity of page indicator's selected index.
----* return opacity ----@return unsigned_char -function PageView:getIndicatorSelectedIndexOpacity () end ----@overload fun(int:int,float:float):self ----@overload fun(int:int):self ----@param idx int ----@param time float ----@return self -function PageView:scrollToPage (idx,time) end ----* brief Set the page indicator's position using anchor point.
----* param positionAsAnchorPoint The position as anchor point. ----@param positionAsAnchorPoint vec2_table ----@return self -function PageView:setIndicatorPositionAsAnchorPoint (positionAsAnchorPoint) end ----@overload fun(int:int,float:float):self ----@overload fun(int:int):self ----@param idx int ----@param time float ----@return self -function PageView:scrollToItem (idx,time) end ----* brief Set color of page indicator's index nodes.
----* param color New indicator node color. ----@param color color3b_table ----@return self -function PageView:setIndicatorIndexNodesColor (color) end ----* brief Get the opacity of page indicator's index nodes.
----* return opacity ----@return unsigned_char -function PageView:getIndicatorIndexNodesOpacity () end ----* brief Get the page indicator's position as anchor point.
----* return positionAsAnchorPoint ----@return vec2_table -function PageView:getIndicatorPositionAsAnchorPoint () end ----* Gets current displayed page index.
----* return current page index. ----@return int -function PageView:getCurrentPageIndex () end ----* Remove a page of PageView.
----* param page Page to be removed. ----@param page ccui.Widget ----@return self -function PageView:removePage (page) end ----* sets texture for index nodes.
----* param fileName File name of texture.
----* param resType @see TextureResType . ----@param texName string ----@param texType int ----@return self -function PageView:setIndicatorIndexNodesTexture (texName,texType) end ----* brief Query page indicator state.
----* return True if page indicator is enabled, false otherwise. ----@return boolean -function PageView:getIndicatorEnabled () end ----* Remove a page at a given index of PageView.
----* param index A given index. ----@param index int ----@return self -function PageView:removePageAtIndex (index) end ----* brief Get the space between page indicator's index nodes.
----* return spaceBetweenIndexNodes ----@return float -function PageView:getIndicatorSpaceBetweenIndexNodes () end ----* Insert a page into the end of PageView.
----* param page Page to be inserted. ----@param page ccui.Widget ----@return self -function PageView:addPage (page) end ----* Create an empty PageView.
----* return A PageView instance. ----@return self -function PageView:create () end ----* ----@return cc.Ref -function PageView:createInstance () end ----* ----@return self -function PageView:doLayout () end ----* ----@return boolean -function PageView:init () end ----* ----@return string -function PageView:getDescription () end ----* Changes direction
----* Direction Direction::VERTICAL means vertical scroll, Direction::HORIZONTAL means horizontal scroll.
----* param direction Set the page view's scroll direction. ----@param direction int ----@return self -function PageView:setDirection (direction) end ----* Default constructor
----* js ctor
----* lua new ----@return self -function PageView:PageView () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccui/RadioButton.lua b/meta/3rd/Cocos4.0/library/ccui/RadioButton.lua deleted file mode 100644 index 10b6c137..00000000 --- a/meta/3rd/Cocos4.0/library/ccui/RadioButton.lua +++ /dev/null @@ -1,35 +0,0 @@ ----@meta - ----@class ccui.RadioButton :ccui.AbstractCheckButton -local RadioButton={ } -ccui.RadioButton=RadioButton - - - - ----* Add a callback function which would be called when radio button is selected or unselected.
----* param callback A std::function with type @see `ccRadioButtonCallback` ----@param callback function ----@return self -function RadioButton:addEventListener (callback) end ----@overload fun(string:string,string:string,string:string,string:string,string:string,int:int):self ----@overload fun():self ----@overload fun(string:string,string:string,string2:int):self ----@param backGround string ----@param backGroundSelected string ----@param cross string ----@param backGroundDisabled string ----@param frontCrossDisabled string ----@param texType int ----@return self -function RadioButton:create (backGround,backGroundSelected,cross,backGroundDisabled,frontCrossDisabled,texType) end ----* ----@return cc.Ref -function RadioButton:createInstance () end ----* ----@return string -function RadioButton:getDescription () end ----* Default constructor.
----* lua new ----@return self -function RadioButton:RadioButton () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccui/RadioButtonGroup.lua b/meta/3rd/Cocos4.0/library/ccui/RadioButtonGroup.lua deleted file mode 100644 index 2dab4ebc..00000000 --- a/meta/3rd/Cocos4.0/library/ccui/RadioButtonGroup.lua +++ /dev/null @@ -1,73 +0,0 @@ ----@meta - ----@class ccui.RadioButtonGroup :ccui.Widget -local RadioButtonGroup={ } -ccui.RadioButtonGroup=RadioButtonGroup - - - - ----* Remove a radio button from this group.
----* param radio button instance ----@param radioButton ccui.RadioButton ----@return self -function RadioButtonGroup:removeRadioButton (radioButton) end ----* Query whether no-selection is allowed or not.
----* param true means no-selection is allowed, false means no-selection is not allowed. ----@return boolean -function RadioButtonGroup:isAllowedNoSelection () end ----* Get the index of selected radio button.
----* return the selected button's index. Returns -1 if no button is selected. ----@return int -function RadioButtonGroup:getSelectedButtonIndex () end ----* Set a flag for allowing no-selection feature.
----* If it is allowed, no radio button can be selected.
----* If it is not allowed, one radio button must be selected all time except it is empty.
----* Default is not allowed.
----* param true means allowing no-selection, false means disallowing no-selection. ----@param allowedNoSelection boolean ----@return self -function RadioButtonGroup:setAllowedNoSelection (allowedNoSelection) end ----@overload fun(int0:ccui.RadioButton):self ----@overload fun(int:int):self ----@param index int ----@return self -function RadioButtonGroup:setSelectedButtonWithoutEvent (index) end ----* Add a callback function which would be called when radio button is selected or unselected.
----* param callback A std::function with type @see `ccRadioButtonGroupCallback` ----@param callback function ----@return self -function RadioButtonGroup:addEventListener (callback) end ----* Remove all radio button from this group. ----@return self -function RadioButtonGroup:removeAllRadioButtons () end ----* Get a radio button in this group by index.
----* param index of the radio button
----* return radio button instance. Returns nullptr if out of index. ----@param index int ----@return ccui.RadioButton -function RadioButtonGroup:getRadioButtonByIndex (index) end ----* Get the number of radio buttons in this group.
----* return the number of radio buttons in this group ----@return int -function RadioButtonGroup:getNumberOfRadioButtons () end ----* Add a radio button into this group.
----* param radio button instance ----@param radioButton ccui.RadioButton ----@return self -function RadioButtonGroup:addRadioButton (radioButton) end ----@overload fun(int0:ccui.RadioButton):self ----@overload fun(int:int):self ----@param index int ----@return self -function RadioButtonGroup:setSelectedButton (index) end ----* Create and return a empty RadioButtonGroup instance pointer. ----@return self -function RadioButtonGroup:create () end ----* ----@return string -function RadioButtonGroup:getDescription () end ----* Default constructor.
----* lua new ----@return self -function RadioButtonGroup:RadioButtonGroup () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccui/RelativeBox.lua b/meta/3rd/Cocos4.0/library/ccui/RelativeBox.lua deleted file mode 100644 index f4845c69..00000000 --- a/meta/3rd/Cocos4.0/library/ccui/RelativeBox.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class ccui.RelativeBox :ccui.Layout -local RelativeBox={ } -ccui.RelativeBox=RelativeBox - - - - ----* ----@param size size_table ----@return boolean -function RelativeBox:initWithSize (size) end ----@overload fun(size_table:size_table):self ----@overload fun():self ----@param size size_table ----@return self -function RelativeBox:create (size) end ----* ----@return boolean -function RelativeBox:init () end ----* Default constructor.
----* js ctor
----* lua new ----@return self -function RelativeBox:RelativeBox () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccui/RelativeLayoutParameter.lua b/meta/3rd/Cocos4.0/library/ccui/RelativeLayoutParameter.lua deleted file mode 100644 index 2a46c3a9..00000000 --- a/meta/3rd/Cocos4.0/library/ccui/RelativeLayoutParameter.lua +++ /dev/null @@ -1,53 +0,0 @@ ----@meta - ----@class ccui.RelativeLayoutParameter :ccui.LayoutParameter -local RelativeLayoutParameter={ } -ccui.RelativeLayoutParameter=RelativeLayoutParameter - - - - ----* Sets RelativeAlign parameter for LayoutParameter.
----* see RelativeAlign
----* param align Relative align in `RelativeAlign`. ----@param align int ----@return self -function RelativeLayoutParameter:setAlign (align) end ----* Set widget name your widget want to relative to.
----* param name Relative widget name. ----@param name string ----@return self -function RelativeLayoutParameter:setRelativeToWidgetName (name) end ----* Get a name of LayoutParameter in Relative Layout.
----* return name Relative name in string. ----@return string -function RelativeLayoutParameter:getRelativeName () end ----* Get the relative widget name.
----* return name A relative widget name in string. ----@return string -function RelativeLayoutParameter:getRelativeToWidgetName () end ----* Set a name for LayoutParameter in Relative Layout.
----* param name A string name. ----@param name string ----@return self -function RelativeLayoutParameter:setRelativeName (name) end ----* Get RelativeAlign parameter for LayoutParameter.
----* see RelativeAlign
----* return A RelativeAlign variable. ----@return int -function RelativeLayoutParameter:getAlign () end ----* Create a RelativeLayoutParameter instance.
----* return A initialized LayoutParameter which is marked as "autorelease". ----@return self -function RelativeLayoutParameter:create () end ----* ----@return ccui.LayoutParameter -function RelativeLayoutParameter:createCloneInstance () end ----* ----@param model ccui.LayoutParameter ----@return self -function RelativeLayoutParameter:copyProperties (model) end ----* Default constructor
----* lua new ----@return self -function RelativeLayoutParameter:RelativeLayoutParameter () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccui/RichElement.lua b/meta/3rd/Cocos4.0/library/ccui/RichElement.lua deleted file mode 100644 index 6e303f70..00000000 --- a/meta/3rd/Cocos4.0/library/ccui/RichElement.lua +++ /dev/null @@ -1,32 +0,0 @@ ----@meta - ----@class ccui.RichElement :cc.Ref -local RichElement={ } -ccui.RichElement=RichElement - - - - ----* ----@param type int ----@return boolean -function RichElement:equalType (type) end ----* brief Initialize a rich element with different arguments.
----* param tag A integer tag value.
----* param color A color in @see `Color3B`.
----* param opacity A opacity value in `GLubyte`.
----* return True if initialize success, false otherwise. ----@param tag int ----@param color color3b_table ----@param opacity unsigned_char ----@return boolean -function RichElement:init (tag,color,opacity) end ----* ----@param color color3b_table ----@return self -function RichElement:setColor (color) end ----* brief Default constructor.
----* js ctor
----* lua new ----@return self -function RichElement:RichElement () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccui/RichElementCustomNode.lua b/meta/3rd/Cocos4.0/library/ccui/RichElementCustomNode.lua deleted file mode 100644 index c9f03fb4..00000000 --- a/meta/3rd/Cocos4.0/library/ccui/RichElementCustomNode.lua +++ /dev/null @@ -1,38 +0,0 @@ ----@meta - ----@class ccui.RichElementCustomNode :ccui.RichElement -local RichElementCustomNode={ } -ccui.RichElementCustomNode=RichElementCustomNode - - - - ----* brief Initialize a RichElementCustomNode with various arguments.
----* param tag A integer tag value.
----* param color A color in Color3B.
----* param opacity A opacity in GLubyte.
----* param customNode A custom node pointer.
----* return True if initialize success, false otherwise. ----@param tag int ----@param color color3b_table ----@param opacity unsigned_char ----@param customNode cc.Node ----@return boolean -function RichElementCustomNode:init (tag,color,opacity,customNode) end ----* brief Create a RichElementCustomNode with various arguments.
----* param tag A integer tag value.
----* param color A color in Color3B.
----* param opacity A opacity in GLubyte.
----* param customNode A custom node pointer.
----* return A RichElementCustomNode instance. ----@param tag int ----@param color color3b_table ----@param opacity unsigned_char ----@param customNode cc.Node ----@return self -function RichElementCustomNode:create (tag,color,opacity,customNode) end ----* brief Default constructor.
----* js ctor
----* lua new ----@return self -function RichElementCustomNode:RichElementCustomNode () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccui/RichElementImage.lua b/meta/3rd/Cocos4.0/library/ccui/RichElementImage.lua deleted file mode 100644 index fc14a694..00000000 --- a/meta/3rd/Cocos4.0/library/ccui/RichElementImage.lua +++ /dev/null @@ -1,58 +0,0 @@ ----@meta - ----@class ccui.RichElementImage :ccui.RichElement -local RichElementImage={ } -ccui.RichElementImage=RichElementImage - - - - ----* ----@param height int ----@return self -function RichElementImage:setHeight (height) end ----* brief Initialize a RichElementImage with various arguments.
----* param tag A integer tag value.
----* param color A color in Color3B.
----* param opacity A opacity in GLubyte.
----* param filePath A image file name.
----* param url uniform resource locator
----* param texType texture type, may be a valid file path, or a sprite frame name
----* return True if initialize success, false otherwise. ----@param tag int ----@param color color3b_table ----@param opacity unsigned_char ----@param filePath string ----@param url string ----@param texType int ----@return boolean -function RichElementImage:init (tag,color,opacity,filePath,url,texType) end ----* ----@param width int ----@return self -function RichElementImage:setWidth (width) end ----* ----@param url string ----@return self -function RichElementImage:setUrl (url) end ----* brief Create a RichElementImage with various arguments.
----* param tag A integer tag value.
----* param color A color in Color3B.
----* param opacity A opacity in GLubyte.
----* param filePath A image file name.
----* param url uniform resource locator
----* param texType texture type, may be a valid file path, or a sprite frame name
----* return A RichElementImage instance. ----@param tag int ----@param color color3b_table ----@param opacity unsigned_char ----@param filePath string ----@param url string ----@param texType int ----@return self -function RichElementImage:create (tag,color,opacity,filePath,url,texType) end ----* brief Default constructor.
----* js ctor
----* lua new ----@return self -function RichElementImage:RichElementImage () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccui/RichElementNewLine.lua b/meta/3rd/Cocos4.0/library/ccui/RichElementNewLine.lua deleted file mode 100644 index 58f49462..00000000 --- a/meta/3rd/Cocos4.0/library/ccui/RichElementNewLine.lua +++ /dev/null @@ -1,24 +0,0 @@ ----@meta - ----@class ccui.RichElementNewLine :ccui.RichElement -local RichElementNewLine={ } -ccui.RichElementNewLine=RichElementNewLine - - - - ----* brief Create a RichElementNewLine with various arguments.
----* param tag A integer tag value.
----* param color A color in Color3B.
----* param opacity A opacity in GLubyte.
----* return A RichElementNewLine instance. ----@param tag int ----@param color color3b_table ----@param opacity unsigned_char ----@return self -function RichElementNewLine:create (tag,color,opacity) end ----* brief Default constructor.
----* js ctor
----* lua new ----@return self -function RichElementNewLine:RichElementNewLine () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccui/RichElementText.lua b/meta/3rd/Cocos4.0/library/ccui/RichElementText.lua deleted file mode 100644 index 77d0aff0..00000000 --- a/meta/3rd/Cocos4.0/library/ccui/RichElementText.lua +++ /dev/null @@ -1,78 +0,0 @@ ----@meta - ----@class ccui.RichElementText :ccui.RichElement -local RichElementText={ } -ccui.RichElementText=RichElementText - - - - ----* brief Initialize a RichElementText with various arguments.
----* param tag A integer tag value.
----* param color A color in Color3B.
----* param opacity A opacity in GLubyte.
----* param text Content string.
----* param fontName Content font name.
----* param fontSize Content font size.
----* param flags italics, bold, underline, strikethrough, url, outline, shadow or glow
----* param url uniform resource locator
----* param outlineColor the color of the outline
----* param outlineSize the outline effect size value
----* param shadowColor the shadow effect color value
----* param shadowOffset shadow effect offset value
----* param shadowBlurRadius the shadow effect blur radius
----* param glowColor glow color
----* return True if initialize success, false otherwise. ----@param tag int ----@param color color3b_table ----@param opacity unsigned_char ----@param text string ----@param fontName string ----@param fontSize float ----@param flags unsigned_int ----@param url string ----@param outlineColor color3b_table ----@param outlineSize int ----@param shadowColor color3b_table ----@param shadowOffset size_table ----@param shadowBlurRadius int ----@param glowColor color3b_table ----@return boolean -function RichElementText:init (tag,color,opacity,text,fontName,fontSize,flags,url,outlineColor,outlineSize,shadowColor,shadowOffset,shadowBlurRadius,glowColor) end ----* brief Create a RichElementText with various arguments.
----* param tag A integer tag value.
----* param color A color in Color3B.
----* param opacity A opacity in GLubyte.
----* param text Content string.
----* param fontName Content font name.
----* param fontSize Content font size.
----* param flags italics, bold, underline, strikethrough, url, outline, shadow or glow
----* param url uniform resource locator
----* param outlineColor the color of the outline
----* param outlineSize the outline effect size value
----* param shadowColor the shadow effect color value
----* param shadowOffset shadow effect offset value
----* param shadowBlurRadius the shadow effect blur radius
----* param glowColor glow color
----* return RichElementText instance. ----@param tag int ----@param color color3b_table ----@param opacity unsigned_char ----@param text string ----@param fontName string ----@param fontSize float ----@param flags unsigned_int ----@param url string ----@param outlineColor color3b_table ----@param outlineSize int ----@param shadowColor color3b_table ----@param shadowOffset size_table ----@param shadowBlurRadius int ----@param glowColor color3b_table ----@return self -function RichElementText:create (tag,color,opacity,text,fontName,fontSize,flags,url,outlineColor,outlineSize,shadowColor,shadowOffset,shadowBlurRadius,glowColor) end ----* brief Default constructor.
----* js ctor
----* lua new ----@return self -function RichElementText:RichElementText () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccui/RichText.lua b/meta/3rd/Cocos4.0/library/ccui/RichText.lua deleted file mode 100644 index c00940fa..00000000 --- a/meta/3rd/Cocos4.0/library/ccui/RichText.lua +++ /dev/null @@ -1,211 +0,0 @@ ----@meta - ----@class ccui.RichText :ccui.Widget -local RichText={ } -ccui.RichText=RichText - - - - ----* brief Insert a RichElement at a given index.
----* param element A RichElement type.
----* param index A given index. ----@param element ccui.RichElement ----@param index int ----@return self -function RichText:insertElement (element,index) end ----* @brief enable the outline of a-tag ----@param enable boolean ----@param outlineColor color3b_table ----@param outlineSize int ----@return self -function RichText:setAnchorTextOutline (enable,outlineColor,outlineSize) end ----* ----@return float -function RichText:getFontSize () end ----* brief Add a RichElement at the end of RichText.
----* param element A RichElement instance. ----@param element ccui.RichElement ----@return self -function RichText:pushBackElement (element) end ----* ----@param enable boolean ----@return self -function RichText:setAnchorTextBold (enable) end ----* ----@return string -function RichText:getAnchorFontColor () end ----* ----@return int -function RichText:getAnchorTextShadowBlurRadius () end ----* @brief enable the shadow of a-tag ----@param enable boolean ----@param shadowColor color3b_table ----@param offset size_table ----@param blurRadius int ----@return self -function RichText:setAnchorTextShadow (enable,shadowColor,offset,blurRadius) end ----* ----@return boolean -function RichText:isAnchorTextItalicEnabled () end ----* ----@param color string ----@return self -function RichText:setAnchorFontColor (color) end ----* ----@param face string ----@return self -function RichText:setFontFace (face) end ----* ----@param enable boolean ----@param glowColor color3b_table ----@return self -function RichText:setAnchorTextGlow (enable,glowColor) end ----* ----@return int -function RichText:getHorizontalAlignment () end ----* ----@param a int ----@return self -function RichText:setHorizontalAlignment (a) end ----* ----@param enable boolean ----@return self -function RichText:setAnchorTextDel (enable) end ----* ----@return color3b_table -function RichText:getAnchorTextOutlineColor3B () end ----* ----@param color4b color4b_table ----@return string -function RichText:stringWithColor4B (color4b) end ----* ----@param xml string ----@param defaults map_table ----@param handleOpenUrl function ----@return boolean -function RichText:initWithXML (xml,defaults,handleOpenUrl) end ----* ----@return color3b_table -function RichText:getAnchorFontColor3B () end ----* brief Rearrange all RichElement in the RichText.
----* It's usually called internally. ----@return self -function RichText:formatText () end ----* ----@return color3b_table -function RichText:getAnchorTextGlowColor3B () end ----* ----@param url string ----@return self -function RichText:openUrl (url) end ----* ----@return string -function RichText:getFontFace () end ----* ----@param color string ----@return self -function RichText:setFontColor (color) end ----* ----@return boolean -function RichText:isAnchorTextGlowEnabled () end ----* ----@return map_table -function RichText:getDefaults () end ----* ----@return boolean -function RichText:isAnchorTextUnderlineEnabled () end ----* ----@return string -function RichText:getFontColor () end ----* ----@return boolean -function RichText:isAnchorTextShadowEnabled () end ----* ----@return int -function RichText:getAnchorTextOutlineSize () end ----* brief Set vertical space between each RichElement.
----* param space Point in float. ----@param space float ----@return self -function RichText:setVerticalSpace (space) end ----* ----@return boolean -function RichText:isAnchorTextDelEnabled () end ----* ----@param defaults map_table ----@return self -function RichText:setDefaults (defaults) end ----* ----@param wrapMode int ----@return self -function RichText:setWrapMode (wrapMode) end ----* ----@param size float ----@return self -function RichText:setFontSize (size) end ----@overload fun(int0:ccui.RichElement):self ----@overload fun(int:int):self ----@param index int ----@return self -function RichText:removeElement (index) end ----* ----@param enable boolean ----@return self -function RichText:setAnchorTextItalic (enable) end ----* ----@return size_table -function RichText:getAnchorTextShadowOffset () end ----* ----@return boolean -function RichText:isAnchorTextBoldEnabled () end ----* ----@return color3b_table -function RichText:getAnchorTextShadowColor3B () end ----* ----@param color3b color3b_table ----@return string -function RichText:stringWithColor3B (color3b) end ----* ----@return boolean -function RichText:isAnchorTextOutlineEnabled () end ----* ----@return color3b_table -function RichText:getFontColor3B () end ----* ----@return int -function RichText:getWrapMode () end ----* ----@param enable boolean ----@return self -function RichText:setAnchorTextUnderline (enable) end ----* ----@param color string ----@return color3b_table -function RichText:color3BWithString (color) end ----* brief Create a empty RichText.
----* return RichText instance. ----@return self -function RichText:create () end ----* brief Create a RichText from an XML
----* return RichText instance. ----@param xml string ----@param defaults map_table ----@param handleOpenUrl function ----@return self -function RichText:createWithXML (xml,defaults,handleOpenUrl) end ----* ----@return boolean -function RichText:init () end ----* ----@return string -function RichText:getDescription () end ----* ----@param ignore boolean ----@return self -function RichText:ignoreContentAdaptWithSize (ignore) end ----* brief Default constructor.
----* js ctor
----* lua new ----@return self -function RichText:RichText () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccui/Scale9Sprite.lua b/meta/3rd/Cocos4.0/library/ccui/Scale9Sprite.lua deleted file mode 100644 index 56442b04..00000000 --- a/meta/3rd/Cocos4.0/library/ccui/Scale9Sprite.lua +++ /dev/null @@ -1,225 +0,0 @@ ----@meta - ----@class ccui.Scale9Sprite :cc.Sprite -local Scale9Sprite={ } -ccui.Scale9Sprite=Scale9Sprite - - - - ----@overload fun(cc.Sprite:cc.Sprite,rect_table:rect_table,boolean:boolean,vec2_table:vec2_table,size_table:size_table,rect_table:rect_table):self ----@overload fun(cc.Sprite:cc.Sprite,rect_table:rect_table,boolean:boolean,vec2_table3:rect_table):self ----@param sprite cc.Sprite ----@param rect rect_table ----@param rotated boolean ----@param offset vec2_table ----@param originalSize size_table ----@param capInsets rect_table ----@return boolean -function Scale9Sprite:updateWithSprite (sprite,rect,rotated,offset,originalSize,capInsets) end ----* Creates and returns a new sprite object with the specified cap insets.
----* You use this method to add cap insets to a sprite or to change the existing
----* cap insets of a sprite. In both cases, you get back a new image and the
----* original sprite remains untouched.
----* param capInsets The values to use for the cap insets.
----* return A Scale9Sprite instance. ----@param capInsets rect_table ----@return self -function Scale9Sprite:resizableSpriteWithCapInsets (capInsets) end ----* Returns the Cap Insets ----@return rect_table -function Scale9Sprite:getCapInsets () end ----* Change the state of 9-slice sprite.
----* see `State`
----* param state A enum value in State.
----* since v3.4 ----@param state int ----@return self -function Scale9Sprite:setState (state) end ----* brief Change the bottom sprite's cap inset.
----* param bottomInset The values to use for the cap inset. ----@param bottomInset float ----@return self -function Scale9Sprite:setInsetBottom (bottomInset) end ----* Initializes a 9-slice sprite with an sprite frame name and with the specified
----* cap insets.
----* Once the sprite is created, you can then call its "setContentSize:" method
----* to resize the sprite will all it's 9-slice goodness interact.
----* It respects the anchorPoint too.
----* param spriteFrameName The sprite frame name.
----* param capInsets The values to use for the cap insets.
----* return True if initializes success, false otherwise. ----@param spriteFrameName string ----@param capInsets rect_table ----@return boolean -function Scale9Sprite:initWithSpriteFrameName (spriteFrameName,capInsets) end ----* brief Get the original no 9-sliced sprite
----* return A sprite instance. ----@return cc.Sprite -function Scale9Sprite:getSprite () end ----* brief Change the top sprite's cap inset.
----* param topInset The values to use for the cap inset. ----@param topInset float ----@return self -function Scale9Sprite:setInsetTop (topInset) end ----* Set the slice sprite rendering type.
----* When setting to SIMPLE, only 4 vertexes is used to rendering.
----* otherwise 16 vertexes will be used to rendering.
----* see RenderingType ----@param type int ----@return self -function Scale9Sprite:setRenderingType (type) end ----@overload fun(cc.Sprite:cc.Sprite,rect_table:rect_table,boolean2:rect_table):self ----@overload fun(cc.Sprite:cc.Sprite,rect_table:rect_table,boolean:boolean,vec2_table3:rect_table):self ----@overload fun(cc.Sprite:cc.Sprite,rect_table:rect_table,boolean:boolean,vec2_table:vec2_table,size_table:size_table,rect_table:rect_table):self ----@param sprite cc.Sprite ----@param rect rect_table ----@param rotated boolean ----@param offset vec2_table ----@param originalSize size_table ----@param capInsets rect_table ----@return boolean -function Scale9Sprite:init (sprite,rect,rotated,offset,originalSize,capInsets) end ----* brief Change the preferred size of Scale9Sprite.
----* param size A delimitation zone. ----@param size size_table ----@return self -function Scale9Sprite:setPreferredSize (size) end ----* brief copies self to copy ----@param copy ccui.Scale9Sprite ----@return self -function Scale9Sprite:copyTo (copy) end ----* brief Change inner sprite's sprite frame.
----* param spriteFrame A sprite frame pointer.
----* param capInsets The values to use for the cap insets. ----@param spriteFrame cc.SpriteFrame ----@param capInsets rect_table ----@return self -function Scale9Sprite:setSpriteFrame (spriteFrame,capInsets) end ----* Query the current bright state.
----* return @see `State`
----* since v3.7 ----@return int -function Scale9Sprite:getState () end ----* brief Query the bottom sprite's cap inset.
----* return The bottom sprite's cap inset. ----@return float -function Scale9Sprite:getInsetBottom () end ----* brief Toggle 9-slice feature.
----* If Scale9Sprite is 9-slice disabled, the Scale9Sprite will rendered as a normal sprite.
----* warning: Don't use setScale9Enabled(false), use setRenderingType(RenderingType::SIMPLE) instead.
----* The setScale9Enabled(false) is kept only for back back compatibility.
----* param enabled True to enable 9-slice, false otherwise.
----* js NA ----@param enabled boolean ----@return self -function Scale9Sprite:setScale9Enabled (enabled) end ----* brief Query whether the Scale9Sprite is enable 9-slice or not.
----* return True if 9-slice is enabled, false otherwise.
----* js NA ----@return boolean -function Scale9Sprite:isScale9Enabled () end ----* ----@return self -function Scale9Sprite:resetRender () end ----* Return the slice sprite rendering type. ----@return int -function Scale9Sprite:getRenderingType () end ----* brief Query the right sprite's cap inset.
----* return The right sprite's cap inset. ----@return float -function Scale9Sprite:getInsetRight () end ----* brief Query the sprite's original size.
----* return Sprite size. ----@return size_table -function Scale9Sprite:getOriginalSize () end ----@overload fun(string0:rect_table,rect_table1:string):self ----@overload fun(string:string,rect_table:rect_table,rect_table:rect_table):self ----@param file string ----@param rect rect_table ----@param capInsets rect_table ----@return boolean -function Scale9Sprite:initWithFile (file,rect,capInsets) end ----* brief Query the top sprite's cap inset.
----* return The top sprite's cap inset. ----@return float -function Scale9Sprite:getInsetTop () end ----* brief Change the left sprite's cap inset.
----* param leftInset The values to use for the cap inset. ----@param leftInset float ----@return self -function Scale9Sprite:setInsetLeft (leftInset) end ----* Initializes a 9-slice sprite with an sprite frame and with the specified
----* cap insets.
----* Once the sprite is created, you can then call its "setContentSize:" method
----* to resize the sprite will all it's 9-slice goodness interact.
----* It respects the anchorPoint too.
----* param spriteFrame The sprite frame object.
----* param capInsets The values to use for the cap insets.
----* return True if initializes success, false otherwise. ----@param spriteFrame cc.SpriteFrame ----@param capInsets rect_table ----@return boolean -function Scale9Sprite:initWithSpriteFrame (spriteFrame,capInsets) end ----* brief Query the Scale9Sprite's preferred size.
----* return Scale9Sprite's preferred size. ----@return size_table -function Scale9Sprite:getPreferredSize () end ----* Set the Cap Insets in Points using the untrimmed size as reference ----@param insets rect_table ----@return self -function Scale9Sprite:setCapInsets (insets) end ----* brief Query the left sprite's cap inset.
----* return The left sprite's cap inset. ----@return float -function Scale9Sprite:getInsetLeft () end ----* brief Change the right sprite's cap inset.
----* param rightInset The values to use for the cap inset. ----@param rightInset float ----@return self -function Scale9Sprite:setInsetRight (rightInset) end ----@overload fun(string:string,rect_table:rect_table,rect_table:rect_table):self ----@overload fun():self ----@overload fun(string0:rect_table,rect_table1:string):self ----@overload fun(string:string,rect_table:rect_table):self ----@overload fun(string:string):self ----@param file string ----@param rect rect_table ----@param capInsets rect_table ----@return self -function Scale9Sprite:create (file,rect,capInsets) end ----@overload fun(string:string,rect_table:rect_table):self ----@overload fun(string:string):self ----@param spriteFrameName string ----@param capInsets rect_table ----@return self -function Scale9Sprite:createWithSpriteFrameName (spriteFrameName,capInsets) end ----@overload fun(cc.SpriteFrame:cc.SpriteFrame,rect_table:rect_table):self ----@overload fun(cc.SpriteFrame:cc.SpriteFrame):self ----@param spriteFrame cc.SpriteFrame ----@param capInsets rect_table ----@return self -function Scale9Sprite:createWithSpriteFrame (spriteFrame,capInsets) end ----* Initializes a 9-slice sprite with an sprite frame name.
----* Once the sprite is created, you can then call its "setContentSize:" method
----* to resize the sprite will all it's 9-slice goodness interact.
----* It respects the anchorPoint too.
----* param spriteFrameName The sprite frame name.
----* return True if initializes success, false otherwise. ----@param spriteFrameName string ----@return boolean -function Scale9Sprite:initWithSpriteFrameName (spriteFrameName) end ----@overload fun(string:string):self ----@overload fun(string:string,rect_table:rect_table):self ----@param file string ----@param rect rect_table ----@return boolean -function Scale9Sprite:initWithFile (file,rect) end ----* ----@return boolean -function Scale9Sprite:init () end ----* Default constructor.
----* js ctor
----* lua new ----@return self -function Scale9Sprite:Scale9Sprite () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccui/ScrollView.lua b/meta/3rd/Cocos4.0/library/ccui/ScrollView.lua deleted file mode 100644 index afa425d8..00000000 --- a/meta/3rd/Cocos4.0/library/ccui/ScrollView.lua +++ /dev/null @@ -1,378 +0,0 @@ ----@meta - ----@class ccui.ScrollView :ccui.Layout -local ScrollView={ } -ccui.ScrollView=ScrollView - - - - ----* Scroll inner container to top boundary of scrollview.
----* param timeInSec Time in seconds.
----* param attenuated Whether scroll speed attenuate or not. ----@param timeInSec float ----@param attenuated boolean ----@return self -function ScrollView:scrollToTop (timeInSec,attenuated) end ----* Scroll inner container to horizontal percent position of scrollview.
----* param percent A value between 0 and 100.
----* param timeInSec Time in seconds.
----* param attenuated Whether scroll speed attenuate or not. ----@param percent float ----@param timeInSec float ----@param attenuated boolean ----@return self -function ScrollView:scrollToPercentHorizontal (percent,timeInSec,attenuated) end ----* brief Set the scroll bar's opacity
----* param the scroll bar's opacity ----@param opacity unsigned_char ----@return self -function ScrollView:setScrollBarOpacity (opacity) end ----* brief Toggle scroll bar enabled.
----* param enabled True if enable scroll bar, false otherwise. ----@param enabled boolean ----@return self -function ScrollView:setScrollBarEnabled (enabled) end ----* brief Query inertia scroll state.
----* return True if inertia is enabled, false otherwise. ----@return boolean -function ScrollView:isInertiaScrollEnabled () end ----* Scroll inner container to bottom boundary of scrollview.
----* param timeInSec Time in seconds.
----* param attenuated Whether scroll speed attenuate or not. ----@param timeInSec float ----@param attenuated boolean ----@return self -function ScrollView:scrollToBottom (timeInSec,attenuated) end ----* return How far the scroll view is scrolled in both axes, combined as a Vec2 ----@return vec2_table -function ScrollView:getScrolledPercentBothDirection () end ----* Query scroll direction of scrollview.
----* see `Direction` Direction::VERTICAL means vertical scroll, Direction::HORIZONTAL means horizontal scroll
----* return Scrollview scroll direction. ----@return int -function ScrollView:getDirection () end ----* brief Set the scroll bar's color
----* param the scroll bar's color ----@param color color3b_table ----@return self -function ScrollView:setScrollBarColor (color) end ----* Scroll inner container to bottom and left boundary of scrollview.
----* param timeInSec Time in seconds.
----* param attenuated Whether scroll speed attenuate or not. ----@param timeInSec float ----@param attenuated boolean ----@return self -function ScrollView:scrollToBottomLeft (timeInSec,attenuated) end ----* Get inner container of scrollview.
----* Inner container is a child of scrollview.
----* return Inner container pointer. ----@return ccui.Layout -function ScrollView:getInnerContainer () end ----* Move inner container to bottom boundary of scrollview. ----@return self -function ScrollView:jumpToBottom () end ----* Set inner container position
----* param pos Inner container position. ----@param pos vec2_table ----@return self -function ScrollView:setInnerContainerPosition (pos) end ----* Changes scroll direction of scrollview.
----* see `Direction`
----* param dir Scroll direction enum. ----@param dir int ----@return self -function ScrollView:setDirection (dir) end ----* Scroll inner container to top and left boundary of scrollview.
----* param timeInSec Time in seconds.
----* param attenuated Whether scroll speed attenuate or not. ----@param timeInSec float ----@param attenuated boolean ----@return self -function ScrollView:scrollToTopLeft (timeInSec,attenuated) end ----* Move inner container to top and right boundary of scrollview. ----@return self -function ScrollView:jumpToTopRight () end ----* Scroll inner container to both direction percent position of scrollview.
----* param percent A value between 0 and 100.
----* param timeInSec Time in seconds.
----* param attenuated Whether scroll speed attenuate or not. ----@param percent vec2_table ----@param timeInSec float ----@param attenuated boolean ----@return self -function ScrollView:scrollToPercentBothDirection (percent,timeInSec,attenuated) end ----* Change inner container size of scrollview.
----* Inner container size must be larger than or equal scrollview's size.
----* param size Inner container size. ----@param size size_table ----@return self -function ScrollView:setInnerContainerSize (size) end ----* Get inner container position
----* return The inner container position. ----@return vec2_table -function ScrollView:getInnerContainerPosition () end ----* Move inner container to top boundary of scrollview. ----@return self -function ScrollView:jumpToTop () end ----* return How far the scroll view is scrolled in the vertical axis ----@return float -function ScrollView:getScrolledPercentVertical () end ----* brief Query bounce state.
----* return True if bounce is enabled, false otherwise. ----@return boolean -function ScrollView:isBounceEnabled () end ----* Move inner container to vertical percent position of scrollview.
----* param percent A value between 0 and 100. ----@param percent float ----@return self -function ScrollView:jumpToPercentVertical (percent) end ----* Add callback function which will be called when scrollview event triggered.
----* param callback A callback function with type of `ccScrollViewCallback`. ----@param callback function ----@return self -function ScrollView:addEventListener (callback) end ----* brief Set scroll bar auto hide time
----* param scroll bar auto hide time ----@param autoHideTime float ----@return self -function ScrollView:setScrollBarAutoHideTime (autoHideTime) end ----* Immediately stops inner container scroll (auto scrolling is not affected). ----@return self -function ScrollView:stopScroll () end ----* brief Set the horizontal scroll bar position from left-bottom corner.
----* param positionFromCorner The position from left-bottom corner ----@param positionFromCorner vec2_table ----@return self -function ScrollView:setScrollBarPositionFromCornerForHorizontal (positionFromCorner) end ----* brief Toggle whether enable scroll inertia while scrolling.
----* param enabled True if enable inertia, false otherwise. ----@param enabled boolean ----@return self -function ScrollView:setInertiaScrollEnabled (enabled) end ----* brief Set scroll bar auto hide state
----* param scroll bar auto hide state ----@param autoHideEnabled boolean ----@return self -function ScrollView:setScrollBarAutoHideEnabled (autoHideEnabled) end ----* brief Get the scroll bar's color
----* return the scroll bar's color ----@return color3b_table -function ScrollView:getScrollBarColor () end ----* Move inner container to top and left boundary of scrollview. ----@return self -function ScrollView:jumpToTopLeft () end ----* brief Query scroll bar state.
----* return True if scroll bar is enabled, false otherwise. ----@return boolean -function ScrollView:isScrollBarEnabled () end ----* return Whether the ScrollView is currently scrolling because of a bounceback or inertia slowdown. ----@return boolean -function ScrollView:isAutoScrolling () end ----* Move inner container to bottom and right boundary of scrollview. ----@return self -function ScrollView:jumpToBottomRight () end ----* brief Set the touch total time threshold
----* param the touch total time threshold ----@param touchTotalTimeThreshold float ----@return self -function ScrollView:setTouchTotalTimeThreshold (touchTotalTimeThreshold) end ----* brief Get the touch total time threshold
----* return the touch total time threshold ----@return float -function ScrollView:getTouchTotalTimeThreshold () end ----* brief Get the horizontal scroll bar's position from right-top corner.
----* return positionFromCorner ----@return vec2_table -function ScrollView:getScrollBarPositionFromCornerForHorizontal () end ----* return How far the scroll view is scrolled in the horizontal axis ----@return float -function ScrollView:getScrolledPercentHorizontal () end ----* brief Toggle bounce enabled when scroll to the edge.
----* param enabled True if enable bounce, false otherwise. ----@param enabled boolean ----@return self -function ScrollView:setBounceEnabled (enabled) end ----* Immediately stops inner container scroll initiated by any of the "scrollTo*" member functions ----@return self -function ScrollView:stopAutoScroll () end ----* Scroll inner container to top and right boundary of scrollview.
----* param timeInSec Time in seconds.
----* param attenuated Whether scroll speed attenuate or not. ----@param timeInSec float ----@param attenuated boolean ----@return self -function ScrollView:scrollToTopRight (timeInSec,attenuated) end ----* return Whether the user is currently dragging the ScrollView to scroll it ----@return boolean -function ScrollView:isScrolling () end ----* Scroll inner container to left boundary of scrollview.
----* param timeInSec Time in seconds.
----* param attenuated Whether scroll speed attenuate or not. ----@param timeInSec float ----@param attenuated boolean ----@return self -function ScrollView:scrollToLeft (timeInSec,attenuated) end ----* Move inner container to both direction percent position of scrollview.
----* param percent A value between 0 and 100. ----@param percent vec2_table ----@return self -function ScrollView:jumpToPercentBothDirection (percent) end ----* Immediately stops inner container scroll if any. ----@return self -function ScrollView:stopOverallScroll () end ----* Scroll inner container to vertical percent position of scrollview.
----* param percent A value between 0 and 100.
----* param timeInSec Time in seconds.
----* param attenuated Whether scroll speed attenuate or not. ----@param percent float ----@param timeInSec float ----@param attenuated boolean ----@return self -function ScrollView:scrollToPercentVertical (percent,timeInSec,attenuated) end ----* brief Set the scroll bar's width
----* param width The scroll bar's width ----@param width float ----@return self -function ScrollView:setScrollBarWidth (width) end ----* brief Get the scroll bar's opacity
----* return the scroll bar's opacity ----@return unsigned_char -function ScrollView:getScrollBarOpacity () end ----* Scroll inner container to bottom and right boundary of scrollview.
----* param timeInSec Time in seconds
----* param attenuated Whether scroll speed attenuate or not. ----@param timeInSec float ----@param attenuated boolean ----@return self -function ScrollView:scrollToBottomRight (timeInSec,attenuated) end ----* brief Set the scroll bar positions from the left-bottom corner (horizontal) and right-top corner (vertical).
----* param positionFromCorner The position from the left-bottom corner (horizontal) and right-top corner (vertical). ----@param positionFromCorner vec2_table ----@return self -function ScrollView:setScrollBarPositionFromCorner (positionFromCorner) end ----* brief Set the vertical scroll bar position from right-top corner.
----* param positionFromCorner The position from right-top corner ----@param positionFromCorner vec2_table ----@return self -function ScrollView:setScrollBarPositionFromCornerForVertical (positionFromCorner) end ----* brief Get the scroll bar's auto hide time
----* return the scroll bar's auto hide time ----@return float -function ScrollView:getScrollBarAutoHideTime () end ----* Move inner container to left boundary of scrollview. ----@return self -function ScrollView:jumpToLeft () end ----* Scroll inner container to right boundary of scrollview.
----* param timeInSec Time in seconds.
----* param attenuated Whether scroll speed attenuate or not. ----@param timeInSec float ----@param attenuated boolean ----@return self -function ScrollView:scrollToRight (timeInSec,attenuated) end ----* brief Get the vertical scroll bar's position from right-top corner.
----* return positionFromCorner ----@return vec2_table -function ScrollView:getScrollBarPositionFromCornerForVertical () end ----* brief Get the scroll bar's width
----* return the scroll bar's width ----@return float -function ScrollView:getScrollBarWidth () end ----* brief Query scroll bar auto hide state
----* return True if scroll bar auto hide is enabled, false otherwise. ----@return boolean -function ScrollView:isScrollBarAutoHideEnabled () end ----* Move inner container to bottom and left boundary of scrollview. ----@return self -function ScrollView:jumpToBottomLeft () end ----* Move inner container to right boundary of scrollview. ----@return self -function ScrollView:jumpToRight () end ----* Get inner container size of scrollview.
----* Inner container size must be larger than or equal scrollview's size.
----* return The inner container size. ----@return size_table -function ScrollView:getInnerContainerSize () end ----* Move inner container to horizontal percent position of scrollview.
----* param percent A value between 0 and 100. ----@param percent float ----@return self -function ScrollView:jumpToPercentHorizontal (percent) end ----* Create an empty ScrollView.
----* return A ScrollView instance. ----@return self -function ScrollView:create () end ----* ----@return cc.Ref -function ScrollView:createInstance () end ----@overload fun(cc.Node:cc.Node,int:int):self ----@overload fun(cc.Node:cc.Node):self ----@overload fun(cc.Node:cc.Node,int:int,string2:int):self ----@overload fun(cc.Node:cc.Node,int:int,string:string):self ----@param child cc.Node ----@param localZOrder int ----@param name string ----@return self -function ScrollView:addChild (child,localZOrder,name) end ----* ----@return boolean -function ScrollView:init () end ----* ----@param name string ----@return cc.Node -function ScrollView:getChildByName (name) end ----* Return the "class name" of widget. ----@return string -function ScrollView:getDescription () end ----* ----@param dt float ----@return self -function ScrollView:update (dt) end ----* Get the layout type for scrollview.
----* see `Layout::Type`
----* return LayoutType ----@return int -function ScrollView:getLayoutType () end ----* ----@param cleanup boolean ----@return self -function ScrollView:removeAllChildrenWithCleanup (cleanup) end ----* ----@return self -function ScrollView:removeAllChildren () end ----* When a widget is in a layout, you could call this method to get the next focused widget within a specified direction.
----* If the widget is not in a layout, it will return itself
----* param direction the direction to look for the next focused widget in a layout
----* param current the current focused widget
----* return the next focused widget in a layout ----@param direction int ----@param current ccui.Widget ----@return ccui.Widget -function ScrollView:findNextFocusedWidget (direction,current) end ----* ----@param child cc.Node ----@param cleanup boolean ----@return self -function ScrollView:removeChild (child,cleanup) end ----@overload fun():self ----@overload fun():self ----@return array_table -function ScrollView:getChildren () end ----* ----@param tag int ----@return cc.Node -function ScrollView:getChildByTag (tag) end ----* ----@return int -function ScrollView:getChildrenCount () end ----* Set layout type for scrollview.
----* see `Layout::Type`
----* param type Layout type enum. ----@param type int ----@return self -function ScrollView:setLayoutType (type) end ----* Default constructor
----* js ctor
----* lua new ----@return self -function ScrollView:ScrollView () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccui/Slider.lua b/meta/3rd/Cocos4.0/library/ccui/Slider.lua deleted file mode 100644 index cc9c92ff..00000000 --- a/meta/3rd/Cocos4.0/library/ccui/Slider.lua +++ /dev/null @@ -1,191 +0,0 @@ ----@meta - ----@class ccui.Slider :ccui.Widget -local Slider={ } -ccui.Slider=Slider - - - - ----* Changes the progress direction of slider.
----* param percent Percent value from 1 to 100. ----@param percent int ----@return self -function Slider:setPercent (percent) end ----* Query the maximum percent of Slider. The default value is 100.
----* since v3.7
----* return The maximum percent of the Slider. ----@return int -function Slider:getMaxPercent () end ----* Load normal state texture for slider ball.
----* param normal Normal state texture.
----* param resType @see TextureResType . ----@param normal string ----@param resType int ----@return self -function Slider:loadSlidBallTextureNormal (normal,resType) end ----* Load dark state texture for slider progress bar.
----* param fileName File path of texture.
----* param resType @see TextureResType . ----@param fileName string ----@param resType int ----@return self -function Slider:loadProgressBarTexture (fileName,resType) end ----* ----@return cc.ResourceData -function Slider:getBallNormalFile () end ----* ----@return cc.Sprite -function Slider:getSlidBallDisabledRenderer () end ----* Sets if slider is using scale9 renderer.
----* param able True that using scale9 renderer, false otherwise. ----@param able boolean ----@return self -function Slider:setScale9Enabled (able) end ----* ----@return cc.ResourceData -function Slider:getBallPressedFile () end ----* brief Return a zoom scale
----* since v3.3 ----@return float -function Slider:getZoomScale () end ----* Sets capinsets for progress bar slider, if slider is using scale9 renderer.
----* param capInsets Capinsets for progress bar slider.
----* js NA ----@param capInsets rect_table ----@return self -function Slider:setCapInsetProgressBarRenderer (capInsets) end ----* Load textures for slider ball.
----* param normal Normal state texture.
----* param pressed Pressed state texture.
----* param disabled Disabled state texture.
----* param texType @see TextureResType . ----@param normal string ----@param pressed string ----@param disabled string ----@param texType int ----@return self -function Slider:loadSlidBallTextures (normal,pressed,disabled,texType) end ----* ----@return cc.Node -function Slider:getSlidBallRenderer () end ----* Add call back function called when slider's percent has changed to slider.
----* param callback An given call back function called when slider's percent has changed to slider. ----@param callback function ----@return self -function Slider:addEventListener (callback) end ----* Set a large value could give more control to the precision.
----* since v3.7
----* param percent The max percent of Slider. ----@param percent int ----@return self -function Slider:setMaxPercent (percent) end ----* Load texture for slider bar.
----* param fileName File name of texture.
----* param resType @see TextureResType . ----@param fileName string ----@param resType int ----@return self -function Slider:loadBarTexture (fileName,resType) end ----* ----@return cc.ResourceData -function Slider:getProgressBarFile () end ----* Gets capinsets for bar slider, if slider is using scale9 renderer.
----* return capInsets Capinsets for bar slider. ----@return rect_table -function Slider:getCapInsetsBarRenderer () end ----* Updates the visual elements of the slider. ----@return self -function Slider:updateVisualSlider () end ----* Gets capinsets for progress bar slider, if slider is using scale9 renderer.
----* return Capinsets for progress bar slider.
----* js NA ----@return rect_table -function Slider:getCapInsetsProgressBarRenderer () end ----* ----@return cc.Sprite -function Slider:getSlidBallPressedRenderer () end ----* Load pressed state texture for slider ball.
----* param pressed Pressed state texture.
----* param resType @see TextureResType . ----@param pressed string ----@param resType int ----@return self -function Slider:loadSlidBallTexturePressed (pressed,resType) end ----* ----@return cc.ResourceData -function Slider:getBackFile () end ----* Gets If slider is using scale9 renderer.
----* return True that using scale9 renderer, false otherwise. ----@return boolean -function Slider:isScale9Enabled () end ----* ----@return cc.ResourceData -function Slider:getBallDisabledFile () end ----* Sets capinsets for bar slider, if slider is using scale9 renderer.
----* param capInsets Capinsets for bar slider. ----@param capInsets rect_table ----@return self -function Slider:setCapInsetsBarRenderer (capInsets) end ----* Gets the progress direction of slider.
----* return percent Percent value from 1 to 100. ----@return int -function Slider:getPercent () end ----* Sets capinsets for slider, if slider is using scale9 renderer.
----* param capInsets Capinsets for slider. ----@param capInsets rect_table ----@return self -function Slider:setCapInsets (capInsets) end ----* Load disabled state texture for slider ball.
----* param disabled Disabled state texture.
----* param resType @see TextureResType . ----@param disabled string ----@param resType int ----@return self -function Slider:loadSlidBallTextureDisabled (disabled,resType) end ----* ----@return cc.Sprite -function Slider:getSlidBallNormalRenderer () end ----* When user pressed the button, the button will zoom to a scale.
----* The final scale of the button equals (button original scale + _zoomScale)
----* since v3.3 ----@param scale float ----@return self -function Slider:setZoomScale (scale) end ----@overload fun(string:string,string:string,int:int):self ----@overload fun():self ----@param barTextureName string ----@param normalBallTextureName string ----@param resType int ----@return self -function Slider:create (barTextureName,normalBallTextureName,resType) end ----* ----@return cc.Ref -function Slider:createInstance () end ----* ----@return cc.Node -function Slider:getVirtualRenderer () end ----* ----@param ignore boolean ----@return self -function Slider:ignoreContentAdaptWithSize (ignore) end ----* Returns the "class name" of widget. ----@return string -function Slider:getDescription () end ----* ----@param pt vec2_table ----@param camera cc.Camera ----@param p vec3_table ----@return boolean -function Slider:hitTest (pt,camera,p) end ----* ----@return boolean -function Slider:init () end ----* ----@return size_table -function Slider:getVirtualRendererSize () end ----* Default constructor.
----* js ctor
----* lua new ----@return self -function Slider:Slider () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccui/TabControl.lua b/meta/3rd/Cocos4.0/library/ccui/TabControl.lua deleted file mode 100644 index 98cb14ab..00000000 --- a/meta/3rd/Cocos4.0/library/ccui/TabControl.lua +++ /dev/null @@ -1,104 +0,0 @@ ----@meta - ----@class ccui.TabControl :ccui.Widget -local TabControl={ } -ccui.TabControl=TabControl - - - - ----* set header width, affect all tab
----* param headerWidth each tab header's width ----@param headerWidth float ----@return self -function TabControl:setHeaderWidth (headerWidth) end ----* remove the tab from this TabControl
----* param index The index of tab ----@param index int ----@return self -function TabControl:removeTab (index) end ----* get the count of tabs in this TabControl
----* return the count of tabs ----@return unsigned_int -function TabControl:getTabCount () end ----* ----@return int -function TabControl:getHeaderDockPlace () end ----* get current selected tab's index
----* return the current selected tab index ----@return int -function TabControl:getSelectedTabIndex () end ----* insert tab, and init the position of header and container
----* param index The index tab should be
----* param header The header Button, will be a protected child in TabControl
----* param container The container, will be a protected child in TabControl ----@param index int ----@param header ccui.TabHeader ----@param container ccui.Layout ----@return self -function TabControl:insertTab (index,header,container) end ----* ignore the textures' size in header, scale them with _headerWidth and _headerHeight
----* param ignore is `true`, the header's texture scale with _headerWidth and _headerHeight
----* ignore is `false`, use the texture's size, do not scale them ----@param ignore boolean ----@return self -function TabControl:ignoreHeadersTextureSize (ignore) end ----* get tab header's width
----* return header's width ----@return float -function TabControl:getHeaderWidth () end ----* the header dock place of header in TabControl
----* param dockPlace The strip place ----@param dockPlace int ----@return self -function TabControl:setHeaderDockPlace (dockPlace) end ----@overload fun(int0:ccui.TabHeader):self ----@overload fun(int:int):self ----@param index int ----@return self -function TabControl:setSelectTab (index) end ----* get TabHeader
----* param index The index of tab ----@param index int ----@return ccui.TabHeader -function TabControl:getTabHeader (index) end ----* get whether ignore the textures' size in header, scale them with _headerWidth and _headerHeight
----* return whether ignore the textures' size in header ----@return boolean -function TabControl:isIgnoreHeadersTextureSize () end ----* Add a callback function which would be called when selected tab changed
----* param callback A std::function with type @see `ccTabControlCallback` ----@param callback function ----@return self -function TabControl:setTabChangedEventListener (callback) end ----* set the delta zoom of selected tab
----* param zoom The delta zoom ----@param zoom float ----@return self -function TabControl:setHeaderSelectedZoom (zoom) end ----* set header height, affect all tab
----* param headerHeight each tab header's height ----@param headerHeight float ----@return self -function TabControl:setHeaderHeight (headerHeight) end ----* get the index of tabCell in TabView, return -1 if not exists in.
----* return the index of tabCell in TabView, `-1` means not exists in. ----@param tabCell ccui.TabHeader ----@return int -function TabControl:indexOfTabHeader (tabCell) end ----* get Container
----* param index The index of tab ----@param index int ----@return ccui.Layout -function TabControl:getTabContainer (index) end ----* get the delta zoom of selected tab
----* return zoom, the delta zoom ----@return float -function TabControl:getHeaderSelectedZoom () end ----* get tab header's height
----* return header's height ----@return int -function TabControl:getHeaderHeight () end ----* ----@return self -function TabControl:create () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccui/TabHeader.lua b/meta/3rd/Cocos4.0/library/ccui/TabHeader.lua deleted file mode 100644 index 9377970b..00000000 --- a/meta/3rd/Cocos4.0/library/ccui/TabHeader.lua +++ /dev/null @@ -1,65 +0,0 @@ ----@meta - ----@class ccui.TabHeader :ccui.AbstractCheckButton -local TabHeader={ } -ccui.TabHeader=TabHeader - - - - ----* get the index this header in the TabControl
----* return -1 means not in any TabControl ----@return int -function TabHeader:getIndexInTabControl () end ----* get the TabHeader text
----* return he TabHeader text ----@return string -function TabHeader:getTitleText () end ----* Change the font size of TabHeader text
----* param size TabHeader text's font size in float. ----@param size float ----@return self -function TabHeader:setTitleFontSize (size) end ----* Change the font name of TabHeader text
----* param fontName a font name string. ----@param fontName string ----@return self -function TabHeader:setTitleFontName (fontName) end ----* get the font size of TabHeader text
----* return TabHeader text's font size in float. ----@return float -function TabHeader:getTitleFontSize () end ----* get the font name of TabHeader text
----* return font name in std::string ----@return string -function TabHeader:getTitleFontName () end ----* get the TabHeader text color.
----* return Color4B of TabHeader text. ----@return color4b_table -function TabHeader:getTitleColor () end ----* Return the inner Label renderer of TabHeader.
----* return The TabHeader Label. ----@return cc.Label -function TabHeader:getTitleRenderer () end ----* Change the content of Header's text.
----* param text The Header's text. ----@param text string ----@return self -function TabHeader:setTitleText (text) end ----* Change the color of he TabHeader text
----* param color The he TabHeader text's color in Color4B. ----@param color color4b_table ----@return self -function TabHeader:setTitleColor (color) end ----@overload fun(string:string,string:string,string:string,string3:int):self ----@overload fun():self ----@overload fun(string:string,string:string,string:string,string:string,string:string,string:string,int:int):self ----@param titleStr string ----@param backGround string ----@param backGroundSelected string ----@param cross string ----@param backGroundDisabled string ----@param frontCrossDisabled string ----@param texType int ----@return self -function TabHeader:create (titleStr,backGround,backGroundSelected,cross,backGroundDisabled,frontCrossDisabled,texType) end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccui/Text.lua b/meta/3rd/Cocos4.0/library/ccui/Text.lua deleted file mode 100644 index a82addf3..00000000 --- a/meta/3rd/Cocos4.0/library/ccui/Text.lua +++ /dev/null @@ -1,206 +0,0 @@ ----@meta - ----@class ccui.Text :ccui.Widget@all parent class: Widget,BlendProtocol -local Text={ } -ccui.Text=Text - - - - ----* Enable shadow for the label.
----* todo support blur for shadow effect
----* param shadowColor The color of shadow effect.
----* param offset The offset of shadow effect.
----* param blurRadius The blur radius of shadow effect. ----@return self -function Text:enableShadow () end ----* Gets the font size of label.
----* return The font size. ----@return float -function Text:getFontSize () end ----* Gets the string value of label.
----* return String value. ----@return string -function Text:getString () end ----@overload fun(int:int):self ----@overload fun():self ----@param effect int ----@return self -function Text:disableEffect (effect) end ----* Return current effect type. ----@return int -function Text:getLabelEffectType () end ----* Gets text color.
----* return Text color. ----@return color4b_table -function Text:getTextColor () end ----* Returns the blending function that is currently being used.
----* return A BlendFunc structure with source and destination factor which specified pixel arithmetic.
----* js NA
----* lua NA ----@return cc.BlendFunc -function Text:getBlendFunc () end ----* Sets text vertical alignment.
----* param alignment vertical text alignment type ----@param alignment int ----@return self -function Text:setTextVerticalAlignment (alignment) end ----* Sets the font name of label.
----* If you are trying to use a system font, you could just pass a font name
----* If you are trying to use a TTF, you should pass a file path to the TTF file
----* Usage:
----* code
----* create a system font UIText
----* Text *text = Text::create("Hello", "Arial", 20);
----* it will change the font to system font no matter the previous font type is TTF or system font
----* text->setFontName("Marfelt");
----* it will change the font to TTF font no matter the previous font type is TTF or system font
----* text->setFontName("xxxx/xxx.ttf");
----* endcode
----* param name Font name. ----@param name string ----@return self -function Text:setFontName (name) end ----* Sets the touch scale enabled of label.
----* param enabled Touch scale enabled of label. ----@param enabled boolean ----@return self -function Text:setTouchScaleChangeEnabled (enabled) end ----* Return shadow effect offset value. ----@return size_table -function Text:getShadowOffset () end ----* Changes the string value of label.
----* param text String value. ----@param text string ----@return self -function Text:setString (text) end ----* Return the outline effect size value. ----@return int -function Text:getOutlineSize () end ----* ----@param textContent string ----@param fontName string ----@param fontSize float ----@return boolean -function Text:init (textContent,fontName,fontSize) end ----* Return the shadow effect blur radius. ----@return float -function Text:getShadowBlurRadius () end ----* Gets the touch scale enabled of label.
----* return Touch scale enabled of label. ----@return boolean -function Text:isTouchScaleChangeEnabled () end ----* Gets the font name.
----* return Font name. ----@return string -function Text:getFontName () end ----* Sets the rendering size of the text, you should call this method
----* along with calling `ignoreContentAdaptWithSize(false)`, otherwise the text area
----* size is calculated by the real size of the text content.
----* param size The text rendering area size. ----@param size size_table ----@return self -function Text:setTextAreaSize (size) end ----* Gets the string length of the label.
----* Note: This length will be larger than the raw string length,
----* if you want to get the raw string length,
----* you should call this->getString().size() instead.
----* return String length. ----@return int -function Text:getStringLength () end ----* Gets the render size in auto mode.
----* return The size of render size in auto mode. ----@return size_table -function Text:getAutoRenderSize () end ----* Enable outline for the label.
----* It only works on IOS and Android when you use System fonts.
----* param outlineColor The color of outline.
----* param outlineSize The size of outline. ----@param outlineColor color4b_table ----@param outlineSize int ----@return self -function Text:enableOutline (outlineColor,outlineSize) end ----* Return current effect color value. ----@return color4b_table -function Text:getEffectColor () end ----* Gets the font type.
----* return The font type. ----@return int -function Text:getType () end ----* Gets text horizontal alignment.
----* return Horizontal text alignment type ----@return int -function Text:getTextHorizontalAlignment () end ----* Return whether the shadow effect is enabled. ----@return boolean -function Text:isShadowEnabled () end ----* Sets the font size of label.
----* param size The font size. ----@param size float ----@return self -function Text:setFontSize (size) end ----* Return the shadow effect color value. ----@return color4b_table -function Text:getShadowColor () end ----* Sets text color.
----* param color Text color. ----@param color color4b_table ----@return self -function Text:setTextColor (color) end ----* Only support for TTF.
----* param glowColor The color of glow. ----@param glowColor color4b_table ----@return self -function Text:enableGlow (glowColor) end ----* Provides a way to treat each character like a Sprite.
----* warning No support system font. ----@param lettetIndex int ----@return cc.Sprite -function Text:getLetter (lettetIndex) end ----* Sets the source blending function.
----* param blendFunc A structure with source and destination factor to specify pixel arithmetic. e.g. {BlendFactor::ONE, BlendFactor::ONE}, {BlendFactor::SRC_ALPHA, BlendFactor::ONE_MINUS_SRC_ALPHA}.
----* js NA
----* lua NA ----@param blendFunc cc.BlendFunc ----@return self -function Text:setBlendFunc (blendFunc) end ----* Gets text vertical alignment.
----* return Vertical text alignment type ----@return int -function Text:getTextVerticalAlignment () end ----* Return the text rendering area size.
----* return The text rendering area size. ----@return size_table -function Text:getTextAreaSize () end ----* Sets text horizontal alignment.
----* param alignment Horizontal text alignment type ----@param alignment int ----@return self -function Text:setTextHorizontalAlignment (alignment) end ----@overload fun(string:string,string:string,float:float):self ----@overload fun():self ----@param textContent string ----@param fontName string ----@param fontSize float ----@return self -function Text:create (textContent,fontName,fontSize) end ----* ----@return cc.Ref -function Text:createInstance () end ----* ----@return cc.Node -function Text:getVirtualRenderer () end ----* ----@return boolean -function Text:init () end ----* Returns the "class name" of widget. ----@return string -function Text:getDescription () end ----* ----@return size_table -function Text:getVirtualRendererSize () end ----* Default constructor.
----* js ctor
----* lua new ----@return self -function Text:Text () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccui/TextAtlas.lua b/meta/3rd/Cocos4.0/library/ccui/TextAtlas.lua deleted file mode 100644 index 9f9170ba..00000000 --- a/meta/3rd/Cocos4.0/library/ccui/TextAtlas.lua +++ /dev/null @@ -1,68 +0,0 @@ ----@meta - ----@class ccui.TextAtlas :ccui.Widget -local TextAtlas={ } -ccui.TextAtlas=TextAtlas - - - - ----* Gets the string length of the label.
----* Note: This length will be larger than the raw string length,
----* if you want to get the raw string length, you should call this->getString().size() instead
----* return string length. ----@return int -function TextAtlas:getStringLength () end ----* Get string value for labelatlas.
----* return The string value of TextAtlas. ----@return string -function TextAtlas:getString () end ----* Set string value for labelatlas.
----* param value A given string needs to be displayed. ----@param value string ----@return self -function TextAtlas:setString (value) end ----* ----@return cc.ResourceData -function TextAtlas:getRenderFile () end ----* Initializes the LabelAtlas with a string, a char map file(the atlas), the width and height of each element and the starting char of the atlas.
----* param stringValue A given string needs to be displayed.
----* param charMapFile A given char map file name.
----* param itemWidth The element width.
----* param itemHeight The element height.
----* param startCharMap The starting char of the atlas. ----@param stringValue string ----@param charMapFile string ----@param itemWidth int ----@param itemHeight int ----@param startCharMap string ----@return self -function TextAtlas:setProperty (stringValue,charMapFile,itemWidth,itemHeight,startCharMap) end ----* js NA ----@return self -function TextAtlas:adaptRenderers () end ----@overload fun(string:string,string:string,int:int,int:int,string:string):self ----@overload fun():self ----@param stringValue string ----@param charMapFile string ----@param itemWidth int ----@param itemHeight int ----@param startCharMap string ----@return self -function TextAtlas:create (stringValue,charMapFile,itemWidth,itemHeight,startCharMap) end ----* ----@return cc.Ref -function TextAtlas:createInstance () end ----* ----@return cc.Node -function TextAtlas:getVirtualRenderer () end ----* Returns the "class name" of widget. ----@return string -function TextAtlas:getDescription () end ----* ----@return size_table -function TextAtlas:getVirtualRendererSize () end ----* Default constructor.
----* lua new ----@return self -function TextAtlas:TextAtlas () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccui/TextBMFont.lua b/meta/3rd/Cocos4.0/library/ccui/TextBMFont.lua deleted file mode 100644 index 8f535439..00000000 --- a/meta/3rd/Cocos4.0/library/ccui/TextBMFont.lua +++ /dev/null @@ -1,55 +0,0 @@ ----@meta - ----@class ccui.TextBMFont :ccui.Widget -local TextBMFont={ } -ccui.TextBMFont=TextBMFont - - - - ----* Gets the string length of the label.
----* Note: This length will be larger than the raw string length,
----* if you want to get the raw string length, you should call this->getString().size() instead
----* return string length. ----@return int -function TextBMFont:getStringLength () end ----* get string value for labelbmfont ----@return string -function TextBMFont:getString () end ----* set string value for labelbmfont ----@param value string ----@return self -function TextBMFont:setString (value) end ----* ----@return cc.ResourceData -function TextBMFont:getRenderFile () end ----* init a bitmap font atlas with an initial string and the FNT file ----@param fileName string ----@return self -function TextBMFont:setFntFile (fileName) end ----* reset TextBMFont inner label ----@return self -function TextBMFont:resetRender () end ----@overload fun(string:string,string:string):self ----@overload fun():self ----@param text string ----@param filename string ----@return self -function TextBMFont:create (text,filename) end ----* ----@return cc.Ref -function TextBMFont:createInstance () end ----* ----@return cc.Node -function TextBMFont:getVirtualRenderer () end ----* Returns the "class name" of widget. ----@return string -function TextBMFont:getDescription () end ----* ----@return size_table -function TextBMFont:getVirtualRendererSize () end ----* Default constructor
----* js ctor
----* lua new ----@return self -function TextBMFont:TextBMFont () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccui/TextField.lua b/meta/3rd/Cocos4.0/library/ccui/TextField.lua deleted file mode 100644 index 8b1c2f61..00000000 --- a/meta/3rd/Cocos4.0/library/ccui/TextField.lua +++ /dev/null @@ -1,248 +0,0 @@ ----@meta - ----@class ccui.TextField :ccui.Widget -local TextField={ } -ccui.TextField=TextField - - - - ----* brief Toggle attach with IME.
----* param attach True if attach with IME, false otherwise. ----@param attach boolean ----@return self -function TextField:setAttachWithIME (attach) end ----* brief Query the font size.
----* return The integer font size. ----@return int -function TextField:getFontSize () end ----* Query the content of TextField.
----* return The string value of TextField. ----@return string -function TextField:getString () end ----* brief Change password style text.
----* param styleText The styleText for password mask, the default value is "*". ----@param styleText char ----@return self -function TextField:setPasswordStyleText (styleText) end ----* brief Whether it is ready to delete backward in TextField.
----* return True is the delete backward is enabled, false otherwise. ----@return boolean -function TextField:getDeleteBackward () end ----* brief Query the text string color.
----* return The color of the text. ----@return color4b_table -function TextField:getTextColor () end ----* brief Get the placeholder of TextField.
----* return A placeholder string. ----@return string -function TextField:getPlaceHolder () end ----* brief Query whether the IME is attached or not.
----* return True if IME is attached, false otherwise. ----@return boolean -function TextField:getAttachWithIME () end ----* brief Change the font name of TextField.
----* param name The font name string. ----@param name string ----@return self -function TextField:setFontName (name) end ----* brief Whether it is ready to get the inserted text or not.
----* return True if the insert text is ready, false otherwise. ----@return boolean -function TextField:getInsertText () end ----* brief Toggle enable insert text mode
----* param insertText True if enable insert text, false otherwise. ----@param insertText boolean ----@return self -function TextField:setInsertText (insertText) end ----* Change content of TextField.
----* param text A string content. ----@param text string ----@return self -function TextField:setString (text) end ----* brief Query whether IME is detached or not.
----* return True if IME is detached, false otherwise. ----@return boolean -function TextField:getDetachWithIME () end ----* brief Change the vertical text alignment.
----* param alignment A alignment arguments in @see `TextVAlignment`. ----@param alignment int ----@return self -function TextField:setTextVerticalAlignment (alignment) end ----* Add a event listener to TextField, when some predefined event happens, the callback will be called.
----* param callback A callback function with type of `ccTextFieldCallback`. ----@param callback function ----@return self -function TextField:addEventListener (callback) end ----* brief Detach the IME. ----@return self -function TextField:didNotSelectSelf () end ----* brief Query the TextField's font name.
----* return The font name string. ----@return string -function TextField:getFontName () end ----* brief Change the text area size.
----* param size A delimitation zone. ----@param size size_table ----@return self -function TextField:setTextAreaSize (size) end ----* brief Attach the IME for inputing. ----@return self -function TextField:attachWithIME () end ----* brief Query the input string length.
----* return A integer length value. ----@return int -function TextField:getStringLength () end ----* brief Get the renderer size in auto mode.
----* return A delimitation zone. ----@return size_table -function TextField:getAutoRenderSize () end ----* brief Toggle enable password input mode.
----* param enable True if enable password input mode, false otherwise. ----@param enable boolean ----@return self -function TextField:setPasswordEnabled (enable) end ----* brief Query the placeholder string color.
----* return The color of placeholder. ----@return color4b_table -function TextField:getPlaceHolderColor () end ----* brief Query the password style text.
----* return A password style text. ----@return char -function TextField:getPasswordStyleText () end ----* brief Toggle maximize length enable
----* param enable True if enable maximize length, false otherwise. ----@param enable boolean ----@return self -function TextField:setMaxLengthEnabled (enable) end ----* brief Query whether password is enabled or not.
----* return True if password is enabled, false otherwise. ----@return boolean -function TextField:isPasswordEnabled () end ----* brief Toggle enable delete backward mode.
----* param deleteBackward True is delete backward is enabled, false otherwise. ----@param deleteBackward boolean ----@return self -function TextField:setDeleteBackward (deleteBackward) end ----* Set cursor position, if enabled
----* js NA ----@param cursorPosition unsigned_int ----@return self -function TextField:setCursorPosition (cursorPosition) end ----* brief Inquire the horizontal alignment
----* return The horizontal alignment ----@return int -function TextField:getTextHorizontalAlignment () end ----* brief Change font size of TextField.
----* param size The integer font size. ----@param size int ----@return self -function TextField:setFontSize (size) end ----* brief Set placeholder of TextField.
----* param value The string value of placeholder. ----@param value string ----@return self -function TextField:setPlaceHolder (value) end ----* Set cursor position to hit letter, if enabled
----* js NA ----@param point vec2_table ----@param camera cc.Camera ----@return self -function TextField:setCursorFromPoint (point,camera) end ----@overload fun(color3b_table0:color4b_table):self ----@overload fun(color3b_table:color3b_table):self ----@param color color3b_table ----@return self -function TextField:setPlaceHolderColor (color) end ----* brief Change horizontal text alignment.
----* param alignment A alignment arguments in @see `TextHAlignment`. ----@param alignment int ----@return self -function TextField:setTextHorizontalAlignment (alignment) end ----* brief Change the text color.
----* param textColor The color value in `Color4B`. ----@param textColor color4b_table ----@return self -function TextField:setTextColor (textColor) end ----* Set char showing cursor.
----* js NA ----@param cursor char ----@return self -function TextField:setCursorChar (cursor) end ----* brief Query maximize input length of TextField.
----* return The integer value of maximize input length. ----@return int -function TextField:getMaxLength () end ----* brief Query whether max length is enabled or not.
----* return True if maximize length is enabled, false otherwise. ----@return boolean -function TextField:isMaxLengthEnabled () end ----* brief Toggle detach with IME.
----* param detach True if detach with IME, false otherwise. ----@param detach boolean ----@return self -function TextField:setDetachWithIME (detach) end ----* brief Inquire the horizontal alignment
----* return The horizontal alignment ----@return int -function TextField:getTextVerticalAlignment () end ----* brief Toggle enable touch area.
----* param enable True if enable touch area, false otherwise. ----@param enable boolean ----@return self -function TextField:setTouchAreaEnabled (enable) end ----* brief Change maximize input length limitation.
----* param length A character count in integer. ----@param length int ----@return self -function TextField:setMaxLength (length) end ----* Set enable cursor use.
----* js NA ----@param enabled boolean ----@return self -function TextField:setCursorEnabled (enabled) end ----* brief Set the touch size
----* The touch size is used for @see `hitTest`.
----* param size A delimitation zone. ----@param size size_table ----@return self -function TextField:setTouchSize (size) end ----* brief Get current touch size of TextField.
----* return The TextField's touch size. ----@return size_table -function TextField:getTouchSize () end ----@overload fun(string:string,string:string,int:int):self ----@overload fun():self ----@param placeholder string ----@param fontName string ----@param fontSize int ----@return self -function TextField:create (placeholder,fontName,fontSize) end ----* ----@return cc.Ref -function TextField:createInstance () end ----* ----@return cc.Node -function TextField:getVirtualRenderer () end ----* Returns the "class name" of widget. ----@return string -function TextField:getDescription () end ----* ----@param dt float ----@return self -function TextField:update (dt) end ----* ----@param pt vec2_table ----@param camera cc.Camera ----@param p vec3_table ----@return boolean -function TextField:hitTest (pt,camera,p) end ----* ----@return boolean -function TextField:init () end ----* ----@return size_table -function TextField:getVirtualRendererSize () end ----* brief Default constructor. ----@return self -function TextField:TextField () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccui/VBox.lua b/meta/3rd/Cocos4.0/library/ccui/VBox.lua deleted file mode 100644 index 8fbea878..00000000 --- a/meta/3rd/Cocos4.0/library/ccui/VBox.lua +++ /dev/null @@ -1,26 +0,0 @@ ----@meta - ----@class ccui.VBox :ccui.Layout -local VBox={ } -ccui.VBox=VBox - - - - ----* ----@param size size_table ----@return boolean -function VBox:initWithSize (size) end ----@overload fun(size_table:size_table):self ----@overload fun():self ----@param size size_table ----@return self -function VBox:create (size) end ----* ----@return boolean -function VBox:init () end ----* Default constructor
----* js ctor
----* lua new ----@return self -function VBox:VBox () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccui/VideoPlayer.lua b/meta/3rd/Cocos4.0/library/ccui/VideoPlayer.lua deleted file mode 100644 index c976116f..00000000 --- a/meta/3rd/Cocos4.0/library/ccui/VideoPlayer.lua +++ /dev/null @@ -1,114 +0,0 @@ ----@meta - ----@class ccui.VideoPlayer :ccui.Widget -local VideoPlayer={ } -ccui.VideoPlayer=VideoPlayer - - - - ----* brief Get the local video file name.
----* return The video file name. ----@return string -function VideoPlayer:getFileName () end ----* brief Get the URL of remoting video source.
----* return A remoting URL address. ----@return string -function VideoPlayer:getURL () end ----* Starts playback. ----@return self -function VideoPlayer:play () end ----* Checks whether the VideoPlayer is set to listen user input to resume and pause the video
----* return true if the videoplayer user input is set, false otherwise. ----@return boolean -function VideoPlayer:isUserInputEnabled () end ----* Causes the video player to keep aspect ratio or no when displaying the video.
----* param enable Specify true to keep aspect ratio or false to scale the video until
----* both dimensions fit the visible bounds of the view exactly. ----@param enable boolean ----@return self -function VideoPlayer:setKeepAspectRatioEnabled (enable) end ----* Stops playback. ----@return self -function VideoPlayer:stop () end ----* Causes the video player to enter or exit full-screen mode.
----* param fullscreen Specify true to enter full-screen mode or false to exit full-screen mode. ----@param fullscreen boolean ----@return self -function VideoPlayer:setFullScreenEnabled (fullscreen) end ----* Sets a file path as a video source for VideoPlayer. ----@param videoPath string ----@return self -function VideoPlayer:setFileName (videoPath) end ----* Sets a URL as a video source for VideoPlayer. ----@param _videoURL string ----@return self -function VideoPlayer:setURL (_videoURL) end ----* Set the style of the player
----* param style The corresponding style ----@param style int ----@return self -function VideoPlayer:setStyle (style) end ----* Seeks to specified time position.
----* param sec The offset in seconds from the start to seek to. ----@param sec float ----@return self -function VideoPlayer:seekTo (sec) end ----* Indicates whether the video player keep aspect ratio when displaying the video. ----@return boolean -function VideoPlayer:isKeepAspectRatioEnabled () end ----* brief A function which will be called when video is playing.
----* param event @see VideoPlayer::EventType. ----@param event int ----@return self -function VideoPlayer:onPlayEvent (event) end ----* Indicates whether the video player is in full-screen mode.
----* return True if the video player is in full-screen mode, false otherwise. ----@return boolean -function VideoPlayer:isFullScreenEnabled () end ----* Checks whether the VideoPlayer is set with looping mode.
----* return true if the videoplayer is set to loop, false otherwise. ----@return boolean -function VideoPlayer:isLooping () end ----* Checks whether the VideoPlayer is playing.
----* return True if currently playing, false otherwise. ----@return boolean -function VideoPlayer:isPlaying () end ----* brief Set if playback is done in loop mode
----* param looping the video will or not automatically restart at the end ----@param looping boolean ----@return self -function VideoPlayer:setLooping (looping) end ----* Set if the player will enable user input for basic pause and resume of video
----* param enableInput If true, input will be handled for basic functionality (pause/resume) ----@param enableInput boolean ----@return self -function VideoPlayer:setUserInputEnabled (enableInput) end ----* ----@return self -function VideoPlayer:create () end ----* ----@param renderer cc.Renderer ----@param transform mat4_table ----@param flags unsigned_int ----@return self -function VideoPlayer:draw (renderer,transform,flags) end ----* Pauses playback. ----@return self -function VideoPlayer:pause () end ----* ----@return self -function VideoPlayer:onEnter () end ----* ----@return self -function VideoPlayer:onExit () end ----* Resumes playback. ----@return self -function VideoPlayer:resume () end ----* ----@param visible boolean ----@return self -function VideoPlayer:setVisible (visible) end ----* ----@return self -function VideoPlayer:VideoPlayer () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccui/WebView.lua b/meta/3rd/Cocos4.0/library/ccui/WebView.lua deleted file mode 100644 index b89cfbd1..00000000 --- a/meta/3rd/Cocos4.0/library/ccui/WebView.lua +++ /dev/null @@ -1,93 +0,0 @@ ----@meta - ----@class ccui.WebView :ccui.Widget -local WebView={ } -ccui.WebView=WebView - - - - ----* SetOpacity of webview. ----@param opacity float ----@return self -function WebView:setOpacityWebView (opacity) end ----* Gets whether this WebView has a back history item.
----* return WebView has a back history item. ----@return boolean -function WebView:canGoBack () end ----* Sets the main page content and base URL.
----* param string The content for the main page.
----* param baseURL The base URL for the content. ----@param string string ----@param baseURL string ----@return self -function WebView:loadHTMLString (string,baseURL) end ----* Goes forward in the history. ----@return self -function WebView:goForward () end ----* Goes back in the history. ----@return self -function WebView:goBack () end ----* Set WebView should support zooming. The default value is false. ----@param scalesPageToFit boolean ----@return self -function WebView:setScalesPageToFit (scalesPageToFit) end ----* Loads the given fileName.
----* param fileName Content fileName. ----@param fileName string ----@return self -function WebView:loadFile (fileName) end ----@overload fun(string:string,boolean:boolean):self ----@overload fun(string:string):self ----@param url string ----@param cleanCachedData boolean ----@return self -function WebView:loadURL (url,cleanCachedData) end ----* Set whether the webview bounces at end of scroll of WebView. ----@param bounce boolean ----@return self -function WebView:setBounces (bounce) end ----* Evaluates JavaScript in the context of the currently displayed page. ----@param js string ----@return self -function WebView:evaluateJS (js) end ----* set the background transparent ----@return self -function WebView:setBackgroundTransparent () end ----* Get the Javascript callback. ----@return function -function WebView:getOnJSCallback () end ----* Gets whether this WebView has a forward history item.
----* return WebView has a forward history item. ----@return boolean -function WebView:canGoForward () end ----* Stops the current load. ----@return self -function WebView:stopLoading () end ----* getOpacity of webview. ----@return float -function WebView:getOpacityWebView () end ----* Reloads the current URL. ----@return self -function WebView:reload () end ----* Set javascript interface scheme.
----* see WebView::setOnJSCallback() ----@param scheme string ----@return self -function WebView:setJavascriptInterfaceScheme (scheme) end ----* Allocates and initializes a WebView. ----@return self -function WebView:create () end ----* ----@return self -function WebView:onEnter () end ----* Toggle visibility of WebView. ----@param visible boolean ----@return self -function WebView:setVisible (visible) end ----* ----@return self -function WebView:onExit () end ----* Default constructor. ----@return self -function WebView:WebView () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/ccui/Widget.lua b/meta/3rd/Cocos4.0/library/ccui/Widget.lua deleted file mode 100644 index 44c79f9b..00000000 --- a/meta/3rd/Cocos4.0/library/ccui/Widget.lua +++ /dev/null @@ -1,399 +0,0 @@ ----@meta - ----@class ccui.Widget :cc.ProtectedNode@all parent class: ProtectedNode,LayoutParameterProtocol -local Widget={ } -ccui.Widget=Widget - - - - ----* Toggle layout component enable.
----* param enable Layout Component of a widget ----@param enable boolean ----@return self -function Widget:setLayoutComponentEnabled (enable) end ----* Changes the percent that is widget's percent size
----* param percent that is widget's percent size ----@param percent vec2_table ----@return self -function Widget:setSizePercent (percent) end ----* Get the user defined widget size.
----* return User defined size. ----@return size_table -function Widget:getCustomSize () end ----* Gets the left boundary position of this widget in parent's coordination system.
----* return The left boundary position of this widget. ----@return float -function Widget:getLeftBoundary () end ----* Sets whether the widget should be flipped horizontally or not.
----* param flippedX true if the widget should be flipped horizontally, false otherwise. ----@param flippedX boolean ----@return self -function Widget:setFlippedX (flippedX) end ----* Set callback name.
----* param callbackName A string representation of callback name. ----@param callbackName string ----@return self -function Widget:setCallbackName (callbackName) end ----* Gets the inner Renderer node of widget.
----* For example, a button's Virtual Renderer is it's texture renderer.
----* return Node pointer. ----@return cc.Node -function Widget:getVirtualRenderer () end ----* brief Allow widget touch events to propagate to its parents. Set false will disable propagation
----* param isPropagate True to allow propagation, false otherwise.
----* since v3.3 ----@param isPropagate boolean ----@return self -function Widget:setPropagateTouchEvents (isPropagate) end ----* Query whether unify size enable state.
----* return true represent the widget use Unify Size, false represent the widget couldn't use Unify Size ----@return boolean -function Widget:isUnifySizeEnabled () end ----* Get size percent of widget.
----* return Percent size. ----@return vec2_table -function Widget:getSizePercent () end ----* Set the percent(x,y) of the widget in OpenGL coordinates
----* param percent The percent (x,y) of the widget in OpenGL coordinates ----@param percent vec2_table ----@return self -function Widget:setPositionPercent (percent) end ----* Toggle widget swallow touch option.
----* brief Specify widget to swallow touches or not
----* param swallow True to swallow touch, false otherwise.
----* since v3.3 ----@param swallow boolean ----@return self -function Widget:setSwallowTouches (swallow) end ----* Get the content size of widget.
----* warning This API exists mainly for keeping back compatibility.
----* return ----@return size_table -function Widget:getLayoutSize () end ----* Sets whether the widget is highlighted
----* The default value is false, a widget is default to not highlighted
----* param highlight true if the widget is highlighted, false if the widget is not highlighted. ----@param highlight boolean ----@return self -function Widget:setHighlighted (highlight) end ----* Changes the position type of the widget
----* see `PositionType`
----* param type the position type of widget ----@param type int ----@return self -function Widget:setPositionType (type) end ----* Query whether the widget ignores user defined content size or not
----* return True means ignore user defined content size, false otherwise. ----@return boolean -function Widget:isIgnoreContentAdaptWithSize () end ----* Get the virtual renderer's size
----* return Widget virtual renderer size. ----@return size_table -function Widget:getVirtualRendererSize () end ----* Determines if the widget is highlighted
----* return true if the widget is highlighted, false if the widget is not highlighted. ----@return boolean -function Widget:isHighlighted () end ----* Gets LayoutParameter of widget.
----* see LayoutParameter
----* return LayoutParameter ----@return ccui.LayoutParameter -function Widget:getLayoutParameter () end ----* Gets the position type of the widget
----* see `PositionType`
----* return type the position type of widget ----@return int -function Widget:getPositionType () end ----* Gets the top boundary position of this widget in parent's coordination system.
----* return The top boundary position of this widget. ----@return float -function Widget:getTopBoundary () end ----* Toggle whether ignore user defined content size for widget.
----* Set true will ignore user defined content size which means
----* the widget size is always equal to the return value of `getVirtualRendererSize`.
----* param ignore set member variable _ignoreSize to ignore ----@param ignore boolean ----@return self -function Widget:ignoreContentAdaptWithSize (ignore) end ----* When a widget is in a layout, you could call this method to get the next focused widget within a specified direction.
----* If the widget is not in a layout, it will return itself
----* param direction the direction to look for the next focused widget in a layout
----* param current the current focused widget
----* return the next focused widget in a layout ----@param direction int ----@param current ccui.Widget ----@return self -function Widget:findNextFocusedWidget (direction,current) end ----* Determines if the widget is enabled or not.
----* return true if the widget is enabled, false if the widget is disabled. ----@return boolean -function Widget:isEnabled () end ----* Query whether widget is focused or not.
----* return whether the widget is focused or not ----@return boolean -function Widget:isFocused () end ----* Gets the touch began point of widget when widget is selected.
----* return the touch began point. ----@return vec2_table -function Widget:getTouchBeganPosition () end ----* Determines if the widget is touch enabled
----* return true if the widget is touch enabled, false if the widget is touch disabled. ----@return boolean -function Widget:isTouchEnabled () end ----* Query callback name.
----* return The callback name. ----@return string -function Widget:getCallbackName () end ----* Get the action tag.
----* return Action tag. ----@return int -function Widget:getActionTag () end ----* Gets position of widget in world space.
----* return Position of widget in world space. ----@return vec2_table -function Widget:getWorldPosition () end ----* Query widget's focus enable state.
----* return true represent the widget could accept focus, false represent the widget couldn't accept focus ----@return boolean -function Widget:isFocusEnabled () end ----* Toggle widget focus status.
----* param focus pass true to let the widget get focus or pass false to let the widget lose focus ----@param focus boolean ----@return self -function Widget:setFocused (focus) end ----* Set the tag of action.
----* param tag A integer tag value. ----@param tag int ----@return self -function Widget:setActionTag (tag) end ----* Sets whether the widget is touch enabled.
----* The default value is false, a widget is default to touch disabled.
----* param enabled True if the widget is touch enabled, false if the widget is touch disabled. ----@param enabled boolean ----@return self -function Widget:setTouchEnabled (enabled) end ----* Sets whether the widget should be flipped vertically or not.
----* param flippedY true if the widget should be flipped vertically, false otherwise. ----@param flippedY boolean ----@return self -function Widget:setFlippedY (flippedY) end ----* Sets whether the widget is enabled
----* true if the widget is enabled, widget may be touched , false if the widget is disabled, widget cannot be touched.
----* Note: If you want to change the widget's appearance to disabled state, you should also call `setBright(false)`.
----* The default value is true, a widget is default to enable touch.
----* param enabled Set to true to enable touch, false otherwise. ----@param enabled boolean ----@return self -function Widget:setEnabled (enabled) end ----* Gets the right boundary position of this widget in parent's coordination system.
----* return The right boundary position of this widget. ----@return float -function Widget:getRightBoundary () end ----* To set the bright style of widget.
----* see BrightStyle
----* param style BrightStyle::NORMAL means the widget is in normal state, BrightStyle::HIGHLIGHT means the widget is in highlight state. ----@param style int ----@return self -function Widget:setBrightStyle (style) end ----* Sets a LayoutParameter to widget.
----* see LayoutParameter
----* param parameter LayoutParameter pointer ----@param parameter ccui.LayoutParameter ----@return self -function Widget:setLayoutParameter (parameter) end ----* Create a new widget copy of the original one.
----* return A cloned widget copy of original. ----@return self -function Widget:clone () end ----* Allow widget to accept focus.
----* param enable pass true/false to enable/disable the focus ability of a widget ----@param enable boolean ----@return self -function Widget:setFocusEnabled (enable) end ----* Gets the bottom boundary position of this widget in parent's coordination system.
----* return The bottom boundary position of this widget. ----@return float -function Widget:getBottomBoundary () end ----* Determines if the widget is bright
----* return true if the widget is bright, false if the widget is dark. ----@return boolean -function Widget:isBright () end ----* Dispatch a EventFocus through a EventDispatcher
----* param widgetLoseFocus The widget which lose its focus
----* param widgetGetFocus he widget which get its focus ----@param widgetLoseFocus ccui.Widget ----@param widgetGetFocus ccui.Widget ----@return self -function Widget:dispatchFocusEvent (widgetLoseFocus,widgetGetFocus) end ----* Toggle use unify size.
----* param enable True to use unify size, false otherwise. ----@param enable boolean ----@return self -function Widget:setUnifySizeEnabled (enable) end ----* Return whether the widget is propagate touch events to its parents or not
----* return whether touch event propagation is allowed or not.
----* since v3.3 ----@return boolean -function Widget:isPropagateTouchEvents () end ----* Checks a point is in widget's content space.
----* This function is used for determining touch area of widget.
----* param pt The point in `Vec2`.
----* param camera The camera look at widget, used to convert GL screen point to near/far plane.
----* param p Point to a Vec3 for store the intersect point, if don't need them set to nullptr.
----* return true if the point is in widget's content space, false otherwise. ----@param pt vec2_table ----@param camera cc.Camera ----@param p vec3_table ----@return boolean -function Widget:hitTest (pt,camera,p) end ----* Query whether layout component is enabled or not.
----* return true represent the widget use Layout Component, false represent the widget couldn't use Layout Component. ----@return boolean -function Widget:isLayoutComponentEnabled () end ----* when a widget calls this method, it will get focus immediately. ----@return self -function Widget:requestFocus () end ----@overload fun(size_table:size_table):self ----@overload fun():self ----@param parentSize size_table ----@return self -function Widget:updateSizeAndPosition (parentSize) end ----* This method is called when a focus change event happens
----* param widgetLostFocus The widget which lose its focus
----* param widgetGetFocus The widget which get its focus ----@param widgetLostFocus ccui.Widget ----@param widgetGetFocus ccui.Widget ----@return self -function Widget:onFocusChange (widgetLostFocus,widgetGetFocus) end ----* ----@return vec2_table -function Widget:getTouchMovePosition () end ----* Gets the size type of widget.
----* see `SizeType` ----@return int -function Widget:getSizeType () end ----* Query callback type.
----* return Callback type string. ----@return string -function Widget:getCallbackType () end ----* ----@return vec2_table -function Widget:getTouchEndPosition () end ----* Gets the percent (x,y) of the widget in OpenGL coordinates
----* see setPosition(const Vec2&)
----* return The percent (x,y) of the widget in OpenGL coordinates ----@return vec2_table -function Widget:getPositionPercent () end ----* brief Propagate touch events to its parents ----@param event int ----@param sender ccui.Widget ----@param touch cc.Touch ----@return self -function Widget:propagateTouchEvent (event,sender,touch) end ----* Returns the flag which indicates whether the widget is flipped horizontally or not.
----* It not only flips the texture of the widget, but also the texture of the widget's children.
----* Also, flipping relies on widget's anchor point.
----* Internally, it just use setScaleX(-1) to flip the widget.
----* return true if the widget is flipped horizontally, false otherwise. ----@return boolean -function Widget:isFlippedX () end ----* Return the flag which indicates whether the widget is flipped vertically or not.
----* It not only flips the texture of the widget, but also the texture of the widget's children.
----* Also, flipping relies on widget's anchor point.
----* Internally, it just use setScaleY(-1) to flip the widget.
----* return true if the widget is flipped vertically, false otherwise. ----@return boolean -function Widget:isFlippedY () end ----* Checks a point if in parent's area.
----* param pt A point in `Vec2`.
----* return true if the point is in parent's area, false otherwise. ----@param pt vec2_table ----@return boolean -function Widget:isClippingParentContainsPoint (pt) end ----* Changes the size type of widget.
----* see `SizeType`
----* param type that is widget's size type ----@param type int ----@return self -function Widget:setSizeType (type) end ----* ----@param event int ----@param sender ccui.Widget ----@param touch cc.Touch ----@return self -function Widget:interceptTouchEvent (event,sender,touch) end ----* Sets whether the widget is bright
----* The default value is true, a widget is default to bright
----* param bright true if the widget is bright, false if the widget is dark. ----@param bright boolean ----@return self -function Widget:setBright (bright) end ----* Set callback type.
----* param callbackType A string representation of callback type. ----@param callbackType string ----@return self -function Widget:setCallbackType (callbackType) end ----* Return whether the widget is swallowing touch or not
----* return Whether touch is swallowed.
----* since v3.3 ----@return boolean -function Widget:isSwallowTouches () end ----* ----@param enable boolean ----@return self -function Widget:enableDpadNavigation (enable) end ----* Return a current focused widget in your UI scene.
----* No matter what widget object you call this method on , it will return you the exact one focused widget. ----@return self -function Widget:getCurrentFocusedWidget () end ----* Create and return a empty Widget instance pointer. ----@return self -function Widget:create () end ----* ----@param scaleY float ----@return self -function Widget:setScaleY (scaleY) end ----* ----@param scaleX float ----@return self -function Widget:setScaleX (scaleX) end ----* ----@return float -function Widget:getScaleY () end ----* ----@return float -function Widget:getScaleX () end ----* Returns the string representation of widget class name
----* return get the class description. ----@return string -function Widget:getDescription () end ----@overload fun(float:float,float:float):self ----@overload fun(float:float):self ----@param scalex float ----@param scaley float ----@return self -function Widget:setScale (scalex,scaley) end ----* ----@return boolean -function Widget:init () end ----* Changes the position (x,y) of the widget in OpenGL coordinates
----* Usually we use p(x,y) to compose a Vec2 object.
----* The original point (0,0) is at the left-bottom corner of screen.
----* param pos The position (x,y) of the widget in OpenGL coordinates ----@param pos vec2_table ----@return self -function Widget:setPosition (pos) end ----* Changes the size that is widget's size
----* param contentSize A content size in `Size`. ----@param contentSize size_table ----@return self -function Widget:setContentSize (contentSize) end ----* ----@return float -function Widget:getScale () end ----* Default constructor
----* js ctor
----* lua new ----@return self -function Widget:Widget () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/global.lua b/meta/3rd/Cocos4.0/library/global.lua deleted file mode 100644 index 2ccdbb66..00000000 --- a/meta/3rd/Cocos4.0/library/global.lua +++ /dev/null @@ -1,216 +0,0 @@ ----@meta - ----require emmylua 0.3.36 - ----@class ccui -ccui={} ----@class cc -cc={} ----@class ccs -ccs={} ----@class ccb -ccb={} ----@class sp -sp={} ----@class cc.ResourceData - ----@class int - ----@class float - ----@class size_table - ----@class unsigned_int - ----@class vec3_table - ----@class array_table - ----@class char - ----@class vec2_table - ----@class ccs.ActionNode - ----@class ccs.AnimationInfo - ----@class color3b_table - ----@class unsigned_char - ----@class map_table - ----@class rect_table - ----@class cc.Animation3DData - ----@class cc.BlendFunc - ----@class mat4_table - ----@class void - ----@class cc.TextureAtlas - ----@class cc.Bone3D - ----@class color4b_table - ----@class cc._ccBezierConfig - ----@class ccs.ColliderDetector - ----@class color4f_table - ----@class cc.SkinData - ----@class cc.MaterialDatas - ----@class cc.NodeDatas - ----@class cc.AABB - ----@class cc.Viewport - ----@class cc.Camer - ----@class point_table - ----@class unsigned short - ----@class color3b_tabl - ----@class double - ----@class cc.IMEKeyboardNotificationInfo - ----@class cc.Value - ----@class floa - ----@class boo - ----@class GLContextAttrs - ----@class cc._ttfConfig - ----@class cc.FontAtlas - ----@class cc.backend.ProgramState - ----@class cc.MeshCommand - ----@class cc.backend.Buffer - ----@class cc.MeshVertexAttrib - ----@class vec4_table - ----@class cc.MeshIndexData - ----@class cc.MeshSkin - ----@class cc.Quaternion - ----@class cc.OffMeshLinkData - ----@class cc.NavMeshAgentParam - ----@class cc.AffineTransform - ----@class cc.Particle3DAffector - ----@class cc.Particle3DRender - ----@class cc.Particle3DEmitter - ----@class voi - ----@class unsigned in - ----@class cc.VertexAttribBinding - ----@class cc.backend.TextureBacken - ----@class btTypedConstraint - ----@class btRigidBody - ----@class cc.Physics3DRigidBodyDes - ----@class btCollisionShape - ----@class cpBody - ----@class cc.PhysicsMaterial - ----@class cc.PhysicsContactData - ----@class cc.V3F_C4B_T2F_Quad - ----@class cc.TrianglesCommand.Triangles - ----@class cc.backend.UniformLocation - ----@class cc.backend.Program - ----@class cc.backend.TextureBackend - ----@class long - ----@class cc.PUEmitter - ----@class cc.PUListener - ----@class cc.PUBehaviour - ----@class cc.PUParticle3D - ----@class cc.PUObserver - ----@class cc.RenderCommand - ----@class cc.ScissorRect - ----@class cc.MeshComman - ----@class cc.backend.ShaderCache - ----@class cc.backend.ShaderModule - ----@class spTrackEntry - ----@class spAnimation - ----@class spAtlas - ----@class spSkeletonData - ----@class spVertexEffect - ----@class spSkeleton - ----@class cc.TextureCub - ----@class cc.ScrollView - ----@class cc.Terrain.DetailMap - ----@class cc.Terrain.TerrainData - ----@class cc.FontDefinition - ----@class cc.backend.Texture2DBackend - ----@class cc.backend.SamplerDescriptor - ----@class cc.backend.TextureDescriptor - ----@class cc.backend.SamplerDescripto - ----@class cc.backend.TextureCubemapBackend - ----@class short - ----@class cc.backend.VertexLayout - diff --git a/meta/3rd/Cocos4.0/library/sp/SkeletonAnimation.lua b/meta/3rd/Cocos4.0/library/sp/SkeletonAnimation.lua deleted file mode 100644 index da925d3c..00000000 --- a/meta/3rd/Cocos4.0/library/sp/SkeletonAnimation.lua +++ /dev/null @@ -1,114 +0,0 @@ ----@meta - ----@class sp.SkeletonAnimation :sp.SkeletonRenderer -local SkeletonAnimation={ } -sp.SkeletonAnimation=SkeletonAnimation - - - - ----* ----@param entry spTrackEntry ----@param listener function ----@return self -function SkeletonAnimation:setTrackCompleteListener (entry,listener) end ----* ----@param name string ----@return spAnimation -function SkeletonAnimation:findAnimation (name) end ----* ----@param listener function ----@return self -function SkeletonAnimation:setCompleteListener (listener) end ----* ----@param fromAnimation string ----@param toAnimation string ----@param duration float ----@return self -function SkeletonAnimation:setMix (fromAnimation,toAnimation,duration) end ----* ----@param entry spTrackEntry ----@param listener function ----@return self -function SkeletonAnimation:setTrackStartListener (entry,listener) end ----* ----@param trackIndex int ----@param mixDuration float ----@param delay float ----@return spTrackEntry -function SkeletonAnimation:addEmptyAnimation (trackIndex,mixDuration,delay) end ----* ----@param listener function ----@return self -function SkeletonAnimation:setDisposeListener (listener) end ----* ----@param entry spTrackEntry ----@param listener function ----@return self -function SkeletonAnimation:setTrackInterruptListener (entry,listener) end ----* ----@param listener function ----@return self -function SkeletonAnimation:setEndListener (listener) end ----* ----@param entry spTrackEntry ----@param listener function ----@return self -function SkeletonAnimation:setTrackDisposeListener (entry,listener) end ----* ----@param listener function ----@return self -function SkeletonAnimation:setEventListener (listener) end ----* ----@param trackIndex int ----@param mixDuration float ----@return spTrackEntry -function SkeletonAnimation:setEmptyAnimation (trackIndex,mixDuration) end ----* ----@param entry spTrackEntry ----@param listener function ----@return self -function SkeletonAnimation:setTrackEventListener (entry,listener) end ----* ----@return self -function SkeletonAnimation:clearTrack () end ----* ----@param listener function ----@return self -function SkeletonAnimation:setInterruptListener (listener) end ----* ----@param mixDuration float ----@return self -function SkeletonAnimation:setEmptyAnimations (mixDuration) end ----* ----@return self -function SkeletonAnimation:clearTracks () end ----* ----@param entry spTrackEntry ----@param listener function ----@return self -function SkeletonAnimation:setTrackEndListener (entry,listener) end ----* ----@param listener function ----@return self -function SkeletonAnimation:setStartListener (listener) end ----@overload fun(string:string,spAtlas1:string,float:float):self ----@overload fun(string:string,spAtlas:spAtlas,float:float):self ----@param skeletonBinaryFile string ----@param atlas spAtlas ----@param scale float ----@return self -function SkeletonAnimation:createWithBinaryFile (skeletonBinaryFile,atlas,scale) end ----* ----@return self -function SkeletonAnimation:create () end ----@overload fun(string:string,spAtlas1:string,float:float):self ----@overload fun(string:string,spAtlas:spAtlas,float:float):self ----@param skeletonJsonFile string ----@param atlas spAtlas ----@param scale float ----@return self -function SkeletonAnimation:createWithJsonFile (skeletonJsonFile,atlas,scale) end ----* ----@return self -function SkeletonAnimation:initialize () end \ No newline at end of file diff --git a/meta/3rd/Cocos4.0/library/sp/SkeletonRenderer.lua b/meta/3rd/Cocos4.0/library/sp/SkeletonRenderer.lua deleted file mode 100644 index c8a618d7..00000000 --- a/meta/3rd/Cocos4.0/library/sp/SkeletonRenderer.lua +++ /dev/null @@ -1,129 +0,0 @@ ----@meta - ----@class sp.SkeletonRenderer :cc.Node@all parent class: Node,BlendProtocol -local SkeletonRenderer={ } -sp.SkeletonRenderer=SkeletonRenderer - - - - ----* ----@param scale float ----@return self -function SkeletonRenderer:setTimeScale (scale) end ----* ----@return boolean -function SkeletonRenderer:getDebugSlotsEnabled () end ----* ----@return self -function SkeletonRenderer:setBonesToSetupPose () end ----* ----@param skeletonData spSkeletonData ----@param ownsSkeletonData boolean ----@return self -function SkeletonRenderer:initWithData (skeletonData,ownsSkeletonData) end ----* ----@param enabled boolean ----@return self -function SkeletonRenderer:setDebugSlotsEnabled (enabled) end ----@overload fun(string:string,spAtlas1:string,float:float):self ----@overload fun(string:string,spAtlas:spAtlas,float:float):self ----@param skeletonDataFile string ----@param atlas spAtlas ----@param scale float ----@return self -function SkeletonRenderer:initWithJsonFile (skeletonDataFile,atlas,scale) end ----* ----@return self -function SkeletonRenderer:setSlotsToSetupPose () end ----@overload fun(string:string,spAtlas1:string,float:float):self ----@overload fun(string:string,spAtlas:spAtlas,float:float):self ----@param skeletonDataFile string ----@param atlas spAtlas ----@param scale float ----@return self -function SkeletonRenderer:initWithBinaryFile (skeletonDataFile,atlas,scale) end ----* ----@return self -function SkeletonRenderer:setToSetupPose () end ----* ----@param enabled boolean ----@return self -function SkeletonRenderer:setDebugMeshesEnabled (enabled) end ----* ----@return boolean -function SkeletonRenderer:isTwoColorTint () end ----* ----@return cc.BlendFunc -function SkeletonRenderer:getBlendFunc () end ----* ----@return self -function SkeletonRenderer:initialize () end ----* ----@param enabled boolean ----@return self -function SkeletonRenderer:setDebugBonesEnabled (enabled) end ----* ----@return boolean -function SkeletonRenderer:getDebugBonesEnabled () end ----* ----@return float -function SkeletonRenderer:getTimeScale () end ----* ----@param enabled boolean ----@return self -function SkeletonRenderer:setTwoColorTint (enabled) end ----* ----@return boolean -function SkeletonRenderer:getDebugMeshesEnabled () end ----* ----@param blendFunc cc.BlendFunc ----@return self -function SkeletonRenderer:setBlendFunc (blendFunc) end ----* ----@param effect spVertexEffect ----@return self -function SkeletonRenderer:setVertexEffect (effect) end ----@overload fun(string0:char):self ----@overload fun(string:string):self ----@param skinName string ----@return boolean -function SkeletonRenderer:setSkin (skinName) end ----* ----@return spSkeleton -function SkeletonRenderer:getSkeleton () end ----@overload fun(string:string,spAtlas1:string,float:float):self ----@overload fun(string:string,spAtlas:spAtlas,float:float):self ----@param skeletonDataFile string ----@param atlas spAtlas ----@param scale float ----@return self -function SkeletonRenderer:createWithFile (skeletonDataFile,atlas,scale) end ----* ----@return self -function SkeletonRenderer:create () end ----* ----@return self -function SkeletonRenderer:onEnter () end ----* ----@return self -function SkeletonRenderer:onExit () end ----* ----@param value boolean ----@return self -function SkeletonRenderer:setOpacityModifyRGB (value) end ----* ----@return rect_table -function SkeletonRenderer:getBoundingBox () end ----* ----@return boolean -function SkeletonRenderer:isOpacityModifyRGB () end ----@overload fun(string0:spSkeletonData,string1:boolean):self ----@overload fun():self ----@overload fun(string:string,string1:spAtlas,float:float):self ----@overload fun(string:string,string:string,float:float):self ----@param skeletonDataFile string ----@param atlasFile string ----@param scale float ----@return self -function SkeletonRenderer:SkeletonRenderer (skeletonDataFile,atlasFile,scale) end \ No newline at end of file -- cgit v1.2.3 From 5c4de8b92476352431fa7383f50800389c27cce3 Mon Sep 17 00:00:00 2001 From: carsakiller Date: Fri, 27 Oct 2023 20:42:07 -0400 Subject: refactor: replace Defold with LuaCATS submodule --- meta/3rd/Defold | 1 + meta/3rd/Defold/config.json | 22 - meta/3rd/Defold/library/base.lua | 83 --- meta/3rd/Defold/library/buffer.lua | 68 -- meta/3rd/Defold/library/built-ins.lua | 24 - meta/3rd/Defold/library/collection_factory.lua | 54 -- meta/3rd/Defold/library/collection_proxy.lua | 9 - meta/3rd/Defold/library/collision_object.lua | 149 ---- meta/3rd/Defold/library/factory.lua | 47 -- meta/3rd/Defold/library/game_object.lua | 340 --------- meta/3rd/Defold/library/gui.lua | 929 ------------------------- meta/3rd/Defold/library/html5.lua | 23 - meta/3rd/Defold/library/http.lua | 18 - meta/3rd/Defold/library/image.lua | 20 - meta/3rd/Defold/library/json.lua | 20 - meta/3rd/Defold/library/label.lua | 20 - meta/3rd/Defold/library/luasocket.lua | 484 ------------- meta/3rd/Defold/library/message.lua | 56 -- meta/3rd/Defold/library/model.lua | 43 -- meta/3rd/Defold/library/particle_effects.lua | 52 -- meta/3rd/Defold/library/profiler.lua | 89 --- meta/3rd/Defold/library/render.lua | 439 ------------ meta/3rd/Defold/library/resource.lua | 181 ----- meta/3rd/Defold/library/sound.lua | 126 ---- meta/3rd/Defold/library/sprite.lua | 32 - meta/3rd/Defold/library/system.lua | 161 ----- meta/3rd/Defold/library/tilemap.lua | 78 --- meta/3rd/Defold/library/timer.lua | 36 - meta/3rd/Defold/library/vector_math.lua | 406 ----------- meta/3rd/Defold/library/window.lua | 56 -- meta/3rd/Defold/library/zlib.lua | 18 - 31 files changed, 1 insertion(+), 4083 deletions(-) create mode 160000 meta/3rd/Defold delete mode 100644 meta/3rd/Defold/config.json delete mode 100644 meta/3rd/Defold/library/base.lua delete mode 100644 meta/3rd/Defold/library/buffer.lua delete mode 100644 meta/3rd/Defold/library/built-ins.lua delete mode 100644 meta/3rd/Defold/library/collection_factory.lua delete mode 100644 meta/3rd/Defold/library/collection_proxy.lua delete mode 100644 meta/3rd/Defold/library/collision_object.lua delete mode 100644 meta/3rd/Defold/library/factory.lua delete mode 100644 meta/3rd/Defold/library/game_object.lua delete mode 100644 meta/3rd/Defold/library/gui.lua delete mode 100644 meta/3rd/Defold/library/html5.lua delete mode 100644 meta/3rd/Defold/library/http.lua delete mode 100644 meta/3rd/Defold/library/image.lua delete mode 100644 meta/3rd/Defold/library/json.lua delete mode 100644 meta/3rd/Defold/library/label.lua delete mode 100644 meta/3rd/Defold/library/luasocket.lua delete mode 100644 meta/3rd/Defold/library/message.lua delete mode 100644 meta/3rd/Defold/library/model.lua delete mode 100644 meta/3rd/Defold/library/particle_effects.lua delete mode 100644 meta/3rd/Defold/library/profiler.lua delete mode 100644 meta/3rd/Defold/library/render.lua delete mode 100644 meta/3rd/Defold/library/resource.lua delete mode 100644 meta/3rd/Defold/library/sound.lua delete mode 100644 meta/3rd/Defold/library/sprite.lua delete mode 100644 meta/3rd/Defold/library/system.lua delete mode 100644 meta/3rd/Defold/library/tilemap.lua delete mode 100644 meta/3rd/Defold/library/timer.lua delete mode 100644 meta/3rd/Defold/library/vector_math.lua delete mode 100644 meta/3rd/Defold/library/window.lua delete mode 100644 meta/3rd/Defold/library/zlib.lua (limited to 'meta') diff --git a/meta/3rd/Defold b/meta/3rd/Defold new file mode 160000 index 00000000..05379b40 --- /dev/null +++ b/meta/3rd/Defold @@ -0,0 +1 @@ +Subproject commit 05379b40fb3084d82f7270475e42da8d521c4dae diff --git a/meta/3rd/Defold/config.json b/meta/3rd/Defold/config.json deleted file mode 100644 index 5ab875d9..00000000 --- a/meta/3rd/Defold/config.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name" : "Defold", - "files" : ["game.project", "*%.script", "*%.gui_script"], - "settings" : { - "Lua.runtime.version" : "Lua 5.1", - "Lua.workspace.library" : [".internal"], - "Lua.workspace.ignoreDir" : [".internal"], - "Lua.diagnostics.globals" : [ - "on_input", - "on_message", - "init", - "update", - "final" - ], - "files.associations" : { - "*.script" : "lua", - "*.gui_script" : "lua", - "*.render_script" : "lua", - "*.editor_script" : "lua" - } - } -} diff --git a/meta/3rd/Defold/library/base.lua b/meta/3rd/Defold/library/base.lua deleted file mode 100644 index 5aac30df..00000000 --- a/meta/3rd/Defold/library/base.lua +++ /dev/null @@ -1,83 +0,0 @@ -------@meta ---- ---- ----@class vector3 ----@field x number ----@field y number ----@field z number ----@operator sub(vector3): vector3 ----@operator add(vector3): vector3 - ----@class vector4 ----@field x number ----@field y number ----@field z number ----@field w number ----@operator sub(vector4): vector4 ----@operator add(vector4): vector4 - ----@class quaternion ----@field x number ----@field y number ----@field z number ----@field w number - ----@alias quat quaternion - ----@class url string|hash ----@field socket string|hash ----@field path string|hash ----@field fragment string|hash - ----@alias hash userdata ----@alias constant userdata ----@alias bool boolean ----@alias float number ----@alias object userdata ----@alias matrix4 userdata ----@alias node userdata - ---mb use number instead of vector4 ----@alias vector vector4 - ---luasocket ----@alias master userdata ----@alias unconnected userdata ----@alias client userdata - ---render ----@alias constant_buffer userdata ----@alias render_target userdata ----@alias predicate userdata - ---- Calls error if the value of its argument `v` is false (i.e., **nil** or ---- **false**); otherwise, returns all its arguments. In case of error, ---- `message` is the error object; when absent, it defaults to "assertion ---- failed!" ----@generic ANY ----@overload fun(v:any):any ----@param v ANY ----@param message string ----@return ANY -function assert(v,message) return v end - ----@param self object -function init(self) end - ----@param self object ----@param dt number -function update(self, dt) end - ----@param self object ----@param message_id hash ----@param message table ----@param sender url -function on_message(self, message_id, message, sender) end - ----@param self object ----@param action_id hash ----@param action table -function on_input(self, action_id, action) end - ----@param self object -function final(self) end; diff --git a/meta/3rd/Defold/library/buffer.lua b/meta/3rd/Defold/library/buffer.lua deleted file mode 100644 index d5841e3c..00000000 --- a/meta/3rd/Defold/library/buffer.lua +++ /dev/null @@ -1,68 +0,0 @@ ----Buffer API documentation ----Functions for manipulating buffers and streams ----@class buffer -buffer = {} ----float32 -buffer.VALUE_TYPE_FLOAT32 = nil ----int16 -buffer.VALUE_TYPE_INT16 = nil ----int32 -buffer.VALUE_TYPE_INT32 = nil ----int64 -buffer.VALUE_TYPE_INT64 = nil ----int8 -buffer.VALUE_TYPE_INT8 = nil ----uint16 -buffer.VALUE_TYPE_UINT16 = nil ----uint32 -buffer.VALUE_TYPE_UINT32 = nil ----uint64 -buffer.VALUE_TYPE_UINT64 = nil ----uint8 -buffer.VALUE_TYPE_UINT8 = nil ----Copy all data streams from one buffer to another, element wise. ---- Each of the source streams must have a matching stream in the ----destination buffer. The streams must match in both type and size. ----The source and destination buffer can be the same. ----@param dst buffer # the destination buffer ----@param dstoffset number # the offset to start copying data to ----@param src buffer # the source data buffer ----@param srcoffset number # the offset to start copying data from ----@param count number # the number of elements to copy -function buffer.copy_buffer(dst, dstoffset, src, srcoffset, count) end - ----Copy a specified amount of data from one stream to another. ---- The value type and size must match between source and destination streams. ----The source and destination streams can be the same. ----@param dst bufferstream # the destination stream ----@param dstoffset number # the offset to start copying data to (measured in value type) ----@param src bufferstream # the source data stream ----@param srcoffset number # the offset to start copying data from (measured in value type) ----@param count number # the number of values to copy (measured in value type) -function buffer.copy_stream(dst, dstoffset, src, srcoffset, count) end - ----Create a new data buffer containing a specified set of streams. A data buffer ----can contain one or more streams with typed data. This is useful for managing ----compound data, for instance a vertex buffer could contain separate streams for ----vertex position, color, normal etc. ----@param element_count number # The number of elements the buffer should hold ----@param declaration table # A table where each entry (table) describes a stream ----@return buffer # the new buffer -function buffer.create(element_count, declaration) end - ----Get a copy of all the bytes from a specified stream as a Lua string. ----@param buffer buffer # the source buffer ----@param stream_name hash # the name of the stream ----@return string # the buffer data as a Lua string -function buffer.get_bytes(buffer, stream_name) end - ----Get a specified stream from a buffer. ----@param buffer buffer # the buffer to get the stream from ----@param stream_name hash|string # the stream name ----@return bufferstream # the data stream -function buffer.get_stream(buffer, stream_name) end - - - - -return buffer \ No newline at end of file diff --git a/meta/3rd/Defold/library/built-ins.lua b/meta/3rd/Defold/library/built-ins.lua deleted file mode 100644 index 9365baf0..00000000 --- a/meta/3rd/Defold/library/built-ins.lua +++ /dev/null @@ -1,24 +0,0 @@ ----Built-ins API documentation ----Built-in scripting functions. - ----All ids in the engine are represented as hashes, so a string needs to be hashed ----before it can be compared with an id. ----@param s string # string to hash ----@return hash # a hashed string -function hash(s) end - ----Returns a hexadecimal representation of a hash value. ----The returned string is always padded with leading zeros. ----@param h hash # hash value to get hex string for ----@return string # hex representation of the hash -function hash_to_hex(h) end - ----Pretty printing of Lua values. This function prints Lua values ----in a manner similar to +print()+, but will also recurse into tables ----and pretty print them. There is a limit to how deep the function ----will recurse. ----@param v any # value to print -function pprint(v) end - - - diff --git a/meta/3rd/Defold/library/collection_factory.lua b/meta/3rd/Defold/library/collection_factory.lua deleted file mode 100644 index e96137a8..00000000 --- a/meta/3rd/Defold/library/collection_factory.lua +++ /dev/null @@ -1,54 +0,0 @@ ----Collection factory API documentation ----Functions for controlling collection factory components which are ----used to dynamically spawn collections into the runtime. ----@class collectionfactory -collectionfactory = {} ----loaded -collectionfactory.STATUS_LOADED = nil ----loading -collectionfactory.STATUS_LOADING = nil ----unloaded -collectionfactory.STATUS_UNLOADED = nil ----The URL identifies the collectionfactory component that should do the spawning. ----Spawning is instant, but spawned game objects get their first update calls the following frame. The supplied parameters for position, rotation and scale ----will be applied to the whole collection when spawned. ----Script properties in the created game objects can be overridden through ----a properties-parameter table. The table should contain game object ids ----(hash) as keys and property tables as values to be used when initiating each ----spawned game object. ----See go.property for more information on script properties. ----The function returns a table that contains a key for each game object ----id (hash), as addressed if the collection file was top level, and the ----corresponding spawned instance id (hash) as value with a unique path ----prefix added to each instance. ---- Calling collectionfactory.create <> create on a collection factory that is marked as dynamic without having loaded resources ----using collectionfactory.load <> will synchronously load and create resources which may affect application performance. ----@param url string|hash|url # the collection factory component to be used ----@param position vector3? # position to assign to the newly spawned collection ----@param rotation quaternion? # rotation to assign to the newly spawned collection ----@param properties table? # table of script properties to propagate to any new game object instances ----@param scale number? # uniform scaling to apply to the newly spawned collection (must be greater than 0). ----@return table # a table mapping the id:s from the collection to the new instance id:s -function collectionfactory.create(url, position, rotation, properties, scale) end - ----This returns status of the collection factory. ----Calling this function when the factory is not marked as dynamic loading always returns COMP_COLLECTION_FACTORY_STATUS_LOADED. ----@param url string|hash|url? # the collection factory component to get status from ----@return constant # status of the collection factory component -function collectionfactory.get_status(url) end - ----Resources loaded are referenced by the collection factory component until the existing (parent) collection is destroyed or collectionfactory.unload is called. ----Calling this function when the factory is not marked as dynamic loading does nothing. ----@param url string|hash|url? # the collection factory component to load ----@param complete_function (fun(self: object, url: url, result: boolean))? # function to call when resources are loaded. -function collectionfactory.load(url, complete_function) end - ----This decreases the reference count for each resource loaded with collectionfactory.load. If reference is zero, the resource is destroyed. ----Calling this function when the factory is not marked as dynamic loading does nothing. ----@param url string|hash|url? # the collection factory component to unload -function collectionfactory.unload(url) end - - - - -return collectionfactory \ No newline at end of file diff --git a/meta/3rd/Defold/library/collection_proxy.lua b/meta/3rd/Defold/library/collection_proxy.lua deleted file mode 100644 index d49ed6d1..00000000 --- a/meta/3rd/Defold/library/collection_proxy.lua +++ /dev/null @@ -1,9 +0,0 @@ ----Collection proxy API documentation ----Messages for controlling and interacting with collection proxies ----which are used to dynamically load collections into the runtime. ----@class collectionproxy -collectionproxy = {} - - - -return collectionproxy \ No newline at end of file diff --git a/meta/3rd/Defold/library/collision_object.lua b/meta/3rd/Defold/library/collision_object.lua deleted file mode 100644 index 41a6ac6a..00000000 --- a/meta/3rd/Defold/library/collision_object.lua +++ /dev/null @@ -1,149 +0,0 @@ ----Collision object physics API documentation ----Collision object physics API documentation ----@class physics -physics = {} ----fixed joint type -physics.JOINT_TYPE_FIXED = nil ----hinge joint type -physics.JOINT_TYPE_HINGE = nil ----slider joint type -physics.JOINT_TYPE_SLIDER = nil ----spring joint type -physics.JOINT_TYPE_SPRING = nil ----weld joint type -physics.JOINT_TYPE_WELD = nil ----Create a physics joint between two collision object components. ----Note: Currently only supported in 2D physics. ----@param joint_type number # the joint type ----@param collisionobject_a string|hash|url # first collision object ----@param joint_id string|hash # id of the joint ----@param position_a vector3 # local position where to attach the joint on the first collision object ----@param collisionobject_b string|hash|url # second collision object ----@param position_b vector3 # local position where to attach the joint on the second collision object ----@param properties table? # optional joint specific properties table See each joint type for possible properties field. The one field that is accepted for all joint types is: - boolean collide_connected: Set this flag to true if the attached bodies should collide. -function physics.create_joint(joint_type, collisionobject_a, joint_id, position_a, collisionobject_b, position_b, properties) end - ----Destroy an already physics joint. The joint has to be created before a ----destroy can be issued. ----Note: Currently only supported in 2D physics. ----@param collisionobject string|hash|url # collision object where the joint exist ----@param joint_id string|hash # id of the joint -function physics.destroy_joint(collisionobject, joint_id) end - ----Get the gravity in runtime. The gravity returned is not global, it will return ----the gravity for the collection that the function is called from. ----Note: For 2D physics the z component will always be zero. ----@return vector3 # gravity vector of collection -function physics.get_gravity() end - ----Returns the group name of a collision object as a hash. ----@param url string|hash|url # the collision object to return the group of. ----@return hash # hash value of the group. local function check_is_enemy() local group = physics.get_group("#collisionobject") return group == hash("enemy") end -function physics.get_group(url) end - ----Get a table for properties for a connected joint. The joint has to be created before ----properties can be retrieved. ----Note: Currently only supported in 2D physics. ----@param collisionobject string|hash|url # collision object where the joint exist ----@param joint_id string|hash # id of the joint ----@return table # properties table. See the joint types for what fields are available, the only field available for all types is: -function physics.get_joint_properties(collisionobject, joint_id) end - ----Get the reaction force for a joint. The joint has to be created before ----the reaction force can be calculated. ----Note: Currently only supported in 2D physics. ----@param collisionobject string|hash|url # collision object where the joint exist ----@param joint_id string|hash # id of the joint ----@return vector3 # reaction force for the joint -function physics.get_joint_reaction_force(collisionobject, joint_id) end - ----Get the reaction torque for a joint. The joint has to be created before ----the reaction torque can be calculated. ----Note: Currently only supported in 2D physics. ----@param collisionobject string|hash|url # collision object where the joint exist ----@param joint_id string|hash # id of the joint ----@return float # the reaction torque on bodyB in N*m. -function physics.get_joint_reaction_torque(collisionobject, joint_id) end - ----Returns true if the specified group is set in the mask of a collision ----object, false otherwise. ----@param url string|hash|url # the collision object to check the mask of. ----@param group string # the name of the group to check for. ----@return boolean # boolean value of the maskbit. 'true' if present, 'false' otherwise. local function is_invincible() -- check if the collisionobject would collide with the "bullet" group local invincible = physics.get_maskbit("#collisionobject", "bullet") return invincible end -function physics.get_maskbit(url, group) end - ----Ray casts are used to test for intersections against collision objects in the physics world. ----Collision objects of types kinematic, dynamic and static are tested against. Trigger objects ----do not intersect with ray casts. ----Which collision objects to hit is filtered by their collision groups and can be configured ----through groups. ----@param from vector3 # the world position of the start of the ray ----@param to vector3 # the world position of the end of the ray ----@param groups table # a lua table containing the hashed groups for which to test collisions against ----@param options table # a lua table containing options for the raycast. ----@return table # It returns a list. If missed it returns nil. See ray_cast_response for details on the returned values. -function physics.raycast(from, to, groups, options) end - ----Ray casts are used to test for intersections against collision objects in the physics world. ----Collision objects of types kinematic, dynamic and static are tested against. Trigger objects ----do not intersect with ray casts. ----Which collision objects to hit is filtered by their collision groups and can be configured ----through groups. ----The actual ray cast will be performed during the physics-update. ---- ---- ---- * If an object is hit, the result will be reported via a ray_cast_response message. ---- ---- * If there is no object hit, the result will be reported via a ray_cast_missed message. ----@param from vector3 # the world position of the start of the ray ----@param to vector3 # the world position of the end of the ray ----@param groups table # a lua table containing the hashed groups for which to test collisions against ----@param request_id number] a number between [0,-255? # . It will be sent back in the response for identification, 0 by default -function physics.raycast_async(from, to, groups, request_id) end - ----Set the gravity in runtime. The gravity change is not global, it will only affect ----the collection that the function is called from. ----Note: For 2D physics the z component of the gravity vector will be ignored. ----@param gravity vector3 # the new gravity vector -function physics.set_gravity(gravity) end - ----Updates the group property of a collision object to the specified ----string value. The group name should exist i.e. have been used in ----a collision object in the editor. ----@param url string|hash|url # the collision object affected. ----@param group string # the new group name to be assigned. local function change_collision_group() physics.set_group("#collisionobject", "enemy") end -function physics.set_group(url, group) end - ----Flips the collision shapes horizontally for a collision object ----@param url string|hash|url # the collision object that should flip its shapes ----@param flip boolean # true if the collision object should flip its shapes, false if not -function physics.set_hflip(url, flip) end - ----Updates the properties for an already connected joint. The joint has to be created before ----properties can be changed. ----Note: Currently only supported in 2D physics. ----@param collisionobject string|hash|url # collision object where the joint exist ----@param joint_id string|hash # id of the joint ----@param properties table # joint specific properties table Note: The collide_connected field cannot be updated/changed after a connection has been made. -function physics.set_joint_properties(collisionobject, joint_id, properties) end - ----Sets or clears the masking of a group (maskbit) in a collision object. ----@param url string|hash|url # the collision object to change the mask of. ----@param group string # the name of the group (maskbit) to modify in the mask. ----@param maskbit boolean # boolean value of the new maskbit. 'true' to enable, 'false' to disable. local function make_invincible() -- no longer collide with the "bullet" group physics.set_maskbit("#collisionobject", "bullet", false) end -function physics.set_maskbit(url, group, maskbit) end - ----Flips the collision shapes vertically for a collision object ----@param url string|hash|url # the collision object that should flip its shapes ----@param flip boolean # true if the collision object should flip its shapes, false if not -function physics.set_vflip(url, flip) end - ----Collision objects tend to fall asleep when inactive for a small period of time for ----efficiency reasons. This function wakes them up. ----@param url string|hash|url # the collision object to wake. function on_input(self, action_id, action) if action_id == hash("test") and action.pressed then physics.wakeup("#collisionobject") end end -function physics.wakeup(url) end - - - - -return physics \ No newline at end of file diff --git a/meta/3rd/Defold/library/factory.lua b/meta/3rd/Defold/library/factory.lua deleted file mode 100644 index 77332789..00000000 --- a/meta/3rd/Defold/library/factory.lua +++ /dev/null @@ -1,47 +0,0 @@ ----Factory API documentation ----Functions for controlling factory components which are used to ----dynamically spawn game objects into the runtime. ----@class factory -factory = {} ----loaded -factory.STATUS_LOADED = nil ----loading -factory.STATUS_LOADING = nil ----unloaded -factory.STATUS_UNLOADED = nil ----The URL identifies which factory should create the game object. ----If the game object is created inside of the frame (e.g. from an update callback), the game object will be created instantly, but none of its component will be updated in the same frame. ----Properties defined in scripts in the created game object can be overridden through the properties-parameter below. ----See go.property for more information on script properties. ---- Calling factory.create <> on a factory that is marked as dynamic without having loaded resources ----using factory.load <> will synchronously load and create resources which may affect application performance. ----@param url string|hash|url # the factory that should create a game object. ----@param position vector3? # the position of the new game object, the position of the game object calling factory.create() is used by default, or if the value is nil. ----@param rotation quaternion? # the rotation of the new game object, the rotation of the game object calling factory.create() is used by default, or if the value is nil. ----@param properties table? # the properties defined in a script attached to the new game object. ----@param scale number|vector3? # the scale of the new game object (must be greater than 0), the scale of the game object containing the factory is used by default, or if the value is nil ----@return hash # the global id of the spawned game object -function factory.create(url, position, rotation, properties, scale) end - ----This returns status of the factory. ----Calling this function when the factory is not marked as dynamic loading always returns ----factory.STATUS_LOADED. ----@param url string|hash|url? # the factory component to get status from ----@return constant # status of the factory component -function factory.get_status(url) end - ----Resources are referenced by the factory component until the existing (parent) collection is destroyed or factory.unload is called. ----Calling this function when the factory is not marked as dynamic loading does nothing. ----@param url string|hash|url? # the factory component to load ----@param complete_function (fun(self: object, url: url, result: boolean))? # function to call when resources are loaded. -function factory.load(url, complete_function) end - ----This decreases the reference count for each resource loaded with factory.load. If reference is zero, the resource is destroyed. ----Calling this function when the factory is not marked as dynamic loading does nothing. ----@param url string|hash|url? # the factory component to unload -function factory.unload(url) end - - - - -return factory \ No newline at end of file diff --git a/meta/3rd/Defold/library/game_object.lua b/meta/3rd/Defold/library/game_object.lua deleted file mode 100644 index 08054a07..00000000 --- a/meta/3rd/Defold/library/game_object.lua +++ /dev/null @@ -1,340 +0,0 @@ ----Game object API documentation ----Functions, core hooks, messages and constants for manipulation of ----game objects. The "go" namespace is accessible from game object script ----files. ----@class go -go = {} ----This is a callback-function, which is called by the engine when a script component is finalized (destroyed). It can ----be used to e.g. take some last action, report the finalization to other game object instances, delete spawned objects ----or release user input focus (see release_input_focus <>). ----@param self object # reference to the script state to be used for storing data -function final(self) end - ----in-back -go.EASING_INBACK = nil ----in-bounce -go.EASING_INBOUNCE = nil ----in-circlic -go.EASING_INCIRC = nil ----in-cubic -go.EASING_INCUBIC = nil ----in-elastic -go.EASING_INELASTIC = nil ----in-exponential -go.EASING_INEXPO = nil ----in-out-back -go.EASING_INOUTBACK = nil ----in-out-bounce -go.EASING_INOUTBOUNCE = nil ----in-out-circlic -go.EASING_INOUTCIRC = nil ----in-out-cubic -go.EASING_INOUTCUBIC = nil ----in-out-elastic -go.EASING_INOUTELASTIC = nil ----in-out-exponential -go.EASING_INOUTEXPO = nil ----in-out-quadratic -go.EASING_INOUTQUAD = nil ----in-out-quartic -go.EASING_INOUTQUART = nil ----in-out-quintic -go.EASING_INOUTQUINT = nil ----in-out-sine -go.EASING_INOUTSINE = nil ----in-quadratic -go.EASING_INQUAD = nil ----in-quartic -go.EASING_INQUART = nil ----in-quintic -go.EASING_INQUINT = nil ----in-sine -go.EASING_INSINE = nil ----linear interpolation -go.EASING_LINEAR = nil ----out-back -go.EASING_OUTBACK = nil ----out-bounce -go.EASING_OUTBOUNCE = nil ----out-circlic -go.EASING_OUTCIRC = nil ----out-cubic -go.EASING_OUTCUBIC = nil ----out-elastic -go.EASING_OUTELASTIC = nil ----out-exponential -go.EASING_OUTEXPO = nil ----out-in-back -go.EASING_OUTINBACK = nil ----out-in-bounce -go.EASING_OUTINBOUNCE = nil ----out-in-circlic -go.EASING_OUTINCIRC = nil ----out-in-cubic -go.EASING_OUTINCUBIC = nil ----out-in-elastic -go.EASING_OUTINELASTIC = nil ----out-in-exponential -go.EASING_OUTINEXPO = nil ----out-in-quadratic -go.EASING_OUTINQUAD = nil ----out-in-quartic -go.EASING_OUTINQUART = nil ----out-in-quintic -go.EASING_OUTINQUINT = nil ----out-in-sine -go.EASING_OUTINSINE = nil ----out-quadratic -go.EASING_OUTQUAD = nil ----out-quartic -go.EASING_OUTQUART = nil ----out-quintic -go.EASING_OUTQUINT = nil ----out-sine -go.EASING_OUTSINE = nil ----loop backward -go.PLAYBACK_LOOP_BACKWARD = nil ----loop forward -go.PLAYBACK_LOOP_FORWARD = nil ----ping pong loop -go.PLAYBACK_LOOP_PINGPONG = nil ----no playback -go.PLAYBACK_NONE = nil ----once backward -go.PLAYBACK_ONCE_BACKWARD = nil ----once forward -go.PLAYBACK_ONCE_FORWARD = nil ----once ping pong -go.PLAYBACK_ONCE_PINGPONG = nil ----This is only supported for numerical properties. If the node property is already being ----animated, that animation will be canceled and replaced by the new one. ----If a complete_function (lua function) is specified, that function will be called when the animation has completed. ----By starting a new animation in that function, several animations can be sequenced together. See the examples for more information. ---- If you call go.animate() from a game object's final() function, ----any passed complete_function will be ignored and never called upon animation completion. ----See the properties guide <> for which properties can be animated and the animation guide <> for how ----them. ----@param url string|hash|url # url of the game object or component having the property ----@param property string|hash # id of the property to animate ----@param playback constant # playback mode of the animation ----@param to number|vector3|vector4|quaternion # target property value ----@param easing constant|vector # easing to use during animation. Either specify a constant, see the animation guide <> for a complete list, or a vmath.vector with a curve ----@param duration number # duration of the animation in seconds ----@param delay number? # delay before the animation starts in seconds ----@param complete_function (fun(self: object, url: url, property: hash))? # optional function to call when the animation has completed -function go.animate(url, property, playback, to, easing, duration, delay, complete_function) end - ----By calling this function, all or specified stored property animations of the game object or component will be canceled. ----See the properties guide <> for which properties can be animated and the animation guide <> for how to animate them. ----@param url string|hash|url # url of the game object or component ----@param property string|hash? # optional id of the property to cancel -function go.cancel_animations(url, property) end - ----Delete one or more game objects identified by id. Deletion is asynchronous meaning that ----the game object(s) are scheduled for deletion which will happen at the end of the current ----frame. Note that game objects scheduled for deletion will be counted against ----max_instances in "game.project" until they are actually removed. ---- Deleting a game object containing a particle FX component emitting particles will not immediately stop the particle FX from emitting particles. You need to manually stop the particle FX using particlefx.stop(). ---- Deleting a game object containing a sound component that is playing will not immediately stop the sound from playing. You need to manually stop the sound using sound.stop(). ----@param id string|hash|url|table? # optional id or table of id's of the instance(s) to delete, the instance of the calling script is deleted by default ----@param recursive boolean? # optional boolean, set to true to recursively delete child hiearchy in child to parent order -function go.delete(id, recursive) end - ----gets a named property of the specified game object or component ----@param url string|hash|url # url of the game object or component having the property ----@param property string|hash # id of the property to retrieve ----@param options table # (optional) options table - index integer index into array property (1 based) - key hash name of internal property ----@return any # the value of the specified property -function go.get(url, property, options) end - ----Returns or constructs an instance identifier. The instance id is a hash ----of the absolute path to the instance. ---- ---- ---- * If path is specified, it can either be absolute or relative to the instance of the calling script. ---- ---- * If path is not specified, the id of the game object instance the script is attached to will be returned. ----@param path string? # path of the instance for which to return the id ----@return hash # instance id -function go.get_id(path) end - ----Get the parent for a game object instance. ----@param id string|hash|url? # optional id of the game object instance to get parent for, defaults to the instance containing the calling script ----@return hash # parent instance or nil -function go.get_parent(id) end - ----The position is relative the parent (if any). Use go.get_world_position <> to retrieve the global world position. ----@param id string|hash|url? # optional id of the game object instance to get the position for, by default the instance of the calling script ----@return vector3 # instance position -function go.get_position(id) end - ----The rotation is relative to the parent (if any). Use go.get_world_rotation <> to retrieve the global world rotation. ----@param id string|hash|url? # optional id of the game object instance to get the rotation for, by default the instance of the calling script ----@return quaternion # instance rotation -function go.get_rotation(id) end - ----The scale is relative the parent (if any). Use go.get_world_scale <> to retrieve the global world 3D scale factor. ----@param id string|hash|url? # optional id of the game object instance to get the scale for, by default the instance of the calling script ----@return vector3 # instance scale factor -function go.get_scale(id) end - ----The uniform scale is relative the parent (if any). If the underlying scale vector is non-uniform the min element of the vector is returned as the uniform scale factor. ----@param id string|hash|url? # optional id of the game object instance to get the uniform scale for, by default the instance of the calling script ----@return number # uniform instance scale factor -function go.get_scale_uniform(id) end - ----The function will return the world position calculated at the end of the previous frame. ----Use go.get_position <> to retrieve the position relative to the parent. ----@param id string|hash|url? # optional id of the game object instance to get the world position for, by default the instance of the calling script ----@return vector3 # instance world position -function go.get_world_position(id) end - ----The function will return the world rotation calculated at the end of the previous frame. ----Use go.get_rotation <> to retrieve the rotation relative to the parent. ----@param id string|hash|url? # optional id of the game object instance to get the world rotation for, by default the instance of the calling script ----@return quaternion # instance world rotation -function go.get_world_rotation(id) end - ----The function will return the world 3D scale factor calculated at the end of the previous frame. ----Use go.get_scale <> to retrieve the 3D scale factor relative to the parent. ----This vector is derived by decomposing the transformation matrix and should be used with care. ----For most cases it should be fine to use go.get_world_scale_uniform <> instead. ----@param id string|hash|url? # optional id of the game object instance to get the world scale for, by default the instance of the calling script ----@return vector3 # instance world 3D scale factor -function go.get_world_scale(id) end - ----The function will return the world scale factor calculated at the end of the previous frame. ----Use go.get_scale_uniform <> to retrieve the scale factor relative to the parent. ----@param id string|hash|url? # optional id of the game object instance to get the world scale for, by default the instance of the calling script ----@return number # instance world scale factor -function go.get_world_scale_uniform(id) end - ----The function will return the world transform matrix calculated at the end of the previous frame. ----@param id string|hash|url? # optional id of the game object instance to get the world transform for, by default the instance of the calling script ----@return matrix4 # instance world transform -function go.get_world_transform(id) end - ----This function defines a property which can then be used in the script through the self-reference. ----The properties defined this way are automatically exposed in the editor in game objects and collections which use the script. ----Note that you can only use this function outside any callback-functions like init and update. ----@param name string # the id of the property ----@param value number|hash|url|vector3|vector4|quaternion|resource # default value of the property. In the case of a url, only the empty constructor msg.url() is allowed. In the case of a resource one of the resource constructors (eg resource.atlas(), resource.font() etc) is expected. -function go.property(name, value) end - ----sets a named property of the specified game object or component, or a material constant ----@param url string|hash|url # url of the game object or component having the property ----@param property string|hash # id of the property to set ----@param value any # the value to set ----@param options table # (optional) options table - index integer index into array property (1 based) - key hash name of internal property -function go.set(url, property, value, options) end - ----Sets the parent for a game object instance. This means that the instance will exist in the geometrical space of its parent, ----like a basic transformation hierarchy or scene graph. If no parent is specified, the instance will be detached from any parent and exist in world ----space. ----This function will generate a set_parent message. It is not until the message has been processed that the change actually takes effect. This ----typically happens later in the same frame or the beginning of the next frame. Refer to the manual to learn how messages are processed by the ----engine. ----@param id string|hash|url? # optional id of the game object instance to set parent for, defaults to the instance containing the calling script ----@param parent_id string|hash|url? # optional id of the new parent game object, defaults to detaching game object from its parent ----@param keep_world_transform boolean? # optional boolean, set to true to maintain the world transform when changing spaces. Defaults to false. -function go.set_parent(id, parent_id, keep_world_transform) end - ----The position is relative to the parent (if any). The global world position cannot be manually set. ----@param position vector3 # position to set ----@param id string|hash|url? # optional id of the game object instance to set the position for, by default the instance of the calling script -function go.set_position(position, id) end - ----The rotation is relative to the parent (if any). The global world rotation cannot be manually set. ----@param rotation quaternion # rotation to set ----@param id string|hash|url? # optional id of the game object instance to get the rotation for, by default the instance of the calling script -function go.set_rotation(rotation, id) end - ----The scale factor is relative to the parent (if any). The global world scale factor cannot be manually set. ---- Physics are currently not affected when setting scale from this function. ----@param scale number|vector3 # vector or uniform scale factor, must be greater than 0 ----@param id string|hash|url? # optional id of the game object instance to get the scale for, by default the instance of the calling script -function go.set_scale(scale, id) end - ----This is a callback-function, which is called by the engine when a script component is initialized. It can be used ----to set the initial state of the script. ----@param self object # reference to the script state to be used for storing data -function init(self) end - ----This is a callback-function, which is called by the engine when user input is sent to the game object instance of the script. ----It can be used to take action on the input, e.g. move the instance according to the input. ----For an instance to obtain user input, it must first acquire input focus ----through the message acquire_input_focus. ----Any instance that has obtained input will be put on top of an ----input stack. Input is sent to all listeners on the stack until the ----end of stack is reached, or a listener returns true ----to signal that it wants input to be consumed. ----See the documentation of acquire_input_focus <> for more ----information. ----The action parameter is a table containing data about the input mapped to the ----action_id. ----For mapped actions it specifies the value of the input and if it was just pressed or released. ----Actions are mapped to input in an input_binding-file. ----Mouse movement is specifically handled and uses nil as its action_id. ----The action only contains positional parameters in this case, such as x and y of the pointer. ----Here is a brief description of the available table fields: ---- ----Field Description ----value The amount of input given by the user. This is usually 1 for buttons and 0-1 for analogue inputs. This is not present for mouse movement. ----pressed If the input was pressed this frame. This is not present for mouse movement. ----released If the input was released this frame. This is not present for mouse movement. ----repeated If the input was repeated this frame. This is similar to how a key on a keyboard is repeated when you hold it down. This is not present for mouse movement. ----x The x value of a pointer device, if present. ----y The y value of a pointer device, if present. ----screen_x The screen space x value of a pointer device, if present. ----screen_y The screen space y value of a pointer device, if present. ----dx The change in x value of a pointer device, if present. ----dy The change in y value of a pointer device, if present. ----screen_dx The change in screen space x value of a pointer device, if present. ----screen_dy The change in screen space y value of a pointer device, if present. ----gamepad The index of the gamepad device that provided the input. ----touch List of touch input, one element per finger, if present. See table below about touch input ----Touch input table: ---- ----Field Description ----id A number identifying the touch input during its duration. ----pressed True if the finger was pressed this frame. ----released True if the finger was released this frame. ----tap_count Number of taps, one for single, two for double-tap, etc ----x The x touch location. ----y The y touch location. ----dx The change in x value. ----dy The change in y value. ----acc_x Accelerometer x value (if present). ----acc_y Accelerometer y value (if present). ----acc_z Accelerometer z value (if present). ----@param self object # reference to the script state to be used for storing data ----@param action_id hash # id of the received input action, as mapped in the input_binding-file ----@param action table # a table containing the input data, see above for a description ----@return boolean? # optional boolean to signal if the input should be consumed (not passed on to others) or not, default is false -function on_input(self, action_id, action) end - ----This is a callback-function, which is called by the engine whenever a message has been sent to the script component. ----It can be used to take action on the message, e.g. send a response back to the sender of the message. ----The message parameter is a table containing the message data. If the message is sent from the engine, the ----documentation of the message specifies which data is supplied. ----@param self object # reference to the script state to be used for storing data ----@param message_id hash # id of the received message ----@param message table # a table containing the message data ----@param sender url # address of the sender -function on_message(self, message_id, message, sender) end - ----This is a callback-function, which is called by the engine when the script component is reloaded, e.g. from the editor. ----It can be used for live development, e.g. to tweak constants or set up the state properly for the instance. ----@param self object # reference to the script state to be used for storing data -function on_reload(self) end - ----This is a callback-function, which is called by the engine every frame to update the state of a script component. ----It can be used to perform any kind of game related tasks, e.g. moving the game object instance. ----@param self object # reference to the script state to be used for storing data ----@param dt number # the time-step of the frame update -function update(self, dt) end - - - - -return go \ No newline at end of file diff --git a/meta/3rd/Defold/library/gui.lua b/meta/3rd/Defold/library/gui.lua deleted file mode 100644 index f4b82cd0..00000000 --- a/meta/3rd/Defold/library/gui.lua +++ /dev/null @@ -1,929 +0,0 @@ ----GUI API documentation ----GUI API documentation ----@class gui -gui = {} ----This is a callback-function, which is called by the engine when a gui component is finalized (destroyed). It can ----be used to e.g. take some last action, report the finalization to other game object instances ----or release user input focus (see release_input_focus). There is no use in starting any animations or similar ----from this function since the gui component is about to be destroyed. ----@param self object # reference to the script state to be used for storing data -function final(self) end - ----fit adjust mode -gui.ADJUST_FIT = nil ----stretch adjust mode -gui.ADJUST_STRETCH = nil ----zoom adjust mode -gui.ADJUST_ZOOM = nil ----bottom y-anchor -gui.ANCHOR_BOTTOM = nil ----left x-anchor -gui.ANCHOR_LEFT = nil ----no anchor -gui.ANCHOR_NONE = nil ----right x-anchor -gui.ANCHOR_RIGHT = nil ----top y-anchor -gui.ANCHOR_TOP = nil ----additive blending -gui.BLEND_ADD = nil ----additive alpha blending -gui.BLEND_ADD_ALPHA = nil ----alpha blending -gui.BLEND_ALPHA = nil ----multiply blending -gui.BLEND_MULT = nil ----clipping mode none -gui.CLIPPING_MODE_NONE = nil ----clipping mode stencil -gui.CLIPPING_MODE_STENCIL = nil ----in-back -gui.EASING_INBACK = nil ----in-bounce -gui.EASING_INBOUNCE = nil ----in-circlic -gui.EASING_INCIRC = nil ----in-cubic -gui.EASING_INCUBIC = nil ----in-elastic -gui.EASING_INELASTIC = nil ----in-exponential -gui.EASING_INEXPO = nil ----in-out-back -gui.EASING_INOUTBACK = nil ----in-out-bounce -gui.EASING_INOUTBOUNCE = nil ----in-out-circlic -gui.EASING_INOUTCIRC = nil ----in-out-cubic -gui.EASING_INOUTCUBIC = nil ----in-out-elastic -gui.EASING_INOUTELASTIC = nil ----in-out-exponential -gui.EASING_INOUTEXPO = nil ----in-out-quadratic -gui.EASING_INOUTQUAD = nil ----in-out-quartic -gui.EASING_INOUTQUART = nil ----in-out-quintic -gui.EASING_INOUTQUINT = nil ----in-out-sine -gui.EASING_INOUTSINE = nil ----in-quadratic -gui.EASING_INQUAD = nil ----in-quartic -gui.EASING_INQUART = nil ----in-quintic -gui.EASING_INQUINT = nil ----in-sine -gui.EASING_INSINE = nil ----linear interpolation -gui.EASING_LINEAR = nil ----out-back -gui.EASING_OUTBACK = nil ----out-bounce -gui.EASING_OUTBOUNCE = nil ----out-circlic -gui.EASING_OUTCIRC = nil ----out-cubic -gui.EASING_OUTCUBIC = nil ----out-elastic -gui.EASING_OUTELASTIC = nil ----out-exponential -gui.EASING_OUTEXPO = nil ----out-in-back -gui.EASING_OUTINBACK = nil ----out-in-bounce -gui.EASING_OUTINBOUNCE = nil ----out-in-circlic -gui.EASING_OUTINCIRC = nil ----out-in-cubic -gui.EASING_OUTINCUBIC = nil ----out-in-elastic -gui.EASING_OUTINELASTIC = nil ----out-in-exponential -gui.EASING_OUTINEXPO = nil ----out-in-quadratic -gui.EASING_OUTINQUAD = nil ----out-in-quartic -gui.EASING_OUTINQUART = nil ----out-in-quintic -gui.EASING_OUTINQUINT = nil ----out-in-sine -gui.EASING_OUTINSINE = nil ----out-quadratic -gui.EASING_OUTQUAD = nil ----out-quartic -gui.EASING_OUTQUART = nil ----out-quintic -gui.EASING_OUTQUINT = nil ----out-sine -gui.EASING_OUTSINE = nil ----default keyboard -gui.KEYBOARD_TYPE_DEFAULT = nil ----email keyboard -gui.KEYBOARD_TYPE_EMAIL = nil ----number input keyboard -gui.KEYBOARD_TYPE_NUMBER_PAD = nil ----password keyboard -gui.KEYBOARD_TYPE_PASSWORD = nil ----elliptical pie node bounds -gui.PIEBOUNDS_ELLIPSE = nil ----rectangular pie node bounds -gui.PIEBOUNDS_RECTANGLE = nil ----center pivot -gui.PIVOT_CENTER = nil ----east pivot -gui.PIVOT_E = nil ----north pivot -gui.PIVOT_N = nil ----north-east pivot -gui.PIVOT_NE = nil ----north-west pivot -gui.PIVOT_NW = nil ----south pivot -gui.PIVOT_S = nil ----south-east pivot -gui.PIVOT_SE = nil ----south-west pivot -gui.PIVOT_SW = nil ----west pivot -gui.PIVOT_W = nil ----loop backward -gui.PLAYBACK_LOOP_BACKWARD = nil ----loop forward -gui.PLAYBACK_LOOP_FORWARD = nil ----ping pong loop -gui.PLAYBACK_LOOP_PINGPONG = nil ----once backward -gui.PLAYBACK_ONCE_BACKWARD = nil ----once forward -gui.PLAYBACK_ONCE_FORWARD = nil ----once forward and then backward -gui.PLAYBACK_ONCE_PINGPONG = nil ----color property -gui.PROP_COLOR = nil ----fill_angle property -gui.PROP_FILL_ANGLE = nil ----inner_radius property -gui.PROP_INNER_RADIUS = nil ----outline color property -gui.PROP_OUTLINE = nil ----position property -gui.PROP_POSITION = nil ----rotation property -gui.PROP_ROTATION = nil ----scale property -gui.PROP_SCALE = nil ----shadow color property -gui.PROP_SHADOW = nil ----size property -gui.PROP_SIZE = nil ----slice9 property -gui.PROP_SLICE9 = nil ----data error -gui.RESULT_DATA_ERROR = nil ----out of resource -gui.RESULT_OUT_OF_RESOURCES = nil ----texture already exists -gui.RESULT_TEXTURE_ALREADY_EXISTS = nil ----automatic size mode -gui.SIZE_MODE_AUTO = nil ----manual size mode -gui.SIZE_MODE_MANUAL = nil ----This starts an animation of a node property according to the specified parameters. ----If the node property is already being animated, that animation will be canceled and ----replaced by the new one. Note however that several different node properties ----can be animated simultaneously. Use gui.cancel_animation to stop the animation ----before it has completed. ----Composite properties of type vector3, vector4 or quaternion ----also expose their sub-components (x, y, z and w). ----You can address the components individually by suffixing the name with a dot '.' ----and the name of the component. ----For instance, "position.x" (the position x coordinate) or "color.w" ----(the color alpha value). ----If a complete_function (Lua function) is specified, that function will be called ----when the animation has completed. ----By starting a new animation in that function, several animations can be sequenced ----together. See the examples below for more information. ----@param node node # node to animate ----@param property string|constant # property to animate ----@param to vector3|vector4 # target property value ----@param easing constant|vector # easing to use during animation. Either specify one of the gui.EASING_* constants or provide a vector with a custom curve. See the animation guide <> for more information. ----@param duration number # duration of the animation in seconds. ----@param delay number? # delay before the animation starts in seconds. ----@param complete_function (fun(self: any, node: any))? # function to call when the animation has completed ----@param playback constant? # playback mode -function gui.animate(node, property, to, easing, duration, delay, complete_function, playback) end - ----If an animation of the specified node is currently running (started by gui.animate), it will immediately be canceled. ----@param node node # node that should have its animation canceled ----@param property string|constant # property for which the animation should be canceled -function gui.cancel_animation(node, property) end - ----Cancels any running flipbook animation on the specified node. ----@param node node # node cancel flipbook animation for -function gui.cancel_flipbook(node) end - ----Make a clone instance of a node. ----This function does not clone the supplied node's children nodes. ----Use gui.clone_tree for that purpose. ----@param node node # node to clone ----@return node # the cloned node -function gui.clone(node) end - ----Make a clone instance of a node and all its children. ----Use gui.clone to clone a node excluding its children. ----@param node node # root node to clone ----@return table # a table mapping node ids to the corresponding cloned nodes -function gui.clone_tree(node) end - ----Deletes the specified node. Any child nodes of the specified node will be ----recursively deleted. ----@param node node # node to delete -function gui.delete_node(node) end - ----Delete a dynamically created texture. ----@param texture string|hash # texture id -function gui.delete_texture(texture) end - ----Returns the adjust mode of a node. ----The adjust mode defines how the node will adjust itself to screen ----resolutions that differs from the one in the project settings. ----@param node node # node from which to get the adjust mode (node) ----@return constant # the current adjust mode -function gui.get_adjust_mode(node) end - ----gets the node alpha ----@param node node # node from which to get alpha -function gui.get_alpha(node) end - ----Returns the blend mode of a node. ----Blend mode defines how the node will be blended with the background. ----@param node node # node from which to get the blend mode ----@return constant # blend mode -function gui.get_blend_mode(node) end - ----If node is set as an inverted clipping node, it will clip anything inside as opposed to outside. ----@param node node # node from which to get the clipping inverted state ----@return boolean # true or false -function gui.get_clipping_inverted(node) end - ----Clipping mode defines how the node will clip it's children nodes ----@param node node # node from which to get the clipping mode ----@return constant # clipping mode -function gui.get_clipping_mode(node) end - ----If node is set as visible clipping node, it will be shown as well as clipping. Otherwise, it will only clip but not show visually. ----@param node node # node from which to get the clipping visibility state ----@return boolean # true or false -function gui.get_clipping_visible(node) end - ----Returns the color of the supplied node. The components ----of the returned vector4 contains the color channel values: ---- ----Component Color value ----x Red value ----y Green value ----z Blue value ----w Alpha value ----@param node node # node to get the color from ----@return vector4 # node color -function gui.get_color(node) end - ----Returns the sector angle of a pie node. ----@param node node # node from which to get the fill angle ----@return number # sector angle -function gui.get_fill_angle(node) end - ----Get node flipbook animation. ----@param node node # node to get flipbook animation from ----@return hash # animation id -function gui.get_flipbook(node) end - ----This is only useful nodes with flipbook animations. Gets the normalized cursor of the flipbook animation on a node. ----@param node node # node to get the cursor for (node) ----@return # value number cursor value -function gui.get_flipbook_cursor(node) end - ----This is only useful nodes with flipbook animations. Gets the playback rate of the flipbook animation on a node. ----@param node node # node to set the cursor for ----@return number # playback rate -function gui.get_flipbook_playback_rate(node) end - ----This is only useful for text nodes. The font must be mapped to the gui scene in the gui editor. ----@param node node # node from which to get the font ----@return hash # font id -function gui.get_font(node) end - ----This is only useful for text nodes. The font must be mapped to the gui scene in the gui editor. ----@param font_name hash|string # font of which to get the path hash ----@return hash # path hash to resource -function gui.get_font_resource(font_name) end - ----Returns the scene height. ----@return number # scene height -function gui.get_height() end - ----Retrieves the id of the specified node. ----@param node node # the node to retrieve the id from ----@return hash # the id of the node -function gui.get_id(node) end - ----Retrieve the index of the specified node among its siblings. ----The index defines the order in which a node appear in a GUI scene. ----Higher index means the node is drawn on top of lower indexed nodes. ----@param node node # the node to retrieve the id from ----@return number # the index of the node -function gui.get_index(node) end - ----gets the node inherit alpha state ----@param node node # node from which to get the inherit alpha state -function gui.get_inherit_alpha(node) end - ----Returns the inner radius of a pie node. ----The radius is defined along the x-axis. ----@param node node # node from where to get the inner radius ----@return number # inner radius -function gui.get_inner_radius(node) end - ----The layer must be mapped to the gui scene in the gui editor. ----@param node node # node from which to get the layer ----@return hash # layer id -function gui.get_layer(node) end - ----gets the scene current layout ----@return hash # layout id -function gui.get_layout() end - ----Returns the leading value for a text node. ----@param node node # node from where to get the leading ----@return number # leading scaling value (default=1) -function gui.get_leading(node) end - ----Returns whether a text node is in line-break mode or not. ----This is only useful for text nodes. ----@param node node # node from which to get the line-break for ----@return boolean # true or false -function gui.get_line_break(node) end - ----Retrieves the node with the specified id. ----@param id string|hash # id of the node to retrieve ----@return node # a new node instance -function gui.get_node(id) end - ----Returns the outer bounds mode for a pie node. ----@param node node # node from where to get the outer bounds mode ----@return constant # the outer bounds mode of the pie node: -function gui.get_outer_bounds(node) end - ----Returns the outline color of the supplied node. ----See gui.get_color <> for info how vectors encode color values. ----@param node node # node to get the outline color from ----@return vector4 # outline color -function gui.get_outline(node) end - ----Returns the parent node of the specified node. ----If the supplied node does not have a parent, nil is returned. ----@param node node # the node from which to retrieve its parent ----@return node # parent instance or nil -function gui.get_parent(node) end - ----Get the paricle fx for a gui node ----@param node node # node to get particle fx for ----@return hash # particle fx id -function gui.get_particlefx(node) end - ----Returns the number of generated vertices around the perimeter ----of a pie node. ----@param node node # pie node ----@return number # vertex count -function gui.get_perimeter_vertices(node) end - ----The pivot specifies how the node is drawn and rotated from its position. ----@param node node # node to get pivot from ----@return constant # pivot constant -function gui.get_pivot(node) end - ----Returns the position of the supplied node. ----@param node node # node to get the position from ----@return vector3 # node position -function gui.get_position(node) end - ----Returns the rotation of the supplied node. ----The rotation is expressed in degree Euler angles. ----@param node node # node to get the rotation from ----@return vector3 # node rotation -function gui.get_rotation(node) end - ----Returns the scale of the supplied node. ----@param node node # node to get the scale from ----@return vector3 # node scale -function gui.get_scale(node) end - ----Returns the screen position of the supplied node. This function returns the ----calculated transformed position of the node, taking into account any parent node ----transforms. ----@param node node # node to get the screen position from ----@return vector3 # node screen position -function gui.get_screen_position(node) end - ----Returns the shadow color of the supplied node. ----See gui.get_color <> for info how vectors encode color values. ----@param node node # node to get the shadow color from ----@return vector4 # node shadow color -function gui.get_shadow(node) end - ----Returns the size of the supplied node. ----@param node node # node to get the size from ----@return vector3 # node size -function gui.get_size(node) end - ----Returns the size of a node. ----The size mode defines how the node will adjust itself in size. Automatic ----size mode alters the node size based on the node's content. Automatic size ----mode works for Box nodes and Pie nodes which will both adjust their size ----to match the assigned image. Particle fx and Text nodes will ignore ----any size mode setting. ----@param node node # node from which to get the size mode (node) ----@return constant # the current size mode -function gui.get_size_mode(node) end - ----Returns the slice9 configuration values for the node. ----@param node node # node to manipulate ----@return vector4 # configuration values -function gui.get_slice9(node) end - ----Returns the text value of a text node. This is only useful for text nodes. ----@param node node # node from which to get the text ----@return string # text value -function gui.get_text(node) end - ----Returns the texture of a node. ----This is currently only useful for box or pie nodes. ----The texture must be mapped to the gui scene in the gui editor. ----@param node node # node to get texture from ----@return hash # texture id -function gui.get_texture(node) end - ----Returns the tracking value of a text node. ----@param node node # node from where to get the tracking ----@return number # tracking scaling number (default=0) -function gui.get_tracking(node) end - ----Returns true if a node is visible and false if it's not. ----Invisible nodes are not rendered. ----@param node node # node to query ----@return boolean # whether the node is visible or not -function gui.get_visible(node) end - ----Returns the scene width. ----@return number # scene width -function gui.get_width() end - ----The x-anchor specifies how the node is moved when the game is run in a different resolution. ----@param node node # node to get x-anchor from ----@return constant # anchor constant -function gui.get_xanchor(node) end - ----The y-anchor specifies how the node is moved when the game is run in a different resolution. ----@param node node # node to get y-anchor from ----@return constant # anchor constant -function gui.get_yanchor(node) end - ----Hides the on-display touch keyboard on the device. -function gui.hide_keyboard() end - ----Returns true if a node is enabled and false if it's not. ----Disabled nodes are not rendered and animations acting on them are not evaluated. ----@param node node # node to query ----@param recursive boolean # check hierarchy recursively ----@return boolean # whether the node is enabled or not -function gui.is_enabled(node, recursive) end - ----Alters the ordering of the two supplied nodes by moving the first node ----above the second. ----If the second argument is nil the first node is moved to the top. ----@param node node # to move ----@param node node|nil # reference node above which the first node should be moved -function gui.move_above(node, node) end - ----Alters the ordering of the two supplied nodes by moving the first node ----below the second. ----If the second argument is nil the first node is moved to the bottom. ----@param node node # to move ----@param node node|nil # reference node below which the first node should be moved -function gui.move_below(node, node) end - ----Dynamically create a new box node. ----@param pos vector3|vector4 # node position ----@param size vector3 # node size ----@return node # new box node -function gui.new_box_node(pos, size) end - ----Dynamically create a particle fx node. ----@param pos vector3|vector4 # node position ----@param particlefx hash|string # particle fx resource name ----@return node # new particle fx node -function gui.new_particlefx_node(pos, particlefx) end - ----Dynamically create a new pie node. ----@param pos vector3|vector4 # node position ----@param size vector3 # node size ----@return node # new pie node -function gui.new_pie_node(pos, size) end - ----Dynamically create a new text node. ----@param pos vector3|vector4 # node position ----@param text string # node text ----@return node # new text node -function gui.new_text_node(pos, text) end - ----Dynamically create a new texture. ----@param texture string|hash # texture id ----@param width number # texture width ----@param height number # texture height ----@param type string|constant # texture type ----@param buffer string # texture data ----@param flip boolean # flip texture vertically ----@return boolean # texture creation was successful ----@return number # one of the gui.RESULT_* codes if unsuccessful -function gui.new_texture(texture, width, height, type, buffer, flip) end - ----Tests whether a coordinate is within the bounding box of a ----node. ----@param node node # node to be tested for picking ----@param x number # x-coordinate (see on_input <> ) ----@param y number # y-coordinate (see on_input <> ) ----@return boolean # pick result -function gui.pick_node(node, x, y) end - ----Play flipbook animation on a box or pie node. ----The current node texture must contain the animation. ----Use this function to set one-frame still images on the node. ----@param node node # node to set animation for ----@param animation string|hash # animation id ----@param complete_function (fun(self: object, node: node))? # optional function to call when the animation has completed ----@param play_properties table? # optional table with properties -function gui.play_flipbook(node, animation, complete_function, play_properties) end - ----Plays the paricle fx for a gui node ----@param node node # node to play particle fx for ----@param emitter_state_function (fun(self: object, node: hash, emitter: hash, state: constant))? # optional callback function that will be called when an emitter attached to this particlefx changes state. -function gui.play_particlefx(node, emitter_state_function) end - ----Resets the input context of keyboard. This will clear marked text. -function gui.reset_keyboard() end - ----Resets all nodes in the current GUI scene to their initial state. ----The reset only applies to static node loaded from the scene. ----Nodes that are created dynamically from script are not affected. -function gui.reset_nodes() end - ----Convert the screen position to the local position of supplied node ----@param node node # node used for getting local transformation matrix ----@param screen_position vector3 # screen position ----@return vector3 # local position -function gui.screen_to_local(node, screen_position) end - ----Sets the adjust mode on a node. ----The adjust mode defines how the node will adjust itself to screen ----resolutions that differs from the one in the project settings. ----@param node node # node to set adjust mode for ----@param adjust_mode constant # adjust mode to set -function gui.set_adjust_mode(node, adjust_mode) end - ----sets the node alpha ----@param node node # node for which to set alpha ----@param alpha number # 0..1 alpha color -function gui.set_alpha(node, alpha) end - ----Set the blend mode of a node. ----Blend mode defines how the node will be blended with the background. ----@param node node # node to set blend mode for ----@param blend_mode constant # blend mode to set -function gui.set_blend_mode(node, blend_mode) end - ----If node is set as an inverted clipping node, it will clip anything inside as opposed to outside. ----@param node node # node to set clipping inverted state for ----@param inverted boolean # true or false -function gui.set_clipping_inverted(node, inverted) end - ----Clipping mode defines how the node will clip it's children nodes ----@param node node # node to set clipping mode for ----@param clipping_mode constant # clipping mode to set -function gui.set_clipping_mode(node, clipping_mode) end - ----If node is set as an visible clipping node, it will be shown as well as clipping. Otherwise, it will only clip but not show visually. ----@param node node # node to set clipping visibility for ----@param visible boolean # true or false -function gui.set_clipping_visible(node, visible) end - ----Sets the color of the supplied node. The components ----of the supplied vector3 or vector4 should contain the color channel values: ---- ----Component Color value ----x Red value ----y Green value ----z Blue value ----w vector4 Alpha value ----@param node node # node to set the color for ----@param color vector3|vector4 # new color -function gui.set_color(node, color) end - ----Sets a node to the disabled or enabled state. ----Disabled nodes are not rendered and animations acting on them are not evaluated. ----@param node node # node to be enabled/disabled ----@param enabled boolean # whether the node should be enabled or not -function gui.set_enabled(node, enabled) end - ----Set the sector angle of a pie node. ----@param node node # node to set the fill angle for ----@param angle number # sector angle -function gui.set_fill_angle(node, angle) end - ----This is only useful nodes with flipbook animations. The cursor is normalized. ----@param node node # node to set the cursor for ----@param cursor number # cursor value -function gui.set_flipbook_cursor(node, cursor) end - ----This is only useful nodes with flipbook animations. Sets the playback rate of the flipbook animation on a node. Must be positive. ----@param node node # node to set the cursor for ----@param playback_rate number # playback rate -function gui.set_flipbook_playback_rate(node, playback_rate) end - ----This is only useful for text nodes. ----The font must be mapped to the gui scene in the gui editor. ----@param node node # node for which to set the font ----@param font string|hash # font id -function gui.set_font(node, font) end - ----Set the id of the specicied node to a new value. ----Nodes created with the gui.new_*_node() functions get ----an empty id. This function allows you to give dynamically ----created nodes an id. ---- No checking is done on the uniqueness of supplied ids. ----It is up to you to make sure you use unique ids. ----@param node node # node to set the id for ----@param id string|hash # id to set -function gui.set_id(node, id) end - ----sets the node inherit alpha state ----@param node node # node from which to set the inherit alpha state ----@param inherit_alpha boolean # true or false -function gui.set_inherit_alpha(node, inherit_alpha) end - ----Sets the inner radius of a pie node. ----The radius is defined along the x-axis. ----@param node node # node to set the inner radius for ----@param radius number # inner radius -function gui.set_inner_radius(node, radius) end - ----The layer must be mapped to the gui scene in the gui editor. ----@param node node # node for which to set the layer ----@param layer string|hash # layer id -function gui.set_layer(node, layer) end - ----Sets the leading value for a text node. This value is used to ----scale the line spacing of text. ----@param node node # node for which to set the leading ----@param leading number # a scaling value for the line spacing (default=1) -function gui.set_leading(node, leading) end - ----Sets the line-break mode on a text node. ----This is only useful for text nodes. ----@param node node # node to set line-break for ----@param line_break boolean # true or false -function gui.set_line_break(node, line_break) end - ----Sets the outer bounds mode for a pie node. ----@param node node # node for which to set the outer bounds mode ----@param bounds_mode constant # the outer bounds mode of the pie node: -function gui.set_outer_bounds(node, bounds_mode) end - ----Sets the outline color of the supplied node. ----See gui.set_color <> for info how vectors encode color values. ----@param node node # node to set the outline color for ----@param color vector3|vector4 # new outline color -function gui.set_outline(node, color) end - ----Sets the parent node of the specified node. ----@param node node # node for which to set its parent ----@param parent node # parent node to set ----@param keep_scene_transform boolean # optional flag to make the scene position being perserved -function gui.set_parent(node, parent, keep_scene_transform) end - ----Set the paricle fx for a gui node ----@param node node # node to set particle fx for ----@param particlefx hash|string # particle fx id -function gui.set_particlefx(node, particlefx) end - ----Sets the number of generated vertices around the perimeter of a pie node. ----@param node node # pie node ----@param vertices number # vertex count -function gui.set_perimeter_vertices(node, vertices) end - ----The pivot specifies how the node is drawn and rotated from its position. ----@param node node # node to set pivot for ----@param pivot constant # pivot constant -function gui.set_pivot(node, pivot) end - ----Sets the position of the supplied node. ----@param node node # node to set the position for ----@param position vector3|vector4 # new position -function gui.set_position(node, position) end - ----Set the order number for the current GUI scene. ----The number dictates the sorting of the "gui" render predicate, ----in other words in which order the scene will be rendered in relation ----to other currently rendered GUI scenes. ----The number must be in the range 0 to 15. ----@param order number # rendering order (0-15) -function gui.set_render_order(order) end - ----Sets the rotation of the supplied node. ----The rotation is expressed in degree Euler angles. ----@param node node # node to set the rotation for ----@param rotation vector3|vector4 # new rotation -function gui.set_rotation(node, rotation) end - ----Sets the scaling of the supplied node. ----@param node node # node to set the scale for ----@param scale vector3|vector4 # new scale -function gui.set_scale(node, scale) end - ----Set the screen position to the supplied node ----@param node node # node to set the screen position to ----@param screen_position vector3 # screen position -function gui.set_screen_position(node, screen_position) end - ----Sets the shadow color of the supplied node. ----See gui.set_color <> for info how vectors encode color values. ----@param node node # node to set the shadow color for ----@param color vector3|vector4 # new shadow color -function gui.set_shadow(node, color) end - ----Sets the size of the supplied node. ---- You can only set size on nodes with size mode set to SIZE_MODE_MANUAL ----@param node node # node to set the size for ----@param size vector3|vector4 # new size -function gui.set_size(node, size) end - ----Sets the size mode of a node. ----The size mode defines how the node will adjust itself in size. Automatic ----size mode alters the node size based on the node's content. Automatic size ----mode works for Box nodes and Pie nodes which will both adjust their size ----to match the assigned image. Particle fx and Text nodes will ignore ----any size mode setting. ----@param node node # node to set size mode for ----@param size_mode constant # size mode to set -function gui.set_size_mode(node, size_mode) end - ----Set the slice9 configuration values for the node. ----@param node node # node to manipulate ----@param values vector4 # new values -function gui.set_slice9(node, values) end - ----Set the text value of a text node. This is only useful for text nodes. ----@param node node # node to set text for ----@param text string # text to set -function gui.set_text(node, text) end - ----Set the texture on a box or pie node. The texture must be mapped to ----the gui scene in the gui editor. The function points out which texture ----the node should render from. If the texture is an atlas, further ----information is needed to select which image/animation in the atlas ----to render. In such cases, use gui.play_flipbook() in ----addition to this function. ----@param node node # node to set texture for ----@param texture string|hash # texture id -function gui.set_texture(node, texture) end - ----Set the texture buffer data for a dynamically created texture. ----@param texture string|hash # texture id ----@param width number # texture width ----@param height number # texture height ----@param type string|constant # texture type ----@param buffer string # texture data ----@param flip boolean # flip texture vertically ----@return boolean # setting the data was successful -function gui.set_texture_data(texture, width, height, type, buffer, flip) end - ----Sets the tracking value of a text node. This value is used to ----adjust the vertical spacing of characters in the text. ----@param node node # node for which to set the tracking ----@param tracking number # a scaling number for the letter spacing (default=0) -function gui.set_tracking(node, tracking) end - ----Set if a node should be visible or not. Only visible nodes are rendered. ----@param node node # node to be visible or not ----@param visible boolean # whether the node should be visible or not -function gui.set_visible(node, visible) end - ----The x-anchor specifies how the node is moved when the game is run in a different resolution. ----@param node node # node to set x-anchor for ----@param anchor constant # anchor constant -function gui.set_xanchor(node, anchor) end - ----The y-anchor specifies how the node is moved when the game is run in a different resolution. ----@param node node # node to set y-anchor for ----@param anchor constant # anchor constant -function gui.set_yanchor(node, anchor) end - ----Shows the on-display touch keyboard. ----The specified type of keyboard is displayed if it is available on ----the device. ----This function is only available on iOS and Android. . ----@param type constant # keyboard type ----@param autoclose boolean # if the keyboard should automatically close when clicking outside -function gui.show_keyboard(type, autoclose) end - ----Stops the particle fx for a gui node ----@param node node # node to stop particle fx for ----@param options table # options when stopping the particle fx. Supported options: -function gui.stop_particlefx(node, options) end - ----This is a callback-function, which is called by the engine when a gui component is initialized. It can be used ----to set the initial state of the script and gui scene. ----@param self object # reference to the script state to be used for storing data -function init(self) end - ----This is a callback-function, which is called by the engine when user input is sent to the instance of the gui component. ----It can be used to take action on the input, e.g. modify the gui according to the input. ----For an instance to obtain user input, it must first acquire input ----focus through the message acquire_input_focus. ----Any instance that has obtained input will be put on top of an ----input stack. Input is sent to all listeners on the stack until the ----end of stack is reached, or a listener returns true ----to signal that it wants input to be consumed. ----See the documentation of acquire_input_focus <> for more ----information. ----The action parameter is a table containing data about the input mapped to the ----action_id. ----For mapped actions it specifies the value of the input and if it was just pressed or released. ----Actions are mapped to input in an input_binding-file. ----Mouse movement is specifically handled and uses nil as its action_id. ----The action only contains positional parameters in this case, such as x and y of the pointer. ----Here is a brief description of the available table fields: ---- ----Field Description ----value The amount of input given by the user. This is usually 1 for buttons and 0-1 for analogue inputs. This is not present for mouse movement. ----pressed If the input was pressed this frame. This is not present for mouse movement. ----released If the input was released this frame. This is not present for mouse movement. ----repeated If the input was repeated this frame. This is similar to how a key on a keyboard is repeated when you hold it down. This is not present for mouse movement. ----x The x value of a pointer device, if present. ----y The y value of a pointer device, if present. ----screen_x The screen space x value of a pointer device, if present. ----screen_y The screen space y value of a pointer device, if present. ----dx The change in x value of a pointer device, if present. ----dy The change in y value of a pointer device, if present. ----screen_dx The change in screen space x value of a pointer device, if present. ----screen_dy The change in screen space y value of a pointer device, if present. ----gamepad The index of the gamepad device that provided the input. ----touch List of touch input, one element per finger, if present. See table below about touch input ----Touch input table: ---- ----Field Description ----id A number identifying the touch input during its duration. ----pressed True if the finger was pressed this frame. ----released True if the finger was released this frame. ----tap_count Number of taps, one for single, two for double-tap, etc ----x The x touch location. ----y The y touch location. ----dx The change in x value. ----dy The change in y value. ----acc_x Accelerometer x value (if present). ----acc_y Accelerometer y value (if present). ----acc_z Accelerometer z value (if present). ----@param self object # reference to the script state to be used for storing data ----@param action_id hash # id of the received input action, as mapped in the input_binding-file ----@param action table # a table containing the input data, see above for a description ----@return boolean? # optional boolean to signal if the input should be consumed (not passed on to others) or not, default is false -function on_input(self, action_id, action) end - ----This is a callback-function, which is called by the engine whenever a message has been sent to the gui component. ----It can be used to take action on the message, e.g. update the gui or send a response back to the sender of the message. ----The message parameter is a table containing the message data. If the message is sent from the engine, the ----documentation of the message specifies which data is supplied. ----See the update <> function for examples on how to use this callback-function. ----@param self object # reference to the script state to be used for storing data ----@param message_id hash # id of the received message ----@param message table # a table containing the message data -function on_message(self, message_id, message) end - ---- ----This is a callback-function, which is called by the engine when the gui script is reloaded, e.g. from the editor. ----It can be used for live development, e.g. to tweak constants or set up the state properly for the script. ----@param self object # reference to the script state to be used for storing data -function on_reload(self) end - ----This is a callback-function, which is called by the engine every frame to update the state of a gui component. ----It can be used to perform any kind of gui related tasks, e.g. animating nodes. ----@param self object # reference to the script state to be used for storing data ----@param dt number # the time-step of the frame update -function update(self, dt) end - - - - -return gui \ No newline at end of file diff --git a/meta/3rd/Defold/library/html5.lua b/meta/3rd/Defold/library/html5.lua deleted file mode 100644 index e87568a9..00000000 --- a/meta/3rd/Defold/library/html5.lua +++ /dev/null @@ -1,23 +0,0 @@ ----HTML5 API documentation ----HTML5 platform specific functions. ---- The following functions are only available on HTML5 builds, the html5.* Lua namespace will not be available on other platforms. ----@class html5 -html5 = {} ----Executes the supplied string as JavaScript inside the browser. ----A call to this function is blocking, the result is returned as-is, as a string. ----(Internally this will execute the string using the eval() JavaScript function.) ----@param code string # Javascript code to run ----@return string # result as string -function html5.run(code) end - ----Set a JavaScript interaction listener callaback from lua that will be ----invoked when a user interacts with the web page by clicking, touching or typing. ----The callback can then call DOM restricted actions like requesting a pointer lock, ----or start playing sounds the first time the callback is invoked. ----@param callback fun(self: object) # The interaction callback. Pass an empty function or nil if you no longer wish to receive callbacks. -function html5.set_interaction_listener(callback) end - - - - -return html5 \ No newline at end of file diff --git a/meta/3rd/Defold/library/http.lua b/meta/3rd/Defold/library/http.lua deleted file mode 100644 index 67e7774f..00000000 --- a/meta/3rd/Defold/library/http.lua +++ /dev/null @@ -1,18 +0,0 @@ ----HTTP API documentation ----Functions for performing HTTP and HTTPS requests. ----@class http -http = {} ----Perform a HTTP/HTTPS request. ---- If no timeout value is passed, the configuration value "network.http_timeout" is used. If that is not set, the timeout value is 0 (which blocks indefinitely). ----@param url string # target url ----@param method string # HTTP/HTTPS method, e.g. "GET", "PUT", "POST" etc. ----@param callback fun(self: object, id: hash, response: table) # response callback function ----@param headers table? # optional table with custom headers ----@param post_data string? # optional data to send ----@param options table? # optional table with request parameters. Supported entries: -function http.request(url, method, callback, headers, post_data, options) end - - - - -return http \ No newline at end of file diff --git a/meta/3rd/Defold/library/image.lua b/meta/3rd/Defold/library/image.lua deleted file mode 100644 index 1dcab022..00000000 --- a/meta/3rd/Defold/library/image.lua +++ /dev/null @@ -1,20 +0,0 @@ ----Image API documentation ----Functions for creating image objects. ----@class image -image = {} ----luminance image type -image.TYPE_LUMINANCE = nil ----RGB image type -image.TYPE_RGB = nil ----RGBA image type -image.TYPE_RGBA = nil ----Load image (PNG or JPEG) from buffer. ----@param buffer string # image data buffer ----@param premult boolean? # optional flag if alpha should be premultiplied. Defaults to false ----@return table # object or nil if loading fails. The object is a table with the following fields: -function image.load(buffer, premult) end - - - - -return image \ No newline at end of file diff --git a/meta/3rd/Defold/library/json.lua b/meta/3rd/Defold/library/json.lua deleted file mode 100644 index 2421d95e..00000000 --- a/meta/3rd/Defold/library/json.lua +++ /dev/null @@ -1,20 +0,0 @@ ----JSON API documentation ----Manipulation of JSON data strings. ----@class json -json = {} ----Decode a string of JSON data into a Lua table. ----A Lua error is raised for syntax errors. ----@param json string # json data ----@return table # decoded json -function json.decode(json) end - ----Encode a lua table to a JSON string. ----A Lua error is raised for syntax errors. ----@param tbl table # lua table to encode ----@return string # encoded json -function json.encode(tbl) end - - - - -return json \ No newline at end of file diff --git a/meta/3rd/Defold/library/label.lua b/meta/3rd/Defold/library/label.lua deleted file mode 100644 index 7646a0a8..00000000 --- a/meta/3rd/Defold/library/label.lua +++ /dev/null @@ -1,20 +0,0 @@ ----Label API documentation ----Label API documentation ----@class label -label = {} ----Gets the text from a label component ----@param url string|hash|url # the label to get the text from ----@return string # the label text -function label.get_text(url) end - ----Sets the text of a label component ---- This method uses the message passing that means the value will be set after dispatch messages step. ----More information is available in the Application Lifecycle manual <>. ----@param url string|hash|url # the label that should have a constant set ----@param text string # the text -function label.set_text(url, text) end - - - - -return label \ No newline at end of file diff --git a/meta/3rd/Defold/library/luasocket.lua b/meta/3rd/Defold/library/luasocket.lua deleted file mode 100644 index 6f4d9103..00000000 --- a/meta/3rd/Defold/library/luasocket.lua +++ /dev/null @@ -1,484 +0,0 @@ ----LuaSocket API documentation ----LuaSocket is a Lua extension library that provides ----support for the TCP and UDP transport layers. Defold provides the "socket" namespace in ----runtime, which contain the core C functionality. Additional LuaSocket support modules for ----SMTP, HTTP, FTP etc are not part of the core included, but can be easily added to a project ----and used. ----Note the included helper module "socket.lua" in "builtins/scripts/socket.lua". Require this ----module to add some additional functions and shortcuts to the namespace: ----require "builtins.scripts.socket" ---- ---- ----LuaSocket is Copyright 2004-2007 Diego Nehab. All rights reserved. ----LuaSocket is free software, released under the MIT license (same license as the Lua core). ----@class socket -socket = {} ----Closes the TCP object. The internal socket used by the object is closed and the local address to which the object was bound is made available to other applications. No further operations (except for further calls to the close method) are allowed on a closed socket. ---- It is important to close all used sockets once they are not needed, since, in many systems, each socket uses a file descriptor, which are limited system resources. Garbage-collected objects are automatically closed before destruction, though. -function client:close() end - ----Check the read buffer status. ---- This is an internal method, any use is unlikely to be portable. ----@return boolean # true if there is any data in the read buffer, false otherwise. -function client:dirty() end - ----Returns the underlying socket descriptor or handle associated to the object. ---- This is an internal method, any use is unlikely to be portable. ----@return number # the descriptor or handle. In case the object has been closed, the return will be -1. -function client:getfd() end - ----Gets options for the TCP object. See client:setoption <> for description of the option names and values. ----@param option string # the name of the option to get: ----@return any # the option value, or nil in case of error. ----@return string # the error message, or nil if no error occurred. -function client:getoption(option) end - ----Returns information about the remote side of a connected client object. ---- It makes no sense to call this method on server objects. ----@return string # a string with the IP address of the peer, the port number that peer is using for the connection, and the family ("inet" or "inet6"). In case of error, the method returns nil. -function client:getpeername() end - ----Returns the local address information associated to the object. ----@return string # a string with local IP address, the local port number, and the family ("inet" or "inet6"). In case of error, the method returns nil. -function client:getsockname() end - ----Returns accounting information on the socket, useful for throttling of bandwidth. ----@return string # a string with the number of bytes received, the number of bytes sent, and the age of the socket object in seconds. -function client:getstats() end - ----Reads data from a client object, according to the specified read pattern. Patterns follow the Lua file I/O format, and the difference in performance between patterns is negligible. ----@param pattern string|number? # the read pattern that can be any of the following: ----@param prefix string? # an optional string to be concatenated to the beginning of any received data before return. ----@return string # the received pattern, or nil in case of error. ----@return string # the error message, or nil if no error occurred. The error message can be the string "closed" in case the connection was closed before the transmission was completed or the string "timeout" in case there was a timeout during the operation. ----@return string # a (possibly empty) string containing the partial that was received, or nil if no error occurred. -function client:receive(pattern, prefix) end - ----Sends data through client object. ----The optional arguments i and j work exactly like the standard string.sub <> Lua function to allow the selection of a substring to be sent. ---- Output is not buffered. For small strings, it is always better to concatenate them in Lua (with the .. operator) and send the result in one call instead of calling the method several times. ----@param data string # the string to be sent. ----@param i number? # optional starting index of the string. ----@param j number? # optional end index of string. ----@return number] the index of the last byte within [i, j # that has been sent, or nil in case of error. Notice that, if i is 1 or absent, this is effectively the total number of bytes sent. ----@return string # the error message, or nil if no error occurred. The error message can be "closed" in case the connection was closed before the transmission was completed or the string "timeout" in case there was a timeout during the operation. ----@return number] in case of error, the index of the last byte within [i, j # that has been sent. You might want to try again from the byte following that. nil if no error occurred. -function client:send(data, i, j) end - ----Sets the underling socket descriptor or handle associated to the object. The current one is simply replaced, not closed, and no other change to the object state is made ----@param handle number # the descriptor or handle to set. -function client:setfd(handle) end - ----Sets options for the TCP object. Options are only needed by low-level or time-critical applications. You should only modify an option if you are sure you need it. ----@param option string # the name of the option to set. The value is provided in the value parameter: ----@param value any? # the value to set for the specified option. ----@return number # the value 1, or nil in case of error. ----@return string # the error message, or nil if no error occurred. -function client:setoption(option, value) end - ----Resets accounting information on the socket, useful for throttling of bandwidth. ----@param received number # the new number of bytes received. ----@param sent number # the new number of bytes sent. ----@param age number # the new age in seconds. ----@return number # the value 1 in case of success, or nil in case of error. -function client:setstats(received, sent, age) end - ----Changes the timeout values for the object. By default, all I/O operations are blocking. That is, any call to the methods send, receive, and accept will block indefinitely, until the operation completes. The settimeout method defines a limit on the amount of time the I/O methods can block. When a timeout is set and the specified amount of time has elapsed, the affected methods give up and fail with an error code. ----There are two timeout modes and both can be used together for fine tuning. ---- Although timeout values have millisecond precision in LuaSocket, large blocks can cause I/O functions not to respect timeout values due to the time the library takes to transfer blocks to and from the OS and to and from the Lua interpreter. Also, function that accept host names and perform automatic name resolution might be blocked by the resolver for longer than the specified timeout value. ----@param value number # the amount of time to wait, in seconds. The nil timeout value allows operations to block indefinitely. Negative timeout values have the same effect. ----@param mode string? # optional timeout mode to set: -function client:settimeout(value, mode) end - ----Shuts down part of a full-duplex connection. ----@param mode string # which way of the connection should be shut down: ----@return number # the value 1. -function client:shutdown(mode) end - ----Closes a UDP object. The internal socket used by the object is closed and the local address to which the object was bound is made available to other applications. No further operations (except for further calls to the close method) are allowed on a closed socket. ---- It is important to close all used sockets once they are not needed, since, in many systems, each socket uses a file descriptor, which are limited system resources. Garbage-collected objects are automatically closed before destruction, though. -function connected:close() end - ----Gets an option value from the UDP object. See connected:setoption <> for description of the option names and values. ----@param option string # the name of the option to get: ----@return any # the option value, or nil in case of error. ----@return string # the error message, or nil if no error occurred. -function connected:getoption(option) end - ----Retrieves information about the peer associated with a connected UDP object. ---- It makes no sense to call this method on unconnected objects. ----@return string # a string with the IP address of the peer, the port number that peer is using for the connection, and the family ("inet" or "inet6"). In case of error, the method returns nil. -function connected:getpeername() end - ----Returns the local address information associated to the object. ---- UDP sockets are not bound to any address until the setsockname or the sendto method is called for the first time (in which case it is bound to an ephemeral port and the wild-card address). ----@return string # a string with local IP address, a number with the local port, and the family ("inet" or "inet6"). In case of error, the method returns nil. -function connected:getsockname() end - ----Receives a datagram from the UDP object. If the UDP object is connected, only datagrams coming from the peer are accepted. Otherwise, the returned datagram can come from any host. ----@param size number? # optional maximum size of the datagram to be retrieved. If there are more than size bytes available in the datagram, the excess bytes are discarded. If there are less then size bytes available in the current datagram, the available bytes are returned. If size is omitted, the maximum datagram size is used (which is currently limited by the implementation to 8192 bytes). ----@return string # the received datagram, or nil in case of error. ----@return string # the error message, or nil if no error occurred. -function connected:receive(size) end - ----Sends a datagram to the UDP peer of a connected object. ---- In UDP, the send method never blocks and the only way it can fail is if the underlying transport layer refuses to send a message to the specified address (i.e. no interface accepts the address). ----@param datagram string # a string with the datagram contents. The maximum datagram size for UDP is 64K minus IP layer overhead. However datagrams larger than the link layer packet size will be fragmented, which may deteriorate performance and/or reliability. ----@return number # the value 1 on success, or nil in case of error. ----@return string # the error message, or nil if no error occurred. -function connected:send(datagram) end - ----Sets options for the UDP object. Options are only needed by low-level or time-critical applications. You should only modify an option if you are sure you need it. ----@param option string # the name of the option to set. The value is provided in the value parameter: ----@param value any? # the value to set for the specified option. ----@return number # the value 1, or nil in case of error. ----@return string # the error message, or nil if no error occurred. -function connected:setoption(option, value) end - ----Changes the peer of a UDP object. This method turns an unconnected UDP object into a connected UDP object or vice versa. ----For connected objects, outgoing datagrams will be sent to the specified peer, and datagrams received from other peers will be discarded by the OS. Connected UDP objects must use the send and receive methods instead of sendto and receivefrom. ---- Since the address of the peer does not have to be passed to and from the OS, the use of connected UDP objects is recommended when the same peer is used for several transmissions and can result in up to 30% performance gains. ----@param _ string # if address is "*" and the object is connected, the peer association is removed and the object becomes an unconnected object again. ----@return number # the value 1 on success, or nil in case of error. ----@return string # the error message, or nil if no error occurred. -function connected:setpeername(_) end - ----Changes the timeout values for the object. By default, the receive and receivefrom operations are blocking. That is, any call to the methods will block indefinitely, until data arrives. The settimeout function defines a limit on the amount of time the functions can block. When a timeout is set and the specified amount of time has elapsed, the affected methods give up and fail with an error code. ---- In UDP, the send and sendto methods never block (the datagram is just passed to the OS and the call returns immediately). Therefore, the settimeout method has no effect on them. ----@param value number # the amount of time to wait, in seconds. The nil timeout value allows operations to block indefinitely. Negative timeout values have the same effect. -function connected:settimeout(value) end - ----Binds a master object to address and port on the local host. ----@param address string # an IP address or a host name. If address is "*", the system binds to all local interfaces using the INADDR_ANY constant. ----@param port number # the port to commect to, in the range [0..64K). If port is 0, the system automatically chooses an ephemeral port. ----@return number # the value 1, or nil in case of error. ----@return string # the error message, or nil if no error occurred. -function master:bind(address, port) end - ----Closes the TCP object. The internal socket used by the object is closed and the local address to which the object was bound is made available to other applications. No further operations (except for further calls to the close method) are allowed on a closed socket. ---- It is important to close all used sockets once they are not needed, since, in many systems, each socket uses a file descriptor, which are limited system resources. Garbage-collected objects are automatically closed before destruction, though. -function master:close() end - ----Attempts to connect a master object to a remote host, transforming it into a client object. Client objects support methods send, receive, getsockname, getpeername, settimeout, and close. ----Note that the function socket.connect is available and is a shortcut for the creation of client sockets. ----@param address string # an IP address or a host name. If address is "*", the system binds to all local interfaces using the INADDR_ANY constant. ----@param port number # the port to commect to, in the range [0..64K). If port is 0, the system automatically chooses an ephemeral port. ----@return number # the value 1, or nil in case of error. ----@return string # the error message, or nil if no error occurred. -function master:connect(address, port) end - ----Check the read buffer status. ---- This is an internal method, any use is unlikely to be portable. ----@return boolean # true if there is any data in the read buffer, false otherwise. -function master:dirty() end - ----Returns the underlying socket descriptor or handle associated to the object. ---- This is an internal method, any use is unlikely to be portable. ----@return number # the descriptor or handle. In case the object has been closed, the return will be -1. -function master:getfd() end - ----Returns the local address information associated to the object. ----@return string # a string with local IP address, the local port number, and the family ("inet" or "inet6"). In case of error, the method returns nil. -function master:getsockname() end - ----Returns accounting information on the socket, useful for throttling of bandwidth. ----@return string # a string with the number of bytes received, the number of bytes sent, and the age of the socket object in seconds. -function master:getstats() end - ----Specifies the socket is willing to receive connections, transforming the object into a server object. Server objects support the accept, getsockname, setoption, settimeout, and close methods. ----@param backlog number # the number of client connections that can be queued waiting for service. If the queue is full and another client attempts connection, the connection is refused. ----@return number # the value 1, or nil in case of error. ----@return string # the error message, or nil if no error occurred. -function master:listen(backlog) end - ----Sets the underling socket descriptor or handle associated to the object. The current one is simply replaced, not closed, and no other change to the object state is made ----@param handle number # the descriptor or handle to set. -function master:setfd(handle) end - ----Resets accounting information on the socket, useful for throttling of bandwidth. ----@param received number # the new number of bytes received. ----@param sent number # the new number of bytes sent. ----@param age number # the new age in seconds. ----@return number # the value 1 in case of success, or nil in case of error. -function master:setstats(received, sent, age) end - ----Changes the timeout values for the object. By default, all I/O operations are blocking. That is, any call to the methods send, receive, and accept will block indefinitely, until the operation completes. The settimeout method defines a limit on the amount of time the I/O methods can block. When a timeout is set and the specified amount of time has elapsed, the affected methods give up and fail with an error code. ----There are two timeout modes and both can be used together for fine tuning. ---- Although timeout values have millisecond precision in LuaSocket, large blocks can cause I/O functions not to respect timeout values due to the time the library takes to transfer blocks to and from the OS and to and from the Lua interpreter. Also, function that accept host names and perform automatic name resolution might be blocked by the resolver for longer than the specified timeout value. ----@param value number # the amount of time to wait, in seconds. The nil timeout value allows operations to block indefinitely. Negative timeout values have the same effect. ----@param mode string? # optional timeout mode to set: -function master:settimeout(value, mode) end - ----Waits for a remote connection on the server object and returns a client object representing that connection. ---- Calling socket.select with a server object in the recvt parameter before a call to accept does not guarantee accept will return immediately. Use the settimeout method or accept might block until another client shows up. ----@return client # if a connection is successfully initiated, a client object is returned, or nil in case of error. ----@return string # the error message, or nil if no error occurred. The error is "timeout" if a timeout condition is met. -function server:accept() end - ----Closes the TCP object. The internal socket used by the object is closed and the local address to which the object was bound is made available to other applications. No further operations (except for further calls to the close method) are allowed on a closed socket. ---- It is important to close all used sockets once they are not needed, since, in many systems, each socket uses a file descriptor, which are limited system resources. Garbage-collected objects are automatically closed before destruction, though. -function server:close() end - ----Check the read buffer status. ---- This is an internal method, any use is unlikely to be portable. ----@return boolean # true if there is any data in the read buffer, false otherwise. -function server:dirty() end - ----Returns the underlying socket descriptor or handle associated to the object. ---- This is an internal method, any use is unlikely to be portable. ----@return number # the descriptor or handle. In case the object has been closed, the return will be -1. -function server:getfd() end - ----Gets options for the TCP object. See server:setoption <> for description of the option names and values. ----@param option string # the name of the option to get: ----@return any # the option value, or nil in case of error. ----@return string # the error message, or nil if no error occurred. -function server:getoption(option) end - ----Returns the local address information associated to the object. ----@return string # a string with local IP address, the local port number, and the family ("inet" or "inet6"). In case of error, the method returns nil. -function server:getsockname() end - ----Returns accounting information on the socket, useful for throttling of bandwidth. ----@return string # a string with the number of bytes received, the number of bytes sent, and the age of the socket object in seconds. -function server:getstats() end - ----Sets the underling socket descriptor or handle associated to the object. The current one is simply replaced, not closed, and no other change to the object state is made ----@param handle number # the descriptor or handle to set. -function server:setfd(handle) end - ----Sets options for the TCP object. Options are only needed by low-level or time-critical applications. You should only modify an option if you are sure you need it. ----@param option string # the name of the option to set. The value is provided in the value parameter: ----@param value any? # the value to set for the specified option. ----@return number # the value 1, or nil in case of error. ----@return string # the error message, or nil if no error occurred. -function server:setoption(option, value) end - ----Resets accounting information on the socket, useful for throttling of bandwidth. ----@param received number # the new number of bytes received. ----@param sent number # the new number of bytes sent. ----@param age number # the new age in seconds. ----@return number # the value 1 in case of success, or nil in case of error. -function server:setstats(received, sent, age) end - ----Changes the timeout values for the object. By default, all I/O operations are blocking. That is, any call to the methods send, receive, and accept will block indefinitely, until the operation completes. The settimeout method defines a limit on the amount of time the I/O methods can block. When a timeout is set and the specified amount of time has elapsed, the affected methods give up and fail with an error code. ----There are two timeout modes and both can be used together for fine tuning. ---- Although timeout values have millisecond precision in LuaSocket, large blocks can cause I/O functions not to respect timeout values due to the time the library takes to transfer blocks to and from the OS and to and from the Lua interpreter. Also, function that accept host names and perform automatic name resolution might be blocked by the resolver for longer than the specified timeout value. ----@param value number # the amount of time to wait, in seconds. The nil timeout value allows operations to block indefinitely. Negative timeout values have the same effect. ----@param mode string? # optional timeout mode to set: -function server:settimeout(value, mode) end - ----max numbers of sockets the select function can handle -socket._SETSIZE = nil ----the current LuaSocket version -socket._VERSION = nil ----This function is a shortcut that creates and returns a TCP client object connected to a remote ----address at a given port. Optionally, the user can also specify the local address and port to ----bind (locaddr and locport), or restrict the socket family to "inet" or "inet6". ----Without specifying family to connect, whether a tcp or tcp6 connection is created depends on ----your system configuration. ----@param address string # the address to connect to. ----@param port number # the port to connect to. ----@param locaddr string? # optional local address to bind to. ----@param locport number? # optional local port to bind to. ----@param family string? # optional socket family to use, "inet" or "inet6". ----@return client # a new IPv6 TCP client object, or nil in case of error. ----@return string # the error message, or nil if no error occurred. -function socket.connect(address, port, locaddr, locport, family) end - ----This function converts a host name to IPv4 or IPv6 address. ----The supplied address can be an IPv4 or IPv6 address or host name. ----The function returns a table with all information returned by the resolver: ----{ ---- [1] = { ---- family = family-name-1, ---- addr = address-1 ---- }, ---- ... ---- [n] = { ---- family = family-name-n, ---- addr = address-n ---- } ----} ---- ---- ----Here, family contains the string "inet" for IPv4 addresses, and "inet6" for IPv6 addresses. ----In case of error, the function returns nil followed by an error message. ----@param address string # a hostname or an IPv4 or IPv6 address. ----@return table # a table with all information returned by the resolver, or if an error occurs, nil. ----@return string # the error message, or nil if no error occurred. -function socket.dns.getaddrinfo(address) end - ----Returns the standard host name for the machine as a string. ----@return string # the host name for the machine. -function socket.dns.gethostname() end - ----This function converts an address to host name. ----The supplied address can be an IPv4 or IPv6 address or host name. ----The function returns a table with all information returned by the resolver: ----{ ---- [1] = host-name-1, ---- ... ---- [n] = host-name-n, ----} ----@param address string # a hostname or an IPv4 or IPv6 address. ----@return table # a table with all information returned by the resolver, or if an error occurs, nil. ----@return string # the error message, or nil if no error occurred. -function socket.dns.getnameinfo(address) end - ----This function converts from an IPv4 address to host name. ----The address can be an IPv4 address or a host name. ----@param address string # an IPv4 address or host name. ----@return string # the canonic host name of the given address, or nil in case of an error. ----@return table|string # a table with all information returned by the resolver, or if an error occurs, the error message string. -function socket.dns.tohostname(address) end - ----This function converts a host name to IPv4 address. ----The address can be an IP address or a host name. ----@param address string # a hostname or an IP address. ----@return string # the first IP address found for the hostname, or nil in case of an error. ----@return table|string # a table with all information returned by the resolver, or if an error occurs, the error message string. -function socket.dns.toip(address) end - ----Returns the time in seconds, relative to the system epoch (Unix epoch time since January 1, 1970 (UTC) or Windows file time since January 1, 1601 (UTC)). ----You should use the values returned by this function for relative measurements only. ----@return number # the number of seconds elapsed. -function socket.gettime() end - ----This function creates and returns a clean try function that allows for cleanup before the exception is raised. ----The finalizer function will be called in protected mode (see protect <>). ----@param finalizer fun() # a function that will be called before the try throws the exception. ----@return fun() # the customized try function. -function socket.newtry(finalizer) end - ----Converts a function that throws exceptions into a safe function. This function only catches exceptions thrown by try functions. It does not catch normal Lua errors. ---- Beware that if your function performs some illegal operation that raises an error, the protected function will catch the error and return it as a string. This is because try functions uses errors as the mechanism to throw exceptions. ----@param func fun() # a function that calls a try function (or assert, or error) to throw exceptions. ----@return fun(fun:fun()) # an equivalent function that instead of throwing exceptions, returns nil followed by an error message. -function socket.protect(func) end - ----The function returns a list with the sockets ready for reading, a list with the sockets ready for writing and an error message. The error message is "timeout" if a timeout condition was met and nil otherwise. The returned tables are doubly keyed both by integers and also by the sockets themselves, to simplify the test if a specific socket has changed status. ----Recvt and sendt parameters can be empty tables or nil. Non-socket values (or values with non-numeric indices) in these arrays will be silently ignored. ----The returned tables are doubly keyed both by integers and also by the sockets themselves, to simplify the test if a specific socket has changed status. ---- This function can monitor a limited number of sockets, as defined by the constant socket._SETSIZE. This number may be as high as 1024 or as low as 64 by default, depending on the system. It is usually possible to change this at compile time. Invoking select with a larger number of sockets will raise an error. ---- A known bug in WinSock causes select to fail on non-blocking TCP sockets. The function may return a socket as writable even though the socket is not ready for sending. ---- Calling select with a server socket in the receive parameter before a call to accept does not guarantee accept will return immediately. Use the settimeout method or accept might block forever. ---- If you close a socket and pass it to select, it will be ignored. ----(Using select with non-socket objects: Any object that implements getfd and dirty can be used with select, allowing objects from other libraries to be used within a socket.select driven loop.) ----@param recvt table # array with the sockets to test for characters available for reading. ----@param sendt table # array with sockets that are watched to see if it is OK to immediately write on them. ----@param timeout number? # the maximum amount of time (in seconds) to wait for a change in status. Nil, negative or omitted timeout value allows the function to block indefinitely. ----@return table # a list with the sockets ready for reading. ----@return table # a list with the sockets ready for writing. ----@return string # an error message. "timeout" if a timeout condition was met, otherwise nil. -function socket.select(recvt, sendt, timeout) end - ----This function drops a number of arguments and returns the remaining. ----It is useful to avoid creation of dummy variables: ----D is the number of arguments to drop. Ret1 to retN are the arguments. ----The function returns retD+1 to retN. ----@param d number # the number of arguments to drop. ----@param ret1 any? # argument 1. ----@param ret2 any? # argument 2. ----@param retN any? # argument N. ----@return any? # argument D+1. ----@return any? # argument D+2. ----@return any? # argument N. -function socket.skip(d, ret1, ret2, retN) end - ----Freezes the program execution during a given amount of time. ----@param time number # the number of seconds to sleep for. -function socket.sleep(time) end - ----Creates and returns an IPv4 TCP master object. A master object can be transformed into a server object with the method listen (after a call to bind) or into a client object with the method connect. The only other method supported by a master object is the close method. ----@return master # a new IPv4 TCP master object, or nil in case of error. ----@return string # the error message, or nil if no error occurred. -function socket.tcp() end - ----Creates and returns an IPv6 TCP master object. A master object can be transformed into a server object with the method listen (after a call to bind) or into a client object with the method connect. The only other method supported by a master object is the close method. ----Note: The TCP object returned will have the option "ipv6-v6only" set to true. ----@return master # a new IPv6 TCP master object, or nil in case of error. ----@return string # the error message, or nil if no error occurred. -function socket.tcp6() end - ----Creates and returns an unconnected IPv4 UDP object. Unconnected objects support the sendto, receive, receivefrom, getoption, getsockname, setoption, settimeout, setpeername, setsockname, and close methods. The setpeername method is used to connect the object. ----@return unconnected # a new unconnected IPv4 UDP object, or nil in case of error. ----@return string # the error message, or nil if no error occurred. -function socket.udp() end - ----Creates and returns an unconnected IPv6 UDP object. Unconnected objects support the sendto, receive, receivefrom, getoption, getsockname, setoption, settimeout, setpeername, setsockname, and close methods. The setpeername method is used to connect the object. ----Note: The UDP object returned will have the option "ipv6-v6only" set to true. ----@return unconnected # a new unconnected IPv6 UDP object, or nil in case of error. ----@return string # the error message, or nil if no error occurred. -function socket.udp6() end - ----Closes a UDP object. The internal socket used by the object is closed and the local address to which the object was bound is made available to other applications. No further operations (except for further calls to the close method) are allowed on a closed socket. ---- It is important to close all used sockets once they are not needed, since, in many systems, each socket uses a file descriptor, which are limited system resources. Garbage-collected objects are automatically closed before destruction, though. -function unconnected:close() end - ----Gets an option value from the UDP object. See unconnected:setoption <> for description of the option names and values. ----@param option string # the name of the option to get: ----@return any # the option value, or nil in case of error. ----@return string # the error message, or nil if no error occurred. -function unconnected:getoption(option) end - ----Returns the local address information associated to the object. ---- UDP sockets are not bound to any address until the setsockname or the sendto method is called for the first time (in which case it is bound to an ephemeral port and the wild-card address). ----@return string # a string with local IP address, a number with the local port, and the family ("inet" or "inet6"). In case of error, the method returns nil. -function unconnected:getsockname() end - ----Receives a datagram from the UDP object. If the UDP object is connected, only datagrams coming from the peer are accepted. Otherwise, the returned datagram can come from any host. ----@param size number? # optional maximum size of the datagram to be retrieved. If there are more than size bytes available in the datagram, the excess bytes are discarded. If there are less then size bytes available in the current datagram, the available bytes are returned. If size is omitted, the maximum datagram size is used (which is currently limited by the implementation to 8192 bytes). ----@return string # the received datagram, or nil in case of error. ----@return string # the error message, or nil if no error occurred. -function unconnected:receive(size) end - ----Works exactly as the receive method, except it returns the IP address and port as extra return values (and is therefore slightly less efficient). ----@param size number? # optional maximum size of the datagram to be retrieved. ----@return string # the received datagram, or nil in case of error. ----@return string # the IP address, or the error message in case of error. ----@return number # the port number, or nil in case of error. -function unconnected:receivefrom(size) end - ----Sends a datagram to the specified IP address and port number. ---- In UDP, the send method never blocks and the only way it can fail is if the underlying transport layer refuses to send a message to the specified address (i.e. no interface accepts the address). ----@param datagram string # a string with the datagram contents. The maximum datagram size for UDP is 64K minus IP layer overhead. However datagrams larger than the link layer packet size will be fragmented, which may deteriorate performance and/or reliability. ----@param ip string # the IP address of the recipient. Host names are not allowed for performance reasons. ----@param port number # the port number at the recipient. ----@return number # the value 1 on success, or nil in case of error. ----@return string # the error message, or nil if no error occurred. -function unconnected:sendto(datagram, ip, port) end - ----Sets options for the UDP object. Options are only needed by low-level or time-critical applications. You should only modify an option if you are sure you need it. ----@param option string # the name of the option to set. The value is provided in the value parameter: ----@param value any? # the value to set for the specified option. ----@return number # the value 1, or nil in case of error. ----@return string # the error message, or nil if no error occurred. -function unconnected:setoption(option, value) end - ----Changes the peer of a UDP object. This method turns an unconnected UDP object into a connected UDP object or vice versa. ----For connected objects, outgoing datagrams will be sent to the specified peer, and datagrams received from other peers will be discarded by the OS. Connected UDP objects must use the send and receive methods instead of sendto and receivefrom. ---- Since the address of the peer does not have to be passed to and from the OS, the use of connected UDP objects is recommended when the same peer is used for several transmissions and can result in up to 30% performance gains. ----@param address string # an IP address or a host name. ----@param port number # the port number. ----@return number # the value 1 on success, or nil in case of error. ----@return string # the error message, or nil if no error occurred. -function unconnected:setpeername(address, port) end - ----Binds the UDP object to a local address. ---- This method can only be called before any datagram is sent through the UDP object, and only once. Otherwise, the system automatically binds the object to all local interfaces and chooses an ephemeral port as soon as the first datagram is sent. After the local address is set, either automatically by the system or explicitly by setsockname, it cannot be changed. ----@param address string # an IP address or a host name. If address is "*" the system binds to all local interfaces using the constant INADDR_ANY. ----@param port number # the port number. If port is 0, the system chooses an ephemeral port. ----@return number # the value 1 on success, or nil in case of error. ----@return string # the error message, or nil if no error occurred. -function unconnected:setsockname(address, port) end - ----Changes the timeout values for the object. By default, the receive and receivefrom operations are blocking. That is, any call to the methods will block indefinitely, until data arrives. The settimeout function defines a limit on the amount of time the functions can block. When a timeout is set and the specified amount of time has elapsed, the affected methods give up and fail with an error code. ---- In UDP, the send and sendto methods never block (the datagram is just passed to the OS and the call returns immediately). Therefore, the settimeout method has no effect on them. ----@param value number # the amount of time to wait, in seconds. The nil timeout value allows operations to block indefinitely. Negative timeout values have the same effect. -function unconnected:settimeout(value) end - - - - -return socket \ No newline at end of file diff --git a/meta/3rd/Defold/library/message.lua b/meta/3rd/Defold/library/message.lua deleted file mode 100644 index 726b54a9..00000000 --- a/meta/3rd/Defold/library/message.lua +++ /dev/null @@ -1,56 +0,0 @@ ----Messaging API documentation ----Functions for passing messages and constructing URL objects. ----@class msg -msg = {} ----Post a message to a receiving URL. The most common case is to send messages ----to a component. If the component part of the receiver is omitted, the message ----is broadcast to all components in the game object. ----The following receiver shorthands are available: ---- ---- ---- * "." the current game object ---- ---- * "#" the current component ---- ---- There is a 2 kilobyte limit to the message parameter table size. ----@param receiver string|url|hash # The receiver must be a string in URL-format, a URL object or a hashed string. ----@param message_id string|hash # The id must be a string or a hashed string. ----@param message table|nil? # a lua table with message parameters to send. -function msg.post(receiver, message_id, message) end - ----This is equivalent to msg.url(nil) or msg.url("#"), which creates an url to the current ----script component. ----@return url # a new URL -function msg.url() end - ----The format of the string must be [socket:][path][#fragment], which is similar to a HTTP URL. ----When addressing instances: ---- ---- ---- * socket is the name of a valid world (a collection) ---- ---- * path is the id of the instance, which can either be relative the instance of the calling script or global ---- ---- * fragment would be the id of the desired component ---- ----In addition, the following shorthands are available: ---- ---- ---- * "." the current game object ---- ---- * "#" the current component ----@param urlstring string # string to create the url from ----@return url # a new URL -function msg.url(urlstring) end - ----creates a new URL from separate arguments ----@param socket string|hash? # socket of the URL ----@param path string|hash? # path of the URL ----@param fragment string|hash? # fragment of the URL ----@return url # a new URL -function msg.url(socket, path, fragment) end - - - - -return msg \ No newline at end of file diff --git a/meta/3rd/Defold/library/model.lua b/meta/3rd/Defold/library/model.lua deleted file mode 100644 index 0631365e..00000000 --- a/meta/3rd/Defold/library/model.lua +++ /dev/null @@ -1,43 +0,0 @@ ----Model API documentation ----Model API documentation ----@class model -model = {} ----Cancels all animation on a model component. ----@param url string|hash|url # the model for which to cancel the animation -function model.cancel(url) end - ----Gets the id of the game object that corresponds to a model skeleton bone. ----The returned game object can be used for parenting and transform queries. ----This function has complexity O(n), where n is the number of bones in the model skeleton. ----Game objects corresponding to a model skeleton bone can not be individually deleted. ----@param url string|hash|url # the model to query ----@param bone_id string|hash # id of the corresponding bone ----@return hash # id of the game object -function model.get_go(url, bone_id) end - ----Plays an animation on a model component with specified playback ----mode and parameters. ----An optional completion callback function can be provided that will be called when ----the animation has completed playing. If no function is provided, ----a model_animation_done <> message is sent to the script that started the animation. ---- The callback is not called (or message sent) if the animation is ----cancelled with model.cancel <>. The callback is called (or message sent) only for ----animations that play with the following playback modes: ---- ---- ---- * go.PLAYBACK_ONCE_FORWARD ---- ---- * go.PLAYBACK_ONCE_BACKWARD ---- ---- * go.PLAYBACK_ONCE_PINGPONG ----@param url string|hash|url # the model for which to play the animation ----@param anim_id string|hash # id of the animation to play ----@param playback constant # playback mode of the animation ----@param play_properties table? # optional table with properties Play properties table: ----@param complete_function (fun(self: object, message_id: hash, message: table, sender: hash))? # function to call when the animation has completed. -function model.play_anim(url, anim_id, playback, play_properties, complete_function) end - - - - -return model \ No newline at end of file diff --git a/meta/3rd/Defold/library/particle_effects.lua b/meta/3rd/Defold/library/particle_effects.lua deleted file mode 100644 index 5bc8a5a6..00000000 --- a/meta/3rd/Defold/library/particle_effects.lua +++ /dev/null @@ -1,52 +0,0 @@ ----Particle effects API documentation ----Functions for controlling particle effect component playback and ----shader constants. ----@class particlefx -particlefx = {} ----postspawn state -particlefx.EMITTER_STATE_POSTSPAWN = nil ----prespawn state -particlefx.EMITTER_STATE_PRESPAWN = nil ----sleeping state -particlefx.EMITTER_STATE_SLEEPING = nil ----spawning state -particlefx.EMITTER_STATE_SPAWNING = nil ----Starts playing a particle FX component. ----Particle FX started this way need to be manually stopped through particlefx.stop(). ----Which particle FX to play is identified by the URL. ---- A particle FX will continue to emit particles even if the game object the particle FX component belonged to is deleted. You can call particlefx.stop() to stop it from emitting more particles. ----@param url string|hash|url # the particle fx that should start playing. ----@param emitter_state_function (fun(self: object, id: hash, emitter: hash, state: constant))? # optional callback function that will be called when an emitter attached to this particlefx changes state. -function particlefx.play(url, emitter_state_function) end - ----Resets a shader constant for a particle FX component emitter. ----The constant must be defined in the material assigned to the emitter. ----Resetting a constant through this function implies that the value defined in the material will be used. ----Which particle FX to reset a constant for is identified by the URL. ----@param url string|hash|url # the particle FX that should have a constant reset ----@param emitter string|hash # the id of the emitter ----@param constant string|hash # the name of the constant -function particlefx.reset_constant(url, emitter, constant) end - ----Sets a shader constant for a particle FX component emitter. ----The constant must be defined in the material assigned to the emitter. ----Setting a constant through this function will override the value set for that constant in the material. ----The value will be overridden until particlefx.reset_constant is called. ----Which particle FX to set a constant for is identified by the URL. ----@param url string|hash|url # the particle FX that should have a constant set ----@param emitter string|hash # the id of the emitter ----@param constant string|hash # the name of the constant ----@param value vector4 # the value of the constant -function particlefx.set_constant(url, emitter, constant, value) end - ----Stops a particle FX component from playing. ----Stopping a particle FX does not remove already spawned particles. ----Which particle FX to stop is identified by the URL. ----@param url string|hash|url # the particle fx that should stop playing ----@param options table # Options when stopping the particle fx. Supported options: -function particlefx.stop(url, options) end - - - - -return particlefx \ No newline at end of file diff --git a/meta/3rd/Defold/library/profiler.lua b/meta/3rd/Defold/library/profiler.lua deleted file mode 100644 index ed2a36fa..00000000 --- a/meta/3rd/Defold/library/profiler.lua +++ /dev/null @@ -1,89 +0,0 @@ ----Profiler API documentation ----Functions for getting profiling data in runtime. ----More detailed profiling and debugging information available in the manuals. ----@class profiler -profiler = {} ----pause on current frame -profiler.MODE_PAUSE = nil ----start recording -profiler.MODE_RECORD = nil ----continously show latest frame -profiler.MODE_RUN = nil ----pause at peak frame -profiler.MODE_SHOW_PEAK_FRAME = nil ----show full profiler ui -profiler.VIEW_MODE_FULL = nil ----show mimimal profiler ui -profiler.VIEW_MODE_MINIMIZED = nil ----Creates and shows or hides and destroys the on-sceen profiler ui ----The profiler is a real-time tool that shows the numbers of milliseconds spent ----in each scope per frame as well as counters. The profiler is very useful for ----tracking down performance and resource problems. ----@param enabled boolean # true to enable, false to disable -function profiler.enable_ui(enabled) end - ----Get the percent of CPU usage by the application, as reported by the OS. ---- This function is not available on HTML5. ----For some platforms ( Android, Linux and Windows), this information is only available ----by default in the debug version of the engine. It can be enabled in release version as well ----by checking track_cpu under profiler in the game.project file. ----(This means that the engine will sample the CPU usage in intervalls during execution even in release mode.) ----@return number # of CPU used by the application -function profiler.get_cpu_usage() end - ----Get the amount of memory used (resident/working set) by the application in bytes, as reported by the OS. ---- This function is not available on HTML5. ----The values are gathered from internal OS functions which correspond to the following; ---- ----OS Value ---- iOS MacOSAndrod Linux Resident memory ---- Windows Working set ---- HTML5 Not available ----@return number # used by the application -function profiler.get_memory_usage() end - ----Send a text to the profiler ----@param text string # the string to send to the profiler -function profiler.log_text(text) end - ----Get the number of recorded frames in the on-screen profiler ui recording buffer ----@return number # the number of recorded frames, zero if on-screen profiler is disabled -function profiler.recorded_frame_count() end - ----Starts a profile scope. ----@param name string # The name of the scope -function profiler.scope_begin(name) end - ----End the current profile scope. -function profiler.scope_end() end - ----Set the on-screen profile mode - run, pause, record or show peak frame ----@param mode constant # the mode to set the ui profiler in -function profiler.set_ui_mode(mode) end - ----Set the on-screen profile view mode - minimized or expanded ----@param mode constant # the view mode to set the ui profiler in -function profiler.set_ui_view_mode(mode) end - ----Shows or hides the time the engine waits for vsync in the on-screen profiler ----Each frame the engine waits for vsync and depending on your vsync settings and how much time ----your game logic takes this time can dwarf the time in the game logic making it hard to ----see details in the on-screen profiler graph and lists. ----Also, by hiding this the FPS times in the header show the time spent each time excuding the ----time spent waiting for vsync. This shows you how long time your game is spending actively ----working each frame. ----This setting also effects the display of recorded frames but does not affect the actual ----recorded frames so it is possible to toggle this on and off when viewing recorded frames. ----By default the vsync wait times is displayed in the profiler. ----@param visible boolean # true to include it in the display, false to hide it. -function profiler.set_ui_vsync_wait_visible(visible) end - ----Pauses and displays a frame from the recording buffer in the on-screen profiler ui ----The frame to show can either be an absolute frame or a relative frame to the current frame. ----@param frame_index table # a table where you specify one of the following parameters: -function profiler.view_recorded_frame(frame_index) end - - - - -return profiler \ No newline at end of file diff --git a/meta/3rd/Defold/library/render.lua b/meta/3rd/Defold/library/render.lua deleted file mode 100644 index 5e3a111e..00000000 --- a/meta/3rd/Defold/library/render.lua +++ /dev/null @@ -1,439 +0,0 @@ ----Rendering API documentation ----Rendering functions, messages and constants. The "render" namespace is ----accessible only from render scripts. ----The rendering API was originally built on top of OpenGL ES 2.0, and it uses a subset of the ----OpenGL computer graphics rendering API for rendering 2D and 3D computer ----graphics. Our current target is OpenGLES 3.0 with fallbacks to 2.0 on some platforms. ---- It is possible to create materials and write shaders that ----require features not in OpenGL ES 2.0, but those will not work cross platform. ----@class render -render = {} -render.BLEND_CONSTANT_ALPHA = nil -render.BLEND_CONSTANT_COLOR = nil -render.BLEND_DST_ALPHA = nil -render.BLEND_DST_COLOR = nil -render.BLEND_ONE = nil -render.BLEND_ONE_MINUS_CONSTANT_ALPHA = nil -render.BLEND_ONE_MINUS_CONSTANT_COLOR = nil -render.BLEND_ONE_MINUS_DST_ALPHA = nil -render.BLEND_ONE_MINUS_DST_COLOR = nil -render.BLEND_ONE_MINUS_SRC_ALPHA = nil -render.BLEND_ONE_MINUS_SRC_COLOR = nil -render.BLEND_SRC_ALPHA = nil -render.BLEND_SRC_ALPHA_SATURATE = nil -render.BLEND_SRC_COLOR = nil -render.BLEND_ZERO = nil -render.BUFFER_COLOR0_BIT = nil -render.BUFFER_COLOR1_BIT = nil -render.BUFFER_COLOR2_BIT = nil -render.BUFFER_COLOR3_BIT = nil -render.BUFFER_COLOR_BIT = nil -render.BUFFER_DEPTH_BIT = nil -render.BUFFER_STENCIL_BIT = nil -render.COMPARE_FUNC_ALWAYS = nil -render.COMPARE_FUNC_EQUAL = nil -render.COMPARE_FUNC_GEQUAL = nil -render.COMPARE_FUNC_GREATER = nil -render.COMPARE_FUNC_LEQUAL = nil -render.COMPARE_FUNC_LESS = nil -render.COMPARE_FUNC_NEVER = nil -render.COMPARE_FUNC_NOTEQUAL = nil -render.FACE_BACK = nil -render.FACE_FRONT = nil -render.FACE_FRONT_AND_BACK = nil -render.FILTER_LINEAR = nil -render.FILTER_NEAREST = nil -render.FORMAT_DEPTH = nil -render.FORMAT_LUMINANCE = nil ----May be nil if the format isn't supported -render.FORMAT_R16F = nil ----May be nil if the format isn't supported -render.FORMAT_R32F = nil ----May be nil if the format isn't supported -render.FORMAT_RG16F = nil ----May be nil if the format isn't supported -render.FORMAT_RG32F = nil -render.FORMAT_RGB = nil ----May be nil if the format isn't supported -render.FORMAT_RGB16F = nil ----May be nil if the format isn't supported -render.FORMAT_RGB32F = nil -render.FORMAT_RGBA = nil ----May be nil if the format isn't supported -render.FORMAT_RGBA16F = nil ----May be nil if the format isn't supported -render.FORMAT_RGBA32F = nil -render.FORMAT_STENCIL = nil -render.RENDER_TARGET_DEFAULT = nil -render.STATE_BLEND = nil -render.STATE_CULL_FACE = nil -render.STATE_DEPTH_TEST = nil -render.STATE_POLYGON_OFFSET_FILL = nil -render.STATE_STENCIL_TEST = nil -render.STENCIL_OP_DECR = nil -render.STENCIL_OP_DECR_WRAP = nil -render.STENCIL_OP_INCR = nil -render.STENCIL_OP_INCR_WRAP = nil -render.STENCIL_OP_INVERT = nil -render.STENCIL_OP_KEEP = nil -render.STENCIL_OP_REPLACE = nil -render.STENCIL_OP_ZERO = nil -render.WRAP_CLAMP_TO_BORDER = nil -render.WRAP_CLAMP_TO_EDGE = nil -render.WRAP_MIRRORED_REPEAT = nil -render.WRAP_REPEAT = nil ----Clear buffers in the currently enabled render target with specified value. If the render target has been created with multiple ----color attachments, all buffers will be cleared with the same value. ----@param buffers table # table with keys specifying which buffers to clear and values set to clear values. Available keys are: -function render.clear(buffers) end - ----Constant buffers are used to set shader program variables and are optionally passed to the render.draw() function. ----The buffer's constant elements can be indexed like an ordinary Lua table, but you can't iterate over them with pairs() or ipairs(). ----@return constant_buffer # new constant buffer -function render.constant_buffer() end - ----Deletes a previously created render target. ----@param render_target render_target # render target to delete -function render.delete_render_target(render_target) end - ----If a material is currently enabled, disable it. ----The name of the material must be specified in the ".render" resource set ----in the "game.project" setting. -function render.disable_material() end - ----Disables a render state. ----@param state constant # state to disable -function render.disable_state(state) end - ----Disables a texture unit for a render target that has previourly been enabled. ----@param unit number # texture unit to disable -function render.disable_texture(unit) end - ----Draws all objects that match a specified predicate. An optional constant buffer can be ----provided to override the default constants. If no constants buffer is provided, a default ----system constants buffer is used containing constants as defined in materials and set through ----go.set <> (or particlefx.set_constant <>) on visual components. ----@param predicate predicate # predicate to draw for ----@param options table? # optional table with properties: -function render.draw(predicate, options) end - ----Draws all 3d debug graphics such as lines drawn with "draw_line" messages and physics visualization. ----@param options table? # optional table with properties: -function render.draw_debug3d(options) end - ----If another material was already enabled, it will be automatically disabled ----and the specified material is used instead. ----The name of the material must be specified in the ".render" resource set ----in the "game.project" setting. ----@param material_id string|hash # material id to enable -function render.enable_material(material_id) end - ----Enables a particular render state. The state will be enabled until disabled. ----@param state constant # state to enable -function render.enable_state(state) end - ----Sets the specified render target's specified buffer to be ----used as texture with the specified unit. ----A material shader can then use the texture to sample from. ----@param unit number # texture unit to enable texture for ----@param render_target render_target # render target from which to enable the specified texture unit ----@param buffer_type constant # buffer type from which to enable the texture -function render.enable_texture(unit, render_target, buffer_type) end - ----Returns the logical window height that is set in the "game.project" settings. ----Note that the actual window pixel size can change, either by device constraints ----or user input. ----@return number # specified window height -function render.get_height() end - ----Returns the specified buffer height from a render target. ----@param render_target render_target # render target from which to retrieve the buffer height ----@param buffer_type constant # which type of buffer to retrieve the height from ----@return number # the height of the render target buffer texture -function render.get_render_target_height(render_target, buffer_type) end - ----Returns the specified buffer width from a render target. ----@param render_target render_target # render target from which to retrieve the buffer width ----@param buffer_type constant # which type of buffer to retrieve the width from ----@return number # the width of the render target buffer texture -function render.get_render_target_width(render_target, buffer_type) end - ----Returns the logical window width that is set in the "game.project" settings. ----Note that the actual window pixel size can change, either by device constraints ----or user input. ----@return number # specified window width (number) -function render.get_width() end - ----Returns the actual physical window height. ----Note that this value might differ from the logical height that is set in the ----"game.project" settings. ----@return number # actual window height -function render.get_window_height() end - ----Returns the actual physical window width. ----Note that this value might differ from the logical width that is set in the ----"game.project" settings. ----@return number # actual window width -function render.get_window_width() end - ----This function returns a new render predicate for objects with materials matching ----the provided material tags. The provided tags are combined into a bit mask ----for the predicate. If multiple tags are provided, the predicate matches materials ----with all tags ANDed together. ----The current limit to the number of tags that can be defined is 64. ----@param tags table # table of tags that the predicate should match. The tags can be of either hash or string type ----@return predicate # new predicate -function render.predicate(tags) end - ----Creates a new render target according to the supplied ----specification table. ----The table should contain keys specifying which buffers should be created ----with what parameters. Each buffer key should have a table value consisting ----of parameters. The following parameter keys are available: ---- ----Key Values ----format render.FORMAT_LUMINANCErender.FORMAT_RGBrender.FORMAT_RGBArender.FORMAT_DEPTHrender.FORMAT_STENCILrender.FORMAT_RGBA32Frender.FORMAT_RGBA16F ----width number ----height number ----min_filter render.FILTER_LINEARrender.FILTER_NEAREST ----mag_filter render.FILTER_LINEARrender.FILTER_NEAREST ----u_wrap render.WRAP_CLAMP_TO_BORDERrender.WRAP_CLAMP_TO_EDGErender.WRAP_MIRRORED_REPEATrender.WRAP_REPEAT ----v_wrap render.WRAP_CLAMP_TO_BORDERrender.WRAP_CLAMP_TO_EDGErender.WRAP_MIRRORED_REPEATrender.WRAP_REPEAT ----The render target can be created to support multiple color attachments. Each attachment can have different format settings and texture filters, ----but attachments must be added in sequence, meaning you cannot create a render target at slot 0 and 3. ----Instead it has to be created with all four buffer types ranging from [0..3] (as denoted by render.BUFFER_COLORX_BIT where 'X' is the attachment you want to create). ----@param name string # render target name ----@param parameters table # table of buffer parameters, see the description for available keys and values ----@return render_target # new render target -function render.render_target(name, parameters) end - ----Specifies the arithmetic used when computing pixel values that are written to the frame ----buffer. In RGBA mode, pixels can be drawn using a function that blends the source RGBA ----pixel values with the destination pixel values already in the frame buffer. ----Blending is initially disabled. ----source_factor specifies which method is used to scale the source color components. ----destination_factor specifies which method is used to scale the destination color ----components. ----Source color components are referred to as (Rs,Gs,Bs,As). ----Destination color components are referred to as (Rd,Gd,Bd,Ad). ----The color specified by setting the blendcolor is referred to as (Rc,Gc,Bc,Ac). ----The source scale factor is referred to as (sR,sG,sB,sA). ----The destination scale factor is referred to as (dR,dG,dB,dA). ----The color values have integer values between 0 and (kR,kG,kB,kA), where kc = 2mc - 1 and mc is the number of bitplanes for that color. I.e for 8 bit color depth, color values are between 0 and 255. ----Available factor constants and corresponding scale factors: ---- ----Factor constant Scale factor (fR,fG,fB,fA) ----render.BLEND_ZERO (0,0,0,0) ----render.BLEND_ONE (1,1,1,1) ----render.BLEND_SRC_COLOR (Rs/kR,Gs/kG,Bs/kB,As/kA) ----render.BLEND_ONE_MINUS_SRC_COLOR(1,1,1,1) - (Rs/kR,Gs/kG,Bs/kB,As/kA) ----render.BLEND_DST_COLOR (Rd/kR,Gd/kG,Bd/kB,Ad/kA) ----render.BLEND_ONE_MINUS_DST_COLOR(1,1,1,1) - (Rd/kR,Gd/kG,Bd/kB,Ad/kA) ----render.BLEND_SRC_ALPHA (As/kA,As/kA,As/kA,As/kA) ----render.BLEND_ONE_MINUS_SRC_ALPHA(1,1,1,1) - (As/kA,As/kA,As/kA,As/kA) ----render.BLEND_DST_ALPHA (Ad/kA,Ad/kA,Ad/kA,Ad/kA) ----render.BLEND_ONE_MINUS_DST_ALPHA(1,1,1,1) - (Ad/kA,Ad/kA,Ad/kA,Ad/kA) ----render.BLEND_CONSTANT_COLOR (Rc,Gc,Bc,Ac) ----render.BLEND_ONE_MINUS_CONSTANT_COLOR(1,1,1,1) - (Rc,Gc,Bc,Ac) ----render.BLEND_CONSTANT_ALPHA (Ac,Ac,Ac,Ac) ----render.BLEND_ONE_MINUS_CONSTANT_ALPHA(1,1,1,1) - (Ac,Ac,Ac,Ac) ----render.BLEND_SRC_ALPHA_SATURATE(i,i,i,1) where i = min(As, kA - Ad) /kA ----The blended RGBA values of a pixel comes from the following equations: ---- ---- ---- * Rd = min(kR, Rs * sR + Rd * dR) ---- ---- * Gd = min(kG, Gs * sG + Gd * dG) ---- ---- * Bd = min(kB, Bs * sB + Bd * dB) ---- ---- * Ad = min(kA, As * sA + Ad * dA) ---- ----Blend function (render.BLEND_SRC_ALPHA, render.BLEND_ONE_MINUS_SRC_ALPHA) is useful for ----drawing with transparency when the drawn objects are sorted from farthest to nearest. ----It is also useful for drawing antialiased points and lines in arbitrary order. ----@param source_factor constant # source factor ----@param destination_factor constant # destination factor -function render.set_blend_func(source_factor, destination_factor) end - ----Specifies whether the individual color components in the frame buffer is enabled for writing (true) or disabled (false). For example, if blue is false, nothing is written to the blue component of any pixel in any of the color buffers, regardless of the drawing operation attempted. Note that writing are either enabled or disabled for entire color components, not the individual bits of a component. ----The component masks are all initially true. ----@param red boolean # red mask ----@param green boolean # green mask ----@param blue boolean # blue mask ----@param alpha boolean # alpha mask -function render.set_color_mask(red, green, blue, alpha) end - ----Specifies whether front- or back-facing polygons can be culled ----when polygon culling is enabled. Polygon culling is initially disabled. ----If mode is render.FACE_FRONT_AND_BACK, no polygons are drawn, but other ----primitives such as points and lines are drawn. The initial value for ----face_type is render.FACE_BACK. ----@param face_type constant # face type -function render.set_cull_face(face_type) end - ----Specifies the function that should be used to compare each incoming pixel ----depth value with the value present in the depth buffer. ----The comparison is performed only if depth testing is enabled and specifies ----the conditions under which a pixel will be drawn. ----Function constants: ---- ---- ---- * render.COMPARE_FUNC_NEVER (never passes) ---- ---- * render.COMPARE_FUNC_LESS (passes if the incoming depth value is less than the stored value) ---- ---- * render.COMPARE_FUNC_LEQUAL (passes if the incoming depth value is less than or equal to the stored value) ---- ---- * render.COMPARE_FUNC_GREATER (passes if the incoming depth value is greater than the stored value) ---- ---- * render.COMPARE_FUNC_GEQUAL (passes if the incoming depth value is greater than or equal to the stored value) ---- ---- * render.COMPARE_FUNC_EQUAL (passes if the incoming depth value is equal to the stored value) ---- ---- * render.COMPARE_FUNC_NOTEQUAL (passes if the incoming depth value is not equal to the stored value) ---- ---- * render.COMPARE_FUNC_ALWAYS (always passes) ---- ----The depth function is initially set to render.COMPARE_FUNC_LESS. ----@param func constant # depth test function, see the description for available values -function render.set_depth_func(func) end - ----Specifies whether the depth buffer is enabled for writing. The supplied mask governs ----if depth buffer writing is enabled (true) or disabled (false). ----The mask is initially true. ----@param depth boolean # depth mask -function render.set_depth_mask(depth) end - ----Sets the scale and units used to calculate depth values. ----If render.STATE_POLYGON_OFFSET_FILL is enabled, each fragment's depth value ----is offset from its interpolated value (depending on the depth value of the ----appropriate vertices). Polygon offset can be used when drawing decals, rendering ----hidden-line images etc. ----factor specifies a scale factor that is used to create a variable depth ----offset for each polygon. The initial value is 0. ----units is multiplied by an implementation-specific value to create a ----constant depth offset. The initial value is 0. ----The value of the offset is computed as factor ? DZ + r ? units ----DZ is a measurement of the depth slope of the polygon which is the change in z (depth) ----values divided by the change in either x or y coordinates, as you traverse a polygon. ----The depth values are in window coordinates, clamped to the range [0, 1]. ----r is the smallest value that is guaranteed to produce a resolvable difference. ----It's value is an implementation-specific constant. ----The offset is added before the depth test is performed and before the ----value is written into the depth buffer. ----@param factor number # polygon offset factor ----@param units number # polygon offset units -function render.set_polygon_offset(factor, units) end - ----Sets the projection matrix to use when rendering. ----@param matrix matrix4 # projection matrix -function render.set_projection(matrix) end - ----Sets a render target. Subsequent draw operations will be to the ----render target until it is replaced by a subsequent call to set_render_target. ----@param render_target render_target # render target to set. render.RENDER_TARGET_DEFAULT to set the default render target ----@param options table? # optional table with behaviour parameters -function render.set_render_target(render_target, options) end - ----sets the render target size ----@param render_target render_target # render target to set size for ----@param width number # new render target width ----@param height number # new render target height -function render.set_render_target_size(render_target, width, height) end - ----Stenciling is similar to depth-buffering as it enables and disables drawing on a ----per-pixel basis. First, GL drawing primitives are drawn into the stencil planes. ----Second, geometry and images are rendered but using the stencil planes to mask out ----where to draw. ----The stencil test discards a pixel based on the outcome of a comparison between the ----reference value ref and the corresponding value in the stencil buffer. ----func specifies the comparison function. See the table below for values. ----The initial value is render.COMPARE_FUNC_ALWAYS. ----ref specifies the reference value for the stencil test. The value is clamped to ----the range [0, 2n-1], where n is the number of bitplanes in the stencil buffer. ----The initial value is 0. ----mask is ANDed with both the reference value and the stored stencil value when the test ----is done. The initial value is all 1's. ----Function constant: ---- ---- ---- * render.COMPARE_FUNC_NEVER (never passes) ---- ---- * render.COMPARE_FUNC_LESS (passes if (ref & mask) < (stencil & mask)) ---- ---- * render.COMPARE_FUNC_LEQUAL (passes if (ref & mask) <= (stencil & mask)) ---- ---- * render.COMPARE_FUNC_GREATER (passes if (ref & mask) > (stencil & mask)) ---- ---- * render.COMPARE_FUNC_GEQUAL (passes if (ref & mask) >= (stencil & mask)) ---- ---- * render.COMPARE_FUNC_EQUAL (passes if (ref & mask) = (stencil & mask)) ---- ---- * render.COMPARE_FUNC_NOTEQUAL (passes if (ref & mask) != (stencil & mask)) ---- ---- * render.COMPARE_FUNC_ALWAYS (always passes) ----@param func constant # stencil test function, see the description for available values ----@param ref number # reference value for the stencil test ----@param mask number # mask that is ANDed with both the reference value and the stored stencil value when the test is done -function render.set_stencil_func(func, ref, mask) end - ----The stencil mask controls the writing of individual bits in the stencil buffer. ----The least significant n bits of the parameter mask, where n is the number of ----bits in the stencil buffer, specify the mask. ----Where a 1 bit appears in the mask, the corresponding ----bit in the stencil buffer can be written. Where a 0 bit appears in the mask, ----the corresponding bit in the stencil buffer is never written. ----The mask is initially all 1's. ----@param mask number # stencil mask -function render.set_stencil_mask(mask) end - ----The stencil test discards a pixel based on the outcome of a comparison between the ----reference value ref and the corresponding value in the stencil buffer. ----To control the test, call render.set_stencil_func <>. ----This function takes three arguments that control what happens to the stored stencil ----value while stenciling is enabled. If the stencil test fails, no change is made to the ----pixel's color or depth buffers, and sfail specifies what happens to the stencil buffer ----contents. ----Operator constants: ---- ---- ---- * render.STENCIL_OP_KEEP (keeps the current value) ---- ---- * render.STENCIL_OP_ZERO (sets the stencil buffer value to 0) ---- ---- * render.STENCIL_OP_REPLACE (sets the stencil buffer value to ref, as specified by render.set_stencil_func <>) ---- ---- * render.STENCIL_OP_INCR (increments the stencil buffer value and clamp to the maximum representable unsigned value) ---- ---- * render.STENCIL_OP_INCR_WRAP (increments the stencil buffer value and wrap to zero when incrementing the maximum representable unsigned value) ---- ---- * render.STENCIL_OP_DECR (decrements the current stencil buffer value and clamp to 0) ---- ---- * render.STENCIL_OP_DECR_WRAP (decrements the current stencil buffer value and wrap to the maximum representable unsigned value when decrementing zero) ---- ---- * render.STENCIL_OP_INVERT (bitwise inverts the current stencil buffer value) ---- ----dppass and dpfail specify the stencil buffer actions depending on whether subsequent ----depth buffer tests succeed (dppass) or fail (dpfail). ----The initial value for all operators is render.STENCIL_OP_KEEP. ----@param sfail constant # action to take when the stencil test fails ----@param dpfail constant # the stencil action when the stencil test passes ----@param dppass constant # the stencil action when both the stencil test and the depth test pass, or when the stencil test passes and either there is no depth buffer or depth testing is not enabled -function render.set_stencil_op(sfail, dpfail, dppass) end - ----Sets the view matrix to use when rendering. ----@param matrix matrix4 # view matrix to set -function render.set_view(matrix) end - ----Set the render viewport to the specified rectangle. ----@param x number # left corner ----@param y number # bottom corner ----@param width number # viewport width ----@param height number # viewport height -function render.set_viewport(x, y, width, height) end - - - - -return render \ No newline at end of file diff --git a/meta/3rd/Defold/library/resource.lua b/meta/3rd/Defold/library/resource.lua deleted file mode 100644 index 5db356fc..00000000 --- a/meta/3rd/Defold/library/resource.lua +++ /dev/null @@ -1,181 +0,0 @@ ----Resource API documentation ----Functions and constants to access resources. ----@class resource -resource = {} ----LIVEUPDATE_BUNDLED_RESOURCE_MISMATCH -resource.LIVEUPDATE_BUNDLED_RESOURCE_MISMATCH = nil ----LIVEUPDATE_ENGINE_VERSION_MISMATCH -resource.LIVEUPDATE_ENGINE_VERSION_MISMATCH = nil ----LIVEUPDATE_FORMAT_ERROR -resource.LIVEUPDATE_FORMAT_ERROR = nil ----LIVEUPDATE_INVALID_RESOURCE -resource.LIVEUPDATE_INVALID_RESOURCE = nil ----LIVEUPDATE_OK -resource.LIVEUPDATE_OK = nil ----LIVEUPDATE_SCHEME_MISMATCH -resource.LIVEUPDATE_SCHEME_MISMATCH = nil ----LIVEUPDATE_SIGNATURE_MISMATCH -resource.LIVEUPDATE_SIGNATURE_MISMATCH = nil ----LIVEUPDATE_VERSION_MISMATCH -resource.LIVEUPDATE_VERSION_MISMATCH = nil ----luminance type texture format -resource.TEXTURE_FORMAT_LUMINANCE = nil ----RGB type texture format -resource.TEXTURE_FORMAT_RGB = nil ----RGBA type texture format -resource.TEXTURE_FORMAT_RGBA = nil ----2D texture type -resource.TEXTURE_TYPE_2D = nil ----Constructor-like function with two purposes: ---- ---- ---- * Load the specified resource as part of loading the script ---- ---- * Return a hash to the run-time version of the resource ---- ---- This function can only be called within go.property <> function calls. ----@param path string? # optional resource path string to the resource ----@return hash # a path hash to the binary version of the resource -function resource.atlas(path) end - ----Constructor-like function with two purposes: ---- ---- ---- * Load the specified resource as part of loading the script ---- ---- * Return a hash to the run-time version of the resource ---- ---- This function can only be called within go.property <> function calls. ----@param path string? # optional resource path string to the resource ----@return hash # a path hash to the binary version of the resource -function resource.buffer(path) end - ----Constructor-like function with two purposes: ---- ---- ---- * Load the specified resource as part of loading the script ---- ---- * Return a hash to the run-time version of the resource ---- ---- This function can only be called within go.property <> function calls. ----@param path string? # optional resource path string to the resource ----@return hash # a path hash to the binary version of the resource -function resource.font(path) end - ----gets the buffer from a resource ----@param path hash|string # The path to the resource ----@return buffer # The resource buffer -function resource.get_buffer(path) end - ----Return a reference to the Manifest that is currently loaded. ----@return number # reference to the Manifest that is currently loaded -function resource.get_current_manifest() end - ----Gets the text metrics from a font ----@param url hash # the font to get the (unscaled) metrics from ----@param text string # text to measure ----@param options table? # A table containing parameters for the text. Supported entries: ----@return table # a table with the following fields: -function resource.get_text_metrics(url, text, options) end - ----Is any liveupdate data mounted and currently in use? ----This can be used to determine if a new manifest or zip file should be downloaded. ----@return bool # true if a liveupdate archive (any format) has been loaded -function resource.is_using_liveupdate_data() end - ----Loads the resource data for a specific resource. ----@param path string # The path to the resource ----@return buffer # Returns the buffer stored on disc -function resource.load(path) end - ----Constructor-like function with two purposes: ---- ---- ---- * Load the specified resource as part of loading the script ---- ---- * Return a hash to the run-time version of the resource ---- ---- This function can only be called within go.property <> function calls. ----@param path string? # optional resource path string to the resource ----@return hash # a path hash to the binary version of the resource -function resource.material(path) end - ----Sets the resource data for a specific resource ----@param path string|hash # The path to the resource ----@param buffer buffer # The buffer of precreated data, suitable for the intended resource type -function resource.set(path, buffer) end - ----sets the buffer of a resource ----@param path hash|string # The path to the resource ----@param buffer buffer # The resource buffer -function resource.set_buffer(path, buffer) end - ----Update internal sound resource (wavc/oggc) with new data ----@param path hash|string # The path to the resource ----@param buffer string # A lua string containing the binary sound data -function resource.set_sound(path, buffer) end - ----Sets the pixel data for a specific texture. ----@param path hash|string # The path to the resource ----@param table table # A table containing info about the texture. Supported entries: ----@param buffer buffer # The buffer of precreated pixel data Currently, only 1 mipmap is generated. -function resource.set_texture(path, table, buffer) end - ----Stores a zip file and uses it for live update content. The contents of the ----zip file will be verified against the manifest to ensure file integrity. ----It is possible to opt out of the resource verification using an option passed ----to this function. ----The path is stored in the (internal) live update location. ----@param path string # the path to the original file on disc ----@param callback fun(self: object, status: constant) # the callback function executed after the storage has completed ----@param options table? # optional table with extra parameters. Supported entries: -function resource.store_archive(path, callback, options) end - ----Create a new manifest from a buffer. The created manifest is verified ----by ensuring that the manifest was signed using the bundled public/private ----key-pair during the bundle process and that the manifest supports the current ----running engine version. Once the manifest is verified it is stored on device. ----The next time the engine starts (or is rebooted) it will look for the stored ----manifest before loading resources. Storing a new manifest allows the ----developer to update the game, modify existing resources, or add new ----resources to the game through LiveUpdate. ----@param manifest_buffer string # the binary data that represents the manifest ----@param callback fun(self: object, status: constant) # the callback function executed once the engine has attempted to store the manifest. -function resource.store_manifest(manifest_buffer, callback) end - ----add a resource to the data archive and runtime index. The resource will be verified ----internally before being added to the data archive. ----@param manifest_reference number # The manifest to check against. ----@param data string # The resource data that should be stored. ----@param hexdigest string # The expected hash for the resource, retrieved through collectionproxy.missing_resources. ----@param callback fun(self: object, hexdigest: string, status: boolean) # The callback function that is executed once the engine has been attempted to store the resource. -function resource.store_resource(manifest_reference, data, hexdigest, callback) end - ----Constructor-like function with two purposes: ---- ---- ---- * Load the specified resource as part of loading the script ---- ---- * Return a hash to the run-time version of the resource ---- ---- This function can only be called within go.property <> function calls. ----@param path string? # optional resource path string to the resource ----@return hash # a path hash to the binary version of the resource -function resource.texture(path) end - ----Constructor-like function with two purposes: ---- ---- ---- * Load the specified resource as part of loading the script ---- ---- * Return a hash to the run-time version of the resource ---- ---- This function can only be called within go.property <> function calls. ----@param path string? # optional resource path string to the resource ----@return hash # a path hash to the binary version of the resource -function resource.tile_source(path) end - - - - -return resource \ No newline at end of file diff --git a/meta/3rd/Defold/library/sound.lua b/meta/3rd/Defold/library/sound.lua deleted file mode 100644 index 647de702..00000000 --- a/meta/3rd/Defold/library/sound.lua +++ /dev/null @@ -1,126 +0,0 @@ ----Sound API documentation ----Sound API documentation ----@class sound -sound = {} ----Get mixer group gain ---- Note that gain is in linear scale, between 0 and 1. ----To get the dB value from the gain, use the formula 20 * log(gain). ----Inversely, to find the linear value from a dB value, use the formula ----10db/20. ----@param group string|hash # group name ----@return number # gain in linear scale -function sound.get_group_gain(group) end - ----Get a mixer group name as a string. ---- This function is to be used for debugging and ----development tooling only. The function does a reverse hash lookup, which does not ----return a proper string value when the game is built in release mode. ----@param group string|hash # group name ----@return string # group name -function sound.get_group_name(group) end - ----Get a table of all mixer group names (hashes). ----@return table # table of mixer group names -function sound.get_groups() end - ----Get peak value from mixer group. ---- Note that gain is in linear scale, between 0 and 1. ----To get the dB value from the gain, use the formula 20 * log(gain). ----Inversely, to find the linear value from a dB value, use the formula ----10db/20. ----Also note that the returned value might be an approximation and in particular ----the effective window might be larger than specified. ----@param group string|hash # group name ----@param window number # window length in seconds ----@return number # peak value for left channel ----@return number # peak value for right channel -function sound.get_peak(group, window) end - ----Get RMS (Root Mean Square) value from mixer group. This value is the ----square root of the mean (average) value of the squared function of ----the instantaneous values. ----For instance: for a sinewave signal with a peak gain of -1.94 dB (0.8 linear), ----the RMS is 0.8 ? 1/sqrt(2) which is about 0.566. ---- Note the returned value might be an approximation and in particular ----the effective window might be larger than specified. ----@param group string|hash # group name ----@param window number # window length in seconds ----@return number # RMS value for left channel ----@return number # RMS value for right channel -function sound.get_rms(group, window) end - ----Checks if background music is playing, e.g. from iTunes. ---- On non mobile platforms, ----this function always return false. ---- On Android you can only get a correct reading ----of this state if your game is not playing any sounds itself. This is a limitation ----in the Android SDK. If your game is playing any sounds, even with a gain of zero, this ----function will return false. ----The best time to call this function is: ---- ---- ---- * In the init function of your main collection script before any sounds are triggered ---- ---- * In a window listener callback when the window.WINDOW_EVENT_FOCUS_GAINED event is received ---- ----Both those times will give you a correct reading of the state even when your application is ----swapped out and in while playing sounds and it works equally well on Android and iOS. ----@return boolean # true if music is playing, otherwise false. -function sound.is_music_playing() end - ----Checks if a phone call is active. If there is an active phone call all ----other sounds will be muted until the phone call is finished. ---- On non mobile platforms, ----this function always return false. ----@return boolean # true if there is an active phone call, false otherwise. -function sound.is_phone_call_active() end - ----Pause all active voices ----@param url string|hash|url # the sound that should pause ----@param pause bool # true if the sound should pause -function sound.pause(url, pause) end - ----Make the sound component play its sound. Multiple voices are supported. The limit is set to 32 voices per sound component. ---- Note that gain is in linear scale, between 0 and 1. ----To get the dB value from the gain, use the formula 20 * log(gain). ----Inversely, to find the linear value from a dB value, use the formula ----10db/20. ---- A sound will continue to play even if the game object the sound component belonged to is deleted. You can call sound.stop() to stop the sound. ----@param url string|hash|url # the sound that should play ----@param play_properties table? # ----@param complete_function (fun(self: object, message_id: hash, message: table, sender: number))? # function to call when the sound has finished playing. ----@return number # The identifier for the sound voice -function sound.play(url, play_properties, complete_function) end - ----Set gain on all active playing voices of a sound. ---- Note that gain is in linear scale, between 0 and 1. ----To get the dB value from the gain, use the formula 20 * log(gain). ----Inversely, to find the linear value from a dB value, use the formula ----10db/20. ----@param url string|hash|url # the sound to set the gain of ----@param gain number? # sound gain between 0 and 1. The final gain of the sound will be a combination of this gain, the group gain and the master gain. -function sound.set_gain(url, gain) end - ----Set mixer group gain ---- Note that gain is in linear scale, between 0 and 1. ----To get the dB value from the gain, use the formula 20 * log(gain). ----Inversely, to find the linear value from a dB value, use the formula ----10db/20. ----@param group string|hash # group name ----@param gain number # gain in linear scale -function sound.set_group_gain(group, gain) end - ----Set panning on all active playing voices of a sound. ----The valid range is from -1.0 to 1.0, representing -45 degrees left, to +45 degrees right. ----@param url string|hash|url # the sound to set the panning value to ----@param pan number? # sound panning between -1.0 and 1.0 -function sound.set_pan(url, pan) end - ----Stop playing all active voices ----@param url string|hash|url # the sound that should stop -function sound.stop(url) end - - - - -return sound \ No newline at end of file diff --git a/meta/3rd/Defold/library/sprite.lua b/meta/3rd/Defold/library/sprite.lua deleted file mode 100644 index 6e909d15..00000000 --- a/meta/3rd/Defold/library/sprite.lua +++ /dev/null @@ -1,32 +0,0 @@ ----Sprite API documentation ----Sprite API documentation ----@class sprite -sprite = {} ----Play an animation on a sprite component from its tile set ----An optional completion callback function can be provided that will be called when ----the animation has completed playing. If no function is provided, ----a animation_done <> message is sent to the script that started the animation. ----@param url string|hash|url # the sprite that should play the animation ----@param id # hash name hash of the animation to play ----@param complete_function (fun(self: object, message_id: hash, message: table, sender: number))? # function to call when the animation has completed. ----@param play_properties table? # optional table with properties: -function sprite.play_flipbook(url, id, complete_function, play_properties) end - ----Sets horizontal flipping of the provided sprite's animations. ----The sprite is identified by its URL. ----If the currently playing animation is flipped by default, flipping it again will make it appear like the original texture. ----@param url string|hash|url # the sprite that should flip its animations ----@param flip boolean # true if the sprite should flip its animations, false if not -function sprite.set_hflip(url, flip) end - ----Sets vertical flipping of the provided sprite's animations. ----The sprite is identified by its URL. ----If the currently playing animation is flipped by default, flipping it again will make it appear like the original texture. ----@param url string|hash|url # the sprite that should flip its animations ----@param flip boolean # true if the sprite should flip its animations, false if not -function sprite.set_vflip(url, flip) end - - - - -return sprite \ No newline at end of file diff --git a/meta/3rd/Defold/library/system.lua b/meta/3rd/Defold/library/system.lua deleted file mode 100644 index 039f7490..00000000 --- a/meta/3rd/Defold/library/system.lua +++ /dev/null @@ -1,161 +0,0 @@ ----System API documentation ----Functions and messages for using system resources, controlling the engine, ----error handling and debugging. ----@class sys -sys = {} ----network connected through other, non cellular, connection -sys.NETWORK_CONNECTED = nil ----network connected through mobile cellular -sys.NETWORK_CONNECTED_CELLULAR = nil ----no network connection found -sys.NETWORK_DISCONNECTED = nil ----deserializes buffer into a lua table ----@param buffer string # buffer to deserialize from ----@return table # lua table with deserialized data -function sys.deserialize(buffer) end - ----Terminates the game application and reports the specified code to the OS. ----@param code number # exit code to report to the OS, 0 means clean exit -function sys.exit(code) end - ----Returns a table with application information for the requested app. ---- On iOS, the app_string is an url scheme for the app that is queried. Your ----game needs to list the schemes that are queried in an LSApplicationQueriesSchemes array ----in a custom "Info.plist". ---- On Android, the app_string is the package identifier for the app. ----@param app_string string # platform specific string with application package or query, see above for details. ----@return table # table with application information in the following fields: -function sys.get_application_info(app_string) end - ----The path from which the application is run. ----@return string # path to application executable -function sys.get_application_path() end - ----Get config value from the game.project configuration file. ----In addition to the project file, configuration values can also be passed ----to the runtime as command line arguments with the --config argument. ----@param key string # key to get value for. The syntax is SECTION.KEY ----@return string # config value as a string. nil if the config key doesn't exists -function sys.get_config(key) end - ----Get config value from the game.project configuration file with default value ----@param key string # key to get value for. The syntax is SECTION.KEY ----@param default_value string # default value to return if the value does not exist ----@return string # config value as a string. default_value if the config key does not exist -function sys.get_config(key, default_value) end - ---- Returns the current network connectivity status ----on mobile platforms. ----On desktop, this function always return sys.NETWORK_CONNECTED. ----@return constant # network connectivity status: -function sys.get_connectivity() end - ----Returns a table with engine information. ----@return table # table with engine information in the following fields: -function sys.get_engine_info() end - ----Returns an array of tables with information on network interfaces. ----@return table # an array of tables. Each table entry contain the following fields: -function sys.get_ifaddrs() end - ----The save-file path is operating system specific and is typically located under the user's home directory. ----@param application_id string # user defined id of the application, which helps define the location of the save-file ----@param file_name string # file-name to get path for ----@return string # path to save-file -function sys.get_save_file(application_id, file_name) end - ----Returns a table with system information. ----@param options table # (optional) options table - ignore_secure boolean this flag ignores values might be secured by OS e.g. device_ident ----@return table # table with system information in the following fields: -function sys.get_sys_info(options) end - ----If the file exists, it must have been created by sys.save to be loaded. ----@param filename string # file to read from ----@return table # lua table, which is empty if the file could not be found -function sys.load(filename) end - ----Loads a custom resource. Specify the full filename of the resource that you want ----to load. When loaded, the file data is returned as a string. ----If loading fails, the function returns nil plus the error message. ----In order for the engine to include custom resources in the build process, you need ----to specify them in the "custom_resources" key in your "game.project" settings file. ----You can specify single resource files or directories. If a directory is included ----in the resource list, all files and directories in that directory is recursively ----included: ----For example "main/data/,assets/level_data.json". ----@param filename string # resource to load, full path ----@return string # loaded data, or nil if the resource could not be loaded ----@return string # the error message, or nil if no error occurred -function sys.load_resource(filename) end - ----Open URL in default application, typically a browser ----@param url string # url to open ----@param attributes table? # table with attributes target - string : Optional. Specifies the target attribute or the name of the window. The following values are supported: - _self - (default value) URL replaces the current page. - _blank - URL is loaded into a new window, or tab. - _parent - URL is loaded into the parent frame. - _top - URL replaces any framesets that may be loaded. - name - The name of the window (Note: the name does not specify the title of the new window). ----@return boolean # a boolean indicating if the url could be opened or not -function sys.open_url(url, attributes) end - ----Reboots the game engine with a specified set of arguments. ----Arguments will be translated into command line arguments. Calling reboot ----function is equivalent to starting the engine with the same arguments. ----On startup the engine reads configuration from "game.project" in the ----project root. ----@param arg1 string # argument 1 ----@param arg2 string # argument 2 ----@param arg3 string # argument 3 ----@param arg4 string # argument 4 ----@param arg5 string # argument 5 ----@param arg6 string # argument 6 -function sys.reboot(arg1, arg2, arg3, arg4, arg5, arg6) end - ----The table can later be loaded by sys.load. ----Use sys.get_save_file to obtain a valid location for the file. ----Internally, this function uses a workspace buffer sized output file sized 512kb. ----This size reflects the output file size which must not exceed this limit. ----Additionally, the total number of rows that any one table may contain is limited to 65536 ----(i.e. a 16 bit range). When tables are used to represent arrays, the values of ----keys are permitted to fall within a 32 bit range, supporting sparse arrays, however ----the limit on the total number of rows remains in effect. ----@param filename string # file to write to ----@param table table # lua table to save ----@return boolean # a boolean indicating if the table could be saved or not -function sys.save(filename, table) end - ----The buffer can later deserialized by sys.deserialize. ----This method has all the same limitations as sys.save. ----@param table table # lua table to serialize ----@return string # serialized data buffer -function sys.serialize(table) end - ----Sets the host that is used to check for network connectivity against. ----@param host string # hostname to check against -function sys.set_connectivity_host(host) end - ----Set the Lua error handler function. ----The error handler is a function which is called whenever a lua runtime error occurs. ----@param error_handler fun(source: string, message: string, traceback: string) # the function to be called on error -function sys.set_error_handler(error_handler) end - ----Set game update-frequency (frame cap). This option is equivalent to display.update_frequency in ----the "game.project" settings but set in run-time. If Vsync checked in "game.project", the rate will ----be clamped to a swap interval that matches any detected main monitor refresh rate. If Vsync is ----unchecked the engine will try to respect the rate in software using timers. There is no ----guarantee that the frame cap will be achieved depending on platform specifics and hardware settings. ----@param frequency number # target frequency. 60 for 60 fps -function sys.set_update_frequency(frequency) end - ----Set the vsync swap interval. The interval with which to swap the front and back buffers ----in sync with vertical blanks (v-blank), the hardware event where the screen image is updated ----with data from the front buffer. A value of 1 swaps the buffers at every v-blank, a value of ----2 swaps the buffers every other v-blank and so on. A value of 0 disables waiting for v-blank ----before swapping the buffers. Default value is 1. ----When setting the swap interval to 0 and having vsync disabled in ----"game.project", the engine will try to respect the set frame cap value from ----"game.project" in software instead. ----This setting may be overridden by driver settings. ----@param swap_interval number # target swap interval. -function sys.set_vsync_swap_interval(swap_interval) end - - - - -return sys \ No newline at end of file diff --git a/meta/3rd/Defold/library/tilemap.lua b/meta/3rd/Defold/library/tilemap.lua deleted file mode 100644 index d9e4e8bb..00000000 --- a/meta/3rd/Defold/library/tilemap.lua +++ /dev/null @@ -1,78 +0,0 @@ ----Tilemap API documentation ----Functions and messages used to manipulate tile map components. ----@class tilemap -tilemap = {} ----flip tile horizontally -tilemap.H_FLIP = nil ----rotate tile 180 degrees clockwise -tilemap.ROTATE_180 = nil ----rotate tile 270 degrees clockwise -tilemap.ROTATE_270 = nil ----rotate tile 90 degrees clockwise -tilemap.ROTATE_90 = nil ----flip tile vertically -tilemap.V_FLIP = nil ----Get the bounds for a tile map. This function returns multiple values: ----The lower left corner index x and y coordinates (1-indexed), ----the tile map width and the tile map height. ----The resulting values take all tile map layers into account, meaning that ----the bounds are calculated as if all layers were collapsed into one. ----@param url string|hash|url # the tile map ----@return number # x coordinate of the bottom left corner ----@return number # y coordinate of the bottom left corner ----@return number # number of columns (width) in the tile map ----@return number # number of rows (height) in the tile map -function tilemap.get_bounds(url) end - ----Get the tile set at the specified position in the tilemap. ----The position is identified by the tile index starting at origin ----with index 1, 1. (see tilemap.set_tile() <>) ----Which tile map and layer to query is identified by the URL and the ----layer name parameters. ----@param url string|hash|url # the tile map ----@param layer string|hash # name of the layer for the tile ----@param x number # x-coordinate of the tile ----@param y number # y-coordinate of the tile ----@return number # index of the tile -function tilemap.get_tile(url, layer, x, y) end - ----Replace a tile in a tile map with a new tile. ----The coordinates of the tiles are indexed so that the "first" tile just ----above and to the right of origin has coordinates 1,1. ----Tiles to the left of and below origin are indexed 0, -1, -2 and so forth. ---- ----+-------+-------+------+------+ ----| 0,3 | 1,3 | 2,3 | 3,3 | ----+-------+-------+------+------+ ----| 0,2 | 1,2 | 2,2 | 3,2 | ----+-------+-------+------+------+ ----| 0,1 | 1,1 | 2,1 | 3,1 | ----+-------O-------+------+------+ ----| 0,0 | 1,0 | 2,0 | 3,0 | ----+-------+-------+------+------+ ---- ---- ----The coordinates must be within the bounds of the tile map as it were created. ----That is, it is not possible to extend the size of a tile map by setting tiles outside the edges. ----To clear a tile, set the tile to number 0. Which tile map and layer to manipulate is identified by the URL and the layer name parameters. ----Transform bitmask is arithmetic sum of one or both FLIP constants (tilemap.H_FLIP, tilemap.V_FLIP) and/or one of ROTATION constants ----(tilemap.ROTATE_90, tilemap.ROTATE_180, tilemap.ROTATE_270). ----Flip always applies before rotation (clockwise). ----@param url string|hash|url # the tile map ----@param layer string|hash # name of the layer for the tile ----@param x number # x-coordinate of the tile ----@param y number # y-coordinate of the tile ----@param tile number # index of new tile to set. 0 resets the cell ----@param transform_bitmask number? # optional flip and/or rotation should be applied to the tile -function tilemap.set_tile(url, layer, x, y, tile, transform_bitmask) end - ----Sets the visibility of the tilemap layer ----@param url string|hash|url # the tile map ----@param layer string|hash # name of the layer for the tile ----@param visible boolean # should the layer be visible -function tilemap.set_visible(url, layer, visible) end - - - - -return tilemap \ No newline at end of file diff --git a/meta/3rd/Defold/library/timer.lua b/meta/3rd/Defold/library/timer.lua deleted file mode 100644 index 4a112fcd..00000000 --- a/meta/3rd/Defold/library/timer.lua +++ /dev/null @@ -1,36 +0,0 @@ ----Timer API documentation ----Timers allow you to set a delay and a callback to be called when the timer completes. ----The timers created with this API are updated with the collection timer where they ----are created. If you pause or speed up the collection (using set_time_step) it will ----also affect the new timer. ----@class timer -timer = {} ----Indicates an invalid timer handle -timer.INVALID_TIMER_HANDLE = nil ----You may cancel a timer from inside a timer callback. ----Cancelling a timer that is already executed or cancelled is safe. ----@param handle hash # the timer handle returned by timer.delay() ----@return boolean # if the timer was active, false if the timer is already cancelled / complete -function timer.cancel(handle) end - ----Adds a timer and returns a unique handle ----You may create more timers from inside a timer callback. ----Using a delay of 0 will result in a timer that triggers at the next frame just before ----script update functions. ----If you want a timer that triggers on each frame, set delay to 0.0f and repeat to true. ----Timers created within a script will automatically die when the script is deleted. ----@param delay number # time interval in seconds ----@param _repeat boolean # true = repeat timer until cancel, false = one-shot timer ----@param callback fun(self: object, handle: number, time_elapsed: number) # timer callback function ----@return hash # handle identifier for the create timer, returns timer.INVALID_TIMER_HANDLE if the timer can not be created -function timer.delay(delay, _repeat, callback) end - ----Manual triggering a callback for a timer. ----@param handle hash # the timer handle returned by timer.delay() ----@return boolean # if the timer was active, false if the timer is already cancelled / complete -function timer.trigger(handle) end - - - - -return timer \ No newline at end of file diff --git a/meta/3rd/Defold/library/vector_math.lua b/meta/3rd/Defold/library/vector_math.lua deleted file mode 100644 index 8196bfd6..00000000 --- a/meta/3rd/Defold/library/vector_math.lua +++ /dev/null @@ -1,406 +0,0 @@ ----Vector math API documentation ----Functions for mathematical operations on vectors, matrices and quaternions. ---- ---- ---- * The vector types (vmath.vector3 and vmath.vector4) supports addition and subtraction ---- with vectors of the same type. Vectors can be negated and multiplied (scaled) or divided by numbers. ---- ---- * The quaternion type (vmath.quat) supports multiplication with other quaternions. ---- ---- * The matrix type (vmath.matrix4) can be multiplied with numbers, other matrices ---- and vmath.vector4 values. ---- ---- * All types performs equality comparison by each component value. ---- ----The following components are available for the various types: ---- ---- vector3 ----x, y and z. Example: v.y ---- vector4 ----x, y, z, and w. Example: v.w ---- quaternion ----x, y, z, and w. Example: q.w ---- matrix4 ----m00 to m33 where the first number is the row (starting from 0) and the second ----number is the column. Columns can be accessed with c0 to c3, returning a vector4. ----Example: m.m21 which is equal to m.c1.z ---- vector ----indexed by number 1 to the vector length. Example: v[3] - ----@class vmath -vmath = {} ----Calculates the conjugate of a quaternion. The result is a ----quaternion with the same magnitudes but with the sign of ----the imaginary (vector) parts changed: ----q* = [w, -v] ----@param q1 quaternion # quaternion of which to calculate the conjugate ----@return quaternion # the conjugate -function vmath.conj(q1) end - ----Given two linearly independent vectors P and Q, the cross product, ----P ? Q, is a vector that is perpendicular to both P and Q and ----therefore normal to the plane containing them. ----If the two vectors have the same direction (or have the exact ----opposite direction from one another, i.e. are not linearly independent) ----or if either one has zero length, then their cross product is zero. ----@param v1 vector3 # first vector ----@param v2 vector3 # second vector ----@return vector3 # a new vector representing the cross product -function vmath.cross(v1, v2) end - ----The returned value is a scalar defined as: ----P ? Q = |P| |Q| cos ? ----where ? is the angle between the vectors P and Q. ---- ---- ---- * If the dot product is positive then the angle between the vectors is below 90 degrees. ---- ---- * If the dot product is zero the vectors are perpendicular (at right-angles to each other). ---- ---- * If the dot product is negative then the angle between the vectors is more than 90 degrees. ----@param v1 vector3|vector4 # first vector ----@param v2 vector3|vector4 # second vector ----@return number # dot product -function vmath.dot(v1, v2) end - ----The resulting matrix is the inverse of the supplied matrix. ---- For ortho-normal matrices, e.g. regular object transformation, ----use vmath.ortho_inv() instead. ----The specialized inverse for ortho-normalized matrices is much faster ----than the general inverse. ----@param m1 matrix4 # matrix to invert ----@return matrix4 # inverse of the supplied matrix -function vmath.inv(m1) end - ----Returns the length of the supplied vector or quaternion. ----If you are comparing the lengths of vectors or quaternions, you should compare ----the length squared instead as it is slightly more efficient to calculate ----(it eliminates a square root calculation). ----@param v vector3|vector4|quat # value of which to calculate the length ----@return number # length -function vmath.length(v) end - ----Returns the squared length of the supplied vector or quaternion. ----@param v vector3|vector4|quat # value of which to calculate the squared length ----@return number # squared length -function vmath.length_sqr(v) end - ----Linearly interpolate between two vectors. The function ----treats the vectors as positions and interpolates between ----the positions in a straight line. Lerp is useful to describe ----transitions from one place to another over time. ---- The function does not clamp t between 0 and 1. ----@param t number # interpolation parameter, 0-1 ----@param v1 vector3|vector4 # vector to lerp from ----@param v2 vector3|vector4 # vector to lerp to ----@return vector3|vector4 # the lerped vector -function vmath.lerp(t, v1, v2) end - ----Linearly interpolate between two quaternions. Linear ----interpolation of rotations are only useful for small ----rotations. For interpolations of arbitrary rotations, ----vmath.slerp <> yields much better results. ---- The function does not clamp t between 0 and 1. ----@param t number # interpolation parameter, 0-1 ----@param q1 quaternion # quaternion to lerp from ----@param q2 quaternion # quaternion to lerp to ----@return quaternion # the lerped quaternion -function vmath.lerp(t, q1, q2) end - ----Linearly interpolate between two values. Lerp is useful ----to describe transitions from one value to another over time. ---- The function does not clamp t between 0 and 1. ----@param t number # interpolation parameter, 0-1 ----@param n1 number # number to lerp from ----@param n2 number # number to lerp to ----@return number # the lerped number -function vmath.lerp(t, n1, n2) end - ----The resulting identity matrix describes a transform with ----no translation or rotation. ----@return matrix4 # identity matrix -function vmath.matrix4() end - ----Creates a new matrix with all components set to the ----corresponding values from the supplied matrix. I.e. ----the function creates a copy of the given matrix. ----@param m1 matrix4 # existing matrix ----@return matrix4 # matrix which is a copy of the specified matrix -function vmath.matrix4(m1) end - ----The resulting matrix describes a rotation around the axis by the specified angle. ----@param v vector3 # axis ----@param angle number # angle in radians ----@return matrix4 # matrix represented by axis and angle -function vmath.matrix4_axis_angle(v, angle) end - ----The resulting matrix describes the same rotation as the quaternion, but does not have any translation (also like the quaternion). ----@param q quaternion # quaternion to create matrix from ----@return matrix4 # matrix represented by quaternion -function vmath.matrix4_from_quat(q) end - ----Constructs a frustum matrix from the given values. The left, right, ----top and bottom coordinates of the view cone are expressed as distances ----from the center of the near clipping plane. The near and far coordinates ----are expressed as distances from the tip of the view frustum cone. ----@param left number # coordinate for left clipping plane ----@param right number # coordinate for right clipping plane ----@param bottom number # coordinate for bottom clipping plane ----@param top number # coordinate for top clipping plane ----@param near number # coordinate for near clipping plane ----@param far number # coordinate for far clipping plane ----@return matrix4 # matrix representing the frustum -function vmath.matrix4_frustum(left, right, bottom, top, near, far) end - ----The resulting matrix is created from the supplied look-at parameters. ----This is useful for constructing a view matrix for a camera or ----rendering in general. ----@param eye vector3 # eye position ----@param look_at vector3 # look-at position ----@param up vector3 # up vector ----@return matrix4 # look-at matrix -function vmath.matrix4_look_at(eye, look_at, up) end - ----Creates an orthographic projection matrix. ----This is useful to construct a projection matrix for a camera or rendering in general. ----@param left number # coordinate for left clipping plane ----@param right number # coordinate for right clipping plane ----@param bottom number # coordinate for bottom clipping plane ----@param top number # coordinate for top clipping plane ----@param near number # coordinate for near clipping plane ----@param far number # coordinate for far clipping plane ----@return matrix4 # orthographic projection matrix -function vmath.matrix4_orthographic(left, right, bottom, top, near, far) end - ----Creates a perspective projection matrix. ----This is useful to construct a projection matrix for a camera or rendering in general. ----@param fov number # angle of the full vertical field of view in radians ----@param aspect number # aspect ratio ----@param near number # coordinate for near clipping plane ----@param far number # coordinate for far clipping plane ----@return matrix4 # perspective projection matrix -function vmath.matrix4_perspective(fov, aspect, near, far) end - ----The resulting matrix describes a rotation around the x-axis ----by the specified angle. ----@param angle number # angle in radians around x-axis ----@return matrix4 # matrix from rotation around x-axis -function vmath.matrix4_rotation_x(angle) end - ----The resulting matrix describes a rotation around the y-axis ----by the specified angle. ----@param angle number # angle in radians around y-axis ----@return matrix4 # matrix from rotation around y-axis -function vmath.matrix4_rotation_y(angle) end - ----The resulting matrix describes a rotation around the z-axis ----by the specified angle. ----@param angle number # angle in radians around z-axis ----@return matrix4 # matrix from rotation around z-axis -function vmath.matrix4_rotation_z(angle) end - ----The resulting matrix describes a translation of a point ----in euclidean space. ----@param position vector3|vector4 # position vector to create matrix from ----@return matrix4 # matrix from the supplied position vector -function vmath.matrix4_translation(position) end - ----Performs an element wise multiplication between two vectors of the same type ----The returned value is a vector defined as (e.g. for a vector3): ----v = vmath.mul_per_elem(a, b) = vmath.vector3(a.x * b.x, a.y * b.y, a.z * b.z) ----@param v1 vector3|vector4 # first vector ----@param v2 vector3|vector4 # second vector ----@return vector3|vector4 # multiplied vector -function vmath.mul_per_elem(v1, v2) end - ----Normalizes a vector, i.e. returns a new vector with the same ----direction as the input vector, but with length 1. ---- The length of the vector must be above 0, otherwise a ----division-by-zero will occur. ----@param v1 vector3|vector4|quat # vector to normalize ----@return vector3|vector4|quat # new normalized vector -function vmath.normalize(v1) end - ----The resulting matrix is the inverse of the supplied matrix. ----The supplied matrix has to be an ortho-normal matrix, e.g. ----describe a regular object transformation. ---- For matrices that are not ortho-normal ----use the general inverse vmath.inv() instead. ----@param m1 matrix4 # ortho-normalized matrix to invert ----@return matrix4 # inverse of the supplied matrix -function vmath.ortho_inv(m1) end - ----Calculates the extent the projection of the first vector onto the second. ----The returned value is a scalar p defined as: ----p = |P| cos ? / |Q| ----where ? is the angle between the vectors P and Q. ----@param v1 vector3 # vector to be projected on the second ----@param v2 vector3 # vector onto which the first will be projected, must not have zero length ----@return number # the projected extent of the first vector onto the second -function vmath.project(v1, v2) end - ----Creates a new identity quaternion. The identity ----quaternion is equal to: ----vmath.quat(0, 0, 0, 1) ----@return quaternion # new identity quaternion -function vmath.quat() end - ----Creates a new quaternion with all components set to the ----corresponding values from the supplied quaternion. I.e. ----This function creates a copy of the given quaternion. ----@param q1 quaternion # existing quaternion ----@return quaternion # new quaternion -function vmath.quat(q1) end - ----Creates a new quaternion with the components set ----according to the supplied parameter values. ----@param x number # x coordinate ----@param y number # y coordinate ----@param z number # z coordinate ----@param w number # w coordinate ----@return quaternion # new quaternion -function vmath.quat(x, y, z, w) end - ----The resulting quaternion describes a rotation of angle ----radians around the axis described by the unit vector v. ----@param v vector3 # axis ----@param angle number # angle ----@return quaternion # quaternion representing the axis-angle rotation -function vmath.quat_axis_angle(v, angle) end - ----The resulting quaternion describes the rotation from the ----identity quaternion (no rotation) to the coordinate system ----as described by the given x, y and z base unit vectors. ----@param x vector3 # x base vector ----@param y vector3 # y base vector ----@param z vector3 # z base vector ----@return quaternion # quaternion representing the rotation of the specified base vectors -function vmath.quat_basis(x, y, z) end - ----The resulting quaternion describes the rotation that, ----if applied to the first vector, would rotate the first ----vector to the second. The two vectors must be unit ----vectors (of length 1). ---- The result is undefined if the two vectors point in opposite directions ----@param v1 vector3 # first unit vector, before rotation ----@param v2 vector3 # second unit vector, after rotation ----@return quaternion # quaternion representing the rotation from first to second vector -function vmath.quat_from_to(v1, v2) end - ----The resulting quaternion describes a rotation of angle ----radians around the x-axis. ----@param angle number # angle in radians around x-axis ----@return quaternion # quaternion representing the rotation around the x-axis -function vmath.quat_rotation_x(angle) end - ----The resulting quaternion describes a rotation of angle ----radians around the y-axis. ----@param angle number # angle in radians around y-axis ----@return quaternion # quaternion representing the rotation around the y-axis -function vmath.quat_rotation_y(angle) end - ----The resulting quaternion describes a rotation of angle ----radians around the z-axis. ----@param angle number # angle in radians around z-axis ----@return quaternion # quaternion representing the rotation around the z-axis -function vmath.quat_rotation_z(angle) end - ----Returns a new vector from the supplied vector that is ----rotated by the rotation described by the supplied ----quaternion. ----@param q quaternion # quaternion ----@param v1 vector3 # vector to rotate ----@return vector3 # the rotated vector -function vmath.rotate(q, v1) end - ----Spherically interpolates between two vectors. The difference to ----lerp is that slerp treats the vectors as directions instead of ----positions in space. ----The direction of the returned vector is interpolated by the angle ----and the magnitude is interpolated between the magnitudes of the ----from and to vectors. ---- Slerp is computationally more expensive than lerp. ----The function does not clamp t between 0 and 1. ----@param t number # interpolation parameter, 0-1 ----@param v1 vector3|vector4 # vector to slerp from ----@param v2 vector3|vector4 # vector to slerp to ----@return vector3|vector4 # the slerped vector -function vmath.slerp(t, v1, v2) end - ----Slerp travels the torque-minimal path maintaining constant ----velocity, which means it travels along the straightest path along ----the rounded surface of a sphere. Slerp is useful for interpolation ----of rotations. ----Slerp travels the torque-minimal path, which means it travels ----along the straightest path the rounded surface of a sphere. ---- The function does not clamp t between 0 and 1. ----@param t number # interpolation parameter, 0-1 ----@param q1 quaternion # quaternion to slerp from ----@param q2 quaternion # quaternion to slerp to ----@return quaternion # the slerped quaternion -function vmath.slerp(t, q1, q2) end - ----Creates a vector of arbitrary size. The vector is initialized ----with numeric values from a table. ---- The table values are converted to floating point ----values. If a value cannot be converted, a 0 is stored in that ----value position in the vector. ----@param t table # table of numbers ----@return vector # new vector -function vmath.vector(t) end - ----Creates a new zero vector with all components set to 0. ----@return vector3 # new zero vector -function vmath.vector3() end - ----Creates a new vector with all components set to the ----supplied scalar value. ----@param n number # scalar value to splat ----@return vector3 # new vector -function vmath.vector3(n) end - ----Creates a new vector with all components set to the ----corresponding values from the supplied vector. I.e. ----This function creates a copy of the given vector. ----@param v1 vector3 # existing vector ----@return vector3 # new vector -function vmath.vector3(v1) end - ----Creates a new vector with the components set to the ----supplied values. ----@param x number # x coordinate ----@param y number # y coordinate ----@param z number # z coordinate ----@return vector3 # new vector -function vmath.vector3(x, y, z) end - ----Creates a new zero vector with all components set to 0. ----@return vector4 # new zero vector -function vmath.vector4() end - ----Creates a new vector with all components set to the ----supplied scalar value. ----@param n number # scalar value to splat ----@return vector4 # new vector -function vmath.vector4(n) end - ----Creates a new vector with all components set to the ----corresponding values from the supplied vector. I.e. ----This function creates a copy of the given vector. ----@param v1 vector4 # existing vector ----@return vector4 # new vector -function vmath.vector4(v1) end - ----Creates a new vector with the components set to the ----supplied values. ----@param x number # x coordinate ----@param y number # y coordinate ----@param z number # z coordinate ----@param w number # w coordinate ----@return vector4 # new vector -function vmath.vector4(x, y, z, w) end - - - - -return vmath \ No newline at end of file diff --git a/meta/3rd/Defold/library/window.lua b/meta/3rd/Defold/library/window.lua deleted file mode 100644 index e62ae7c4..00000000 --- a/meta/3rd/Defold/library/window.lua +++ /dev/null @@ -1,56 +0,0 @@ ----Window API documentation ----Functions and constants to access the window, window event listeners ----and screen dimming. ----@class window -window = {} ----dimming mode off -window.DIMMING_OFF = nil ----dimming mode on -window.DIMMING_ON = nil ----dimming mode unknown -window.DIMMING_UNKNOWN = nil ----deiconified window event -window.WINDOW_EVENT_DEICONIFIED = nil ----focus gained window event -window.WINDOW_EVENT_FOCUS_GAINED = nil ----focus lost window event -window.WINDOW_EVENT_FOCUS_LOST = nil ----iconify window event -window.WINDOW_EVENT_ICONFIED = nil ----resized window event -window.WINDOW_EVENT_RESIZED = nil ---- Returns the current dimming mode set on a mobile device. ----The dimming mode specifies whether or not a mobile device should dim the screen after a period without user interaction. ----On platforms that does not support dimming, window.DIMMING_UNKNOWN is always returned. ----@return constant # The mode for screen dimming -function window.get_dim_mode() end - ----This returns the current lock state of the mouse cursor ----@return boolean # The lock state -function window.get_mouse_lock() end - ----This returns the current window size (width and height). ----@return number # The window width ----@return number # The window height -function window.get_size() end - ---- Sets the dimming mode on a mobile device. ----The dimming mode specifies whether or not a mobile device should dim the screen after a period without user interaction. The dimming mode will only affect the mobile device while the game is in focus on the device, but not when the game is running in the background. ----This function has no effect on platforms that does not support dimming. ----@param mode constant # The mode for screen dimming -function window.set_dim_mode(mode) end - ----Sets a window event listener. ----@param callback fun(self: object, event: constant, data: table) # A callback which receives info about window events. Pass an empty function or nil if you no longer wish to receive callbacks. -function window.set_listener(callback) end - ----Set the locking state for current mouse cursor on a PC platform. ----This function locks or unlocks the mouse cursor to the center point of the window. While the cursor is locked, ----mouse position updates will still be sent to the scripts as usual. ----@param flag boolean # The lock state for the mouse cursor -function window.set_mouse_lock(flag) end - - - - -return window \ No newline at end of file diff --git a/meta/3rd/Defold/library/zlib.lua b/meta/3rd/Defold/library/zlib.lua deleted file mode 100644 index 9d05c192..00000000 --- a/meta/3rd/Defold/library/zlib.lua +++ /dev/null @@ -1,18 +0,0 @@ ----Zlib compression API documentation ----Functions for compression and decompression of string buffers. ----@class zlib -zlib = {} ----A lua error is raised is on error ----@param buf string # buffer to deflate ----@return string # deflated buffer -function zlib.deflate(buf) end - ----A lua error is raised is on error ----@param buf string # buffer to inflate ----@return string # inflated buffer -function zlib.inflate(buf) end - - - - -return zlib \ No newline at end of file -- cgit v1.2.3 From cf102e1e4684d44d309a1848e9addff53bc4a878 Mon Sep 17 00:00:00 2001 From: carsakiller Date: Fri, 27 Oct 2023 20:42:07 -0400 Subject: refactor: replace Jass with LuaCATS submodule --- meta/3rd/Jass | 1 + meta/3rd/Jass/config.json | 6 - meta/3rd/Jass/library/jass/common.lua | 12329 -------------------------------- 3 files changed, 1 insertion(+), 12335 deletions(-) create mode 160000 meta/3rd/Jass delete mode 100644 meta/3rd/Jass/config.json delete mode 100644 meta/3rd/Jass/library/jass/common.lua (limited to 'meta') diff --git a/meta/3rd/Jass b/meta/3rd/Jass new file mode 160000 index 00000000..80d85cbb --- /dev/null +++ b/meta/3rd/Jass @@ -0,0 +1 @@ +Subproject commit 80d85cbbfd8ae2473fb39c7df4be814602f5bc4f diff --git a/meta/3rd/Jass/config.json b/meta/3rd/Jass/config.json deleted file mode 100644 index 1bbb0c7c..00000000 --- a/meta/3rd/Jass/config.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "words" : ["jass%.common"], - "settings" : { - "Lua.runtime.version": "Lua 5.3" - } -} diff --git a/meta/3rd/Jass/library/jass/common.lua b/meta/3rd/Jass/library/jass/common.lua deleted file mode 100644 index 4c49c110..00000000 --- a/meta/3rd/Jass/library/jass/common.lua +++ /dev/null @@ -1,12329 +0,0 @@ ----@meta ----@class real ----@class handle ----@class agent ----@class event ----@class player ----@class widget ----@class unit ----@class destructable ----@class item ----@class ability ----@class buff ----@class force ----@class group ----@class trigger ----@class triggercondition ----@class triggeraction ----@class timer ----@class location ----@class region ----@class rect ----@class boolexpr ----@class sound ----@class conditionfunc ----@class filterfunc ----@class unitpool ----@class itempool ----@class race ----@class alliancetype ----@class racepreference ----@class gamestate ----@class igamestate ----@class fgamestate ----@class playerstate ----@class playerscore ----@class playergameresult ----@class unitstate ----@class aidifficulty ----@class eventid ----@class gameevent ----@class playerevent ----@class playerunitevent ----@class unitevent ----@class limitop ----@class widgetevent ----@class dialogevent ----@class unittype ----@class gamespeed ----@class gamedifficulty ----@class gametype ----@class mapflag ----@class mapvisibility ----@class mapsetting ----@class mapdensity ----@class mapcontrol ----@class minimapicon ----@class playerslotstate ----@class volumegroup ----@class camerafield ----@class camerasetup ----@class playercolor ----@class placement ----@class startlocprio ----@class raritycontrol ----@class blendmode ----@class texmapflags ----@class effect ----@class effecttype ----@class weathereffect ----@class terraindeformation ----@class fogstate ----@class fogmodifier ----@class dialog ----@class button ----@class quest ----@class questitem ----@class defeatcondition ----@class timerdialog ----@class leaderboard ----@class multiboard ----@class multiboarditem ----@class trackable ----@class gamecache ----@class version ----@class itemtype ----@class texttag ----@class attacktype ----@class damagetype ----@class weapontype ----@class soundtype ----@class lightning ----@class pathingtype ----@class mousebuttontype ----@class animtype ----@class subanimtype ----@class image ----@class ubersplat ----@class hashtable ----@class framehandle ----@class originframetype ----@class framepointtype ----@class textaligntype ----@class frameeventtype ----@class oskeytype ----@class abilityintegerfield ----@class abilityrealfield ----@class abilitybooleanfield ----@class abilitystringfield ----@class abilityintegerlevelfield ----@class abilityreallevelfield ----@class abilitybooleanlevelfield ----@class abilitystringlevelfield ----@class abilityintegerlevelarrayfield ----@class abilityreallevelarrayfield ----@class abilitybooleanlevelarrayfield ----@class abilitystringlevelarrayfield ----@class unitintegerfield ----@class unitrealfield ----@class unitbooleanfield ----@class unitstringfield ----@class unitweaponintegerfield ----@class unitweaponrealfield ----@class unitweaponbooleanfield ----@class unitweaponstringfield ----@class itemintegerfield ----@class itemrealfield ----@class itembooleanfield ----@class itemstringfield ----@class movetype ----@class targetflag ----@class armortype ----@class heroattribute ----@class defensetype ----@class regentype ----@class unitcategory ----@class pathingflag ----@class commandbuttoneffect - ----'common' ----@class common ---- ----FALSE 'common.FALSE' ----@field FALSE boolean _false ---- ----TRUE 'common.TRUE' ----@field TRUE boolean _true ---- ----JASS_MAX_ARRAY_SIZE 'common.JASS_MAX_ARRAY_SIZE' ----@field JASS_MAX_ARRAY_SIZE integer _8192 ---- ----PLAYER_NEUTRAL_PASSIVE 'common.PLAYER_NEUTRAL_PASSIVE' ----@field PLAYER_NEUTRAL_PASSIVE integer _GetPlayerNeutralPassive() ---- ----PLAYER_NEUTRAL_AGGRESSIVE 'common.PLAYER_NEUTRAL_AGGRESSIVE' ----@field PLAYER_NEUTRAL_AGGRESSIVE integer _GetPlayerNeutralAggressive() ---- ----PLAYER_COLOR_RED 'common.PLAYER_COLOR_RED' ----@field PLAYER_COLOR_RED playercolor _ConvertPlayerColor(0) ---- ----PLAYER_COLOR_BLUE 'common.PLAYER_COLOR_BLUE' ----@field PLAYER_COLOR_BLUE playercolor _ConvertPlayerColor(1) ---- ----PLAYER_COLOR_CYAN 'common.PLAYER_COLOR_CYAN' ----@field PLAYER_COLOR_CYAN playercolor _ConvertPlayerColor(2) ---- ----PLAYER_COLOR_PURPLE 'common.PLAYER_COLOR_PURPLE' ----@field PLAYER_COLOR_PURPLE playercolor _ConvertPlayerColor(3) ---- ----PLAYER_COLOR_YELLOW 'common.PLAYER_COLOR_YELLOW' ----@field PLAYER_COLOR_YELLOW playercolor _ConvertPlayerColor(4) ---- ----PLAYER_COLOR_ORANGE 'common.PLAYER_COLOR_ORANGE' ----@field PLAYER_COLOR_ORANGE playercolor _ConvertPlayerColor(5) ---- ----PLAYER_COLOR_GREEN 'common.PLAYER_COLOR_GREEN' ----@field PLAYER_COLOR_GREEN playercolor _ConvertPlayerColor(6) ---- ----PLAYER_COLOR_PINK 'common.PLAYER_COLOR_PINK' ----@field PLAYER_COLOR_PINK playercolor _ConvertPlayerColor(7) ---- ----PLAYER_COLOR_LIGHT_GRAY 'common.PLAYER_COLOR_LIGHT_GRAY' ----@field PLAYER_COLOR_LIGHT_GRAY playercolor _ConvertPlayerColor(8) ---- ----PLAYER_COLOR_LIGHT_BLUE 'common.PLAYER_COLOR_LIGHT_BLUE' ----@field PLAYER_COLOR_LIGHT_BLUE playercolor _ConvertPlayerColor(9) ---- ----PLAYER_COLOR_AQUA 'common.PLAYER_COLOR_AQUA' ----@field PLAYER_COLOR_AQUA playercolor _ConvertPlayerColor(10) ---- ----PLAYER_COLOR_BROWN 'common.PLAYER_COLOR_BROWN' ----@field PLAYER_COLOR_BROWN playercolor _ConvertPlayerColor(11) ---- ----PLAYER_COLOR_MAROON 'common.PLAYER_COLOR_MAROON' ----@field PLAYER_COLOR_MAROON playercolor _ConvertPlayerColor(12) ---- ----PLAYER_COLOR_NAVY 'common.PLAYER_COLOR_NAVY' ----@field PLAYER_COLOR_NAVY playercolor _ConvertPlayerColor(13) ---- ----PLAYER_COLOR_TURQUOISE 'common.PLAYER_COLOR_TURQUOISE' ----@field PLAYER_COLOR_TURQUOISE playercolor _ConvertPlayerColor(14) ---- ----PLAYER_COLOR_VIOLET 'common.PLAYER_COLOR_VIOLET' ----@field PLAYER_COLOR_VIOLET playercolor _ConvertPlayerColor(15) ---- ----PLAYER_COLOR_WHEAT 'common.PLAYER_COLOR_WHEAT' ----@field PLAYER_COLOR_WHEAT playercolor _ConvertPlayerColor(16) ---- ----PLAYER_COLOR_PEACH 'common.PLAYER_COLOR_PEACH' ----@field PLAYER_COLOR_PEACH playercolor _ConvertPlayerColor(17) ---- ----PLAYER_COLOR_MINT 'common.PLAYER_COLOR_MINT' ----@field PLAYER_COLOR_MINT playercolor _ConvertPlayerColor(18) ---- ----PLAYER_COLOR_LAVENDER 'common.PLAYER_COLOR_LAVENDER' ----@field PLAYER_COLOR_LAVENDER playercolor _ConvertPlayerColor(19) ---- ----PLAYER_COLOR_COAL 'common.PLAYER_COLOR_COAL' ----@field PLAYER_COLOR_COAL playercolor _ConvertPlayerColor(20) ---- ----PLAYER_COLOR_SNOW 'common.PLAYER_COLOR_SNOW' ----@field PLAYER_COLOR_SNOW playercolor _ConvertPlayerColor(21) ---- ----PLAYER_COLOR_EMERALD 'common.PLAYER_COLOR_EMERALD' ----@field PLAYER_COLOR_EMERALD playercolor _ConvertPlayerColor(22) ---- ----PLAYER_COLOR_PEANUT 'common.PLAYER_COLOR_PEANUT' ----@field PLAYER_COLOR_PEANUT playercolor _ConvertPlayerColor(23) ---- ----RACE_HUMAN 'common.RACE_HUMAN' ----@field RACE_HUMAN race _ConvertRace(1) ---- ----RACE_ORC 'common.RACE_ORC' ----@field RACE_ORC race _ConvertRace(2) ---- ----RACE_UNDEAD 'common.RACE_UNDEAD' ----@field RACE_UNDEAD race _ConvertRace(3) ---- ----RACE_NIGHTELF 'common.RACE_NIGHTELF' ----@field RACE_NIGHTELF race _ConvertRace(4) ---- ----RACE_DEMON 'common.RACE_DEMON' ----@field RACE_DEMON race _ConvertRace(5) ---- ----RACE_OTHER 'common.RACE_OTHER' ----@field RACE_OTHER race _ConvertRace(7) ---- ----PLAYER_GAME_RESULT_VICTORY 'common.PLAYER_GAME_RESULT_VICTORY' ----@field PLAYER_GAME_RESULT_VICTORY playergameresult _ConvertPlayerGameResult(0) ---- ----PLAYER_GAME_RESULT_DEFEAT 'common.PLAYER_GAME_RESULT_DEFEAT' ----@field PLAYER_GAME_RESULT_DEFEAT playergameresult _ConvertPlayerGameResult(1) ---- ----PLAYER_GAME_RESULT_TIE 'common.PLAYER_GAME_RESULT_TIE' ----@field PLAYER_GAME_RESULT_TIE playergameresult _ConvertPlayerGameResult(2) ---- ----PLAYER_GAME_RESULT_NEUTRAL 'common.PLAYER_GAME_RESULT_NEUTRAL' ----@field PLAYER_GAME_RESULT_NEUTRAL playergameresult _ConvertPlayerGameResult(3) ---- ----ALLIANCE_PASSIVE 'common.ALLIANCE_PASSIVE' ----@field ALLIANCE_PASSIVE alliancetype _ConvertAllianceType(0) ---- ----ALLIANCE_HELP_REQUEST 'common.ALLIANCE_HELP_REQUEST' ----@field ALLIANCE_HELP_REQUEST alliancetype _ConvertAllianceType(1) ---- ----ALLIANCE_HELP_RESPONSE 'common.ALLIANCE_HELP_RESPONSE' ----@field ALLIANCE_HELP_RESPONSE alliancetype _ConvertAllianceType(2) ---- ----ALLIANCE_SHARED_XP 'common.ALLIANCE_SHARED_XP' ----@field ALLIANCE_SHARED_XP alliancetype _ConvertAllianceType(3) ---- ----ALLIANCE_SHARED_SPELLS 'common.ALLIANCE_SHARED_SPELLS' ----@field ALLIANCE_SHARED_SPELLS alliancetype _ConvertAllianceType(4) ---- ----ALLIANCE_SHARED_VISION 'common.ALLIANCE_SHARED_VISION' ----@field ALLIANCE_SHARED_VISION alliancetype _ConvertAllianceType(5) ---- ----ALLIANCE_SHARED_CONTROL 'common.ALLIANCE_SHARED_CONTROL' ----@field ALLIANCE_SHARED_CONTROL alliancetype _ConvertAllianceType(6) ---- ----ALLIANCE_SHARED_ADVANCED_CONTROL 'common.ALLIANCE_SHARED_ADVANCED_CONTROL' ----@field ALLIANCE_SHARED_ADVANCED_CONTROL alliancetype _ConvertAllianceType(7) ---- ----ALLIANCE_RESCUABLE 'common.ALLIANCE_RESCUABLE' ----@field ALLIANCE_RESCUABLE alliancetype _ConvertAllianceType(8) ---- ----ALLIANCE_SHARED_VISION_FORCED 'common.ALLIANCE_SHARED_VISION_FORCED' ----@field ALLIANCE_SHARED_VISION_FORCED alliancetype _ConvertAllianceType(9) ---- ----VERSION_REIGN_OF_CHAOS 'common.VERSION_REIGN_OF_CHAOS' ----@field VERSION_REIGN_OF_CHAOS version _ConvertVersion(0) ---- ----VERSION_FROZEN_THRONE 'common.VERSION_FROZEN_THRONE' ----@field VERSION_FROZEN_THRONE version _ConvertVersion(1) ---- ----ATTACK_TYPE_NORMAL 'common.ATTACK_TYPE_NORMAL' ----@field ATTACK_TYPE_NORMAL attacktype _ConvertAttackType(0) ---- ----ATTACK_TYPE_MELEE 'common.ATTACK_TYPE_MELEE' ----@field ATTACK_TYPE_MELEE attacktype _ConvertAttackType(1) ---- ----ATTACK_TYPE_PIERCE 'common.ATTACK_TYPE_PIERCE' ----@field ATTACK_TYPE_PIERCE attacktype _ConvertAttackType(2) ---- ----ATTACK_TYPE_SIEGE 'common.ATTACK_TYPE_SIEGE' ----@field ATTACK_TYPE_SIEGE attacktype _ConvertAttackType(3) ---- ----ATTACK_TYPE_MAGIC 'common.ATTACK_TYPE_MAGIC' ----@field ATTACK_TYPE_MAGIC attacktype _ConvertAttackType(4) ---- ----ATTACK_TYPE_CHAOS 'common.ATTACK_TYPE_CHAOS' ----@field ATTACK_TYPE_CHAOS attacktype _ConvertAttackType(5) ---- ----ATTACK_TYPE_HERO 'common.ATTACK_TYPE_HERO' ----@field ATTACK_TYPE_HERO attacktype _ConvertAttackType(6) ---- ----DAMAGE_TYPE_UNKNOWN 'common.DAMAGE_TYPE_UNKNOWN' ----@field DAMAGE_TYPE_UNKNOWN damagetype _ConvertDamageType(0) ---- ----DAMAGE_TYPE_NORMAL 'common.DAMAGE_TYPE_NORMAL' ----@field DAMAGE_TYPE_NORMAL damagetype _ConvertDamageType(4) ---- ----DAMAGE_TYPE_ENHANCED 'common.DAMAGE_TYPE_ENHANCED' ----@field DAMAGE_TYPE_ENHANCED damagetype _ConvertDamageType(5) ---- ----DAMAGE_TYPE_FIRE 'common.DAMAGE_TYPE_FIRE' ----@field DAMAGE_TYPE_FIRE damagetype _ConvertDamageType(8) ---- ----DAMAGE_TYPE_COLD 'common.DAMAGE_TYPE_COLD' ----@field DAMAGE_TYPE_COLD damagetype _ConvertDamageType(9) ---- ----DAMAGE_TYPE_LIGHTNING 'common.DAMAGE_TYPE_LIGHTNING' ----@field DAMAGE_TYPE_LIGHTNING damagetype _ConvertDamageType(10) ---- ----DAMAGE_TYPE_POISON 'common.DAMAGE_TYPE_POISON' ----@field DAMAGE_TYPE_POISON damagetype _ConvertDamageType(11) ---- ----DAMAGE_TYPE_DISEASE 'common.DAMAGE_TYPE_DISEASE' ----@field DAMAGE_TYPE_DISEASE damagetype _ConvertDamageType(12) ---- ----DAMAGE_TYPE_DIVINE 'common.DAMAGE_TYPE_DIVINE' ----@field DAMAGE_TYPE_DIVINE damagetype _ConvertDamageType(13) ---- ----DAMAGE_TYPE_MAGIC 'common.DAMAGE_TYPE_MAGIC' ----@field DAMAGE_TYPE_MAGIC damagetype _ConvertDamageType(14) ---- ----DAMAGE_TYPE_SONIC 'common.DAMAGE_TYPE_SONIC' ----@field DAMAGE_TYPE_SONIC damagetype _ConvertDamageType(15) ---- ----DAMAGE_TYPE_ACID 'common.DAMAGE_TYPE_ACID' ----@field DAMAGE_TYPE_ACID damagetype _ConvertDamageType(16) ---- ----DAMAGE_TYPE_FORCE 'common.DAMAGE_TYPE_FORCE' ----@field DAMAGE_TYPE_FORCE damagetype _ConvertDamageType(17) ---- ----DAMAGE_TYPE_DEATH 'common.DAMAGE_TYPE_DEATH' ----@field DAMAGE_TYPE_DEATH damagetype _ConvertDamageType(18) ---- ----DAMAGE_TYPE_MIND 'common.DAMAGE_TYPE_MIND' ----@field DAMAGE_TYPE_MIND damagetype _ConvertDamageType(19) ---- ----DAMAGE_TYPE_PLANT 'common.DAMAGE_TYPE_PLANT' ----@field DAMAGE_TYPE_PLANT damagetype _ConvertDamageType(20) ---- ----DAMAGE_TYPE_DEFENSIVE 'common.DAMAGE_TYPE_DEFENSIVE' ----@field DAMAGE_TYPE_DEFENSIVE damagetype _ConvertDamageType(21) ---- ----DAMAGE_TYPE_DEMOLITION 'common.DAMAGE_TYPE_DEMOLITION' ----@field DAMAGE_TYPE_DEMOLITION damagetype _ConvertDamageType(22) ---- ----DAMAGE_TYPE_SLOW_POISON 'common.DAMAGE_TYPE_SLOW_POISON' ----@field DAMAGE_TYPE_SLOW_POISON damagetype _ConvertDamageType(23) ---- ----DAMAGE_TYPE_SPIRIT_LINK 'common.DAMAGE_TYPE_SPIRIT_LINK' ----@field DAMAGE_TYPE_SPIRIT_LINK damagetype _ConvertDamageType(24) ---- ----DAMAGE_TYPE_SHADOW_STRIKE 'common.DAMAGE_TYPE_SHADOW_STRIKE' ----@field DAMAGE_TYPE_SHADOW_STRIKE damagetype _ConvertDamageType(25) ---- ----DAMAGE_TYPE_UNIVERSAL 'common.DAMAGE_TYPE_UNIVERSAL' ----@field DAMAGE_TYPE_UNIVERSAL damagetype _ConvertDamageType(26) ---- ----WEAPON_TYPE_WHOKNOWS 'common.WEAPON_TYPE_WHOKNOWS' ----@field WEAPON_TYPE_WHOKNOWS weapontype _ConvertWeaponType(0) ---- ----WEAPON_TYPE_METAL_LIGHT_CHOP 'common.WEAPON_TYPE_METAL_LIGHT_CHOP' ----@field WEAPON_TYPE_METAL_LIGHT_CHOP weapontype _ConvertWeaponType(1) ---- ----WEAPON_TYPE_METAL_MEDIUM_CHOP 'common.WEAPON_TYPE_METAL_MEDIUM_CHOP' ----@field WEAPON_TYPE_METAL_MEDIUM_CHOP weapontype _ConvertWeaponType(2) ---- ----WEAPON_TYPE_METAL_HEAVY_CHOP 'common.WEAPON_TYPE_METAL_HEAVY_CHOP' ----@field WEAPON_TYPE_METAL_HEAVY_CHOP weapontype _ConvertWeaponType(3) ---- ----WEAPON_TYPE_METAL_LIGHT_SLICE 'common.WEAPON_TYPE_METAL_LIGHT_SLICE' ----@field WEAPON_TYPE_METAL_LIGHT_SLICE weapontype _ConvertWeaponType(4) ---- ----WEAPON_TYPE_METAL_MEDIUM_SLICE 'common.WEAPON_TYPE_METAL_MEDIUM_SLICE' ----@field WEAPON_TYPE_METAL_MEDIUM_SLICE weapontype _ConvertWeaponType(5) ---- ----WEAPON_TYPE_METAL_HEAVY_SLICE 'common.WEAPON_TYPE_METAL_HEAVY_SLICE' ----@field WEAPON_TYPE_METAL_HEAVY_SLICE weapontype _ConvertWeaponType(6) ---- ----WEAPON_TYPE_METAL_MEDIUM_BASH 'common.WEAPON_TYPE_METAL_MEDIUM_BASH' ----@field WEAPON_TYPE_METAL_MEDIUM_BASH weapontype _ConvertWeaponType(7) ---- ----WEAPON_TYPE_METAL_HEAVY_BASH 'common.WEAPON_TYPE_METAL_HEAVY_BASH' ----@field WEAPON_TYPE_METAL_HEAVY_BASH weapontype _ConvertWeaponType(8) ---- ----WEAPON_TYPE_METAL_MEDIUM_STAB 'common.WEAPON_TYPE_METAL_MEDIUM_STAB' ----@field WEAPON_TYPE_METAL_MEDIUM_STAB weapontype _ConvertWeaponType(9) ---- ----WEAPON_TYPE_METAL_HEAVY_STAB 'common.WEAPON_TYPE_METAL_HEAVY_STAB' ----@field WEAPON_TYPE_METAL_HEAVY_STAB weapontype _ConvertWeaponType(10) ---- ----WEAPON_TYPE_WOOD_LIGHT_SLICE 'common.WEAPON_TYPE_WOOD_LIGHT_SLICE' ----@field WEAPON_TYPE_WOOD_LIGHT_SLICE weapontype _ConvertWeaponType(11) ---- ----WEAPON_TYPE_WOOD_MEDIUM_SLICE 'common.WEAPON_TYPE_WOOD_MEDIUM_SLICE' ----@field WEAPON_TYPE_WOOD_MEDIUM_SLICE weapontype _ConvertWeaponType(12) ---- ----WEAPON_TYPE_WOOD_HEAVY_SLICE 'common.WEAPON_TYPE_WOOD_HEAVY_SLICE' ----@field WEAPON_TYPE_WOOD_HEAVY_SLICE weapontype _ConvertWeaponType(13) ---- ----WEAPON_TYPE_WOOD_LIGHT_BASH 'common.WEAPON_TYPE_WOOD_LIGHT_BASH' ----@field WEAPON_TYPE_WOOD_LIGHT_BASH weapontype _ConvertWeaponType(14) ---- ----WEAPON_TYPE_WOOD_MEDIUM_BASH 'common.WEAPON_TYPE_WOOD_MEDIUM_BASH' ----@field WEAPON_TYPE_WOOD_MEDIUM_BASH weapontype _ConvertWeaponType(15) ---- ----WEAPON_TYPE_WOOD_HEAVY_BASH 'common.WEAPON_TYPE_WOOD_HEAVY_BASH' ----@field WEAPON_TYPE_WOOD_HEAVY_BASH weapontype _ConvertWeaponType(16) ---- ----WEAPON_TYPE_WOOD_LIGHT_STAB 'common.WEAPON_TYPE_WOOD_LIGHT_STAB' ----@field WEAPON_TYPE_WOOD_LIGHT_STAB weapontype _ConvertWeaponType(17) ---- ----WEAPON_TYPE_WOOD_MEDIUM_STAB 'common.WEAPON_TYPE_WOOD_MEDIUM_STAB' ----@field WEAPON_TYPE_WOOD_MEDIUM_STAB weapontype _ConvertWeaponType(18) ---- ----WEAPON_TYPE_CLAW_LIGHT_SLICE 'common.WEAPON_TYPE_CLAW_LIGHT_SLICE' ----@field WEAPON_TYPE_CLAW_LIGHT_SLICE weapontype _ConvertWeaponType(19) ---- ----WEAPON_TYPE_CLAW_MEDIUM_SLICE 'common.WEAPON_TYPE_CLAW_MEDIUM_SLICE' ----@field WEAPON_TYPE_CLAW_MEDIUM_SLICE weapontype _ConvertWeaponType(20) ---- ----WEAPON_TYPE_CLAW_HEAVY_SLICE 'common.WEAPON_TYPE_CLAW_HEAVY_SLICE' ----@field WEAPON_TYPE_CLAW_HEAVY_SLICE weapontype _ConvertWeaponType(21) ---- ----WEAPON_TYPE_AXE_MEDIUM_CHOP 'common.WEAPON_TYPE_AXE_MEDIUM_CHOP' ----@field WEAPON_TYPE_AXE_MEDIUM_CHOP weapontype _ConvertWeaponType(22) ---- ----WEAPON_TYPE_ROCK_HEAVY_BASH 'common.WEAPON_TYPE_ROCK_HEAVY_BASH' ----@field WEAPON_TYPE_ROCK_HEAVY_BASH weapontype _ConvertWeaponType(23) ---- ----PATHING_TYPE_ANY 'common.PATHING_TYPE_ANY' ----@field PATHING_TYPE_ANY pathingtype _ConvertPathingType(0) ---- ----PATHING_TYPE_WALKABILITY 'common.PATHING_TYPE_WALKABILITY' ----@field PATHING_TYPE_WALKABILITY pathingtype _ConvertPathingType(1) ---- ----PATHING_TYPE_FLYABILITY 'common.PATHING_TYPE_FLYABILITY' ----@field PATHING_TYPE_FLYABILITY pathingtype _ConvertPathingType(2) ---- ----PATHING_TYPE_BUILDABILITY 'common.PATHING_TYPE_BUILDABILITY' ----@field PATHING_TYPE_BUILDABILITY pathingtype _ConvertPathingType(3) ---- ----PATHING_TYPE_PEONHARVESTPATHING 'common.PATHING_TYPE_PEONHARVESTPATHING' ----@field PATHING_TYPE_PEONHARVESTPATHING pathingtype _ConvertPathingType(4) ---- ----PATHING_TYPE_BLIGHTPATHING 'common.PATHING_TYPE_BLIGHTPATHING' ----@field PATHING_TYPE_BLIGHTPATHING pathingtype _ConvertPathingType(5) ---- ----PATHING_TYPE_FLOATABILITY 'common.PATHING_TYPE_FLOATABILITY' ----@field PATHING_TYPE_FLOATABILITY pathingtype _ConvertPathingType(6) ---- ----PATHING_TYPE_AMPHIBIOUSPATHING 'common.PATHING_TYPE_AMPHIBIOUSPATHING' ----@field PATHING_TYPE_AMPHIBIOUSPATHING pathingtype _ConvertPathingType(7) ---- ----MOUSE_BUTTON_TYPE_LEFT 'common.MOUSE_BUTTON_TYPE_LEFT' ----@field MOUSE_BUTTON_TYPE_LEFT mousebuttontype _ConvertMouseButtonType(1) ---- ----MOUSE_BUTTON_TYPE_MIDDLE 'common.MOUSE_BUTTON_TYPE_MIDDLE' ----@field MOUSE_BUTTON_TYPE_MIDDLE mousebuttontype _ConvertMouseButtonType(2) ---- ----MOUSE_BUTTON_TYPE_RIGHT 'common.MOUSE_BUTTON_TYPE_RIGHT' ----@field MOUSE_BUTTON_TYPE_RIGHT mousebuttontype _ConvertMouseButtonType(3) ---- ----ANIM_TYPE_BIRTH 'common.ANIM_TYPE_BIRTH' ----@field ANIM_TYPE_BIRTH animtype _ConvertAnimType(0) ---- ----ANIM_TYPE_DEATH 'common.ANIM_TYPE_DEATH' ----@field ANIM_TYPE_DEATH animtype _ConvertAnimType(1) ---- ----ANIM_TYPE_DECAY 'common.ANIM_TYPE_DECAY' ----@field ANIM_TYPE_DECAY animtype _ConvertAnimType(2) ---- ----ANIM_TYPE_DISSIPATE 'common.ANIM_TYPE_DISSIPATE' ----@field ANIM_TYPE_DISSIPATE animtype _ConvertAnimType(3) ---- ----ANIM_TYPE_STAND 'common.ANIM_TYPE_STAND' ----@field ANIM_TYPE_STAND animtype _ConvertAnimType(4) ---- ----ANIM_TYPE_WALK 'common.ANIM_TYPE_WALK' ----@field ANIM_TYPE_WALK animtype _ConvertAnimType(5) ---- ----ANIM_TYPE_ATTACK 'common.ANIM_TYPE_ATTACK' ----@field ANIM_TYPE_ATTACK animtype _ConvertAnimType(6) ---- ----ANIM_TYPE_MORPH 'common.ANIM_TYPE_MORPH' ----@field ANIM_TYPE_MORPH animtype _ConvertAnimType(7) ---- ----ANIM_TYPE_SLEEP 'common.ANIM_TYPE_SLEEP' ----@field ANIM_TYPE_SLEEP animtype _ConvertAnimType(8) ---- ----ANIM_TYPE_SPELL 'common.ANIM_TYPE_SPELL' ----@field ANIM_TYPE_SPELL animtype _ConvertAnimType(9) ---- ----ANIM_TYPE_PORTRAIT 'common.ANIM_TYPE_PORTRAIT' ----@field ANIM_TYPE_PORTRAIT animtype _ConvertAnimType(10) ---- ----SUBANIM_TYPE_ROOTED 'common.SUBANIM_TYPE_ROOTED' ----@field SUBANIM_TYPE_ROOTED subanimtype _ConvertSubAnimType(11) ---- ----SUBANIM_TYPE_ALTERNATE_EX 'common.SUBANIM_TYPE_ALTERNATE_EX' ----@field SUBANIM_TYPE_ALTERNATE_EX subanimtype _ConvertSubAnimType(12) ---- ----SUBANIM_TYPE_LOOPING 'common.SUBANIM_TYPE_LOOPING' ----@field SUBANIM_TYPE_LOOPING subanimtype _ConvertSubAnimType(13) ---- ----SUBANIM_TYPE_SLAM 'common.SUBANIM_TYPE_SLAM' ----@field SUBANIM_TYPE_SLAM subanimtype _ConvertSubAnimType(14) ---- ----SUBANIM_TYPE_THROW 'common.SUBANIM_TYPE_THROW' ----@field SUBANIM_TYPE_THROW subanimtype _ConvertSubAnimType(15) ---- ----SUBANIM_TYPE_SPIKED 'common.SUBANIM_TYPE_SPIKED' ----@field SUBANIM_TYPE_SPIKED subanimtype _ConvertSubAnimType(16) ---- ----SUBANIM_TYPE_FAST 'common.SUBANIM_TYPE_FAST' ----@field SUBANIM_TYPE_FAST subanimtype _ConvertSubAnimType(17) ---- ----SUBANIM_TYPE_SPIN 'common.SUBANIM_TYPE_SPIN' ----@field SUBANIM_TYPE_SPIN subanimtype _ConvertSubAnimType(18) ---- ----SUBANIM_TYPE_READY 'common.SUBANIM_TYPE_READY' ----@field SUBANIM_TYPE_READY subanimtype _ConvertSubAnimType(19) ---- ----SUBANIM_TYPE_CHANNEL 'common.SUBANIM_TYPE_CHANNEL' ----@field SUBANIM_TYPE_CHANNEL subanimtype _ConvertSubAnimType(20) ---- ----SUBANIM_TYPE_DEFEND 'common.SUBANIM_TYPE_DEFEND' ----@field SUBANIM_TYPE_DEFEND subanimtype _ConvertSubAnimType(21) ---- ----SUBANIM_TYPE_VICTORY 'common.SUBANIM_TYPE_VICTORY' ----@field SUBANIM_TYPE_VICTORY subanimtype _ConvertSubAnimType(22) ---- ----SUBANIM_TYPE_TURN 'common.SUBANIM_TYPE_TURN' ----@field SUBANIM_TYPE_TURN subanimtype _ConvertSubAnimType(23) ---- ----SUBANIM_TYPE_LEFT 'common.SUBANIM_TYPE_LEFT' ----@field SUBANIM_TYPE_LEFT subanimtype _ConvertSubAnimType(24) ---- ----SUBANIM_TYPE_RIGHT 'common.SUBANIM_TYPE_RIGHT' ----@field SUBANIM_TYPE_RIGHT subanimtype _ConvertSubAnimType(25) ---- ----SUBANIM_TYPE_FIRE 'common.SUBANIM_TYPE_FIRE' ----@field SUBANIM_TYPE_FIRE subanimtype _ConvertSubAnimType(26) ---- ----SUBANIM_TYPE_FLESH 'common.SUBANIM_TYPE_FLESH' ----@field SUBANIM_TYPE_FLESH subanimtype _ConvertSubAnimType(27) ---- ----SUBANIM_TYPE_HIT 'common.SUBANIM_TYPE_HIT' ----@field SUBANIM_TYPE_HIT subanimtype _ConvertSubAnimType(28) ---- ----SUBANIM_TYPE_WOUNDED 'common.SUBANIM_TYPE_WOUNDED' ----@field SUBANIM_TYPE_WOUNDED subanimtype _ConvertSubAnimType(29) ---- ----SUBANIM_TYPE_LIGHT 'common.SUBANIM_TYPE_LIGHT' ----@field SUBANIM_TYPE_LIGHT subanimtype _ConvertSubAnimType(30) ---- ----SUBANIM_TYPE_MODERATE 'common.SUBANIM_TYPE_MODERATE' ----@field SUBANIM_TYPE_MODERATE subanimtype _ConvertSubAnimType(31) ---- ----SUBANIM_TYPE_SEVERE 'common.SUBANIM_TYPE_SEVERE' ----@field SUBANIM_TYPE_SEVERE subanimtype _ConvertSubAnimType(32) ---- ----SUBANIM_TYPE_CRITICAL 'common.SUBANIM_TYPE_CRITICAL' ----@field SUBANIM_TYPE_CRITICAL subanimtype _ConvertSubAnimType(33) ---- ----SUBANIM_TYPE_COMPLETE 'common.SUBANIM_TYPE_COMPLETE' ----@field SUBANIM_TYPE_COMPLETE subanimtype _ConvertSubAnimType(34) ---- ----SUBANIM_TYPE_GOLD 'common.SUBANIM_TYPE_GOLD' ----@field SUBANIM_TYPE_GOLD subanimtype _ConvertSubAnimType(35) ---- ----SUBANIM_TYPE_LUMBER 'common.SUBANIM_TYPE_LUMBER' ----@field SUBANIM_TYPE_LUMBER subanimtype _ConvertSubAnimType(36) ---- ----SUBANIM_TYPE_WORK 'common.SUBANIM_TYPE_WORK' ----@field SUBANIM_TYPE_WORK subanimtype _ConvertSubAnimType(37) ---- ----SUBANIM_TYPE_TALK 'common.SUBANIM_TYPE_TALK' ----@field SUBANIM_TYPE_TALK subanimtype _ConvertSubAnimType(38) ---- ----SUBANIM_TYPE_FIRST 'common.SUBANIM_TYPE_FIRST' ----@field SUBANIM_TYPE_FIRST subanimtype _ConvertSubAnimType(39) ---- ----SUBANIM_TYPE_SECOND 'common.SUBANIM_TYPE_SECOND' ----@field SUBANIM_TYPE_SECOND subanimtype _ConvertSubAnimType(40) ---- ----SUBANIM_TYPE_THIRD 'common.SUBANIM_TYPE_THIRD' ----@field SUBANIM_TYPE_THIRD subanimtype _ConvertSubAnimType(41) ---- ----SUBANIM_TYPE_FOURTH 'common.SUBANIM_TYPE_FOURTH' ----@field SUBANIM_TYPE_FOURTH subanimtype _ConvertSubAnimType(42) ---- ----SUBANIM_TYPE_FIFTH 'common.SUBANIM_TYPE_FIFTH' ----@field SUBANIM_TYPE_FIFTH subanimtype _ConvertSubAnimType(43) ---- ----SUBANIM_TYPE_ONE 'common.SUBANIM_TYPE_ONE' ----@field SUBANIM_TYPE_ONE subanimtype _ConvertSubAnimType(44) ---- ----SUBANIM_TYPE_TWO 'common.SUBANIM_TYPE_TWO' ----@field SUBANIM_TYPE_TWO subanimtype _ConvertSubAnimType(45) ---- ----SUBANIM_TYPE_THREE 'common.SUBANIM_TYPE_THREE' ----@field SUBANIM_TYPE_THREE subanimtype _ConvertSubAnimType(46) ---- ----SUBANIM_TYPE_FOUR 'common.SUBANIM_TYPE_FOUR' ----@field SUBANIM_TYPE_FOUR subanimtype _ConvertSubAnimType(47) ---- ----SUBANIM_TYPE_FIVE 'common.SUBANIM_TYPE_FIVE' ----@field SUBANIM_TYPE_FIVE subanimtype _ConvertSubAnimType(48) ---- ----SUBANIM_TYPE_SMALL 'common.SUBANIM_TYPE_SMALL' ----@field SUBANIM_TYPE_SMALL subanimtype _ConvertSubAnimType(49) ---- ----SUBANIM_TYPE_MEDIUM 'common.SUBANIM_TYPE_MEDIUM' ----@field SUBANIM_TYPE_MEDIUM subanimtype _ConvertSubAnimType(50) ---- ----SUBANIM_TYPE_LARGE 'common.SUBANIM_TYPE_LARGE' ----@field SUBANIM_TYPE_LARGE subanimtype _ConvertSubAnimType(51) ---- ----SUBANIM_TYPE_UPGRADE 'common.SUBANIM_TYPE_UPGRADE' ----@field SUBANIM_TYPE_UPGRADE subanimtype _ConvertSubAnimType(52) ---- ----SUBANIM_TYPE_DRAIN 'common.SUBANIM_TYPE_DRAIN' ----@field SUBANIM_TYPE_DRAIN subanimtype _ConvertSubAnimType(53) ---- ----SUBANIM_TYPE_FILL 'common.SUBANIM_TYPE_FILL' ----@field SUBANIM_TYPE_FILL subanimtype _ConvertSubAnimType(54) ---- ----SUBANIM_TYPE_CHAINLIGHTNING 'common.SUBANIM_TYPE_CHAINLIGHTNING' ----@field SUBANIM_TYPE_CHAINLIGHTNING subanimtype _ConvertSubAnimType(55) ---- ----SUBANIM_TYPE_EATTREE 'common.SUBANIM_TYPE_EATTREE' ----@field SUBANIM_TYPE_EATTREE subanimtype _ConvertSubAnimType(56) ---- ----SUBANIM_TYPE_PUKE 'common.SUBANIM_TYPE_PUKE' ----@field SUBANIM_TYPE_PUKE subanimtype _ConvertSubAnimType(57) ---- ----SUBANIM_TYPE_FLAIL 'common.SUBANIM_TYPE_FLAIL' ----@field SUBANIM_TYPE_FLAIL subanimtype _ConvertSubAnimType(58) ---- ----SUBANIM_TYPE_OFF 'common.SUBANIM_TYPE_OFF' ----@field SUBANIM_TYPE_OFF subanimtype _ConvertSubAnimType(59) ---- ----SUBANIM_TYPE_SWIM 'common.SUBANIM_TYPE_SWIM' ----@field SUBANIM_TYPE_SWIM subanimtype _ConvertSubAnimType(60) ---- ----SUBANIM_TYPE_ENTANGLE 'common.SUBANIM_TYPE_ENTANGLE' ----@field SUBANIM_TYPE_ENTANGLE subanimtype _ConvertSubAnimType(61) ---- ----SUBANIM_TYPE_BERSERK 'common.SUBANIM_TYPE_BERSERK' ----@field SUBANIM_TYPE_BERSERK subanimtype _ConvertSubAnimType(62) ---- ----RACE_PREF_HUMAN 'common.RACE_PREF_HUMAN' ----@field RACE_PREF_HUMAN racepreference _ConvertRacePref(1) ---- ----RACE_PREF_ORC 'common.RACE_PREF_ORC' ----@field RACE_PREF_ORC racepreference _ConvertRacePref(2) ---- ----RACE_PREF_NIGHTELF 'common.RACE_PREF_NIGHTELF' ----@field RACE_PREF_NIGHTELF racepreference _ConvertRacePref(4) ---- ----RACE_PREF_UNDEAD 'common.RACE_PREF_UNDEAD' ----@field RACE_PREF_UNDEAD racepreference _ConvertRacePref(8) ---- ----RACE_PREF_DEMON 'common.RACE_PREF_DEMON' ----@field RACE_PREF_DEMON racepreference _ConvertRacePref(16) ---- ----RACE_PREF_RANDOM 'common.RACE_PREF_RANDOM' ----@field RACE_PREF_RANDOM racepreference _ConvertRacePref(32) ---- ----RACE_PREF_USER_SELECTABLE 'common.RACE_PREF_USER_SELECTABLE' ----@field RACE_PREF_USER_SELECTABLE racepreference _ConvertRacePref(64) ---- ----MAP_CONTROL_USER 'common.MAP_CONTROL_USER' ----@field MAP_CONTROL_USER mapcontrol _ConvertMapControl(0) ---- ----MAP_CONTROL_COMPUTER 'common.MAP_CONTROL_COMPUTER' ----@field MAP_CONTROL_COMPUTER mapcontrol _ConvertMapControl(1) ---- ----MAP_CONTROL_RESCUABLE 'common.MAP_CONTROL_RESCUABLE' ----@field MAP_CONTROL_RESCUABLE mapcontrol _ConvertMapControl(2) ---- ----MAP_CONTROL_NEUTRAL 'common.MAP_CONTROL_NEUTRAL' ----@field MAP_CONTROL_NEUTRAL mapcontrol _ConvertMapControl(3) ---- ----MAP_CONTROL_CREEP 'common.MAP_CONTROL_CREEP' ----@field MAP_CONTROL_CREEP mapcontrol _ConvertMapControl(4) ---- ----MAP_CONTROL_NONE 'common.MAP_CONTROL_NONE' ----@field MAP_CONTROL_NONE mapcontrol _ConvertMapControl(5) ---- ----GAME_TYPE_MELEE 'common.GAME_TYPE_MELEE' ----@field GAME_TYPE_MELEE gametype _ConvertGameType(1) ---- ----GAME_TYPE_FFA 'common.GAME_TYPE_FFA' ----@field GAME_TYPE_FFA gametype _ConvertGameType(2) ---- ----GAME_TYPE_USE_MAP_SETTINGS 'common.GAME_TYPE_USE_MAP_SETTINGS' ----@field GAME_TYPE_USE_MAP_SETTINGS gametype _ConvertGameType(4) ---- ----GAME_TYPE_BLIZ 'common.GAME_TYPE_BLIZ' ----@field GAME_TYPE_BLIZ gametype _ConvertGameType(8) ---- ----GAME_TYPE_ONE_ON_ONE 'common.GAME_TYPE_ONE_ON_ONE' ----@field GAME_TYPE_ONE_ON_ONE gametype _ConvertGameType(16) ---- ----GAME_TYPE_TWO_TEAM_PLAY 'common.GAME_TYPE_TWO_TEAM_PLAY' ----@field GAME_TYPE_TWO_TEAM_PLAY gametype _ConvertGameType(32) ---- ----GAME_TYPE_THREE_TEAM_PLAY 'common.GAME_TYPE_THREE_TEAM_PLAY' ----@field GAME_TYPE_THREE_TEAM_PLAY gametype _ConvertGameType(64) ---- ----GAME_TYPE_FOUR_TEAM_PLAY 'common.GAME_TYPE_FOUR_TEAM_PLAY' ----@field GAME_TYPE_FOUR_TEAM_PLAY gametype _ConvertGameType(128) ---- ----MAP_FOG_HIDE_TERRAIN 'common.MAP_FOG_HIDE_TERRAIN' ----@field MAP_FOG_HIDE_TERRAIN mapflag _ConvertMapFlag(1) ---- ----MAP_FOG_MAP_EXPLORED 'common.MAP_FOG_MAP_EXPLORED' ----@field MAP_FOG_MAP_EXPLORED mapflag _ConvertMapFlag(2) ---- ----MAP_FOG_ALWAYS_VISIBLE 'common.MAP_FOG_ALWAYS_VISIBLE' ----@field MAP_FOG_ALWAYS_VISIBLE mapflag _ConvertMapFlag(4) ---- ----MAP_USE_HANDICAPS 'common.MAP_USE_HANDICAPS' ----@field MAP_USE_HANDICAPS mapflag _ConvertMapFlag(8) ---- ----MAP_OBSERVERS 'common.MAP_OBSERVERS' ----@field MAP_OBSERVERS mapflag _ConvertMapFlag(16) ---- ----MAP_OBSERVERS_ON_DEATH 'common.MAP_OBSERVERS_ON_DEATH' ----@field MAP_OBSERVERS_ON_DEATH mapflag _ConvertMapFlag(32) ---- ----MAP_FIXED_COLORS 'common.MAP_FIXED_COLORS' ----@field MAP_FIXED_COLORS mapflag _ConvertMapFlag(128) ---- ----MAP_LOCK_RESOURCE_TRADING 'common.MAP_LOCK_RESOURCE_TRADING' ----@field MAP_LOCK_RESOURCE_TRADING mapflag _ConvertMapFlag(256) ---- ----MAP_RESOURCE_TRADING_ALLIES_ONLY 'common.MAP_RESOURCE_TRADING_ALLIES_ONLY' ----@field MAP_RESOURCE_TRADING_ALLIES_ONLY mapflag _ConvertMapFlag(512) ---- ----MAP_LOCK_ALLIANCE_CHANGES 'common.MAP_LOCK_ALLIANCE_CHANGES' ----@field MAP_LOCK_ALLIANCE_CHANGES mapflag _ConvertMapFlag(1024) ---- ----MAP_ALLIANCE_CHANGES_HIDDEN 'common.MAP_ALLIANCE_CHANGES_HIDDEN' ----@field MAP_ALLIANCE_CHANGES_HIDDEN mapflag _ConvertMapFlag(2048) ---- ----MAP_CHEATS 'common.MAP_CHEATS' ----@field MAP_CHEATS mapflag _ConvertMapFlag(4096) ---- ----MAP_CHEATS_HIDDEN 'common.MAP_CHEATS_HIDDEN' ----@field MAP_CHEATS_HIDDEN mapflag _ConvertMapFlag(8192) ---- ----MAP_LOCK_SPEED 'common.MAP_LOCK_SPEED' ----@field MAP_LOCK_SPEED mapflag _ConvertMapFlag(8192*2) ---- ----MAP_LOCK_RANDOM_SEED 'common.MAP_LOCK_RANDOM_SEED' ----@field MAP_LOCK_RANDOM_SEED mapflag _ConvertMapFlag(8192*4) ---- ----MAP_SHARED_ADVANCED_CONTROL 'common.MAP_SHARED_ADVANCED_CONTROL' ----@field MAP_SHARED_ADVANCED_CONTROL mapflag _ConvertMapFlag(8192*8) ---- ----MAP_RANDOM_HERO 'common.MAP_RANDOM_HERO' ----@field MAP_RANDOM_HERO mapflag _ConvertMapFlag(8192*16) ---- ----MAP_RANDOM_RACES 'common.MAP_RANDOM_RACES' ----@field MAP_RANDOM_RACES mapflag _ConvertMapFlag(8192*32) ---- ----MAP_RELOADED 'common.MAP_RELOADED' ----@field MAP_RELOADED mapflag _ConvertMapFlag(8192*64) ---- ----MAP_PLACEMENT_RANDOM 'common.MAP_PLACEMENT_RANDOM' ----@field MAP_PLACEMENT_RANDOM placement _ConvertPlacement(0) ---- ----MAP_PLACEMENT_FIXED 'common.MAP_PLACEMENT_FIXED' ----@field MAP_PLACEMENT_FIXED placement _ConvertPlacement(1) ---- ----MAP_PLACEMENT_USE_MAP_SETTINGS 'common.MAP_PLACEMENT_USE_MAP_SETTINGS' ----@field MAP_PLACEMENT_USE_MAP_SETTINGS placement _ConvertPlacement(2) ---- ----MAP_PLACEMENT_TEAMS_TOGETHER 'common.MAP_PLACEMENT_TEAMS_TOGETHER' ----@field MAP_PLACEMENT_TEAMS_TOGETHER placement _ConvertPlacement(3) ---- ----MAP_LOC_PRIO_LOW 'common.MAP_LOC_PRIO_LOW' ----@field MAP_LOC_PRIO_LOW startlocprio _ConvertStartLocPrio(0) ---- ----MAP_LOC_PRIO_HIGH 'common.MAP_LOC_PRIO_HIGH' ----@field MAP_LOC_PRIO_HIGH startlocprio _ConvertStartLocPrio(1) ---- ----MAP_LOC_PRIO_NOT 'common.MAP_LOC_PRIO_NOT' ----@field MAP_LOC_PRIO_NOT startlocprio _ConvertStartLocPrio(2) ---- ----MAP_DENSITY_NONE 'common.MAP_DENSITY_NONE' ----@field MAP_DENSITY_NONE mapdensity _ConvertMapDensity(0) ---- ----MAP_DENSITY_LIGHT 'common.MAP_DENSITY_LIGHT' ----@field MAP_DENSITY_LIGHT mapdensity _ConvertMapDensity(1) ---- ----MAP_DENSITY_MEDIUM 'common.MAP_DENSITY_MEDIUM' ----@field MAP_DENSITY_MEDIUM mapdensity _ConvertMapDensity(2) ---- ----MAP_DENSITY_HEAVY 'common.MAP_DENSITY_HEAVY' ----@field MAP_DENSITY_HEAVY mapdensity _ConvertMapDensity(3) ---- ----MAP_DIFFICULTY_EASY 'common.MAP_DIFFICULTY_EASY' ----@field MAP_DIFFICULTY_EASY gamedifficulty _ConvertGameDifficulty(0) ---- ----MAP_DIFFICULTY_NORMAL 'common.MAP_DIFFICULTY_NORMAL' ----@field MAP_DIFFICULTY_NORMAL gamedifficulty _ConvertGameDifficulty(1) ---- ----MAP_DIFFICULTY_HARD 'common.MAP_DIFFICULTY_HARD' ----@field MAP_DIFFICULTY_HARD gamedifficulty _ConvertGameDifficulty(2) ---- ----MAP_DIFFICULTY_INSANE 'common.MAP_DIFFICULTY_INSANE' ----@field MAP_DIFFICULTY_INSANE gamedifficulty _ConvertGameDifficulty(3) ---- ----MAP_SPEED_SLOWEST 'common.MAP_SPEED_SLOWEST' ----@field MAP_SPEED_SLOWEST gamespeed _ConvertGameSpeed(0) ---- ----MAP_SPEED_SLOW 'common.MAP_SPEED_SLOW' ----@field MAP_SPEED_SLOW gamespeed _ConvertGameSpeed(1) ---- ----MAP_SPEED_NORMAL 'common.MAP_SPEED_NORMAL' ----@field MAP_SPEED_NORMAL gamespeed _ConvertGameSpeed(2) ---- ----MAP_SPEED_FAST 'common.MAP_SPEED_FAST' ----@field MAP_SPEED_FAST gamespeed _ConvertGameSpeed(3) ---- ----MAP_SPEED_FASTEST 'common.MAP_SPEED_FASTEST' ----@field MAP_SPEED_FASTEST gamespeed _ConvertGameSpeed(4) ---- ----PLAYER_SLOT_STATE_EMPTY 'common.PLAYER_SLOT_STATE_EMPTY' ----@field PLAYER_SLOT_STATE_EMPTY playerslotstate _ConvertPlayerSlotState(0) ---- ----PLAYER_SLOT_STATE_PLAYING 'common.PLAYER_SLOT_STATE_PLAYING' ----@field PLAYER_SLOT_STATE_PLAYING playerslotstate _ConvertPlayerSlotState(1) ---- ----PLAYER_SLOT_STATE_LEFT 'common.PLAYER_SLOT_STATE_LEFT' ----@field PLAYER_SLOT_STATE_LEFT playerslotstate _ConvertPlayerSlotState(2) ---- ----SOUND_VOLUMEGROUP_UNITMOVEMENT 'common.SOUND_VOLUMEGROUP_UNITMOVEMENT' ----@field SOUND_VOLUMEGROUP_UNITMOVEMENT volumegroup _ConvertVolumeGroup(0) ---- ----SOUND_VOLUMEGROUP_UNITSOUNDS 'common.SOUND_VOLUMEGROUP_UNITSOUNDS' ----@field SOUND_VOLUMEGROUP_UNITSOUNDS volumegroup _ConvertVolumeGroup(1) ---- ----SOUND_VOLUMEGROUP_COMBAT 'common.SOUND_VOLUMEGROUP_COMBAT' ----@field SOUND_VOLUMEGROUP_COMBAT volumegroup _ConvertVolumeGroup(2) ---- ----SOUND_VOLUMEGROUP_SPELLS 'common.SOUND_VOLUMEGROUP_SPELLS' ----@field SOUND_VOLUMEGROUP_SPELLS volumegroup _ConvertVolumeGroup(3) ---- ----SOUND_VOLUMEGROUP_UI 'common.SOUND_VOLUMEGROUP_UI' ----@field SOUND_VOLUMEGROUP_UI volumegroup _ConvertVolumeGroup(4) ---- ----SOUND_VOLUMEGROUP_MUSIC 'common.SOUND_VOLUMEGROUP_MUSIC' ----@field SOUND_VOLUMEGROUP_MUSIC volumegroup _ConvertVolumeGroup(5) ---- ----SOUND_VOLUMEGROUP_AMBIENTSOUNDS 'common.SOUND_VOLUMEGROUP_AMBIENTSOUNDS' ----@field SOUND_VOLUMEGROUP_AMBIENTSOUNDS volumegroup _ConvertVolumeGroup(6) ---- ----SOUND_VOLUMEGROUP_FIRE 'common.SOUND_VOLUMEGROUP_FIRE' ----@field SOUND_VOLUMEGROUP_FIRE volumegroup _ConvertVolumeGroup(7) ---- ----GAME_STATE_DIVINE_INTERVENTION 'common.GAME_STATE_DIVINE_INTERVENTION' ----@field GAME_STATE_DIVINE_INTERVENTION igamestate _ConvertIGameState(0) ---- ----GAME_STATE_DISCONNECTED 'common.GAME_STATE_DISCONNECTED' ----@field GAME_STATE_DISCONNECTED igamestate _ConvertIGameState(1) ---- ----GAME_STATE_TIME_OF_DAY 'common.GAME_STATE_TIME_OF_DAY' ----@field GAME_STATE_TIME_OF_DAY fgamestate _ConvertFGameState(2) ---- ----PLAYER_STATE_GAME_RESULT 'common.PLAYER_STATE_GAME_RESULT' ----@field PLAYER_STATE_GAME_RESULT playerstate _ConvertPlayerState(0) ---- ----current resource levels 'common.PLAYER_STATE_RESOURCE_GOLD' ----@field PLAYER_STATE_RESOURCE_GOLD playerstate _ConvertPlayerState(1) ---- ----PLAYER_STATE_RESOURCE_LUMBER 'common.PLAYER_STATE_RESOURCE_LUMBER' ----@field PLAYER_STATE_RESOURCE_LUMBER playerstate _ConvertPlayerState(2) ---- ----PLAYER_STATE_RESOURCE_HERO_TOKENS 'common.PLAYER_STATE_RESOURCE_HERO_TOKENS' ----@field PLAYER_STATE_RESOURCE_HERO_TOKENS playerstate _ConvertPlayerState(3) ---- ----PLAYER_STATE_RESOURCE_FOOD_CAP 'common.PLAYER_STATE_RESOURCE_FOOD_CAP' ----@field PLAYER_STATE_RESOURCE_FOOD_CAP playerstate _ConvertPlayerState(4) ---- ----PLAYER_STATE_RESOURCE_FOOD_USED 'common.PLAYER_STATE_RESOURCE_FOOD_USED' ----@field PLAYER_STATE_RESOURCE_FOOD_USED playerstate _ConvertPlayerState(5) ---- ----PLAYER_STATE_FOOD_CAP_CEILING 'common.PLAYER_STATE_FOOD_CAP_CEILING' ----@field PLAYER_STATE_FOOD_CAP_CEILING playerstate _ConvertPlayerState(6) ---- ----PLAYER_STATE_GIVES_BOUNTY 'common.PLAYER_STATE_GIVES_BOUNTY' ----@field PLAYER_STATE_GIVES_BOUNTY playerstate _ConvertPlayerState(7) ---- ----PLAYER_STATE_ALLIED_VICTORY 'common.PLAYER_STATE_ALLIED_VICTORY' ----@field PLAYER_STATE_ALLIED_VICTORY playerstate _ConvertPlayerState(8) ---- ----PLAYER_STATE_PLACED 'common.PLAYER_STATE_PLACED' ----@field PLAYER_STATE_PLACED playerstate _ConvertPlayerState(9) ---- ----PLAYER_STATE_OBSERVER_ON_DEATH 'common.PLAYER_STATE_OBSERVER_ON_DEATH' ----@field PLAYER_STATE_OBSERVER_ON_DEATH playerstate _ConvertPlayerState(10) ---- ----PLAYER_STATE_OBSERVER 'common.PLAYER_STATE_OBSERVER' ----@field PLAYER_STATE_OBSERVER playerstate _ConvertPlayerState(11) ---- ----PLAYER_STATE_UNFOLLOWABLE 'common.PLAYER_STATE_UNFOLLOWABLE' ----@field PLAYER_STATE_UNFOLLOWABLE playerstate _ConvertPlayerState(12) ---- ----taxation rate for each resource 'common.PLAYER_STATE_GOLD_UPKEEP_RATE' ----@field PLAYER_STATE_GOLD_UPKEEP_RATE playerstate _ConvertPlayerState(13) ---- ----PLAYER_STATE_LUMBER_UPKEEP_RATE 'common.PLAYER_STATE_LUMBER_UPKEEP_RATE' ----@field PLAYER_STATE_LUMBER_UPKEEP_RATE playerstate _ConvertPlayerState(14) ---- ----cumulative resources collected by the player during the mission 'common.PLAYER_STATE_GOLD_GATHERED' ----@field PLAYER_STATE_GOLD_GATHERED playerstate _ConvertPlayerState(15) ---- ----PLAYER_STATE_LUMBER_GATHERED 'common.PLAYER_STATE_LUMBER_GATHERED' ----@field PLAYER_STATE_LUMBER_GATHERED playerstate _ConvertPlayerState(16) ---- ----PLAYER_STATE_NO_CREEP_SLEEP 'common.PLAYER_STATE_NO_CREEP_SLEEP' ----@field PLAYER_STATE_NO_CREEP_SLEEP playerstate _ConvertPlayerState(25) ---- ----UNIT_STATE_LIFE 'common.UNIT_STATE_LIFE' ----@field UNIT_STATE_LIFE unitstate _ConvertUnitState(0) ---- ----UNIT_STATE_MAX_LIFE 'common.UNIT_STATE_MAX_LIFE' ----@field UNIT_STATE_MAX_LIFE unitstate _ConvertUnitState(1) ---- ----UNIT_STATE_MANA 'common.UNIT_STATE_MANA' ----@field UNIT_STATE_MANA unitstate _ConvertUnitState(2) ---- ----UNIT_STATE_MAX_MANA 'common.UNIT_STATE_MAX_MANA' ----@field UNIT_STATE_MAX_MANA unitstate _ConvertUnitState(3) ---- ----AI_DIFFICULTY_NEWBIE 'common.AI_DIFFICULTY_NEWBIE' ----@field AI_DIFFICULTY_NEWBIE aidifficulty _ConvertAIDifficulty(0) ---- ----AI_DIFFICULTY_NORMAL 'common.AI_DIFFICULTY_NORMAL' ----@field AI_DIFFICULTY_NORMAL aidifficulty _ConvertAIDifficulty(1) ---- ----AI_DIFFICULTY_INSANE 'common.AI_DIFFICULTY_INSANE' ----@field AI_DIFFICULTY_INSANE aidifficulty _ConvertAIDifficulty(2) ---- ----player score values 'common.PLAYER_SCORE_UNITS_TRAINED' ----@field PLAYER_SCORE_UNITS_TRAINED playerscore _ConvertPlayerScore(0) ---- ----PLAYER_SCORE_UNITS_KILLED 'common.PLAYER_SCORE_UNITS_KILLED' ----@field PLAYER_SCORE_UNITS_KILLED playerscore _ConvertPlayerScore(1) ---- ----PLAYER_SCORE_STRUCT_BUILT 'common.PLAYER_SCORE_STRUCT_BUILT' ----@field PLAYER_SCORE_STRUCT_BUILT playerscore _ConvertPlayerScore(2) ---- ----PLAYER_SCORE_STRUCT_RAZED 'common.PLAYER_SCORE_STRUCT_RAZED' ----@field PLAYER_SCORE_STRUCT_RAZED playerscore _ConvertPlayerScore(3) ---- ----PLAYER_SCORE_TECH_PERCENT 'common.PLAYER_SCORE_TECH_PERCENT' ----@field PLAYER_SCORE_TECH_PERCENT playerscore _ConvertPlayerScore(4) ---- ----PLAYER_SCORE_FOOD_MAXPROD 'common.PLAYER_SCORE_FOOD_MAXPROD' ----@field PLAYER_SCORE_FOOD_MAXPROD playerscore _ConvertPlayerScore(5) ---- ----PLAYER_SCORE_FOOD_MAXUSED 'common.PLAYER_SCORE_FOOD_MAXUSED' ----@field PLAYER_SCORE_FOOD_MAXUSED playerscore _ConvertPlayerScore(6) ---- ----PLAYER_SCORE_HEROES_KILLED 'common.PLAYER_SCORE_HEROES_KILLED' ----@field PLAYER_SCORE_HEROES_KILLED playerscore _ConvertPlayerScore(7) ---- ----PLAYER_SCORE_ITEMS_GAINED 'common.PLAYER_SCORE_ITEMS_GAINED' ----@field PLAYER_SCORE_ITEMS_GAINED playerscore _ConvertPlayerScore(8) ---- ----PLAYER_SCORE_MERCS_HIRED 'common.PLAYER_SCORE_MERCS_HIRED' ----@field PLAYER_SCORE_MERCS_HIRED playerscore _ConvertPlayerScore(9) ---- ----PLAYER_SCORE_GOLD_MINED_TOTAL 'common.PLAYER_SCORE_GOLD_MINED_TOTAL' ----@field PLAYER_SCORE_GOLD_MINED_TOTAL playerscore _ConvertPlayerScore(10) ---- ----PLAYER_SCORE_GOLD_MINED_UPKEEP 'common.PLAYER_SCORE_GOLD_MINED_UPKEEP' ----@field PLAYER_SCORE_GOLD_MINED_UPKEEP playerscore _ConvertPlayerScore(11) ---- ----PLAYER_SCORE_GOLD_LOST_UPKEEP 'common.PLAYER_SCORE_GOLD_LOST_UPKEEP' ----@field PLAYER_SCORE_GOLD_LOST_UPKEEP playerscore _ConvertPlayerScore(12) ---- ----PLAYER_SCORE_GOLD_LOST_TAX 'common.PLAYER_SCORE_GOLD_LOST_TAX' ----@field PLAYER_SCORE_GOLD_LOST_TAX playerscore _ConvertPlayerScore(13) ---- ----PLAYER_SCORE_GOLD_GIVEN 'common.PLAYER_SCORE_GOLD_GIVEN' ----@field PLAYER_SCORE_GOLD_GIVEN playerscore _ConvertPlayerScore(14) ---- ----PLAYER_SCORE_GOLD_RECEIVED 'common.PLAYER_SCORE_GOLD_RECEIVED' ----@field PLAYER_SCORE_GOLD_RECEIVED playerscore _ConvertPlayerScore(15) ---- ----PLAYER_SCORE_LUMBER_TOTAL 'common.PLAYER_SCORE_LUMBER_TOTAL' ----@field PLAYER_SCORE_LUMBER_TOTAL playerscore _ConvertPlayerScore(16) ---- ----PLAYER_SCORE_LUMBER_LOST_UPKEEP 'common.PLAYER_SCORE_LUMBER_LOST_UPKEEP' ----@field PLAYER_SCORE_LUMBER_LOST_UPKEEP playerscore _ConvertPlayerScore(17) ---- ----PLAYER_SCORE_LUMBER_LOST_TAX 'common.PLAYER_SCORE_LUMBER_LOST_TAX' ----@field PLAYER_SCORE_LUMBER_LOST_TAX playerscore _ConvertPlayerScore(18) ---- ----PLAYER_SCORE_LUMBER_GIVEN 'common.PLAYER_SCORE_LUMBER_GIVEN' ----@field PLAYER_SCORE_LUMBER_GIVEN playerscore _ConvertPlayerScore(19) ---- ----PLAYER_SCORE_LUMBER_RECEIVED 'common.PLAYER_SCORE_LUMBER_RECEIVED' ----@field PLAYER_SCORE_LUMBER_RECEIVED playerscore _ConvertPlayerScore(20) ---- ----PLAYER_SCORE_UNIT_TOTAL 'common.PLAYER_SCORE_UNIT_TOTAL' ----@field PLAYER_SCORE_UNIT_TOTAL playerscore _ConvertPlayerScore(21) ---- ----PLAYER_SCORE_HERO_TOTAL 'common.PLAYER_SCORE_HERO_TOTAL' ----@field PLAYER_SCORE_HERO_TOTAL playerscore _ConvertPlayerScore(22) ---- ----PLAYER_SCORE_RESOURCE_TOTAL 'common.PLAYER_SCORE_RESOURCE_TOTAL' ----@field PLAYER_SCORE_RESOURCE_TOTAL playerscore _ConvertPlayerScore(23) ---- ----PLAYER_SCORE_TOTAL 'common.PLAYER_SCORE_TOTAL' ----@field PLAYER_SCORE_TOTAL playerscore _ConvertPlayerScore(24) ---- ----EVENT_GAME_VICTORY 'common.EVENT_GAME_VICTORY' ----@field EVENT_GAME_VICTORY gameevent _ConvertGameEvent(0) ---- ----EVENT_GAME_END_LEVEL 'common.EVENT_GAME_END_LEVEL' ----@field EVENT_GAME_END_LEVEL gameevent _ConvertGameEvent(1) ---- ----EVENT_GAME_VARIABLE_LIMIT 'common.EVENT_GAME_VARIABLE_LIMIT' ----@field EVENT_GAME_VARIABLE_LIMIT gameevent _ConvertGameEvent(2) ---- ----EVENT_GAME_STATE_LIMIT 'common.EVENT_GAME_STATE_LIMIT' ----@field EVENT_GAME_STATE_LIMIT gameevent _ConvertGameEvent(3) ---- ----EVENT_GAME_TIMER_EXPIRED 'common.EVENT_GAME_TIMER_EXPIRED' ----@field EVENT_GAME_TIMER_EXPIRED gameevent _ConvertGameEvent(4) ---- ----EVENT_GAME_ENTER_REGION 'common.EVENT_GAME_ENTER_REGION' ----@field EVENT_GAME_ENTER_REGION gameevent _ConvertGameEvent(5) ---- ----EVENT_GAME_LEAVE_REGION 'common.EVENT_GAME_LEAVE_REGION' ----@field EVENT_GAME_LEAVE_REGION gameevent _ConvertGameEvent(6) ---- ----EVENT_GAME_TRACKABLE_HIT 'common.EVENT_GAME_TRACKABLE_HIT' ----@field EVENT_GAME_TRACKABLE_HIT gameevent _ConvertGameEvent(7) ---- ----EVENT_GAME_TRACKABLE_TRACK 'common.EVENT_GAME_TRACKABLE_TRACK' ----@field EVENT_GAME_TRACKABLE_TRACK gameevent _ConvertGameEvent(8) ---- ----EVENT_GAME_SHOW_SKILL 'common.EVENT_GAME_SHOW_SKILL' ----@field EVENT_GAME_SHOW_SKILL gameevent _ConvertGameEvent(9) ---- ----EVENT_GAME_BUILD_SUBMENU 'common.EVENT_GAME_BUILD_SUBMENU' ----@field EVENT_GAME_BUILD_SUBMENU gameevent _ConvertGameEvent(10) ---- ----For use with TriggerRegisterPlayerEvent 'common.EVENT_PLAYER_STATE_LIMIT' ----@field EVENT_PLAYER_STATE_LIMIT playerevent _ConvertPlayerEvent(11) ---- ----EVENT_PLAYER_ALLIANCE_CHANGED 'common.EVENT_PLAYER_ALLIANCE_CHANGED' ----@field EVENT_PLAYER_ALLIANCE_CHANGED playerevent _ConvertPlayerEvent(12) ---- ----EVENT_PLAYER_DEFEAT 'common.EVENT_PLAYER_DEFEAT' ----@field EVENT_PLAYER_DEFEAT playerevent _ConvertPlayerEvent(13) ---- ----EVENT_PLAYER_VICTORY 'common.EVENT_PLAYER_VICTORY' ----@field EVENT_PLAYER_VICTORY playerevent _ConvertPlayerEvent(14) ---- ----EVENT_PLAYER_LEAVE 'common.EVENT_PLAYER_LEAVE' ----@field EVENT_PLAYER_LEAVE playerevent _ConvertPlayerEvent(15) ---- ----EVENT_PLAYER_CHAT 'common.EVENT_PLAYER_CHAT' ----@field EVENT_PLAYER_CHAT playerevent _ConvertPlayerEvent(16) ---- ----EVENT_PLAYER_END_CINEMATIC 'common.EVENT_PLAYER_END_CINEMATIC' ----@field EVENT_PLAYER_END_CINEMATIC playerevent _ConvertPlayerEvent(17) ---- ----玩家單位被攻擊 'common.EVENT_PLAYER_UNIT_ATTACKED' ----@field EVENT_PLAYER_UNIT_ATTACKED playerunitevent _ConvertPlayerUnitEvent(18) ---- ----玩家單位被救援 'common.EVENT_PLAYER_UNIT_RESCUED' ----@field EVENT_PLAYER_UNIT_RESCUED playerunitevent _ConvertPlayerUnitEvent(19) ---- ----玩家單位死亡 'common.EVENT_PLAYER_UNIT_DEATH' ----@field EVENT_PLAYER_UNIT_DEATH playerunitevent _ConvertPlayerUnitEvent(20) ---- ----玩家單位開始腐爛 'common.EVENT_PLAYER_UNIT_DECAY' ----@field EVENT_PLAYER_UNIT_DECAY playerunitevent _ConvertPlayerUnitEvent(21) ---- ----EVENT_PLAYER_UNIT_DETECTED 'common.EVENT_PLAYER_UNIT_DETECTED' ----@field EVENT_PLAYER_UNIT_DETECTED playerunitevent _ConvertPlayerUnitEvent(22) ---- ----EVENT_PLAYER_UNIT_HIDDEN 'common.EVENT_PLAYER_UNIT_HIDDEN' ----@field EVENT_PLAYER_UNIT_HIDDEN playerunitevent _ConvertPlayerUnitEvent(23) ---- ----EVENT_PLAYER_UNIT_SELECTED 'common.EVENT_PLAYER_UNIT_SELECTED' ----@field EVENT_PLAYER_UNIT_SELECTED playerunitevent _ConvertPlayerUnitEvent(24) ---- ----EVENT_PLAYER_UNIT_DESELECTED 'common.EVENT_PLAYER_UNIT_DESELECTED' ----@field EVENT_PLAYER_UNIT_DESELECTED playerunitevent _ConvertPlayerUnitEvent(25) ---- ----EVENT_PLAYER_UNIT_CONSTRUCT_START 'common.EVENT_PLAYER_UNIT_CONSTRUCT_START' ----@field EVENT_PLAYER_UNIT_CONSTRUCT_START playerunitevent _ConvertPlayerUnitEvent(26) ---- ----EVENT_PLAYER_UNIT_CONSTRUCT_CANCEL 'common.EVENT_PLAYER_UNIT_CONSTRUCT_CANCEL' ----@field EVENT_PLAYER_UNIT_CONSTRUCT_CANCEL playerunitevent _ConvertPlayerUnitEvent(27) ---- ----EVENT_PLAYER_UNIT_CONSTRUCT_FINISH 'common.EVENT_PLAYER_UNIT_CONSTRUCT_FINISH' ----@field EVENT_PLAYER_UNIT_CONSTRUCT_FINISH playerunitevent _ConvertPlayerUnitEvent(28) ---- ----EVENT_PLAYER_UNIT_UPGRADE_START 'common.EVENT_PLAYER_UNIT_UPGRADE_START' ----@field EVENT_PLAYER_UNIT_UPGRADE_START playerunitevent _ConvertPlayerUnitEvent(29) ---- ----EVENT_PLAYER_UNIT_UPGRADE_CANCEL 'common.EVENT_PLAYER_UNIT_UPGRADE_CANCEL' ----@field EVENT_PLAYER_UNIT_UPGRADE_CANCEL playerunitevent _ConvertPlayerUnitEvent(30) ---- ----EVENT_PLAYER_UNIT_UPGRADE_FINISH 'common.EVENT_PLAYER_UNIT_UPGRADE_FINISH' ----@field EVENT_PLAYER_UNIT_UPGRADE_FINISH playerunitevent _ConvertPlayerUnitEvent(31) ---- ----EVENT_PLAYER_UNIT_TRAIN_START 'common.EVENT_PLAYER_UNIT_TRAIN_START' ----@field EVENT_PLAYER_UNIT_TRAIN_START playerunitevent _ConvertPlayerUnitEvent(32) ---- ----EVENT_PLAYER_UNIT_TRAIN_CANCEL 'common.EVENT_PLAYER_UNIT_TRAIN_CANCEL' ----@field EVENT_PLAYER_UNIT_TRAIN_CANCEL playerunitevent _ConvertPlayerUnitEvent(33) ---- ----EVENT_PLAYER_UNIT_TRAIN_FINISH 'common.EVENT_PLAYER_UNIT_TRAIN_FINISH' ----@field EVENT_PLAYER_UNIT_TRAIN_FINISH playerunitevent _ConvertPlayerUnitEvent(34) ---- ----EVENT_PLAYER_UNIT_RESEARCH_START 'common.EVENT_PLAYER_UNIT_RESEARCH_START' ----@field EVENT_PLAYER_UNIT_RESEARCH_START playerunitevent _ConvertPlayerUnitEvent(35) ---- ----EVENT_PLAYER_UNIT_RESEARCH_CANCEL 'common.EVENT_PLAYER_UNIT_RESEARCH_CANCEL' ----@field EVENT_PLAYER_UNIT_RESEARCH_CANCEL playerunitevent _ConvertPlayerUnitEvent(36) ---- ----EVENT_PLAYER_UNIT_RESEARCH_FINISH 'common.EVENT_PLAYER_UNIT_RESEARCH_FINISH' ----@field EVENT_PLAYER_UNIT_RESEARCH_FINISH playerunitevent _ConvertPlayerUnitEvent(37) ---- ----EVENT_PLAYER_UNIT_ISSUED_ORDER 'common.EVENT_PLAYER_UNIT_ISSUED_ORDER' ----@field EVENT_PLAYER_UNIT_ISSUED_ORDER playerunitevent _ConvertPlayerUnitEvent(38) ---- ----EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER 'common.EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER' ----@field EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER playerunitevent _ConvertPlayerUnitEvent(39) ---- ----EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER 'common.EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER' ----@field EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER playerunitevent _ConvertPlayerUnitEvent(40) ---- ----EVENT_PLAYER_UNIT_ISSUED_UNIT_ORDER 'common.EVENT_PLAYER_UNIT_ISSUED_UNIT_ORDER' ----@field EVENT_PLAYER_UNIT_ISSUED_UNIT_ORDER playerunitevent _ConvertPlayerUnitEvent(40) ---- ----EVENT_PLAYER_HERO_LEVEL 'common.EVENT_PLAYER_HERO_LEVEL' ----@field EVENT_PLAYER_HERO_LEVEL playerunitevent _ConvertPlayerUnitEvent(41) ---- ----EVENT_PLAYER_HERO_SKILL 'common.EVENT_PLAYER_HERO_SKILL' ----@field EVENT_PLAYER_HERO_SKILL playerunitevent _ConvertPlayerUnitEvent(42) ---- ----EVENT_PLAYER_HERO_REVIVABLE 'common.EVENT_PLAYER_HERO_REVIVABLE' ----@field EVENT_PLAYER_HERO_REVIVABLE playerunitevent _ConvertPlayerUnitEvent(43) ---- ----EVENT_PLAYER_HERO_REVIVE_START 'common.EVENT_PLAYER_HERO_REVIVE_START' ----@field EVENT_PLAYER_HERO_REVIVE_START playerunitevent _ConvertPlayerUnitEvent(44) ---- ----EVENT_PLAYER_HERO_REVIVE_CANCEL 'common.EVENT_PLAYER_HERO_REVIVE_CANCEL' ----@field EVENT_PLAYER_HERO_REVIVE_CANCEL playerunitevent _ConvertPlayerUnitEvent(45) ---- ----EVENT_PLAYER_HERO_REVIVE_FINISH 'common.EVENT_PLAYER_HERO_REVIVE_FINISH' ----@field EVENT_PLAYER_HERO_REVIVE_FINISH playerunitevent _ConvertPlayerUnitEvent(46) ---- ----EVENT_PLAYER_UNIT_SUMMON 'common.EVENT_PLAYER_UNIT_SUMMON' ----@field EVENT_PLAYER_UNIT_SUMMON playerunitevent _ConvertPlayerUnitEvent(47) ---- ----EVENT_PLAYER_UNIT_DROP_ITEM 'common.EVENT_PLAYER_UNIT_DROP_ITEM' ----@field EVENT_PLAYER_UNIT_DROP_ITEM playerunitevent _ConvertPlayerUnitEvent(48) ---- ----EVENT_PLAYER_UNIT_PICKUP_ITEM 'common.EVENT_PLAYER_UNIT_PICKUP_ITEM' ----@field EVENT_PLAYER_UNIT_PICKUP_ITEM playerunitevent _ConvertPlayerUnitEvent(49) ---- ----EVENT_PLAYER_UNIT_USE_ITEM 'common.EVENT_PLAYER_UNIT_USE_ITEM' ----@field EVENT_PLAYER_UNIT_USE_ITEM playerunitevent _ConvertPlayerUnitEvent(50) ---- ----EVENT_PLAYER_UNIT_LOADED 'common.EVENT_PLAYER_UNIT_LOADED' ----@field EVENT_PLAYER_UNIT_LOADED playerunitevent _ConvertPlayerUnitEvent(51) ---- ----EVENT_PLAYER_UNIT_DAMAGED 'common.EVENT_PLAYER_UNIT_DAMAGED' ----@field EVENT_PLAYER_UNIT_DAMAGED playerunitevent _ConvertPlayerUnitEvent(308) ---- ----EVENT_PLAYER_UNIT_DAMAGING 'common.EVENT_PLAYER_UNIT_DAMAGING' ----@field EVENT_PLAYER_UNIT_DAMAGING playerunitevent _ConvertPlayerUnitEvent(315) ---- ----EVENT_UNIT_DAMAGED 'common.EVENT_UNIT_DAMAGED' ----@field EVENT_UNIT_DAMAGED unitevent _ConvertUnitEvent(52) ---- ----EVENT_UNIT_DAMAGING 'common.EVENT_UNIT_DAMAGING' ----@field EVENT_UNIT_DAMAGING unitevent _ConvertUnitEvent(314) ---- ----EVENT_UNIT_DEATH 'common.EVENT_UNIT_DEATH' ----@field EVENT_UNIT_DEATH unitevent _ConvertUnitEvent(53) ---- ----EVENT_UNIT_DECAY 'common.EVENT_UNIT_DECAY' ----@field EVENT_UNIT_DECAY unitevent _ConvertUnitEvent(54) ---- ----EVENT_UNIT_DETECTED 'common.EVENT_UNIT_DETECTED' ----@field EVENT_UNIT_DETECTED unitevent _ConvertUnitEvent(55) ---- ----EVENT_UNIT_HIDDEN 'common.EVENT_UNIT_HIDDEN' ----@field EVENT_UNIT_HIDDEN unitevent _ConvertUnitEvent(56) ---- ----EVENT_UNIT_SELECTED 'common.EVENT_UNIT_SELECTED' ----@field EVENT_UNIT_SELECTED unitevent _ConvertUnitEvent(57) ---- ----EVENT_UNIT_DESELECTED 'common.EVENT_UNIT_DESELECTED' ----@field EVENT_UNIT_DESELECTED unitevent _ConvertUnitEvent(58) ---- ----EVENT_UNIT_STATE_LIMIT 'common.EVENT_UNIT_STATE_LIMIT' ----@field EVENT_UNIT_STATE_LIMIT unitevent _ConvertUnitEvent(59) ---- ----Events which may have a filter for the "other unit" 'common.EVENT_UNIT_ACQUIRED_TARGET' ----@field EVENT_UNIT_ACQUIRED_TARGET unitevent _ConvertUnitEvent(60) ---- ----EVENT_UNIT_TARGET_IN_RANGE 'common.EVENT_UNIT_TARGET_IN_RANGE' ----@field EVENT_UNIT_TARGET_IN_RANGE unitevent _ConvertUnitEvent(61) ---- ----EVENT_UNIT_ATTACKED 'common.EVENT_UNIT_ATTACKED' ----@field EVENT_UNIT_ATTACKED unitevent _ConvertUnitEvent(62) ---- ----EVENT_UNIT_RESCUED 'common.EVENT_UNIT_RESCUED' ----@field EVENT_UNIT_RESCUED unitevent _ConvertUnitEvent(63) ---- ----EVENT_UNIT_CONSTRUCT_CANCEL 'common.EVENT_UNIT_CONSTRUCT_CANCEL' ----@field EVENT_UNIT_CONSTRUCT_CANCEL unitevent _ConvertUnitEvent(64) ---- ----EVENT_UNIT_CONSTRUCT_FINISH 'common.EVENT_UNIT_CONSTRUCT_FINISH' ----@field EVENT_UNIT_CONSTRUCT_FINISH unitevent _ConvertUnitEvent(65) ---- ----EVENT_UNIT_UPGRADE_START 'common.EVENT_UNIT_UPGRADE_START' ----@field EVENT_UNIT_UPGRADE_START unitevent _ConvertUnitEvent(66) ---- ----EVENT_UNIT_UPGRADE_CANCEL 'common.EVENT_UNIT_UPGRADE_CANCEL' ----@field EVENT_UNIT_UPGRADE_CANCEL unitevent _ConvertUnitEvent(67) ---- ----EVENT_UNIT_UPGRADE_FINISH 'common.EVENT_UNIT_UPGRADE_FINISH' ----@field EVENT_UNIT_UPGRADE_FINISH unitevent _ConvertUnitEvent(68) ---- ----Events which involve the specified unit performing ----training of other units 'common.EVENT_UNIT_TRAIN_START' ----@field EVENT_UNIT_TRAIN_START unitevent _ConvertUnitEvent(69) ---- ----EVENT_UNIT_TRAIN_CANCEL 'common.EVENT_UNIT_TRAIN_CANCEL' ----@field EVENT_UNIT_TRAIN_CANCEL unitevent _ConvertUnitEvent(70) ---- ----EVENT_UNIT_TRAIN_FINISH 'common.EVENT_UNIT_TRAIN_FINISH' ----@field EVENT_UNIT_TRAIN_FINISH unitevent _ConvertUnitEvent(71) ---- ----EVENT_UNIT_RESEARCH_START 'common.EVENT_UNIT_RESEARCH_START' ----@field EVENT_UNIT_RESEARCH_START unitevent _ConvertUnitEvent(72) ---- ----EVENT_UNIT_RESEARCH_CANCEL 'common.EVENT_UNIT_RESEARCH_CANCEL' ----@field EVENT_UNIT_RESEARCH_CANCEL unitevent _ConvertUnitEvent(73) ---- ----EVENT_UNIT_RESEARCH_FINISH 'common.EVENT_UNIT_RESEARCH_FINISH' ----@field EVENT_UNIT_RESEARCH_FINISH unitevent _ConvertUnitEvent(74) ---- ----EVENT_UNIT_ISSUED_ORDER 'common.EVENT_UNIT_ISSUED_ORDER' ----@field EVENT_UNIT_ISSUED_ORDER unitevent _ConvertUnitEvent(75) ---- ----EVENT_UNIT_ISSUED_POINT_ORDER 'common.EVENT_UNIT_ISSUED_POINT_ORDER' ----@field EVENT_UNIT_ISSUED_POINT_ORDER unitevent _ConvertUnitEvent(76) ---- ----EVENT_UNIT_ISSUED_TARGET_ORDER 'common.EVENT_UNIT_ISSUED_TARGET_ORDER' ----@field EVENT_UNIT_ISSUED_TARGET_ORDER unitevent _ConvertUnitEvent(77) ---- ----EVENT_UNIT_HERO_LEVEL 'common.EVENT_UNIT_HERO_LEVEL' ----@field EVENT_UNIT_HERO_LEVEL unitevent _ConvertUnitEvent(78) ---- ----EVENT_UNIT_HERO_SKILL 'common.EVENT_UNIT_HERO_SKILL' ----@field EVENT_UNIT_HERO_SKILL unitevent _ConvertUnitEvent(79) ---- ----EVENT_UNIT_HERO_REVIVABLE 'common.EVENT_UNIT_HERO_REVIVABLE' ----@field EVENT_UNIT_HERO_REVIVABLE unitevent _ConvertUnitEvent(80) ---- ----EVENT_UNIT_HERO_REVIVE_START 'common.EVENT_UNIT_HERO_REVIVE_START' ----@field EVENT_UNIT_HERO_REVIVE_START unitevent _ConvertUnitEvent(81) ---- ----EVENT_UNIT_HERO_REVIVE_CANCEL 'common.EVENT_UNIT_HERO_REVIVE_CANCEL' ----@field EVENT_UNIT_HERO_REVIVE_CANCEL unitevent _ConvertUnitEvent(82) ---- ----EVENT_UNIT_HERO_REVIVE_FINISH 'common.EVENT_UNIT_HERO_REVIVE_FINISH' ----@field EVENT_UNIT_HERO_REVIVE_FINISH unitevent _ConvertUnitEvent(83) ---- ----EVENT_UNIT_SUMMON 'common.EVENT_UNIT_SUMMON' ----@field EVENT_UNIT_SUMMON unitevent _ConvertUnitEvent(84) ---- ----EVENT_UNIT_DROP_ITEM 'common.EVENT_UNIT_DROP_ITEM' ----@field EVENT_UNIT_DROP_ITEM unitevent _ConvertUnitEvent(85) ---- ----EVENT_UNIT_PICKUP_ITEM 'common.EVENT_UNIT_PICKUP_ITEM' ----@field EVENT_UNIT_PICKUP_ITEM unitevent _ConvertUnitEvent(86) ---- ----EVENT_UNIT_USE_ITEM 'common.EVENT_UNIT_USE_ITEM' ----@field EVENT_UNIT_USE_ITEM unitevent _ConvertUnitEvent(87) ---- ----EVENT_UNIT_LOADED 'common.EVENT_UNIT_LOADED' ----@field EVENT_UNIT_LOADED unitevent _ConvertUnitEvent(88) ---- ----EVENT_WIDGET_DEATH 'common.EVENT_WIDGET_DEATH' ----@field EVENT_WIDGET_DEATH widgetevent _ConvertWidgetEvent(89) ---- ----EVENT_DIALOG_BUTTON_CLICK 'common.EVENT_DIALOG_BUTTON_CLICK' ----@field EVENT_DIALOG_BUTTON_CLICK dialogevent _ConvertDialogEvent(90) ---- ----EVENT_DIALOG_CLICK 'common.EVENT_DIALOG_CLICK' ----@field EVENT_DIALOG_CLICK dialogevent _ConvertDialogEvent(91) ---- ----EVENT_GAME_LOADED 'common.EVENT_GAME_LOADED' ----@field EVENT_GAME_LOADED gameevent _ConvertGameEvent(256) ---- ----EVENT_GAME_TOURNAMENT_FINISH_SOON 'common.EVENT_GAME_TOURNAMENT_FINISH_SOON' ----@field EVENT_GAME_TOURNAMENT_FINISH_SOON gameevent _ConvertGameEvent(257) ---- ----EVENT_GAME_TOURNAMENT_FINISH_NOW 'common.EVENT_GAME_TOURNAMENT_FINISH_NOW' ----@field EVENT_GAME_TOURNAMENT_FINISH_NOW gameevent _ConvertGameEvent(258) ---- ----EVENT_GAME_SAVE 'common.EVENT_GAME_SAVE' ----@field EVENT_GAME_SAVE gameevent _ConvertGameEvent(259) ---- ----EVENT_GAME_CUSTOM_UI_FRAME 'common.EVENT_GAME_CUSTOM_UI_FRAME' ----@field EVENT_GAME_CUSTOM_UI_FRAME gameevent _ConvertGameEvent(310) ---- ----EVENT_PLAYER_ARROW_LEFT_DOWN 'common.EVENT_PLAYER_ARROW_LEFT_DOWN' ----@field EVENT_PLAYER_ARROW_LEFT_DOWN playerevent _ConvertPlayerEvent(261) ---- ----EVENT_PLAYER_ARROW_LEFT_UP 'common.EVENT_PLAYER_ARROW_LEFT_UP' ----@field EVENT_PLAYER_ARROW_LEFT_UP playerevent _ConvertPlayerEvent(262) ---- ----EVENT_PLAYER_ARROW_RIGHT_DOWN 'common.EVENT_PLAYER_ARROW_RIGHT_DOWN' ----@field EVENT_PLAYER_ARROW_RIGHT_DOWN playerevent _ConvertPlayerEvent(263) ---- ----EVENT_PLAYER_ARROW_RIGHT_UP 'common.EVENT_PLAYER_ARROW_RIGHT_UP' ----@field EVENT_PLAYER_ARROW_RIGHT_UP playerevent _ConvertPlayerEvent(264) ---- ----EVENT_PLAYER_ARROW_DOWN_DOWN 'common.EVENT_PLAYER_ARROW_DOWN_DOWN' ----@field EVENT_PLAYER_ARROW_DOWN_DOWN playerevent _ConvertPlayerEvent(265) ---- ----EVENT_PLAYER_ARROW_DOWN_UP 'common.EVENT_PLAYER_ARROW_DOWN_UP' ----@field EVENT_PLAYER_ARROW_DOWN_UP playerevent _ConvertPlayerEvent(266) ---- ----EVENT_PLAYER_ARROW_UP_DOWN 'common.EVENT_PLAYER_ARROW_UP_DOWN' ----@field EVENT_PLAYER_ARROW_UP_DOWN playerevent _ConvertPlayerEvent(267) ---- ----EVENT_PLAYER_ARROW_UP_UP 'common.EVENT_PLAYER_ARROW_UP_UP' ----@field EVENT_PLAYER_ARROW_UP_UP playerevent _ConvertPlayerEvent(268) ---- ----EVENT_PLAYER_MOUSE_DOWN 'common.EVENT_PLAYER_MOUSE_DOWN' ----@field EVENT_PLAYER_MOUSE_DOWN playerevent _ConvertPlayerEvent(305) ---- ----EVENT_PLAYER_MOUSE_UP 'common.EVENT_PLAYER_MOUSE_UP' ----@field EVENT_PLAYER_MOUSE_UP playerevent _ConvertPlayerEvent(306) ---- ----EVENT_PLAYER_MOUSE_MOVE 'common.EVENT_PLAYER_MOUSE_MOVE' ----@field EVENT_PLAYER_MOUSE_MOVE playerevent _ConvertPlayerEvent(307) ---- ----EVENT_PLAYER_SYNC_DATA 'common.EVENT_PLAYER_SYNC_DATA' ----@field EVENT_PLAYER_SYNC_DATA playerevent _ConvertPlayerEvent(309) ---- ----EVENT_PLAYER_KEY 'common.EVENT_PLAYER_KEY' ----@field EVENT_PLAYER_KEY playerevent _ConvertPlayerEvent(311) ---- ----EVENT_PLAYER_KEY_DOWN 'common.EVENT_PLAYER_KEY_DOWN' ----@field EVENT_PLAYER_KEY_DOWN playerevent _ConvertPlayerEvent(312) ---- ----EVENT_PLAYER_KEY_UP 'common.EVENT_PLAYER_KEY_UP' ----@field EVENT_PLAYER_KEY_UP playerevent _ConvertPlayerEvent(313) ---- ----EVENT_PLAYER_UNIT_SELL 'common.EVENT_PLAYER_UNIT_SELL' ----@field EVENT_PLAYER_UNIT_SELL playerunitevent _ConvertPlayerUnitEvent(269) ---- ----玩家單位更改所有者 'common.EVENT_PLAYER_UNIT_CHANGE_OWNER' ----@field EVENT_PLAYER_UNIT_CHANGE_OWNER playerunitevent _ConvertPlayerUnitEvent(270) ---- ----玩家單位出售物品 'common.EVENT_PLAYER_UNIT_SELL_ITEM' ----@field EVENT_PLAYER_UNIT_SELL_ITEM playerunitevent _ConvertPlayerUnitEvent(271) ---- ----玩家單位準備施放技能 'common.EVENT_PLAYER_UNIT_SPELL_CHANNEL' ----@field EVENT_PLAYER_UNIT_SPELL_CHANNEL playerunitevent _ConvertPlayerUnitEvent(272) ---- ----玩家單位開始施放技能 'common.EVENT_PLAYER_UNIT_SPELL_CAST' ----@field EVENT_PLAYER_UNIT_SPELL_CAST playerunitevent _ConvertPlayerUnitEvent(273) ---- ----玩家單位發動技能效果 'common.EVENT_PLAYER_UNIT_SPELL_EFFECT' ----@field EVENT_PLAYER_UNIT_SPELL_EFFECT playerunitevent _ConvertPlayerUnitEvent(274) ---- ----玩家單位釋放技能結束 'common.EVENT_PLAYER_UNIT_SPELL_FINISH' ----@field EVENT_PLAYER_UNIT_SPELL_FINISH playerunitevent _ConvertPlayerUnitEvent(275) ---- ----玩家單位停止施放技能 'common.EVENT_PLAYER_UNIT_SPELL_ENDCAST' ----@field EVENT_PLAYER_UNIT_SPELL_ENDCAST playerunitevent _ConvertPlayerUnitEvent(276) ---- ----玩家單位抵押物品 'common.EVENT_PLAYER_UNIT_PAWN_ITEM' ----@field EVENT_PLAYER_UNIT_PAWN_ITEM playerunitevent _ConvertPlayerUnitEvent(277) ---- ----For use with TriggerRegisterUnitEvent ----单位出售 'common.EVENT_UNIT_SELL' ----@field EVENT_UNIT_SELL unitevent _ConvertUnitEvent(286) ---- ----单位所属改变 'common.EVENT_UNIT_CHANGE_OWNER' ----@field EVENT_UNIT_CHANGE_OWNER unitevent _ConvertUnitEvent(287) ---- ----出售物品 'common.EVENT_UNIT_SELL_ITEM' ----@field EVENT_UNIT_SELL_ITEM unitevent _ConvertUnitEvent(288) ---- ----准备施放技能 (前摇开始) 'common.EVENT_UNIT_SPELL_CHANNEL' ----@field EVENT_UNIT_SPELL_CHANNEL unitevent _ConvertUnitEvent(289) ---- ----开始施放技能 (前摇结束) 'common.EVENT_UNIT_SPELL_CAST' ----@field EVENT_UNIT_SPELL_CAST unitevent _ConvertUnitEvent(290) ---- ----发动技能效果 (后摇开始) 'common.EVENT_UNIT_SPELL_EFFECT' ----@field EVENT_UNIT_SPELL_EFFECT unitevent _ConvertUnitEvent(291) ---- ----发动技能结束 (后摇结束) 'common.EVENT_UNIT_SPELL_FINISH' ----@field EVENT_UNIT_SPELL_FINISH unitevent _ConvertUnitEvent(292) ---- ----停止施放技能 'common.EVENT_UNIT_SPELL_ENDCAST' ----@field EVENT_UNIT_SPELL_ENDCAST unitevent _ConvertUnitEvent(293) ---- ----抵押物品 'common.EVENT_UNIT_PAWN_ITEM' ----@field EVENT_UNIT_PAWN_ITEM unitevent _ConvertUnitEvent(294) ---- ----LESS_THAN 'common.LESS_THAN' ----@field LESS_THAN limitop _ConvertLimitOp(0) ---- ----LESS_THAN_OR_EQUAL 'common.LESS_THAN_OR_EQUAL' ----@field LESS_THAN_OR_EQUAL limitop _ConvertLimitOp(1) ---- ----EQUAL 'common.EQUAL' ----@field EQUAL limitop _ConvertLimitOp(2) ---- ----GREATER_THAN_OR_EQUAL 'common.GREATER_THAN_OR_EQUAL' ----@field GREATER_THAN_OR_EQUAL limitop _ConvertLimitOp(3) ---- ----GREATER_THAN 'common.GREATER_THAN' ----@field GREATER_THAN limitop _ConvertLimitOp(4) ---- ----NOT_EQUAL 'common.NOT_EQUAL' ----@field NOT_EQUAL limitop _ConvertLimitOp(5) ---- ----UNIT_TYPE_HERO 'common.UNIT_TYPE_HERO' ----@field UNIT_TYPE_HERO unittype _ConvertUnitType(0) ---- ----UNIT_TYPE_DEAD 'common.UNIT_TYPE_DEAD' ----@field UNIT_TYPE_DEAD unittype _ConvertUnitType(1) ---- ----UNIT_TYPE_STRUCTURE 'common.UNIT_TYPE_STRUCTURE' ----@field UNIT_TYPE_STRUCTURE unittype _ConvertUnitType(2) ---- ----UNIT_TYPE_FLYING 'common.UNIT_TYPE_FLYING' ----@field UNIT_TYPE_FLYING unittype _ConvertUnitType(3) ---- ----UNIT_TYPE_GROUND 'common.UNIT_TYPE_GROUND' ----@field UNIT_TYPE_GROUND unittype _ConvertUnitType(4) ---- ----UNIT_TYPE_ATTACKS_FLYING 'common.UNIT_TYPE_ATTACKS_FLYING' ----@field UNIT_TYPE_ATTACKS_FLYING unittype _ConvertUnitType(5) ---- ----UNIT_TYPE_ATTACKS_GROUND 'common.UNIT_TYPE_ATTACKS_GROUND' ----@field UNIT_TYPE_ATTACKS_GROUND unittype _ConvertUnitType(6) ---- ----UNIT_TYPE_MELEE_ATTACKER 'common.UNIT_TYPE_MELEE_ATTACKER' ----@field UNIT_TYPE_MELEE_ATTACKER unittype _ConvertUnitType(7) ---- ----UNIT_TYPE_RANGED_ATTACKER 'common.UNIT_TYPE_RANGED_ATTACKER' ----@field UNIT_TYPE_RANGED_ATTACKER unittype _ConvertUnitType(8) ---- ----UNIT_TYPE_GIANT 'common.UNIT_TYPE_GIANT' ----@field UNIT_TYPE_GIANT unittype _ConvertUnitType(9) ---- ----UNIT_TYPE_SUMMONED 'common.UNIT_TYPE_SUMMONED' ----@field UNIT_TYPE_SUMMONED unittype _ConvertUnitType(10) ---- ----UNIT_TYPE_STUNNED 'common.UNIT_TYPE_STUNNED' ----@field UNIT_TYPE_STUNNED unittype _ConvertUnitType(11) ---- ----UNIT_TYPE_PLAGUED 'common.UNIT_TYPE_PLAGUED' ----@field UNIT_TYPE_PLAGUED unittype _ConvertUnitType(12) ---- ----UNIT_TYPE_SNARED 'common.UNIT_TYPE_SNARED' ----@field UNIT_TYPE_SNARED unittype _ConvertUnitType(13) ---- ----UNIT_TYPE_UNDEAD 'common.UNIT_TYPE_UNDEAD' ----@field UNIT_TYPE_UNDEAD unittype _ConvertUnitType(14) ---- ----UNIT_TYPE_MECHANICAL 'common.UNIT_TYPE_MECHANICAL' ----@field UNIT_TYPE_MECHANICAL unittype _ConvertUnitType(15) ---- ----UNIT_TYPE_PEON 'common.UNIT_TYPE_PEON' ----@field UNIT_TYPE_PEON unittype _ConvertUnitType(16) ---- ----UNIT_TYPE_SAPPER 'common.UNIT_TYPE_SAPPER' ----@field UNIT_TYPE_SAPPER unittype _ConvertUnitType(17) ---- ----UNIT_TYPE_TOWNHALL 'common.UNIT_TYPE_TOWNHALL' ----@field UNIT_TYPE_TOWNHALL unittype _ConvertUnitType(18) ---- ----UNIT_TYPE_ANCIENT 'common.UNIT_TYPE_ANCIENT' ----@field UNIT_TYPE_ANCIENT unittype _ConvertUnitType(19) ---- ----UNIT_TYPE_TAUREN 'common.UNIT_TYPE_TAUREN' ----@field UNIT_TYPE_TAUREN unittype _ConvertUnitType(20) ---- ----UNIT_TYPE_POISONED 'common.UNIT_TYPE_POISONED' ----@field UNIT_TYPE_POISONED unittype _ConvertUnitType(21) ---- ----UNIT_TYPE_POLYMORPHED 'common.UNIT_TYPE_POLYMORPHED' ----@field UNIT_TYPE_POLYMORPHED unittype _ConvertUnitType(22) ---- ----UNIT_TYPE_SLEEPING 'common.UNIT_TYPE_SLEEPING' ----@field UNIT_TYPE_SLEEPING unittype _ConvertUnitType(23) ---- ----UNIT_TYPE_RESISTANT 'common.UNIT_TYPE_RESISTANT' ----@field UNIT_TYPE_RESISTANT unittype _ConvertUnitType(24) ---- ----UNIT_TYPE_ETHEREAL 'common.UNIT_TYPE_ETHEREAL' ----@field UNIT_TYPE_ETHEREAL unittype _ConvertUnitType(25) ---- ----UNIT_TYPE_MAGIC_IMMUNE 'common.UNIT_TYPE_MAGIC_IMMUNE' ----@field UNIT_TYPE_MAGIC_IMMUNE unittype _ConvertUnitType(26) ---- ----ITEM_TYPE_PERMANENT 'common.ITEM_TYPE_PERMANENT' ----@field ITEM_TYPE_PERMANENT itemtype _ConvertItemType(0) ---- ----ITEM_TYPE_CHARGED 'common.ITEM_TYPE_CHARGED' ----@field ITEM_TYPE_CHARGED itemtype _ConvertItemType(1) ---- ----ITEM_TYPE_POWERUP 'common.ITEM_TYPE_POWERUP' ----@field ITEM_TYPE_POWERUP itemtype _ConvertItemType(2) ---- ----ITEM_TYPE_ARTIFACT 'common.ITEM_TYPE_ARTIFACT' ----@field ITEM_TYPE_ARTIFACT itemtype _ConvertItemType(3) ---- ----ITEM_TYPE_PURCHASABLE 'common.ITEM_TYPE_PURCHASABLE' ----@field ITEM_TYPE_PURCHASABLE itemtype _ConvertItemType(4) ---- ----ITEM_TYPE_CAMPAIGN 'common.ITEM_TYPE_CAMPAIGN' ----@field ITEM_TYPE_CAMPAIGN itemtype _ConvertItemType(5) ---- ----ITEM_TYPE_MISCELLANEOUS 'common.ITEM_TYPE_MISCELLANEOUS' ----@field ITEM_TYPE_MISCELLANEOUS itemtype _ConvertItemType(6) ---- ----ITEM_TYPE_UNKNOWN 'common.ITEM_TYPE_UNKNOWN' ----@field ITEM_TYPE_UNKNOWN itemtype _ConvertItemType(7) ---- ----ITEM_TYPE_ANY 'common.ITEM_TYPE_ANY' ----@field ITEM_TYPE_ANY itemtype _ConvertItemType(8) ---- ----Deprecated, should use ITEM_TYPE_POWERUP 'common.ITEM_TYPE_TOME' ----@field ITEM_TYPE_TOME itemtype _ConvertItemType(2) ---- ----CAMERA_FIELD_TARGET_DISTANCE 'common.CAMERA_FIELD_TARGET_DISTANCE' ----@field CAMERA_FIELD_TARGET_DISTANCE camerafield _ConvertCameraField(0) ---- ----CAMERA_FIELD_FARZ 'common.CAMERA_FIELD_FARZ' ----@field CAMERA_FIELD_FARZ camerafield _ConvertCameraField(1) ---- ----CAMERA_FIELD_ANGLE_OF_ATTACK 'common.CAMERA_FIELD_ANGLE_OF_ATTACK' ----@field CAMERA_FIELD_ANGLE_OF_ATTACK camerafield _ConvertCameraField(2) ---- ----CAMERA_FIELD_FIELD_OF_VIEW 'common.CAMERA_FIELD_FIELD_OF_VIEW' ----@field CAMERA_FIELD_FIELD_OF_VIEW camerafield _ConvertCameraField(3) ---- ----CAMERA_FIELD_ROLL 'common.CAMERA_FIELD_ROLL' ----@field CAMERA_FIELD_ROLL camerafield _ConvertCameraField(4) ---- ----CAMERA_FIELD_ROTATION 'common.CAMERA_FIELD_ROTATION' ----@field CAMERA_FIELD_ROTATION camerafield _ConvertCameraField(5) ---- ----CAMERA_FIELD_ZOFFSET 'common.CAMERA_FIELD_ZOFFSET' ----@field CAMERA_FIELD_ZOFFSET camerafield _ConvertCameraField(6) ---- ----CAMERA_FIELD_NEARZ 'common.CAMERA_FIELD_NEARZ' ----@field CAMERA_FIELD_NEARZ camerafield _ConvertCameraField(7) ---- ----CAMERA_FIELD_LOCAL_PITCH 'common.CAMERA_FIELD_LOCAL_PITCH' ----@field CAMERA_FIELD_LOCAL_PITCH camerafield _ConvertCameraField(8) ---- ----CAMERA_FIELD_LOCAL_YAW 'common.CAMERA_FIELD_LOCAL_YAW' ----@field CAMERA_FIELD_LOCAL_YAW camerafield _ConvertCameraField(9) ---- ----CAMERA_FIELD_LOCAL_ROLL 'common.CAMERA_FIELD_LOCAL_ROLL' ----@field CAMERA_FIELD_LOCAL_ROLL camerafield _ConvertCameraField(10) ---- ----BLEND_MODE_NONE 'common.BLEND_MODE_NONE' ----@field BLEND_MODE_NONE blendmode _ConvertBlendMode(0) ---- ----BLEND_MODE_DONT_CARE 'common.BLEND_MODE_DONT_CARE' ----@field BLEND_MODE_DONT_CARE blendmode _ConvertBlendMode(0) ---- ----BLEND_MODE_KEYALPHA 'common.BLEND_MODE_KEYALPHA' ----@field BLEND_MODE_KEYALPHA blendmode _ConvertBlendMode(1) ---- ----BLEND_MODE_BLEND 'common.BLEND_MODE_BLEND' ----@field BLEND_MODE_BLEND blendmode _ConvertBlendMode(2) ---- ----BLEND_MODE_ADDITIVE 'common.BLEND_MODE_ADDITIVE' ----@field BLEND_MODE_ADDITIVE blendmode _ConvertBlendMode(3) ---- ----BLEND_MODE_MODULATE 'common.BLEND_MODE_MODULATE' ----@field BLEND_MODE_MODULATE blendmode _ConvertBlendMode(4) ---- ----BLEND_MODE_MODULATE_2X 'common.BLEND_MODE_MODULATE_2X' ----@field BLEND_MODE_MODULATE_2X blendmode _ConvertBlendMode(5) ---- ----RARITY_FREQUENT 'common.RARITY_FREQUENT' ----@field RARITY_FREQUENT raritycontrol _ConvertRarityControl(0) ---- ----RARITY_RARE 'common.RARITY_RARE' ----@field RARITY_RARE raritycontrol _ConvertRarityControl(1) ---- ----TEXMAP_FLAG_NONE 'common.TEXMAP_FLAG_NONE' ----@field TEXMAP_FLAG_NONE texmapflags _ConvertTexMapFlags(0) ---- ----TEXMAP_FLAG_WRAP_U 'common.TEXMAP_FLAG_WRAP_U' ----@field TEXMAP_FLAG_WRAP_U texmapflags _ConvertTexMapFlags(1) ---- ----TEXMAP_FLAG_WRAP_V 'common.TEXMAP_FLAG_WRAP_V' ----@field TEXMAP_FLAG_WRAP_V texmapflags _ConvertTexMapFlags(2) ---- ----TEXMAP_FLAG_WRAP_UV 'common.TEXMAP_FLAG_WRAP_UV' ----@field TEXMAP_FLAG_WRAP_UV texmapflags _ConvertTexMapFlags(3) ---- ----FOG_OF_WAR_MASKED 'common.FOG_OF_WAR_MASKED' ----@field FOG_OF_WAR_MASKED fogstate _ConvertFogState(1) ---- ----FOG_OF_WAR_FOGGED 'common.FOG_OF_WAR_FOGGED' ----@field FOG_OF_WAR_FOGGED fogstate _ConvertFogState(2) ---- ----FOG_OF_WAR_VISIBLE 'common.FOG_OF_WAR_VISIBLE' ----@field FOG_OF_WAR_VISIBLE fogstate _ConvertFogState(4) ---- ----CAMERA_MARGIN_LEFT 'common.CAMERA_MARGIN_LEFT' ----@field CAMERA_MARGIN_LEFT integer _0 ---- ----CAMERA_MARGIN_RIGHT 'common.CAMERA_MARGIN_RIGHT' ----@field CAMERA_MARGIN_RIGHT integer _1 ---- ----CAMERA_MARGIN_TOP 'common.CAMERA_MARGIN_TOP' ----@field CAMERA_MARGIN_TOP integer _2 ---- ----CAMERA_MARGIN_BOTTOM 'common.CAMERA_MARGIN_BOTTOM' ----@field CAMERA_MARGIN_BOTTOM integer _3 ---- ----EFFECT_TYPE_EFFECT 'common.EFFECT_TYPE_EFFECT' ----@field EFFECT_TYPE_EFFECT effecttype _ConvertEffectType(0) ---- ----EFFECT_TYPE_TARGET 'common.EFFECT_TYPE_TARGET' ----@field EFFECT_TYPE_TARGET effecttype _ConvertEffectType(1) ---- ----EFFECT_TYPE_CASTER 'common.EFFECT_TYPE_CASTER' ----@field EFFECT_TYPE_CASTER effecttype _ConvertEffectType(2) ---- ----EFFECT_TYPE_SPECIAL 'common.EFFECT_TYPE_SPECIAL' ----@field EFFECT_TYPE_SPECIAL effecttype _ConvertEffectType(3) ---- ----EFFECT_TYPE_AREA_EFFECT 'common.EFFECT_TYPE_AREA_EFFECT' ----@field EFFECT_TYPE_AREA_EFFECT effecttype _ConvertEffectType(4) ---- ----EFFECT_TYPE_MISSILE 'common.EFFECT_TYPE_MISSILE' ----@field EFFECT_TYPE_MISSILE effecttype _ConvertEffectType(5) ---- ----EFFECT_TYPE_LIGHTNING 'common.EFFECT_TYPE_LIGHTNING' ----@field EFFECT_TYPE_LIGHTNING effecttype _ConvertEffectType(6) ---- ----SOUND_TYPE_EFFECT 'common.SOUND_TYPE_EFFECT' ----@field SOUND_TYPE_EFFECT soundtype _ConvertSoundType(0) ---- ----SOUND_TYPE_EFFECT_LOOPED 'common.SOUND_TYPE_EFFECT_LOOPED' ----@field SOUND_TYPE_EFFECT_LOOPED soundtype _ConvertSoundType(1) ---- ----ORIGIN_FRAME_GAME_UI 'common.ORIGIN_FRAME_GAME_UI' ----@field ORIGIN_FRAME_GAME_UI originframetype _ConvertOriginFrameType(0) ---- ----ORIGIN_FRAME_COMMAND_BUTTON 'common.ORIGIN_FRAME_COMMAND_BUTTON' ----@field ORIGIN_FRAME_COMMAND_BUTTON originframetype _ConvertOriginFrameType(1) ---- ----ORIGIN_FRAME_HERO_BAR 'common.ORIGIN_FRAME_HERO_BAR' ----@field ORIGIN_FRAME_HERO_BAR originframetype _ConvertOriginFrameType(2) ---- ----ORIGIN_FRAME_HERO_BUTTON 'common.ORIGIN_FRAME_HERO_BUTTON' ----@field ORIGIN_FRAME_HERO_BUTTON originframetype _ConvertOriginFrameType(3) ---- ----ORIGIN_FRAME_HERO_HP_BAR 'common.ORIGIN_FRAME_HERO_HP_BAR' ----@field ORIGIN_FRAME_HERO_HP_BAR originframetype _ConvertOriginFrameType(4) ---- ----ORIGIN_FRAME_HERO_MANA_BAR 'common.ORIGIN_FRAME_HERO_MANA_BAR' ----@field ORIGIN_FRAME_HERO_MANA_BAR originframetype _ConvertOriginFrameType(5) ---- ----ORIGIN_FRAME_HERO_BUTTON_INDICATOR 'common.ORIGIN_FRAME_HERO_BUTTON_INDICATOR' ----@field ORIGIN_FRAME_HERO_BUTTON_INDICATOR originframetype _ConvertOriginFrameType(6) ---- ----ORIGIN_FRAME_ITEM_BUTTON 'common.ORIGIN_FRAME_ITEM_BUTTON' ----@field ORIGIN_FRAME_ITEM_BUTTON originframetype _ConvertOriginFrameType(7) ---- ----ORIGIN_FRAME_MINIMAP 'common.ORIGIN_FRAME_MINIMAP' ----@field ORIGIN_FRAME_MINIMAP originframetype _ConvertOriginFrameType(8) ---- ----ORIGIN_FRAME_MINIMAP_BUTTON 'common.ORIGIN_FRAME_MINIMAP_BUTTON' ----@field ORIGIN_FRAME_MINIMAP_BUTTON originframetype _ConvertOriginFrameType(9) ---- ----ORIGIN_FRAME_SYSTEM_BUTTON 'common.ORIGIN_FRAME_SYSTEM_BUTTON' ----@field ORIGIN_FRAME_SYSTEM_BUTTON originframetype _ConvertOriginFrameType(10) ---- ----ORIGIN_FRAME_TOOLTIP 'common.ORIGIN_FRAME_TOOLTIP' ----@field ORIGIN_FRAME_TOOLTIP originframetype _ConvertOriginFrameType(11) ---- ----ORIGIN_FRAME_UBERTOOLTIP 'common.ORIGIN_FRAME_UBERTOOLTIP' ----@field ORIGIN_FRAME_UBERTOOLTIP originframetype _ConvertOriginFrameType(12) ---- ----ORIGIN_FRAME_CHAT_MSG 'common.ORIGIN_FRAME_CHAT_MSG' ----@field ORIGIN_FRAME_CHAT_MSG originframetype _ConvertOriginFrameType(13) ---- ----ORIGIN_FRAME_UNIT_MSG 'common.ORIGIN_FRAME_UNIT_MSG' ----@field ORIGIN_FRAME_UNIT_MSG originframetype _ConvertOriginFrameType(14) ---- ----ORIGIN_FRAME_TOP_MSG 'common.ORIGIN_FRAME_TOP_MSG' ----@field ORIGIN_FRAME_TOP_MSG originframetype _ConvertOriginFrameType(15) ---- ----ORIGIN_FRAME_PORTRAIT 'common.ORIGIN_FRAME_PORTRAIT' ----@field ORIGIN_FRAME_PORTRAIT originframetype _ConvertOriginFrameType(16) ---- ----ORIGIN_FRAME_WORLD_FRAME 'common.ORIGIN_FRAME_WORLD_FRAME' ----@field ORIGIN_FRAME_WORLD_FRAME originframetype _ConvertOriginFrameType(17) ---- ----ORIGIN_FRAME_SIMPLE_UI_PARENT 'common.ORIGIN_FRAME_SIMPLE_UI_PARENT' ----@field ORIGIN_FRAME_SIMPLE_UI_PARENT originframetype _ConvertOriginFrameType(18) ---- ----ORIGIN_FRAME_PORTRAIT_HP_TEXT 'common.ORIGIN_FRAME_PORTRAIT_HP_TEXT' ----@field ORIGIN_FRAME_PORTRAIT_HP_TEXT originframetype _ConvertOriginFrameType(19) ---- ----ORIGIN_FRAME_PORTRAIT_MANA_TEXT 'common.ORIGIN_FRAME_PORTRAIT_MANA_TEXT' ----@field ORIGIN_FRAME_PORTRAIT_MANA_TEXT originframetype _ConvertOriginFrameType(20) ---- ----ORIGIN_FRAME_UNIT_PANEL_BUFF_BAR 'common.ORIGIN_FRAME_UNIT_PANEL_BUFF_BAR' ----@field ORIGIN_FRAME_UNIT_PANEL_BUFF_BAR originframetype _ConvertOriginFrameType(21) ---- ----ORIGIN_FRAME_UNIT_PANEL_BUFF_BAR_LABEL 'common.ORIGIN_FRAME_UNIT_PANEL_BUFF_BAR_LABEL' ----@field ORIGIN_FRAME_UNIT_PANEL_BUFF_BAR_LABEL originframetype _ConvertOriginFrameType(22) ---- ----FRAMEPOINT_TOPLEFT 'common.FRAMEPOINT_TOPLEFT' ----@field FRAMEPOINT_TOPLEFT framepointtype _ConvertFramePointType(0) ---- ----FRAMEPOINT_TOP 'common.FRAMEPOINT_TOP' ----@field FRAMEPOINT_TOP framepointtype _ConvertFramePointType(1) ---- ----FRAMEPOINT_TOPRIGHT 'common.FRAMEPOINT_TOPRIGHT' ----@field FRAMEPOINT_TOPRIGHT framepointtype _ConvertFramePointType(2) ---- ----FRAMEPOINT_LEFT 'common.FRAMEPOINT_LEFT' ----@field FRAMEPOINT_LEFT framepointtype _ConvertFramePointType(3) ---- ----FRAMEPOINT_CENTER 'common.FRAMEPOINT_CENTER' ----@field FRAMEPOINT_CENTER framepointtype _ConvertFramePointType(4) ---- ----FRAMEPOINT_RIGHT 'common.FRAMEPOINT_RIGHT' ----@field FRAMEPOINT_RIGHT framepointtype _ConvertFramePointType(5) ---- ----FRAMEPOINT_BOTTOMLEFT 'common.FRAMEPOINT_BOTTOMLEFT' ----@field FRAMEPOINT_BOTTOMLEFT framepointtype _ConvertFramePointType(6) ---- ----FRAMEPOINT_BOTTOM 'common.FRAMEPOINT_BOTTOM' ----@field FRAMEPOINT_BOTTOM framepointtype _ConvertFramePointType(7) ---- ----FRAMEPOINT_BOTTOMRIGHT 'common.FRAMEPOINT_BOTTOMRIGHT' ----@field FRAMEPOINT_BOTTOMRIGHT framepointtype _ConvertFramePointType(8) ---- ----TEXT_JUSTIFY_TOP 'common.TEXT_JUSTIFY_TOP' ----@field TEXT_JUSTIFY_TOP textaligntype _ConvertTextAlignType(0) ---- ----TEXT_JUSTIFY_MIDDLE 'common.TEXT_JUSTIFY_MIDDLE' ----@field TEXT_JUSTIFY_MIDDLE textaligntype _ConvertTextAlignType(1) ---- ----TEXT_JUSTIFY_BOTTOM 'common.TEXT_JUSTIFY_BOTTOM' ----@field TEXT_JUSTIFY_BOTTOM textaligntype _ConvertTextAlignType(2) ---- ----TEXT_JUSTIFY_LEFT 'common.TEXT_JUSTIFY_LEFT' ----@field TEXT_JUSTIFY_LEFT textaligntype _ConvertTextAlignType(3) ---- ----TEXT_JUSTIFY_CENTER 'common.TEXT_JUSTIFY_CENTER' ----@field TEXT_JUSTIFY_CENTER textaligntype _ConvertTextAlignType(4) ---- ----TEXT_JUSTIFY_RIGHT 'common.TEXT_JUSTIFY_RIGHT' ----@field TEXT_JUSTIFY_RIGHT textaligntype _ConvertTextAlignType(5) ---- ----FRAMEEVENT_CONTROL_CLICK 'common.FRAMEEVENT_CONTROL_CLICK' ----@field FRAMEEVENT_CONTROL_CLICK frameeventtype _ConvertFrameEventType(1) ---- ----FRAMEEVENT_MOUSE_ENTER 'common.FRAMEEVENT_MOUSE_ENTER' ----@field FRAMEEVENT_MOUSE_ENTER frameeventtype _ConvertFrameEventType(2) ---- ----FRAMEEVENT_MOUSE_LEAVE 'common.FRAMEEVENT_MOUSE_LEAVE' ----@field FRAMEEVENT_MOUSE_LEAVE frameeventtype _ConvertFrameEventType(3) ---- ----FRAMEEVENT_MOUSE_UP 'common.FRAMEEVENT_MOUSE_UP' ----@field FRAMEEVENT_MOUSE_UP frameeventtype _ConvertFrameEventType(4) ---- ----FRAMEEVENT_MOUSE_DOWN 'common.FRAMEEVENT_MOUSE_DOWN' ----@field FRAMEEVENT_MOUSE_DOWN frameeventtype _ConvertFrameEventType(5) ---- ----FRAMEEVENT_MOUSE_WHEEL 'common.FRAMEEVENT_MOUSE_WHEEL' ----@field FRAMEEVENT_MOUSE_WHEEL frameeventtype _ConvertFrameEventType(6) ---- ----FRAMEEVENT_CHECKBOX_CHECKED 'common.FRAMEEVENT_CHECKBOX_CHECKED' ----@field FRAMEEVENT_CHECKBOX_CHECKED frameeventtype _ConvertFrameEventType(7) ---- ----FRAMEEVENT_CHECKBOX_UNCHECKED 'common.FRAMEEVENT_CHECKBOX_UNCHECKED' ----@field FRAMEEVENT_CHECKBOX_UNCHECKED frameeventtype _ConvertFrameEventType(8) ---- ----FRAMEEVENT_EDITBOX_TEXT_CHANGED 'common.FRAMEEVENT_EDITBOX_TEXT_CHANGED' ----@field FRAMEEVENT_EDITBOX_TEXT_CHANGED frameeventtype _ConvertFrameEventType(9) ---- ----FRAMEEVENT_POPUPMENU_ITEM_CHANGED 'common.FRAMEEVENT_POPUPMENU_ITEM_CHANGED' ----@field FRAMEEVENT_POPUPMENU_ITEM_CHANGED frameeventtype _ConvertFrameEventType(10) ---- ----FRAMEEVENT_MOUSE_DOUBLECLICK 'common.FRAMEEVENT_MOUSE_DOUBLECLICK' ----@field FRAMEEVENT_MOUSE_DOUBLECLICK frameeventtype _ConvertFrameEventType(11) ---- ----FRAMEEVENT_SPRITE_ANIM_UPDATE 'common.FRAMEEVENT_SPRITE_ANIM_UPDATE' ----@field FRAMEEVENT_SPRITE_ANIM_UPDATE frameeventtype _ConvertFrameEventType(12) ---- ----FRAMEEVENT_SLIDER_VALUE_CHANGED 'common.FRAMEEVENT_SLIDER_VALUE_CHANGED' ----@field FRAMEEVENT_SLIDER_VALUE_CHANGED frameeventtype _ConvertFrameEventType(13) ---- ----FRAMEEVENT_DIALOG_CANCEL 'common.FRAMEEVENT_DIALOG_CANCEL' ----@field FRAMEEVENT_DIALOG_CANCEL frameeventtype _ConvertFrameEventType(14) ---- ----FRAMEEVENT_DIALOG_ACCEPT 'common.FRAMEEVENT_DIALOG_ACCEPT' ----@field FRAMEEVENT_DIALOG_ACCEPT frameeventtype _ConvertFrameEventType(15) ---- ----FRAMEEVENT_EDITBOX_ENTER 'common.FRAMEEVENT_EDITBOX_ENTER' ----@field FRAMEEVENT_EDITBOX_ENTER frameeventtype _ConvertFrameEventType(16) ---- ----OSKEY_BACKSPACE 'common.OSKEY_BACKSPACE' ----@field OSKEY_BACKSPACE oskeytype _ConvertOsKeyType($08) ---- ----OSKEY_TAB 'common.OSKEY_TAB' ----@field OSKEY_TAB oskeytype _ConvertOsKeyType($09) ---- ----OSKEY_CLEAR 'common.OSKEY_CLEAR' ----@field OSKEY_CLEAR oskeytype _ConvertOsKeyType($0C) ---- ----OSKEY_RETURN 'common.OSKEY_RETURN' ----@field OSKEY_RETURN oskeytype _ConvertOsKeyType($0D) ---- ----OSKEY_SHIFT 'common.OSKEY_SHIFT' ----@field OSKEY_SHIFT oskeytype _ConvertOsKeyType($10) ---- ----OSKEY_CONTROL 'common.OSKEY_CONTROL' ----@field OSKEY_CONTROL oskeytype _ConvertOsKeyType($11) ---- ----OSKEY_ALT 'common.OSKEY_ALT' ----@field OSKEY_ALT oskeytype _ConvertOsKeyType($12) ---- ----OSKEY_PAUSE 'common.OSKEY_PAUSE' ----@field OSKEY_PAUSE oskeytype _ConvertOsKeyType($13) ---- ----OSKEY_CAPSLOCK 'common.OSKEY_CAPSLOCK' ----@field OSKEY_CAPSLOCK oskeytype _ConvertOsKeyType($14) ---- ----OSKEY_KANA 'common.OSKEY_KANA' ----@field OSKEY_KANA oskeytype _ConvertOsKeyType($15) ---- ----OSKEY_HANGUL 'common.OSKEY_HANGUL' ----@field OSKEY_HANGUL oskeytype _ConvertOsKeyType($15) ---- ----OSKEY_JUNJA 'common.OSKEY_JUNJA' ----@field OSKEY_JUNJA oskeytype _ConvertOsKeyType($17) ---- ----OSKEY_FINAL 'common.OSKEY_FINAL' ----@field OSKEY_FINAL oskeytype _ConvertOsKeyType($18) ---- ----OSKEY_HANJA 'common.OSKEY_HANJA' ----@field OSKEY_HANJA oskeytype _ConvertOsKeyType($19) ---- ----OSKEY_KANJI 'common.OSKEY_KANJI' ----@field OSKEY_KANJI oskeytype _ConvertOsKeyType($19) ---- ----OSKEY_ESCAPE 'common.OSKEY_ESCAPE' ----@field OSKEY_ESCAPE oskeytype _ConvertOsKeyType($1B) ---- ----OSKEY_CONVERT 'common.OSKEY_CONVERT' ----@field OSKEY_CONVERT oskeytype _ConvertOsKeyType($1C) ---- ----OSKEY_NONCONVERT 'common.OSKEY_NONCONVERT' ----@field OSKEY_NONCONVERT oskeytype _ConvertOsKeyType($1D) ---- ----OSKEY_ACCEPT 'common.OSKEY_ACCEPT' ----@field OSKEY_ACCEPT oskeytype _ConvertOsKeyType($1E) ---- ----OSKEY_MODECHANGE 'common.OSKEY_MODECHANGE' ----@field OSKEY_MODECHANGE oskeytype _ConvertOsKeyType($1F) ---- ----OSKEY_SPACE 'common.OSKEY_SPACE' ----@field OSKEY_SPACE oskeytype _ConvertOsKeyType($20) ---- ----OSKEY_PAGEUP 'common.OSKEY_PAGEUP' ----@field OSKEY_PAGEUP oskeytype _ConvertOsKeyType($21) ---- ----OSKEY_PAGEDOWN 'common.OSKEY_PAGEDOWN' ----@field OSKEY_PAGEDOWN oskeytype _ConvertOsKeyType($22) ---- ----OSKEY_END 'common.OSKEY_END' ----@field OSKEY_END oskeytype _ConvertOsKeyType($23) ---- ----OSKEY_HOME 'common.OSKEY_HOME' ----@field OSKEY_HOME oskeytype _ConvertOsKeyType($24) ---- ----OSKEY_LEFT 'common.OSKEY_LEFT' ----@field OSKEY_LEFT oskeytype _ConvertOsKeyType($25) ---- ----OSKEY_UP 'common.OSKEY_UP' ----@field OSKEY_UP oskeytype _ConvertOsKeyType($26) ---- ----OSKEY_RIGHT 'common.OSKEY_RIGHT' ----@field OSKEY_RIGHT oskeytype _ConvertOsKeyType($27) ---- ----OSKEY_DOWN 'common.OSKEY_DOWN' ----@field OSKEY_DOWN oskeytype _ConvertOsKeyType($28) ---- ----OSKEY_SELECT 'common.OSKEY_SELECT' ----@field OSKEY_SELECT oskeytype _ConvertOsKeyType($29) ---- ----OSKEY_PRINT 'common.OSKEY_PRINT' ----@field OSKEY_PRINT oskeytype _ConvertOsKeyType($2A) ---- ----OSKEY_EXECUTE 'common.OSKEY_EXECUTE' ----@field OSKEY_EXECUTE oskeytype _ConvertOsKeyType($2B) ---- ----OSKEY_PRINTSCREEN 'common.OSKEY_PRINTSCREEN' ----@field OSKEY_PRINTSCREEN oskeytype _ConvertOsKeyType($2C) ---- ----OSKEY_INSERT 'common.OSKEY_INSERT' ----@field OSKEY_INSERT oskeytype _ConvertOsKeyType($2D) ---- ----OSKEY_DELETE 'common.OSKEY_DELETE' ----@field OSKEY_DELETE oskeytype _ConvertOsKeyType($2E) ---- ----OSKEY_HELP 'common.OSKEY_HELP' ----@field OSKEY_HELP oskeytype _ConvertOsKeyType($2F) ---- ----OSKEY_0 'common.OSKEY_0' ----@field OSKEY_0 oskeytype _ConvertOsKeyType($30) ---- ----OSKEY_1 'common.OSKEY_1' ----@field OSKEY_1 oskeytype _ConvertOsKeyType($31) ---- ----OSKEY_2 'common.OSKEY_2' ----@field OSKEY_2 oskeytype _ConvertOsKeyType($32) ---- ----OSKEY_3 'common.OSKEY_3' ----@field OSKEY_3 oskeytype _ConvertOsKeyType($33) ---- ----OSKEY_4 'common.OSKEY_4' ----@field OSKEY_4 oskeytype _ConvertOsKeyType($34) ---- ----OSKEY_5 'common.OSKEY_5' ----@field OSKEY_5 oskeytype _ConvertOsKeyType($35) ---- ----OSKEY_6 'common.OSKEY_6' ----@field OSKEY_6 oskeytype _ConvertOsKeyType($36) ---- ----OSKEY_7 'common.OSKEY_7' ----@field OSKEY_7 oskeytype _ConvertOsKeyType($37) ---- ----OSKEY_8 'common.OSKEY_8' ----@field OSKEY_8 oskeytype _ConvertOsKeyType($38) ---- ----OSKEY_9 'common.OSKEY_9' ----@field OSKEY_9 oskeytype _ConvertOsKeyType($39) ---- ----OSKEY_A 'common.OSKEY_A' ----@field OSKEY_A oskeytype _ConvertOsKeyType($41) ---- ----OSKEY_B 'common.OSKEY_B' ----@field OSKEY_B oskeytype _ConvertOsKeyType($42) ---- ----OSKEY_C 'common.OSKEY_C' ----@field OSKEY_C oskeytype _ConvertOsKeyType($43) ---- ----OSKEY_D 'common.OSKEY_D' ----@field OSKEY_D oskeytype _ConvertOsKeyType($44) ---- ----OSKEY_E 'common.OSKEY_E' ----@field OSKEY_E oskeytype _ConvertOsKeyType($45) ---- ----OSKEY_F 'common.OSKEY_F' ----@field OSKEY_F oskeytype _ConvertOsKeyType($46) ---- ----OSKEY_G 'common.OSKEY_G' ----@field OSKEY_G oskeytype _ConvertOsKeyType($47) ---- ----OSKEY_H 'common.OSKEY_H' ----@field OSKEY_H oskeytype _ConvertOsKeyType($48) ---- ----OSKEY_I 'common.OSKEY_I' ----@field OSKEY_I oskeytype _ConvertOsKeyType($49) ---- ----OSKEY_J 'common.OSKEY_J' ----@field OSKEY_J oskeytype _ConvertOsKeyType($4A) ---- ----OSKEY_K 'common.OSKEY_K' ----@field OSKEY_K oskeytype _ConvertOsKeyType($4B) ---- ----OSKEY_L 'common.OSKEY_L' ----@field OSKEY_L oskeytype _ConvertOsKeyType($4C) ---- ----OSKEY_M 'common.OSKEY_M' ----@field OSKEY_M oskeytype _ConvertOsKeyType($4D) ---- ----OSKEY_N 'common.OSKEY_N' ----@field OSKEY_N oskeytype _ConvertOsKeyType($4E) ---- ----OSKEY_O 'common.OSKEY_O' ----@field OSKEY_O oskeytype _ConvertOsKeyType($4F) ---- ----OSKEY_P 'common.OSKEY_P' ----@field OSKEY_P oskeytype _ConvertOsKeyType($50) ---- ----OSKEY_Q 'common.OSKEY_Q' ----@field OSKEY_Q oskeytype _ConvertOsKeyType($51) ---- ----OSKEY_R 'common.OSKEY_R' ----@field OSKEY_R oskeytype _ConvertOsKeyType($52) ---- ----OSKEY_S 'common.OSKEY_S' ----@field OSKEY_S oskeytype _ConvertOsKeyType($53) ---- ----OSKEY_T 'common.OSKEY_T' ----@field OSKEY_T oskeytype _ConvertOsKeyType($54) ---- ----OSKEY_U 'common.OSKEY_U' ----@field OSKEY_U oskeytype _ConvertOsKeyType($55) ---- ----OSKEY_V 'common.OSKEY_V' ----@field OSKEY_V oskeytype _ConvertOsKeyType($56) ---- ----OSKEY_W 'common.OSKEY_W' ----@field OSKEY_W oskeytype _ConvertOsKeyType($57) ---- ----OSKEY_X 'common.OSKEY_X' ----@field OSKEY_X oskeytype _ConvertOsKeyType($58) ---- ----OSKEY_Y 'common.OSKEY_Y' ----@field OSKEY_Y oskeytype _ConvertOsKeyType($59) ---- ----OSKEY_Z 'common.OSKEY_Z' ----@field OSKEY_Z oskeytype _ConvertOsKeyType($5A) ---- ----OSKEY_LMETA 'common.OSKEY_LMETA' ----@field OSKEY_LMETA oskeytype _ConvertOsKeyType($5B) ---- ----OSKEY_RMETA 'common.OSKEY_RMETA' ----@field OSKEY_RMETA oskeytype _ConvertOsKeyType($5C) ---- ----OSKEY_APPS 'common.OSKEY_APPS' ----@field OSKEY_APPS oskeytype _ConvertOsKeyType($5D) ---- ----OSKEY_SLEEP 'common.OSKEY_SLEEP' ----@field OSKEY_SLEEP oskeytype _ConvertOsKeyType($5F) ---- ----OSKEY_NUMPAD0 'common.OSKEY_NUMPAD0' ----@field OSKEY_NUMPAD0 oskeytype _ConvertOsKeyType($60) ---- ----OSKEY_NUMPAD1 'common.OSKEY_NUMPAD1' ----@field OSKEY_NUMPAD1 oskeytype _ConvertOsKeyType($61) ---- ----OSKEY_NUMPAD2 'common.OSKEY_NUMPAD2' ----@field OSKEY_NUMPAD2 oskeytype _ConvertOsKeyType($62) ---- ----OSKEY_NUMPAD3 'common.OSKEY_NUMPAD3' ----@field OSKEY_NUMPAD3 oskeytype _ConvertOsKeyType($63) ---- ----OSKEY_NUMPAD4 'common.OSKEY_NUMPAD4' ----@field OSKEY_NUMPAD4 oskeytype _ConvertOsKeyType($64) ---- ----OSKEY_NUMPAD5 'common.OSKEY_NUMPAD5' ----@field OSKEY_NUMPAD5 oskeytype _ConvertOsKeyType($65) ---- ----OSKEY_NUMPAD6 'common.OSKEY_NUMPAD6' ----@field OSKEY_NUMPAD6 oskeytype _ConvertOsKeyType($66) ---- ----OSKEY_NUMPAD7 'common.OSKEY_NUMPAD7' ----@field OSKEY_NUMPAD7 oskeytype _ConvertOsKeyType($67) ---- ----OSKEY_NUMPAD8 'common.OSKEY_NUMPAD8' ----@field OSKEY_NUMPAD8 oskeytype _ConvertOsKeyType($68) ---- ----OSKEY_NUMPAD9 'common.OSKEY_NUMPAD9' ----@field OSKEY_NUMPAD9 oskeytype _ConvertOsKeyType($69) ---- ----OSKEY_MULTIPLY 'common.OSKEY_MULTIPLY' ----@field OSKEY_MULTIPLY oskeytype _ConvertOsKeyType($6A) ---- ----OSKEY_ADD 'common.OSKEY_ADD' ----@field OSKEY_ADD oskeytype _ConvertOsKeyType($6B) ---- ----OSKEY_SEPARATOR 'common.OSKEY_SEPARATOR' ----@field OSKEY_SEPARATOR oskeytype _ConvertOsKeyType($6C) ---- ----OSKEY_SUBTRACT 'common.OSKEY_SUBTRACT' ----@field OSKEY_SUBTRACT oskeytype _ConvertOsKeyType($6D) ---- ----OSKEY_DECIMAL 'common.OSKEY_DECIMAL' ----@field OSKEY_DECIMAL oskeytype _ConvertOsKeyType($6E) ---- ----OSKEY_DIVIDE 'common.OSKEY_DIVIDE' ----@field OSKEY_DIVIDE oskeytype _ConvertOsKeyType($6F) ---- ----OSKEY_F1 'common.OSKEY_F1' ----@field OSKEY_F1 oskeytype _ConvertOsKeyType($70) ---- ----OSKEY_F2 'common.OSKEY_F2' ----@field OSKEY_F2 oskeytype _ConvertOsKeyType($71) ---- ----OSKEY_F3 'common.OSKEY_F3' ----@field OSKEY_F3 oskeytype _ConvertOsKeyType($72) ---- ----OSKEY_F4 'common.OSKEY_F4' ----@field OSKEY_F4 oskeytype _ConvertOsKeyType($73) ---- ----OSKEY_F5 'common.OSKEY_F5' ----@field OSKEY_F5 oskeytype _ConvertOsKeyType($74) ---- ----OSKEY_F6 'common.OSKEY_F6' ----@field OSKEY_F6 oskeytype _ConvertOsKeyType($75) ---- ----OSKEY_F7 'common.OSKEY_F7' ----@field OSKEY_F7 oskeytype _ConvertOsKeyType($76) ---- ----OSKEY_F8 'common.OSKEY_F8' ----@field OSKEY_F8 oskeytype _ConvertOsKeyType($77) ---- ----OSKEY_F9 'common.OSKEY_F9' ----@field OSKEY_F9 oskeytype _ConvertOsKeyType($78) ---- ----OSKEY_F10 'common.OSKEY_F10' ----@field OSKEY_F10 oskeytype _ConvertOsKeyType($79) ---- ----OSKEY_F11 'common.OSKEY_F11' ----@field OSKEY_F11 oskeytype _ConvertOsKeyType($7A) ---- ----OSKEY_F12 'common.OSKEY_F12' ----@field OSKEY_F12 oskeytype _ConvertOsKeyType($7B) ---- ----OSKEY_F13 'common.OSKEY_F13' ----@field OSKEY_F13 oskeytype _ConvertOsKeyType($7C) ---- ----OSKEY_F14 'common.OSKEY_F14' ----@field OSKEY_F14 oskeytype _ConvertOsKeyType($7D) ---- ----OSKEY_F15 'common.OSKEY_F15' ----@field OSKEY_F15 oskeytype _ConvertOsKeyType($7E) ---- ----OSKEY_F16 'common.OSKEY_F16' ----@field OSKEY_F16 oskeytype _ConvertOsKeyType($7F) ---- ----OSKEY_F17 'common.OSKEY_F17' ----@field OSKEY_F17 oskeytype _ConvertOsKeyType($80) ---- ----OSKEY_F18 'common.OSKEY_F18' ----@field OSKEY_F18 oskeytype _ConvertOsKeyType($81) ---- ----OSKEY_F19 'common.OSKEY_F19' ----@field OSKEY_F19 oskeytype _ConvertOsKeyType($82) ---- ----OSKEY_F20 'common.OSKEY_F20' ----@field OSKEY_F20 oskeytype _ConvertOsKeyType($83) ---- ----OSKEY_F21 'common.OSKEY_F21' ----@field OSKEY_F21 oskeytype _ConvertOsKeyType($84) ---- ----OSKEY_F22 'common.OSKEY_F22' ----@field OSKEY_F22 oskeytype _ConvertOsKeyType($85) ---- ----OSKEY_F23 'common.OSKEY_F23' ----@field OSKEY_F23 oskeytype _ConvertOsKeyType($86) ---- ----OSKEY_F24 'common.OSKEY_F24' ----@field OSKEY_F24 oskeytype _ConvertOsKeyType($87) ---- ----OSKEY_NUMLOCK 'common.OSKEY_NUMLOCK' ----@field OSKEY_NUMLOCK oskeytype _ConvertOsKeyType($90) ---- ----OSKEY_SCROLLLOCK 'common.OSKEY_SCROLLLOCK' ----@field OSKEY_SCROLLLOCK oskeytype _ConvertOsKeyType($91) ---- ----OSKEY_OEM_NEC_EQUAL 'common.OSKEY_OEM_NEC_EQUAL' ----@field OSKEY_OEM_NEC_EQUAL oskeytype _ConvertOsKeyType($92) ---- ----OSKEY_OEM_FJ_JISHO 'common.OSKEY_OEM_FJ_JISHO' ----@field OSKEY_OEM_FJ_JISHO oskeytype _ConvertOsKeyType($92) ---- ----OSKEY_OEM_FJ_MASSHOU 'common.OSKEY_OEM_FJ_MASSHOU' ----@field OSKEY_OEM_FJ_MASSHOU oskeytype _ConvertOsKeyType($93) ---- ----OSKEY_OEM_FJ_TOUROKU 'common.OSKEY_OEM_FJ_TOUROKU' ----@field OSKEY_OEM_FJ_TOUROKU oskeytype _ConvertOsKeyType($94) ---- ----OSKEY_OEM_FJ_LOYA 'common.OSKEY_OEM_FJ_LOYA' ----@field OSKEY_OEM_FJ_LOYA oskeytype _ConvertOsKeyType($95) ---- ----OSKEY_OEM_FJ_ROYA 'common.OSKEY_OEM_FJ_ROYA' ----@field OSKEY_OEM_FJ_ROYA oskeytype _ConvertOsKeyType($96) ---- ----OSKEY_LSHIFT 'common.OSKEY_LSHIFT' ----@field OSKEY_LSHIFT oskeytype _ConvertOsKeyType($A0) ---- ----OSKEY_RSHIFT 'common.OSKEY_RSHIFT' ----@field OSKEY_RSHIFT oskeytype _ConvertOsKeyType($A1) ---- ----OSKEY_LCONTROL 'common.OSKEY_LCONTROL' ----@field OSKEY_LCONTROL oskeytype _ConvertOsKeyType($A2) ---- ----OSKEY_RCONTROL 'common.OSKEY_RCONTROL' ----@field OSKEY_RCONTROL oskeytype _ConvertOsKeyType($A3) ---- ----OSKEY_LALT 'common.OSKEY_LALT' ----@field OSKEY_LALT oskeytype _ConvertOsKeyType($A4) ---- ----OSKEY_RALT 'common.OSKEY_RALT' ----@field OSKEY_RALT oskeytype _ConvertOsKeyType($A5) ---- ----OSKEY_BROWSER_BACK 'common.OSKEY_BROWSER_BACK' ----@field OSKEY_BROWSER_BACK oskeytype _ConvertOsKeyType($A6) ---- ----OSKEY_BROWSER_FORWARD 'common.OSKEY_BROWSER_FORWARD' ----@field OSKEY_BROWSER_FORWARD oskeytype _ConvertOsKeyType($A7) ---- ----OSKEY_BROWSER_REFRESH 'common.OSKEY_BROWSER_REFRESH' ----@field OSKEY_BROWSER_REFRESH oskeytype _ConvertOsKeyType($A8) ---- ----OSKEY_BROWSER_STOP 'common.OSKEY_BROWSER_STOP' ----@field OSKEY_BROWSER_STOP oskeytype _ConvertOsKeyType($A9) ---- ----OSKEY_BROWSER_SEARCH 'common.OSKEY_BROWSER_SEARCH' ----@field OSKEY_BROWSER_SEARCH oskeytype _ConvertOsKeyType($AA) ---- ----OSKEY_BROWSER_FAVORITES 'common.OSKEY_BROWSER_FAVORITES' ----@field OSKEY_BROWSER_FAVORITES oskeytype _ConvertOsKeyType($AB) ---- ----OSKEY_BROWSER_HOME 'common.OSKEY_BROWSER_HOME' ----@field OSKEY_BROWSER_HOME oskeytype _ConvertOsKeyType($AC) ---- ----OSKEY_VOLUME_MUTE 'common.OSKEY_VOLUME_MUTE' ----@field OSKEY_VOLUME_MUTE oskeytype _ConvertOsKeyType($AD) ---- ----OSKEY_VOLUME_DOWN 'common.OSKEY_VOLUME_DOWN' ----@field OSKEY_VOLUME_DOWN oskeytype _ConvertOsKeyType($AE) ---- ----OSKEY_VOLUME_UP 'common.OSKEY_VOLUME_UP' ----@field OSKEY_VOLUME_UP oskeytype _ConvertOsKeyType($AF) ---- ----OSKEY_MEDIA_NEXT_TRACK 'common.OSKEY_MEDIA_NEXT_TRACK' ----@field OSKEY_MEDIA_NEXT_TRACK oskeytype _ConvertOsKeyType($B0) ---- ----OSKEY_MEDIA_PREV_TRACK 'common.OSKEY_MEDIA_PREV_TRACK' ----@field OSKEY_MEDIA_PREV_TRACK oskeytype _ConvertOsKeyType($B1) ---- ----OSKEY_MEDIA_STOP 'common.OSKEY_MEDIA_STOP' ----@field OSKEY_MEDIA_STOP oskeytype _ConvertOsKeyType($B2) ---- ----OSKEY_MEDIA_PLAY_PAUSE 'common.OSKEY_MEDIA_PLAY_PAUSE' ----@field OSKEY_MEDIA_PLAY_PAUSE oskeytype _ConvertOsKeyType($B3) ---- ----OSKEY_LAUNCH_MAIL 'common.OSKEY_LAUNCH_MAIL' ----@field OSKEY_LAUNCH_MAIL oskeytype _ConvertOsKeyType($B4) ---- ----OSKEY_LAUNCH_MEDIA_SELECT 'common.OSKEY_LAUNCH_MEDIA_SELECT' ----@field OSKEY_LAUNCH_MEDIA_SELECT oskeytype _ConvertOsKeyType($B5) ---- ----OSKEY_LAUNCH_APP1 'common.OSKEY_LAUNCH_APP1' ----@field OSKEY_LAUNCH_APP1 oskeytype _ConvertOsKeyType($B6) ---- ----OSKEY_LAUNCH_APP2 'common.OSKEY_LAUNCH_APP2' ----@field OSKEY_LAUNCH_APP2 oskeytype _ConvertOsKeyType($B7) ---- ----OSKEY_OEM_1 'common.OSKEY_OEM_1' ----@field OSKEY_OEM_1 oskeytype _ConvertOsKeyType($BA) ---- ----OSKEY_OEM_PLUS 'common.OSKEY_OEM_PLUS' ----@field OSKEY_OEM_PLUS oskeytype _ConvertOsKeyType($BB) ---- ----OSKEY_OEM_COMMA 'common.OSKEY_OEM_COMMA' ----@field OSKEY_OEM_COMMA oskeytype _ConvertOsKeyType($BC) ---- ----OSKEY_OEM_MINUS 'common.OSKEY_OEM_MINUS' ----@field OSKEY_OEM_MINUS oskeytype _ConvertOsKeyType($BD) ---- ----OSKEY_OEM_PERIOD 'common.OSKEY_OEM_PERIOD' ----@field OSKEY_OEM_PERIOD oskeytype _ConvertOsKeyType($BE) ---- ----OSKEY_OEM_2 'common.OSKEY_OEM_2' ----@field OSKEY_OEM_2 oskeytype _ConvertOsKeyType($BF) ---- ----OSKEY_OEM_3 'common.OSKEY_OEM_3' ----@field OSKEY_OEM_3 oskeytype _ConvertOsKeyType($C0) ---- ----OSKEY_OEM_4 'common.OSKEY_OEM_4' ----@field OSKEY_OEM_4 oskeytype _ConvertOsKeyType($DB) ---- ----OSKEY_OEM_5 'common.OSKEY_OEM_5' ----@field OSKEY_OEM_5 oskeytype _ConvertOsKeyType($DC) ---- ----OSKEY_OEM_6 'common.OSKEY_OEM_6' ----@field OSKEY_OEM_6 oskeytype _ConvertOsKeyType($DD) ---- ----OSKEY_OEM_7 'common.OSKEY_OEM_7' ----@field OSKEY_OEM_7 oskeytype _ConvertOsKeyType($DE) ---- ----OSKEY_OEM_8 'common.OSKEY_OEM_8' ----@field OSKEY_OEM_8 oskeytype _ConvertOsKeyType($DF) ---- ----OSKEY_OEM_AX 'common.OSKEY_OEM_AX' ----@field OSKEY_OEM_AX oskeytype _ConvertOsKeyType($E1) ---- ----OSKEY_OEM_102 'common.OSKEY_OEM_102' ----@field OSKEY_OEM_102 oskeytype _ConvertOsKeyType($E2) ---- ----OSKEY_ICO_HELP 'common.OSKEY_ICO_HELP' ----@field OSKEY_ICO_HELP oskeytype _ConvertOsKeyType($E3) ---- ----OSKEY_ICO_00 'common.OSKEY_ICO_00' ----@field OSKEY_ICO_00 oskeytype _ConvertOsKeyType($E4) ---- ----OSKEY_PROCESSKEY 'common.OSKEY_PROCESSKEY' ----@field OSKEY_PROCESSKEY oskeytype _ConvertOsKeyType($E5) ---- ----OSKEY_ICO_CLEAR 'common.OSKEY_ICO_CLEAR' ----@field OSKEY_ICO_CLEAR oskeytype _ConvertOsKeyType($E6) ---- ----OSKEY_PACKET 'common.OSKEY_PACKET' ----@field OSKEY_PACKET oskeytype _ConvertOsKeyType($E7) ---- ----OSKEY_OEM_RESET 'common.OSKEY_OEM_RESET' ----@field OSKEY_OEM_RESET oskeytype _ConvertOsKeyType($E9) ---- ----OSKEY_OEM_JUMP 'common.OSKEY_OEM_JUMP' ----@field OSKEY_OEM_JUMP oskeytype _ConvertOsKeyType($EA) ---- ----OSKEY_OEM_PA1 'common.OSKEY_OEM_PA1' ----@field OSKEY_OEM_PA1 oskeytype _ConvertOsKeyType($EB) ---- ----OSKEY_OEM_PA2 'common.OSKEY_OEM_PA2' ----@field OSKEY_OEM_PA2 oskeytype _ConvertOsKeyType($EC) ---- ----OSKEY_OEM_PA3 'common.OSKEY_OEM_PA3' ----@field OSKEY_OEM_PA3 oskeytype _ConvertOsKeyType($ED) ---- ----OSKEY_OEM_WSCTRL 'common.OSKEY_OEM_WSCTRL' ----@field OSKEY_OEM_WSCTRL oskeytype _ConvertOsKeyType($EE) ---- ----OSKEY_OEM_CUSEL 'common.OSKEY_OEM_CUSEL' ----@field OSKEY_OEM_CUSEL oskeytype _ConvertOsKeyType($EF) ---- ----OSKEY_OEM_ATTN 'common.OSKEY_OEM_ATTN' ----@field OSKEY_OEM_ATTN oskeytype _ConvertOsKeyType($F0) ---- ----OSKEY_OEM_FINISH 'common.OSKEY_OEM_FINISH' ----@field OSKEY_OEM_FINISH oskeytype _ConvertOsKeyType($F1) ---- ----OSKEY_OEM_COPY 'common.OSKEY_OEM_COPY' ----@field OSKEY_OEM_COPY oskeytype _ConvertOsKeyType($F2) ---- ----OSKEY_OEM_AUTO 'common.OSKEY_OEM_AUTO' ----@field OSKEY_OEM_AUTO oskeytype _ConvertOsKeyType($F3) ---- ----OSKEY_OEM_ENLW 'common.OSKEY_OEM_ENLW' ----@field OSKEY_OEM_ENLW oskeytype _ConvertOsKeyType($F4) ---- ----OSKEY_OEM_BACKTAB 'common.OSKEY_OEM_BACKTAB' ----@field OSKEY_OEM_BACKTAB oskeytype _ConvertOsKeyType($F5) ---- ----OSKEY_ATTN 'common.OSKEY_ATTN' ----@field OSKEY_ATTN oskeytype _ConvertOsKeyType($F6) ---- ----OSKEY_CRSEL 'common.OSKEY_CRSEL' ----@field OSKEY_CRSEL oskeytype _ConvertOsKeyType($F7) ---- ----OSKEY_EXSEL 'common.OSKEY_EXSEL' ----@field OSKEY_EXSEL oskeytype _ConvertOsKeyType($F8) ---- ----OSKEY_EREOF 'common.OSKEY_EREOF' ----@field OSKEY_EREOF oskeytype _ConvertOsKeyType($F9) ---- ----OSKEY_PLAY 'common.OSKEY_PLAY' ----@field OSKEY_PLAY oskeytype _ConvertOsKeyType($FA) ---- ----OSKEY_ZOOM 'common.OSKEY_ZOOM' ----@field OSKEY_ZOOM oskeytype _ConvertOsKeyType($FB) ---- ----OSKEY_NONAME 'common.OSKEY_NONAME' ----@field OSKEY_NONAME oskeytype _ConvertOsKeyType($FC) ---- ----OSKEY_PA1 'common.OSKEY_PA1' ----@field OSKEY_PA1 oskeytype _ConvertOsKeyType($FD) ---- ----OSKEY_OEM_CLEAR 'common.OSKEY_OEM_CLEAR' ----@field OSKEY_OEM_CLEAR oskeytype _ConvertOsKeyType($FE) ---- ----Ability 'common.ABILITY_IF_BUTTON_POSITION_NORMAL_X' ----@field ABILITY_IF_BUTTON_POSITION_NORMAL_X abilityintegerfield _ConvertAbilityIntegerField('abpx') ---- ----ABILITY_IF_BUTTON_POSITION_NORMAL_Y 'common.ABILITY_IF_BUTTON_POSITION_NORMAL_Y' ----@field ABILITY_IF_BUTTON_POSITION_NORMAL_Y abilityintegerfield _ConvertAbilityIntegerField('abpy') ---- ----ABILITY_IF_BUTTON_POSITION_ACTIVATED_X 'common.ABILITY_IF_BUTTON_POSITION_ACTIVATED_X' ----@field ABILITY_IF_BUTTON_POSITION_ACTIVATED_X abilityintegerfield _ConvertAbilityIntegerField('aubx') ---- ----ABILITY_IF_BUTTON_POSITION_ACTIVATED_Y 'common.ABILITY_IF_BUTTON_POSITION_ACTIVATED_Y' ----@field ABILITY_IF_BUTTON_POSITION_ACTIVATED_Y abilityintegerfield _ConvertAbilityIntegerField('auby') ---- ----ABILITY_IF_BUTTON_POSITION_RESEARCH_X 'common.ABILITY_IF_BUTTON_POSITION_RESEARCH_X' ----@field ABILITY_IF_BUTTON_POSITION_RESEARCH_X abilityintegerfield _ConvertAbilityIntegerField('arpx') ---- ----ABILITY_IF_BUTTON_POSITION_RESEARCH_Y 'common.ABILITY_IF_BUTTON_POSITION_RESEARCH_Y' ----@field ABILITY_IF_BUTTON_POSITION_RESEARCH_Y abilityintegerfield _ConvertAbilityIntegerField('arpy') ---- ----ABILITY_IF_MISSILE_SPEED 'common.ABILITY_IF_MISSILE_SPEED' ----@field ABILITY_IF_MISSILE_SPEED abilityintegerfield _ConvertAbilityIntegerField('amsp') ---- ----ABILITY_IF_TARGET_ATTACHMENTS 'common.ABILITY_IF_TARGET_ATTACHMENTS' ----@field ABILITY_IF_TARGET_ATTACHMENTS abilityintegerfield _ConvertAbilityIntegerField('atac') ---- ----ABILITY_IF_CASTER_ATTACHMENTS 'common.ABILITY_IF_CASTER_ATTACHMENTS' ----@field ABILITY_IF_CASTER_ATTACHMENTS abilityintegerfield _ConvertAbilityIntegerField('acac') ---- ----ABILITY_IF_PRIORITY 'common.ABILITY_IF_PRIORITY' ----@field ABILITY_IF_PRIORITY abilityintegerfield _ConvertAbilityIntegerField('apri') ---- ----ABILITY_IF_LEVELS 'common.ABILITY_IF_LEVELS' ----@field ABILITY_IF_LEVELS abilityintegerfield _ConvertAbilityIntegerField('alev') ---- ----ABILITY_IF_REQUIRED_LEVEL 'common.ABILITY_IF_REQUIRED_LEVEL' ----@field ABILITY_IF_REQUIRED_LEVEL abilityintegerfield _ConvertAbilityIntegerField('arlv') ---- ----ABILITY_IF_LEVEL_SKIP_REQUIREMENT 'common.ABILITY_IF_LEVEL_SKIP_REQUIREMENT' ----@field ABILITY_IF_LEVEL_SKIP_REQUIREMENT abilityintegerfield _ConvertAbilityIntegerField('alsk') ---- ----ABILITY_BF_HERO_ABILITY 'common.ABILITY_BF_HERO_ABILITY' ----@field ABILITY_BF_HERO_ABILITY abilitybooleanfield _ConvertAbilityBooleanField('aher') ---- ----ABILITY_BF_ITEM_ABILITY 'common.ABILITY_BF_ITEM_ABILITY' ----@field ABILITY_BF_ITEM_ABILITY abilitybooleanfield _ConvertAbilityBooleanField('aite') ---- ----ABILITY_BF_CHECK_DEPENDENCIES 'common.ABILITY_BF_CHECK_DEPENDENCIES' ----@field ABILITY_BF_CHECK_DEPENDENCIES abilitybooleanfield _ConvertAbilityBooleanField('achd') ---- ----ABILITY_RF_ARF_MISSILE_ARC 'common.ABILITY_RF_ARF_MISSILE_ARC' ----@field ABILITY_RF_ARF_MISSILE_ARC abilityrealfield _ConvertAbilityRealField('amac') ---- ----ABILITY_SF_NAME 'common.ABILITY_SF_NAME' ----@field ABILITY_SF_NAME abilitystringfield _ConvertAbilityStringField('anam') ---- ----ABILITY_SF_ICON_ACTIVATED 'common.ABILITY_SF_ICON_ACTIVATED' ----@field ABILITY_SF_ICON_ACTIVATED abilitystringfield _ConvertAbilityStringField('auar') ---- ----ABILITY_SF_ICON_RESEARCH 'common.ABILITY_SF_ICON_RESEARCH' ----@field ABILITY_SF_ICON_RESEARCH abilitystringfield _ConvertAbilityStringField('arar') ---- ----ABILITY_SF_EFFECT_SOUND 'common.ABILITY_SF_EFFECT_SOUND' ----@field ABILITY_SF_EFFECT_SOUND abilitystringfield _ConvertAbilityStringField('aefs') ---- ----ABILITY_SF_EFFECT_SOUND_LOOPING 'common.ABILITY_SF_EFFECT_SOUND_LOOPING' ----@field ABILITY_SF_EFFECT_SOUND_LOOPING abilitystringfield _ConvertAbilityStringField('aefl') ---- ----ABILITY_ILF_MANA_COST 'common.ABILITY_ILF_MANA_COST' ----@field ABILITY_ILF_MANA_COST abilityintegerlevelfield _ConvertAbilityIntegerLevelField('amcs') ---- ----ABILITY_ILF_NUMBER_OF_WAVES 'common.ABILITY_ILF_NUMBER_OF_WAVES' ----@field ABILITY_ILF_NUMBER_OF_WAVES abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Hbz1') ---- ----ABILITY_ILF_NUMBER_OF_SHARDS 'common.ABILITY_ILF_NUMBER_OF_SHARDS' ----@field ABILITY_ILF_NUMBER_OF_SHARDS abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Hbz3') ---- ----ABILITY_ILF_NUMBER_OF_UNITS_TELEPORTED 'common.ABILITY_ILF_NUMBER_OF_UNITS_TELEPORTED' ----@field ABILITY_ILF_NUMBER_OF_UNITS_TELEPORTED abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Hmt1') ---- ----ABILITY_ILF_SUMMONED_UNIT_COUNT_HWE2 'common.ABILITY_ILF_SUMMONED_UNIT_COUNT_HWE2' ----@field ABILITY_ILF_SUMMONED_UNIT_COUNT_HWE2 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Hwe2') ---- ----ABILITY_ILF_NUMBER_OF_IMAGES 'common.ABILITY_ILF_NUMBER_OF_IMAGES' ----@field ABILITY_ILF_NUMBER_OF_IMAGES abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Omi1') ---- ----ABILITY_ILF_NUMBER_OF_CORPSES_RAISED_UAN1 'common.ABILITY_ILF_NUMBER_OF_CORPSES_RAISED_UAN1' ----@field ABILITY_ILF_NUMBER_OF_CORPSES_RAISED_UAN1 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Uan1') ---- ----ABILITY_ILF_MORPHING_FLAGS 'common.ABILITY_ILF_MORPHING_FLAGS' ----@field ABILITY_ILF_MORPHING_FLAGS abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Eme2') ---- ----ABILITY_ILF_STRENGTH_BONUS_NRG5 'common.ABILITY_ILF_STRENGTH_BONUS_NRG5' ----@field ABILITY_ILF_STRENGTH_BONUS_NRG5 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Nrg5') ---- ----ABILITY_ILF_DEFENSE_BONUS_NRG6 'common.ABILITY_ILF_DEFENSE_BONUS_NRG6' ----@field ABILITY_ILF_DEFENSE_BONUS_NRG6 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Nrg6') ---- ----ABILITY_ILF_NUMBER_OF_TARGETS_HIT 'common.ABILITY_ILF_NUMBER_OF_TARGETS_HIT' ----@field ABILITY_ILF_NUMBER_OF_TARGETS_HIT abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Ocl2') ---- ----ABILITY_ILF_DETECTION_TYPE_OFS1 'common.ABILITY_ILF_DETECTION_TYPE_OFS1' ----@field ABILITY_ILF_DETECTION_TYPE_OFS1 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Ofs1') ---- ----ABILITY_ILF_NUMBER_OF_SUMMONED_UNITS_OSF2 'common.ABILITY_ILF_NUMBER_OF_SUMMONED_UNITS_OSF2' ----@field ABILITY_ILF_NUMBER_OF_SUMMONED_UNITS_OSF2 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Osf2') ---- ----ABILITY_ILF_NUMBER_OF_SUMMONED_UNITS_EFN1 'common.ABILITY_ILF_NUMBER_OF_SUMMONED_UNITS_EFN1' ----@field ABILITY_ILF_NUMBER_OF_SUMMONED_UNITS_EFN1 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Efn1') ---- ----ABILITY_ILF_NUMBER_OF_CORPSES_RAISED_HRE1 'common.ABILITY_ILF_NUMBER_OF_CORPSES_RAISED_HRE1' ----@field ABILITY_ILF_NUMBER_OF_CORPSES_RAISED_HRE1 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Hre1') ---- ----ABILITY_ILF_STACK_FLAGS 'common.ABILITY_ILF_STACK_FLAGS' ----@field ABILITY_ILF_STACK_FLAGS abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Hca4') ---- ----ABILITY_ILF_MINIMUM_NUMBER_OF_UNITS 'common.ABILITY_ILF_MINIMUM_NUMBER_OF_UNITS' ----@field ABILITY_ILF_MINIMUM_NUMBER_OF_UNITS abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Ndp2') ---- ----ABILITY_ILF_MAXIMUM_NUMBER_OF_UNITS_NDP3 'common.ABILITY_ILF_MAXIMUM_NUMBER_OF_UNITS_NDP3' ----@field ABILITY_ILF_MAXIMUM_NUMBER_OF_UNITS_NDP3 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Ndp3') ---- ----ABILITY_ILF_NUMBER_OF_UNITS_CREATED_NRC2 'common.ABILITY_ILF_NUMBER_OF_UNITS_CREATED_NRC2' ----@field ABILITY_ILF_NUMBER_OF_UNITS_CREATED_NRC2 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Nrc2') ---- ----ABILITY_ILF_SHIELD_LIFE 'common.ABILITY_ILF_SHIELD_LIFE' ----@field ABILITY_ILF_SHIELD_LIFE abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Ams3') ---- ----ABILITY_ILF_MANA_LOSS_AMS4 'common.ABILITY_ILF_MANA_LOSS_AMS4' ----@field ABILITY_ILF_MANA_LOSS_AMS4 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Ams4') ---- ----ABILITY_ILF_GOLD_PER_INTERVAL_BGM1 'common.ABILITY_ILF_GOLD_PER_INTERVAL_BGM1' ----@field ABILITY_ILF_GOLD_PER_INTERVAL_BGM1 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Bgm1') ---- ----ABILITY_ILF_MAX_NUMBER_OF_MINERS 'common.ABILITY_ILF_MAX_NUMBER_OF_MINERS' ----@field ABILITY_ILF_MAX_NUMBER_OF_MINERS abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Bgm3') ---- ----ABILITY_ILF_CARGO_CAPACITY 'common.ABILITY_ILF_CARGO_CAPACITY' ----@field ABILITY_ILF_CARGO_CAPACITY abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Car1') ---- ----ABILITY_ILF_MAXIMUM_CREEP_LEVEL_DEV3 'common.ABILITY_ILF_MAXIMUM_CREEP_LEVEL_DEV3' ----@field ABILITY_ILF_MAXIMUM_CREEP_LEVEL_DEV3 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Dev3') ---- ----ABILITY_ILF_MAX_CREEP_LEVEL_DEV1 'common.ABILITY_ILF_MAX_CREEP_LEVEL_DEV1' ----@field ABILITY_ILF_MAX_CREEP_LEVEL_DEV1 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Dev1') ---- ----ABILITY_ILF_GOLD_PER_INTERVAL_EGM1 'common.ABILITY_ILF_GOLD_PER_INTERVAL_EGM1' ----@field ABILITY_ILF_GOLD_PER_INTERVAL_EGM1 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Egm1') ---- ----ABILITY_ILF_DEFENSE_REDUCTION 'common.ABILITY_ILF_DEFENSE_REDUCTION' ----@field ABILITY_ILF_DEFENSE_REDUCTION abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Fae1') ---- ----ABILITY_ILF_DETECTION_TYPE_FLA1 'common.ABILITY_ILF_DETECTION_TYPE_FLA1' ----@field ABILITY_ILF_DETECTION_TYPE_FLA1 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Fla1') ---- ----ABILITY_ILF_FLARE_COUNT 'common.ABILITY_ILF_FLARE_COUNT' ----@field ABILITY_ILF_FLARE_COUNT abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Fla3') ---- ----ABILITY_ILF_MAX_GOLD 'common.ABILITY_ILF_MAX_GOLD' ----@field ABILITY_ILF_MAX_GOLD abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Gld1') ---- ----ABILITY_ILF_MINING_CAPACITY 'common.ABILITY_ILF_MINING_CAPACITY' ----@field ABILITY_ILF_MINING_CAPACITY abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Gld3') ---- ----ABILITY_ILF_MAXIMUM_NUMBER_OF_CORPSES_GYD1 'common.ABILITY_ILF_MAXIMUM_NUMBER_OF_CORPSES_GYD1' ----@field ABILITY_ILF_MAXIMUM_NUMBER_OF_CORPSES_GYD1 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Gyd1') ---- ----ABILITY_ILF_DAMAGE_TO_TREE 'common.ABILITY_ILF_DAMAGE_TO_TREE' ----@field ABILITY_ILF_DAMAGE_TO_TREE abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Har1') ---- ----ABILITY_ILF_LUMBER_CAPACITY 'common.ABILITY_ILF_LUMBER_CAPACITY' ----@field ABILITY_ILF_LUMBER_CAPACITY abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Har2') ---- ----ABILITY_ILF_GOLD_CAPACITY 'common.ABILITY_ILF_GOLD_CAPACITY' ----@field ABILITY_ILF_GOLD_CAPACITY abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Har3') ---- ----ABILITY_ILF_DEFENSE_INCREASE_INF2 'common.ABILITY_ILF_DEFENSE_INCREASE_INF2' ----@field ABILITY_ILF_DEFENSE_INCREASE_INF2 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Inf2') ---- ----ABILITY_ILF_INTERACTION_TYPE 'common.ABILITY_ILF_INTERACTION_TYPE' ----@field ABILITY_ILF_INTERACTION_TYPE abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Neu2') ---- ----ABILITY_ILF_GOLD_COST_NDT1 'common.ABILITY_ILF_GOLD_COST_NDT1' ----@field ABILITY_ILF_GOLD_COST_NDT1 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Ndt1') ---- ----ABILITY_ILF_LUMBER_COST_NDT2 'common.ABILITY_ILF_LUMBER_COST_NDT2' ----@field ABILITY_ILF_LUMBER_COST_NDT2 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Ndt2') ---- ----ABILITY_ILF_DETECTION_TYPE_NDT3 'common.ABILITY_ILF_DETECTION_TYPE_NDT3' ----@field ABILITY_ILF_DETECTION_TYPE_NDT3 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Ndt3') ---- ----ABILITY_ILF_STACKING_TYPE_POI4 'common.ABILITY_ILF_STACKING_TYPE_POI4' ----@field ABILITY_ILF_STACKING_TYPE_POI4 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Poi4') ---- ----ABILITY_ILF_STACKING_TYPE_POA5 'common.ABILITY_ILF_STACKING_TYPE_POA5' ----@field ABILITY_ILF_STACKING_TYPE_POA5 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Poa5') ---- ----ABILITY_ILF_MAXIMUM_CREEP_LEVEL_PLY1 'common.ABILITY_ILF_MAXIMUM_CREEP_LEVEL_PLY1' ----@field ABILITY_ILF_MAXIMUM_CREEP_LEVEL_PLY1 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Ply1') ---- ----ABILITY_ILF_MAXIMUM_CREEP_LEVEL_POS1 'common.ABILITY_ILF_MAXIMUM_CREEP_LEVEL_POS1' ----@field ABILITY_ILF_MAXIMUM_CREEP_LEVEL_POS1 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Pos1') ---- ----ABILITY_ILF_MOVEMENT_UPDATE_FREQUENCY_PRG1 'common.ABILITY_ILF_MOVEMENT_UPDATE_FREQUENCY_PRG1' ----@field ABILITY_ILF_MOVEMENT_UPDATE_FREQUENCY_PRG1 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Prg1') ---- ----ABILITY_ILF_ATTACK_UPDATE_FREQUENCY_PRG2 'common.ABILITY_ILF_ATTACK_UPDATE_FREQUENCY_PRG2' ----@field ABILITY_ILF_ATTACK_UPDATE_FREQUENCY_PRG2 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Prg2') ---- ----ABILITY_ILF_MANA_LOSS_PRG6 'common.ABILITY_ILF_MANA_LOSS_PRG6' ----@field ABILITY_ILF_MANA_LOSS_PRG6 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Prg6') ---- ----ABILITY_ILF_UNITS_SUMMONED_TYPE_ONE 'common.ABILITY_ILF_UNITS_SUMMONED_TYPE_ONE' ----@field ABILITY_ILF_UNITS_SUMMONED_TYPE_ONE abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Rai1') ---- ----ABILITY_ILF_UNITS_SUMMONED_TYPE_TWO 'common.ABILITY_ILF_UNITS_SUMMONED_TYPE_TWO' ----@field ABILITY_ILF_UNITS_SUMMONED_TYPE_TWO abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Rai2') ---- ----ABILITY_ILF_MAX_UNITS_SUMMONED 'common.ABILITY_ILF_MAX_UNITS_SUMMONED' ----@field ABILITY_ILF_MAX_UNITS_SUMMONED abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Ucb5') ---- ----ABILITY_ILF_ALLOW_WHEN_FULL_REJ3 'common.ABILITY_ILF_ALLOW_WHEN_FULL_REJ3' ----@field ABILITY_ILF_ALLOW_WHEN_FULL_REJ3 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Rej3') ---- ----ABILITY_ILF_MAXIMUM_UNITS_CHARGED_TO_CASTER 'common.ABILITY_ILF_MAXIMUM_UNITS_CHARGED_TO_CASTER' ----@field ABILITY_ILF_MAXIMUM_UNITS_CHARGED_TO_CASTER abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Rpb5') ---- ----ABILITY_ILF_MAXIMUM_UNITS_AFFECTED 'common.ABILITY_ILF_MAXIMUM_UNITS_AFFECTED' ----@field ABILITY_ILF_MAXIMUM_UNITS_AFFECTED abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Rpb6') ---- ----ABILITY_ILF_DEFENSE_INCREASE_ROA2 'common.ABILITY_ILF_DEFENSE_INCREASE_ROA2' ----@field ABILITY_ILF_DEFENSE_INCREASE_ROA2 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Roa2') ---- ----ABILITY_ILF_MAX_UNITS_ROA7 'common.ABILITY_ILF_MAX_UNITS_ROA7' ----@field ABILITY_ILF_MAX_UNITS_ROA7 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Roa7') ---- ----ABILITY_ILF_ROOTED_WEAPONS 'common.ABILITY_ILF_ROOTED_WEAPONS' ----@field ABILITY_ILF_ROOTED_WEAPONS abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Roo1') ---- ----ABILITY_ILF_UPROOTED_WEAPONS 'common.ABILITY_ILF_UPROOTED_WEAPONS' ----@field ABILITY_ILF_UPROOTED_WEAPONS abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Roo2') ---- ----ABILITY_ILF_UPROOTED_DEFENSE_TYPE 'common.ABILITY_ILF_UPROOTED_DEFENSE_TYPE' ----@field ABILITY_ILF_UPROOTED_DEFENSE_TYPE abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Roo4') ---- ----ABILITY_ILF_ACCUMULATION_STEP 'common.ABILITY_ILF_ACCUMULATION_STEP' ----@field ABILITY_ILF_ACCUMULATION_STEP abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Sal2') ---- ----ABILITY_ILF_NUMBER_OF_OWLS 'common.ABILITY_ILF_NUMBER_OF_OWLS' ----@field ABILITY_ILF_NUMBER_OF_OWLS abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Esn4') ---- ----ABILITY_ILF_STACKING_TYPE_SPO4 'common.ABILITY_ILF_STACKING_TYPE_SPO4' ----@field ABILITY_ILF_STACKING_TYPE_SPO4 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Spo4') ---- ----ABILITY_ILF_NUMBER_OF_UNITS 'common.ABILITY_ILF_NUMBER_OF_UNITS' ----@field ABILITY_ILF_NUMBER_OF_UNITS abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Sod1') ---- ----ABILITY_ILF_SPIDER_CAPACITY 'common.ABILITY_ILF_SPIDER_CAPACITY' ----@field ABILITY_ILF_SPIDER_CAPACITY abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Spa1') ---- ----ABILITY_ILF_INTERVALS_BEFORE_CHANGING_TREES 'common.ABILITY_ILF_INTERVALS_BEFORE_CHANGING_TREES' ----@field ABILITY_ILF_INTERVALS_BEFORE_CHANGING_TREES abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Wha2') ---- ----ABILITY_ILF_AGILITY_BONUS 'common.ABILITY_ILF_AGILITY_BONUS' ----@field ABILITY_ILF_AGILITY_BONUS abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Iagi') ---- ----ABILITY_ILF_INTELLIGENCE_BONUS 'common.ABILITY_ILF_INTELLIGENCE_BONUS' ----@field ABILITY_ILF_INTELLIGENCE_BONUS abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Iint') ---- ----ABILITY_ILF_STRENGTH_BONUS_ISTR 'common.ABILITY_ILF_STRENGTH_BONUS_ISTR' ----@field ABILITY_ILF_STRENGTH_BONUS_ISTR abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Istr') ---- ----ABILITY_ILF_ATTACK_BONUS 'common.ABILITY_ILF_ATTACK_BONUS' ----@field ABILITY_ILF_ATTACK_BONUS abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Iatt') ---- ----ABILITY_ILF_DEFENSE_BONUS_IDEF 'common.ABILITY_ILF_DEFENSE_BONUS_IDEF' ----@field ABILITY_ILF_DEFENSE_BONUS_IDEF abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Idef') ---- ----ABILITY_ILF_SUMMON_1_AMOUNT 'common.ABILITY_ILF_SUMMON_1_AMOUNT' ----@field ABILITY_ILF_SUMMON_1_AMOUNT abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Isn1') ---- ----ABILITY_ILF_SUMMON_2_AMOUNT 'common.ABILITY_ILF_SUMMON_2_AMOUNT' ----@field ABILITY_ILF_SUMMON_2_AMOUNT abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Isn2') ---- ----ABILITY_ILF_EXPERIENCE_GAINED 'common.ABILITY_ILF_EXPERIENCE_GAINED' ----@field ABILITY_ILF_EXPERIENCE_GAINED abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Ixpg') ---- ----ABILITY_ILF_HIT_POINTS_GAINED_IHPG 'common.ABILITY_ILF_HIT_POINTS_GAINED_IHPG' ----@field ABILITY_ILF_HIT_POINTS_GAINED_IHPG abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Ihpg') ---- ----ABILITY_ILF_MANA_POINTS_GAINED_IMPG 'common.ABILITY_ILF_MANA_POINTS_GAINED_IMPG' ----@field ABILITY_ILF_MANA_POINTS_GAINED_IMPG abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Impg') ---- ----ABILITY_ILF_HIT_POINTS_GAINED_IHP2 'common.ABILITY_ILF_HIT_POINTS_GAINED_IHP2' ----@field ABILITY_ILF_HIT_POINTS_GAINED_IHP2 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Ihp2') ---- ----ABILITY_ILF_MANA_POINTS_GAINED_IMP2 'common.ABILITY_ILF_MANA_POINTS_GAINED_IMP2' ----@field ABILITY_ILF_MANA_POINTS_GAINED_IMP2 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Imp2') ---- ----ABILITY_ILF_DAMAGE_BONUS_DICE 'common.ABILITY_ILF_DAMAGE_BONUS_DICE' ----@field ABILITY_ILF_DAMAGE_BONUS_DICE abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Idic') ---- ----ABILITY_ILF_ARMOR_PENALTY_IARP 'common.ABILITY_ILF_ARMOR_PENALTY_IARP' ----@field ABILITY_ILF_ARMOR_PENALTY_IARP abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Iarp') ---- ----ABILITY_ILF_ENABLED_ATTACK_INDEX_IOB5 'common.ABILITY_ILF_ENABLED_ATTACK_INDEX_IOB5' ----@field ABILITY_ILF_ENABLED_ATTACK_INDEX_IOB5 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Iob5') ---- ----ABILITY_ILF_LEVELS_GAINED 'common.ABILITY_ILF_LEVELS_GAINED' ----@field ABILITY_ILF_LEVELS_GAINED abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Ilev') ---- ----ABILITY_ILF_MAX_LIFE_GAINED 'common.ABILITY_ILF_MAX_LIFE_GAINED' ----@field ABILITY_ILF_MAX_LIFE_GAINED abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Ilif') ---- ----ABILITY_ILF_MAX_MANA_GAINED 'common.ABILITY_ILF_MAX_MANA_GAINED' ----@field ABILITY_ILF_MAX_MANA_GAINED abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Iman') ---- ----ABILITY_ILF_GOLD_GIVEN 'common.ABILITY_ILF_GOLD_GIVEN' ----@field ABILITY_ILF_GOLD_GIVEN abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Igol') ---- ----ABILITY_ILF_LUMBER_GIVEN 'common.ABILITY_ILF_LUMBER_GIVEN' ----@field ABILITY_ILF_LUMBER_GIVEN abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Ilum') ---- ----ABILITY_ILF_DETECTION_TYPE_IFA1 'common.ABILITY_ILF_DETECTION_TYPE_IFA1' ----@field ABILITY_ILF_DETECTION_TYPE_IFA1 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Ifa1') ---- ----ABILITY_ILF_MAXIMUM_CREEP_LEVEL_ICRE 'common.ABILITY_ILF_MAXIMUM_CREEP_LEVEL_ICRE' ----@field ABILITY_ILF_MAXIMUM_CREEP_LEVEL_ICRE abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Icre') ---- ----ABILITY_ILF_MOVEMENT_SPEED_BONUS 'common.ABILITY_ILF_MOVEMENT_SPEED_BONUS' ----@field ABILITY_ILF_MOVEMENT_SPEED_BONUS abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Imvb') ---- ----ABILITY_ILF_HIT_POINTS_REGENERATED_PER_SECOND 'common.ABILITY_ILF_HIT_POINTS_REGENERATED_PER_SECOND' ----@field ABILITY_ILF_HIT_POINTS_REGENERATED_PER_SECOND abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Ihpr') ---- ----ABILITY_ILF_SIGHT_RANGE_BONUS 'common.ABILITY_ILF_SIGHT_RANGE_BONUS' ----@field ABILITY_ILF_SIGHT_RANGE_BONUS abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Isib') ---- ----ABILITY_ILF_DAMAGE_PER_DURATION 'common.ABILITY_ILF_DAMAGE_PER_DURATION' ----@field ABILITY_ILF_DAMAGE_PER_DURATION abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Icfd') ---- ----ABILITY_ILF_MANA_USED_PER_SECOND 'common.ABILITY_ILF_MANA_USED_PER_SECOND' ----@field ABILITY_ILF_MANA_USED_PER_SECOND abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Icfm') ---- ----ABILITY_ILF_EXTRA_MANA_REQUIRED 'common.ABILITY_ILF_EXTRA_MANA_REQUIRED' ----@field ABILITY_ILF_EXTRA_MANA_REQUIRED abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Icfx') ---- ----ABILITY_ILF_DETECTION_RADIUS_IDET 'common.ABILITY_ILF_DETECTION_RADIUS_IDET' ----@field ABILITY_ILF_DETECTION_RADIUS_IDET abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Idet') ---- ----ABILITY_ILF_MANA_LOSS_PER_UNIT_IDIM 'common.ABILITY_ILF_MANA_LOSS_PER_UNIT_IDIM' ----@field ABILITY_ILF_MANA_LOSS_PER_UNIT_IDIM abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Idim') ---- ----ABILITY_ILF_DAMAGE_TO_SUMMONED_UNITS_IDID 'common.ABILITY_ILF_DAMAGE_TO_SUMMONED_UNITS_IDID' ----@field ABILITY_ILF_DAMAGE_TO_SUMMONED_UNITS_IDID abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Idid') ---- ----ABILITY_ILF_MAXIMUM_NUMBER_OF_UNITS_IREC 'common.ABILITY_ILF_MAXIMUM_NUMBER_OF_UNITS_IREC' ----@field ABILITY_ILF_MAXIMUM_NUMBER_OF_UNITS_IREC abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Irec') ---- ----ABILITY_ILF_DELAY_AFTER_DEATH_SECONDS 'common.ABILITY_ILF_DELAY_AFTER_DEATH_SECONDS' ----@field ABILITY_ILF_DELAY_AFTER_DEATH_SECONDS abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Ircd') ---- ----ABILITY_ILF_RESTORED_LIFE 'common.ABILITY_ILF_RESTORED_LIFE' ----@field ABILITY_ILF_RESTORED_LIFE abilityintegerlevelfield _ConvertAbilityIntegerLevelField('irc2') ---- ----ABILITY_ILF_RESTORED_MANA__1_FOR_CURRENT 'common.ABILITY_ILF_RESTORED_MANA__1_FOR_CURRENT' ----@field ABILITY_ILF_RESTORED_MANA__1_FOR_CURRENT abilityintegerlevelfield _ConvertAbilityIntegerLevelField('irc3') ---- ----ABILITY_ILF_HIT_POINTS_RESTORED 'common.ABILITY_ILF_HIT_POINTS_RESTORED' ----@field ABILITY_ILF_HIT_POINTS_RESTORED abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Ihps') ---- ----ABILITY_ILF_MANA_POINTS_RESTORED 'common.ABILITY_ILF_MANA_POINTS_RESTORED' ----@field ABILITY_ILF_MANA_POINTS_RESTORED abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Imps') ---- ----ABILITY_ILF_MAXIMUM_NUMBER_OF_UNITS_ITPM 'common.ABILITY_ILF_MAXIMUM_NUMBER_OF_UNITS_ITPM' ----@field ABILITY_ILF_MAXIMUM_NUMBER_OF_UNITS_ITPM abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Itpm') ---- ----ABILITY_ILF_NUMBER_OF_CORPSES_RAISED_CAD1 'common.ABILITY_ILF_NUMBER_OF_CORPSES_RAISED_CAD1' ----@field ABILITY_ILF_NUMBER_OF_CORPSES_RAISED_CAD1 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Cad1') ---- ----ABILITY_ILF_TERRAIN_DEFORMATION_DURATION_MS 'common.ABILITY_ILF_TERRAIN_DEFORMATION_DURATION_MS' ----@field ABILITY_ILF_TERRAIN_DEFORMATION_DURATION_MS abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Wrs3') ---- ----ABILITY_ILF_MAXIMUM_UNITS 'common.ABILITY_ILF_MAXIMUM_UNITS' ----@field ABILITY_ILF_MAXIMUM_UNITS abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Uds1') ---- ----ABILITY_ILF_DETECTION_TYPE_DET1 'common.ABILITY_ILF_DETECTION_TYPE_DET1' ----@field ABILITY_ILF_DETECTION_TYPE_DET1 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Det1') ---- ----ABILITY_ILF_GOLD_COST_PER_STRUCTURE 'common.ABILITY_ILF_GOLD_COST_PER_STRUCTURE' ----@field ABILITY_ILF_GOLD_COST_PER_STRUCTURE abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Nsp1') ---- ----ABILITY_ILF_LUMBER_COST_PER_USE 'common.ABILITY_ILF_LUMBER_COST_PER_USE' ----@field ABILITY_ILF_LUMBER_COST_PER_USE abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Nsp2') ---- ----ABILITY_ILF_DETECTION_TYPE_NSP3 'common.ABILITY_ILF_DETECTION_TYPE_NSP3' ----@field ABILITY_ILF_DETECTION_TYPE_NSP3 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Nsp3') ---- ----ABILITY_ILF_NUMBER_OF_SWARM_UNITS 'common.ABILITY_ILF_NUMBER_OF_SWARM_UNITS' ----@field ABILITY_ILF_NUMBER_OF_SWARM_UNITS abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Uls1') ---- ----ABILITY_ILF_MAX_SWARM_UNITS_PER_TARGET 'common.ABILITY_ILF_MAX_SWARM_UNITS_PER_TARGET' ----@field ABILITY_ILF_MAX_SWARM_UNITS_PER_TARGET abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Uls3') ---- ----ABILITY_ILF_NUMBER_OF_SUMMONED_UNITS_NBA2 'common.ABILITY_ILF_NUMBER_OF_SUMMONED_UNITS_NBA2' ----@field ABILITY_ILF_NUMBER_OF_SUMMONED_UNITS_NBA2 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Nba2') ---- ----ABILITY_ILF_MAXIMUM_CREEP_LEVEL_NCH1 'common.ABILITY_ILF_MAXIMUM_CREEP_LEVEL_NCH1' ----@field ABILITY_ILF_MAXIMUM_CREEP_LEVEL_NCH1 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Nch1') ---- ----ABILITY_ILF_ATTACKS_PREVENTED 'common.ABILITY_ILF_ATTACKS_PREVENTED' ----@field ABILITY_ILF_ATTACKS_PREVENTED abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Nsi1') ---- ----ABILITY_ILF_MAXIMUM_NUMBER_OF_TARGETS_EFK3 'common.ABILITY_ILF_MAXIMUM_NUMBER_OF_TARGETS_EFK3' ----@field ABILITY_ILF_MAXIMUM_NUMBER_OF_TARGETS_EFK3 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Efk3') ---- ----ABILITY_ILF_NUMBER_OF_SUMMONED_UNITS_ESV1 'common.ABILITY_ILF_NUMBER_OF_SUMMONED_UNITS_ESV1' ----@field ABILITY_ILF_NUMBER_OF_SUMMONED_UNITS_ESV1 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Esv1') ---- ----ABILITY_ILF_MAXIMUM_NUMBER_OF_CORPSES_EXH1 'common.ABILITY_ILF_MAXIMUM_NUMBER_OF_CORPSES_EXH1' ----@field ABILITY_ILF_MAXIMUM_NUMBER_OF_CORPSES_EXH1 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('exh1') ---- ----ABILITY_ILF_ITEM_CAPACITY 'common.ABILITY_ILF_ITEM_CAPACITY' ----@field ABILITY_ILF_ITEM_CAPACITY abilityintegerlevelfield _ConvertAbilityIntegerLevelField('inv1') ---- ----ABILITY_ILF_MAXIMUM_NUMBER_OF_TARGETS_SPL2 'common.ABILITY_ILF_MAXIMUM_NUMBER_OF_TARGETS_SPL2' ----@field ABILITY_ILF_MAXIMUM_NUMBER_OF_TARGETS_SPL2 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('spl2') ---- ----ABILITY_ILF_ALLOW_WHEN_FULL_IRL3 'common.ABILITY_ILF_ALLOW_WHEN_FULL_IRL3' ----@field ABILITY_ILF_ALLOW_WHEN_FULL_IRL3 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('irl3') ---- ----ABILITY_ILF_MAXIMUM_DISPELLED_UNITS 'common.ABILITY_ILF_MAXIMUM_DISPELLED_UNITS' ----@field ABILITY_ILF_MAXIMUM_DISPELLED_UNITS abilityintegerlevelfield _ConvertAbilityIntegerLevelField('idc3') ---- ----ABILITY_ILF_NUMBER_OF_LURES 'common.ABILITY_ILF_NUMBER_OF_LURES' ----@field ABILITY_ILF_NUMBER_OF_LURES abilityintegerlevelfield _ConvertAbilityIntegerLevelField('imo1') ---- ----ABILITY_ILF_NEW_TIME_OF_DAY_HOUR 'common.ABILITY_ILF_NEW_TIME_OF_DAY_HOUR' ----@field ABILITY_ILF_NEW_TIME_OF_DAY_HOUR abilityintegerlevelfield _ConvertAbilityIntegerLevelField('ict1') ---- ----ABILITY_ILF_NEW_TIME_OF_DAY_MINUTE 'common.ABILITY_ILF_NEW_TIME_OF_DAY_MINUTE' ----@field ABILITY_ILF_NEW_TIME_OF_DAY_MINUTE abilityintegerlevelfield _ConvertAbilityIntegerLevelField('ict2') ---- ----ABILITY_ILF_NUMBER_OF_UNITS_CREATED_MEC1 'common.ABILITY_ILF_NUMBER_OF_UNITS_CREATED_MEC1' ----@field ABILITY_ILF_NUMBER_OF_UNITS_CREATED_MEC1 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('mec1') ---- ----ABILITY_ILF_MINIMUM_SPELLS 'common.ABILITY_ILF_MINIMUM_SPELLS' ----@field ABILITY_ILF_MINIMUM_SPELLS abilityintegerlevelfield _ConvertAbilityIntegerLevelField('spb3') ---- ----ABILITY_ILF_MAXIMUM_SPELLS 'common.ABILITY_ILF_MAXIMUM_SPELLS' ----@field ABILITY_ILF_MAXIMUM_SPELLS abilityintegerlevelfield _ConvertAbilityIntegerLevelField('spb4') ---- ----ABILITY_ILF_DISABLED_ATTACK_INDEX 'common.ABILITY_ILF_DISABLED_ATTACK_INDEX' ----@field ABILITY_ILF_DISABLED_ATTACK_INDEX abilityintegerlevelfield _ConvertAbilityIntegerLevelField('gra3') ---- ----ABILITY_ILF_ENABLED_ATTACK_INDEX_GRA4 'common.ABILITY_ILF_ENABLED_ATTACK_INDEX_GRA4' ----@field ABILITY_ILF_ENABLED_ATTACK_INDEX_GRA4 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('gra4') ---- ----ABILITY_ILF_MAXIMUM_ATTACKS 'common.ABILITY_ILF_MAXIMUM_ATTACKS' ----@field ABILITY_ILF_MAXIMUM_ATTACKS abilityintegerlevelfield _ConvertAbilityIntegerLevelField('gra5') ---- ----ABILITY_ILF_BUILDING_TYPES_ALLOWED_NPR1 'common.ABILITY_ILF_BUILDING_TYPES_ALLOWED_NPR1' ----@field ABILITY_ILF_BUILDING_TYPES_ALLOWED_NPR1 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Npr1') ---- ----ABILITY_ILF_BUILDING_TYPES_ALLOWED_NSA1 'common.ABILITY_ILF_BUILDING_TYPES_ALLOWED_NSA1' ----@field ABILITY_ILF_BUILDING_TYPES_ALLOWED_NSA1 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Nsa1') ---- ----ABILITY_ILF_ATTACK_MODIFICATION 'common.ABILITY_ILF_ATTACK_MODIFICATION' ----@field ABILITY_ILF_ATTACK_MODIFICATION abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Iaa1') ---- ----ABILITY_ILF_SUMMONED_UNIT_COUNT_NPA5 'common.ABILITY_ILF_SUMMONED_UNIT_COUNT_NPA5' ----@field ABILITY_ILF_SUMMONED_UNIT_COUNT_NPA5 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Npa5') ---- ----ABILITY_ILF_UPGRADE_LEVELS 'common.ABILITY_ILF_UPGRADE_LEVELS' ----@field ABILITY_ILF_UPGRADE_LEVELS abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Igl1') ---- ----ABILITY_ILF_NUMBER_OF_SUMMONED_UNITS_NDO2 'common.ABILITY_ILF_NUMBER_OF_SUMMONED_UNITS_NDO2' ----@field ABILITY_ILF_NUMBER_OF_SUMMONED_UNITS_NDO2 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Ndo2') ---- ----ABILITY_ILF_BEASTS_PER_SECOND 'common.ABILITY_ILF_BEASTS_PER_SECOND' ----@field ABILITY_ILF_BEASTS_PER_SECOND abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Nst1') ---- ----ABILITY_ILF_TARGET_TYPE 'common.ABILITY_ILF_TARGET_TYPE' ----@field ABILITY_ILF_TARGET_TYPE abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Ncl2') ---- ----ABILITY_ILF_OPTIONS 'common.ABILITY_ILF_OPTIONS' ----@field ABILITY_ILF_OPTIONS abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Ncl3') ---- ----ABILITY_ILF_ARMOR_PENALTY_NAB3 'common.ABILITY_ILF_ARMOR_PENALTY_NAB3' ----@field ABILITY_ILF_ARMOR_PENALTY_NAB3 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Nab3') ---- ----ABILITY_ILF_WAVE_COUNT_NHS6 'common.ABILITY_ILF_WAVE_COUNT_NHS6' ----@field ABILITY_ILF_WAVE_COUNT_NHS6 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Nhs6') ---- ----ABILITY_ILF_MAX_CREEP_LEVEL_NTM3 'common.ABILITY_ILF_MAX_CREEP_LEVEL_NTM3' ----@field ABILITY_ILF_MAX_CREEP_LEVEL_NTM3 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Ntm3') ---- ----ABILITY_ILF_MISSILE_COUNT 'common.ABILITY_ILF_MISSILE_COUNT' ----@field ABILITY_ILF_MISSILE_COUNT abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Ncs3') ---- ----ABILITY_ILF_SPLIT_ATTACK_COUNT 'common.ABILITY_ILF_SPLIT_ATTACK_COUNT' ----@field ABILITY_ILF_SPLIT_ATTACK_COUNT abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Nlm3') ---- ----ABILITY_ILF_GENERATION_COUNT 'common.ABILITY_ILF_GENERATION_COUNT' ----@field ABILITY_ILF_GENERATION_COUNT abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Nlm6') ---- ----ABILITY_ILF_ROCK_RING_COUNT 'common.ABILITY_ILF_ROCK_RING_COUNT' ----@field ABILITY_ILF_ROCK_RING_COUNT abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Nvc1') ---- ----ABILITY_ILF_WAVE_COUNT_NVC2 'common.ABILITY_ILF_WAVE_COUNT_NVC2' ----@field ABILITY_ILF_WAVE_COUNT_NVC2 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Nvc2') ---- ----ABILITY_ILF_PREFER_HOSTILES_TAU1 'common.ABILITY_ILF_PREFER_HOSTILES_TAU1' ----@field ABILITY_ILF_PREFER_HOSTILES_TAU1 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Tau1') ---- ----ABILITY_ILF_PREFER_FRIENDLIES_TAU2 'common.ABILITY_ILF_PREFER_FRIENDLIES_TAU2' ----@field ABILITY_ILF_PREFER_FRIENDLIES_TAU2 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Tau2') ---- ----ABILITY_ILF_MAX_UNITS_TAU3 'common.ABILITY_ILF_MAX_UNITS_TAU3' ----@field ABILITY_ILF_MAX_UNITS_TAU3 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Tau3') ---- ----ABILITY_ILF_NUMBER_OF_PULSES 'common.ABILITY_ILF_NUMBER_OF_PULSES' ----@field ABILITY_ILF_NUMBER_OF_PULSES abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Tau4') ---- ----ABILITY_ILF_SUMMONED_UNIT_TYPE_HWE1 'common.ABILITY_ILF_SUMMONED_UNIT_TYPE_HWE1' ----@field ABILITY_ILF_SUMMONED_UNIT_TYPE_HWE1 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Hwe1') ---- ----ABILITY_ILF_SUMMONED_UNIT_UIN4 'common.ABILITY_ILF_SUMMONED_UNIT_UIN4' ----@field ABILITY_ILF_SUMMONED_UNIT_UIN4 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Uin4') ---- ----ABILITY_ILF_SUMMONED_UNIT_OSF1 'common.ABILITY_ILF_SUMMONED_UNIT_OSF1' ----@field ABILITY_ILF_SUMMONED_UNIT_OSF1 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Osf1') ---- ----ABILITY_ILF_SUMMONED_UNIT_TYPE_EFNU 'common.ABILITY_ILF_SUMMONED_UNIT_TYPE_EFNU' ----@field ABILITY_ILF_SUMMONED_UNIT_TYPE_EFNU abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Efnu') ---- ----ABILITY_ILF_SUMMONED_UNIT_TYPE_NBAU 'common.ABILITY_ILF_SUMMONED_UNIT_TYPE_NBAU' ----@field ABILITY_ILF_SUMMONED_UNIT_TYPE_NBAU abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Nbau') ---- ----ABILITY_ILF_SUMMONED_UNIT_TYPE_NTOU 'common.ABILITY_ILF_SUMMONED_UNIT_TYPE_NTOU' ----@field ABILITY_ILF_SUMMONED_UNIT_TYPE_NTOU abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Ntou') ---- ----ABILITY_ILF_SUMMONED_UNIT_TYPE_ESVU 'common.ABILITY_ILF_SUMMONED_UNIT_TYPE_ESVU' ----@field ABILITY_ILF_SUMMONED_UNIT_TYPE_ESVU abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Esvu') ---- ----ABILITY_ILF_SUMMONED_UNIT_TYPES 'common.ABILITY_ILF_SUMMONED_UNIT_TYPES' ----@field ABILITY_ILF_SUMMONED_UNIT_TYPES abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Nef1') ---- ----ABILITY_ILF_SUMMONED_UNIT_TYPE_NDOU 'common.ABILITY_ILF_SUMMONED_UNIT_TYPE_NDOU' ----@field ABILITY_ILF_SUMMONED_UNIT_TYPE_NDOU abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Ndou') ---- ----ABILITY_ILF_ALTERNATE_FORM_UNIT_EMEU 'common.ABILITY_ILF_ALTERNATE_FORM_UNIT_EMEU' ----@field ABILITY_ILF_ALTERNATE_FORM_UNIT_EMEU abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Emeu') ---- ----ABILITY_ILF_PLAGUE_WARD_UNIT_TYPE 'common.ABILITY_ILF_PLAGUE_WARD_UNIT_TYPE' ----@field ABILITY_ILF_PLAGUE_WARD_UNIT_TYPE abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Aplu') ---- ----ABILITY_ILF_ALLOWED_UNIT_TYPE_BTL1 'common.ABILITY_ILF_ALLOWED_UNIT_TYPE_BTL1' ----@field ABILITY_ILF_ALLOWED_UNIT_TYPE_BTL1 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Btl1') ---- ----ABILITY_ILF_NEW_UNIT_TYPE 'common.ABILITY_ILF_NEW_UNIT_TYPE' ----@field ABILITY_ILF_NEW_UNIT_TYPE abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Cha1') ---- ----ABILITY_ILF_RESULTING_UNIT_TYPE_ENT1 'common.ABILITY_ILF_RESULTING_UNIT_TYPE_ENT1' ----@field ABILITY_ILF_RESULTING_UNIT_TYPE_ENT1 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('ent1') ---- ----ABILITY_ILF_CORPSE_UNIT_TYPE 'common.ABILITY_ILF_CORPSE_UNIT_TYPE' ----@field ABILITY_ILF_CORPSE_UNIT_TYPE abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Gydu') ---- ----ABILITY_ILF_ALLOWED_UNIT_TYPE_LOA1 'common.ABILITY_ILF_ALLOWED_UNIT_TYPE_LOA1' ----@field ABILITY_ILF_ALLOWED_UNIT_TYPE_LOA1 abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Loa1') ---- ----ABILITY_ILF_UNIT_TYPE_FOR_LIMIT_CHECK 'common.ABILITY_ILF_UNIT_TYPE_FOR_LIMIT_CHECK' ----@field ABILITY_ILF_UNIT_TYPE_FOR_LIMIT_CHECK abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Raiu') ---- ----ABILITY_ILF_WARD_UNIT_TYPE_STAU 'common.ABILITY_ILF_WARD_UNIT_TYPE_STAU' ----@field ABILITY_ILF_WARD_UNIT_TYPE_STAU abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Stau') ---- ----ABILITY_ILF_EFFECT_ABILITY 'common.ABILITY_ILF_EFFECT_ABILITY' ----@field ABILITY_ILF_EFFECT_ABILITY abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Iobu') ---- ----ABILITY_ILF_CONVERSION_UNIT 'common.ABILITY_ILF_CONVERSION_UNIT' ----@field ABILITY_ILF_CONVERSION_UNIT abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Ndc2') ---- ----ABILITY_ILF_UNIT_TO_PRESERVE 'common.ABILITY_ILF_UNIT_TO_PRESERVE' ----@field ABILITY_ILF_UNIT_TO_PRESERVE abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Nsl1') ---- ----ABILITY_ILF_UNIT_TYPE_ALLOWED 'common.ABILITY_ILF_UNIT_TYPE_ALLOWED' ----@field ABILITY_ILF_UNIT_TYPE_ALLOWED abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Chl1') ---- ----ABILITY_ILF_SWARM_UNIT_TYPE 'common.ABILITY_ILF_SWARM_UNIT_TYPE' ----@field ABILITY_ILF_SWARM_UNIT_TYPE abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Ulsu') ---- ----ABILITY_ILF_RESULTING_UNIT_TYPE_COAU 'common.ABILITY_ILF_RESULTING_UNIT_TYPE_COAU' ----@field ABILITY_ILF_RESULTING_UNIT_TYPE_COAU abilityintegerlevelfield _ConvertAbilityIntegerLevelField('coau') ---- ----ABILITY_ILF_UNIT_TYPE_EXHU 'common.ABILITY_ILF_UNIT_TYPE_EXHU' ----@field ABILITY_ILF_UNIT_TYPE_EXHU abilityintegerlevelfield _ConvertAbilityIntegerLevelField('exhu') ---- ----ABILITY_ILF_WARD_UNIT_TYPE_HWDU 'common.ABILITY_ILF_WARD_UNIT_TYPE_HWDU' ----@field ABILITY_ILF_WARD_UNIT_TYPE_HWDU abilityintegerlevelfield _ConvertAbilityIntegerLevelField('hwdu') ---- ----ABILITY_ILF_LURE_UNIT_TYPE 'common.ABILITY_ILF_LURE_UNIT_TYPE' ----@field ABILITY_ILF_LURE_UNIT_TYPE abilityintegerlevelfield _ConvertAbilityIntegerLevelField('imou') ---- ----ABILITY_ILF_UNIT_TYPE_IPMU 'common.ABILITY_ILF_UNIT_TYPE_IPMU' ----@field ABILITY_ILF_UNIT_TYPE_IPMU abilityintegerlevelfield _ConvertAbilityIntegerLevelField('ipmu') ---- ----ABILITY_ILF_FACTORY_UNIT_ID 'common.ABILITY_ILF_FACTORY_UNIT_ID' ----@field ABILITY_ILF_FACTORY_UNIT_ID abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Nsyu') ---- ----ABILITY_ILF_SPAWN_UNIT_ID_NFYU 'common.ABILITY_ILF_SPAWN_UNIT_ID_NFYU' ----@field ABILITY_ILF_SPAWN_UNIT_ID_NFYU abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Nfyu') ---- ----ABILITY_ILF_DESTRUCTIBLE_ID 'common.ABILITY_ILF_DESTRUCTIBLE_ID' ----@field ABILITY_ILF_DESTRUCTIBLE_ID abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Nvcu') ---- ----ABILITY_ILF_UPGRADE_TYPE 'common.ABILITY_ILF_UPGRADE_TYPE' ----@field ABILITY_ILF_UPGRADE_TYPE abilityintegerlevelfield _ConvertAbilityIntegerLevelField('Iglu') ---- ----ABILITY_RLF_CASTING_TIME 'common.ABILITY_RLF_CASTING_TIME' ----@field ABILITY_RLF_CASTING_TIME abilityreallevelfield _ConvertAbilityRealLevelField('acas') ---- ----ABILITY_RLF_DURATION_NORMAL 'common.ABILITY_RLF_DURATION_NORMAL' ----@field ABILITY_RLF_DURATION_NORMAL abilityreallevelfield _ConvertAbilityRealLevelField('adur') ---- ----ABILITY_RLF_DURATION_HERO 'common.ABILITY_RLF_DURATION_HERO' ----@field ABILITY_RLF_DURATION_HERO abilityreallevelfield _ConvertAbilityRealLevelField('ahdu') ---- ----ABILITY_RLF_COOLDOWN 'common.ABILITY_RLF_COOLDOWN' ----@field ABILITY_RLF_COOLDOWN abilityreallevelfield _ConvertAbilityRealLevelField('acdn') ---- ----ABILITY_RLF_AREA_OF_EFFECT 'common.ABILITY_RLF_AREA_OF_EFFECT' ----@field ABILITY_RLF_AREA_OF_EFFECT abilityreallevelfield _ConvertAbilityRealLevelField('aare') ---- ----ABILITY_RLF_CAST_RANGE 'common.ABILITY_RLF_CAST_RANGE' ----@field ABILITY_RLF_CAST_RANGE abilityreallevelfield _ConvertAbilityRealLevelField('aran') ---- ----ABILITY_RLF_DAMAGE_HBZ2 'common.ABILITY_RLF_DAMAGE_HBZ2' ----@field ABILITY_RLF_DAMAGE_HBZ2 abilityreallevelfield _ConvertAbilityRealLevelField('Hbz2') ---- ----ABILITY_RLF_BUILDING_REDUCTION_HBZ4 'common.ABILITY_RLF_BUILDING_REDUCTION_HBZ4' ----@field ABILITY_RLF_BUILDING_REDUCTION_HBZ4 abilityreallevelfield _ConvertAbilityRealLevelField('Hbz4') ---- ----ABILITY_RLF_DAMAGE_PER_SECOND_HBZ5 'common.ABILITY_RLF_DAMAGE_PER_SECOND_HBZ5' ----@field ABILITY_RLF_DAMAGE_PER_SECOND_HBZ5 abilityreallevelfield _ConvertAbilityRealLevelField('Hbz5') ---- ----ABILITY_RLF_MAXIMUM_DAMAGE_PER_WAVE 'common.ABILITY_RLF_MAXIMUM_DAMAGE_PER_WAVE' ----@field ABILITY_RLF_MAXIMUM_DAMAGE_PER_WAVE abilityreallevelfield _ConvertAbilityRealLevelField('Hbz6') ---- ----ABILITY_RLF_MANA_REGENERATION_INCREASE 'common.ABILITY_RLF_MANA_REGENERATION_INCREASE' ----@field ABILITY_RLF_MANA_REGENERATION_INCREASE abilityreallevelfield _ConvertAbilityRealLevelField('Hab1') ---- ----ABILITY_RLF_CASTING_DELAY 'common.ABILITY_RLF_CASTING_DELAY' ----@field ABILITY_RLF_CASTING_DELAY abilityreallevelfield _ConvertAbilityRealLevelField('Hmt2') ---- ----ABILITY_RLF_DAMAGE_PER_SECOND_OWW1 'common.ABILITY_RLF_DAMAGE_PER_SECOND_OWW1' ----@field ABILITY_RLF_DAMAGE_PER_SECOND_OWW1 abilityreallevelfield _ConvertAbilityRealLevelField('Oww1') ---- ----ABILITY_RLF_MAGIC_DAMAGE_REDUCTION_OWW2 'common.ABILITY_RLF_MAGIC_DAMAGE_REDUCTION_OWW2' ----@field ABILITY_RLF_MAGIC_DAMAGE_REDUCTION_OWW2 abilityreallevelfield _ConvertAbilityRealLevelField('Oww2') ---- ----ABILITY_RLF_CHANCE_TO_CRITICAL_STRIKE 'common.ABILITY_RLF_CHANCE_TO_CRITICAL_STRIKE' ----@field ABILITY_RLF_CHANCE_TO_CRITICAL_STRIKE abilityreallevelfield _ConvertAbilityRealLevelField('Ocr1') ---- ----ABILITY_RLF_DAMAGE_MULTIPLIER_OCR2 'common.ABILITY_RLF_DAMAGE_MULTIPLIER_OCR2' ----@field ABILITY_RLF_DAMAGE_MULTIPLIER_OCR2 abilityreallevelfield _ConvertAbilityRealLevelField('Ocr2') ---- ----ABILITY_RLF_DAMAGE_BONUS_OCR3 'common.ABILITY_RLF_DAMAGE_BONUS_OCR3' ----@field ABILITY_RLF_DAMAGE_BONUS_OCR3 abilityreallevelfield _ConvertAbilityRealLevelField('Ocr3') ---- ----ABILITY_RLF_CHANCE_TO_EVADE_OCR4 'common.ABILITY_RLF_CHANCE_TO_EVADE_OCR4' ----@field ABILITY_RLF_CHANCE_TO_EVADE_OCR4 abilityreallevelfield _ConvertAbilityRealLevelField('Ocr4') ---- ----ABILITY_RLF_DAMAGE_DEALT_PERCENT_OMI2 'common.ABILITY_RLF_DAMAGE_DEALT_PERCENT_OMI2' ----@field ABILITY_RLF_DAMAGE_DEALT_PERCENT_OMI2 abilityreallevelfield _ConvertAbilityRealLevelField('Omi2') ---- ----ABILITY_RLF_DAMAGE_TAKEN_PERCENT_OMI3 'common.ABILITY_RLF_DAMAGE_TAKEN_PERCENT_OMI3' ----@field ABILITY_RLF_DAMAGE_TAKEN_PERCENT_OMI3 abilityreallevelfield _ConvertAbilityRealLevelField('Omi3') ---- ----ABILITY_RLF_ANIMATION_DELAY 'common.ABILITY_RLF_ANIMATION_DELAY' ----@field ABILITY_RLF_ANIMATION_DELAY abilityreallevelfield _ConvertAbilityRealLevelField('Omi4') ---- ----ABILITY_RLF_TRANSITION_TIME 'common.ABILITY_RLF_TRANSITION_TIME' ----@field ABILITY_RLF_TRANSITION_TIME abilityreallevelfield _ConvertAbilityRealLevelField('Owk1') ---- ----ABILITY_RLF_MOVEMENT_SPEED_INCREASE_PERCENT_OWK2 'common.ABILITY_RLF_MOVEMENT_SPEED_INCREASE_PERCENT_OWK2' ----@field ABILITY_RLF_MOVEMENT_SPEED_INCREASE_PERCENT_OWK2 abilityreallevelfield _ConvertAbilityRealLevelField('Owk2') ---- ----ABILITY_RLF_BACKSTAB_DAMAGE 'common.ABILITY_RLF_BACKSTAB_DAMAGE' ----@field ABILITY_RLF_BACKSTAB_DAMAGE abilityreallevelfield _ConvertAbilityRealLevelField('Owk3') ---- ----ABILITY_RLF_AMOUNT_HEALED_DAMAGED_UDC1 'common.ABILITY_RLF_AMOUNT_HEALED_DAMAGED_UDC1' ----@field ABILITY_RLF_AMOUNT_HEALED_DAMAGED_UDC1 abilityreallevelfield _ConvertAbilityRealLevelField('Udc1') ---- ----ABILITY_RLF_LIFE_CONVERTED_TO_MANA 'common.ABILITY_RLF_LIFE_CONVERTED_TO_MANA' ----@field ABILITY_RLF_LIFE_CONVERTED_TO_MANA abilityreallevelfield _ConvertAbilityRealLevelField('Udp1') ---- ----ABILITY_RLF_LIFE_CONVERTED_TO_LIFE 'common.ABILITY_RLF_LIFE_CONVERTED_TO_LIFE' ----@field ABILITY_RLF_LIFE_CONVERTED_TO_LIFE abilityreallevelfield _ConvertAbilityRealLevelField('Udp2') ---- ----ABILITY_RLF_MOVEMENT_SPEED_INCREASE_PERCENT_UAU1 'common.ABILITY_RLF_MOVEMENT_SPEED_INCREASE_PERCENT_UAU1' ----@field ABILITY_RLF_MOVEMENT_SPEED_INCREASE_PERCENT_UAU1 abilityreallevelfield _ConvertAbilityRealLevelField('Uau1') ---- ----ABILITY_RLF_LIFE_REGENERATION_INCREASE_PERCENT 'common.ABILITY_RLF_LIFE_REGENERATION_INCREASE_PERCENT' ----@field ABILITY_RLF_LIFE_REGENERATION_INCREASE_PERCENT abilityreallevelfield _ConvertAbilityRealLevelField('Uau2') ---- ----ABILITY_RLF_CHANCE_TO_EVADE_EEV1 'common.ABILITY_RLF_CHANCE_TO_EVADE_EEV1' ----@field ABILITY_RLF_CHANCE_TO_EVADE_EEV1 abilityreallevelfield _ConvertAbilityRealLevelField('Eev1') ---- ----ABILITY_RLF_DAMAGE_PER_INTERVAL 'common.ABILITY_RLF_DAMAGE_PER_INTERVAL' ----@field ABILITY_RLF_DAMAGE_PER_INTERVAL abilityreallevelfield _ConvertAbilityRealLevelField('Eim1') ---- ----ABILITY_RLF_MANA_DRAINED_PER_SECOND_EIM2 'common.ABILITY_RLF_MANA_DRAINED_PER_SECOND_EIM2' ----@field ABILITY_RLF_MANA_DRAINED_PER_SECOND_EIM2 abilityreallevelfield _ConvertAbilityRealLevelField('Eim2') ---- ----ABILITY_RLF_BUFFER_MANA_REQUIRED 'common.ABILITY_RLF_BUFFER_MANA_REQUIRED' ----@field ABILITY_RLF_BUFFER_MANA_REQUIRED abilityreallevelfield _ConvertAbilityRealLevelField('Eim3') ---- ----ABILITY_RLF_MAX_MANA_DRAINED 'common.ABILITY_RLF_MAX_MANA_DRAINED' ----@field ABILITY_RLF_MAX_MANA_DRAINED abilityreallevelfield _ConvertAbilityRealLevelField('Emb1') ---- ----ABILITY_RLF_BOLT_DELAY 'common.ABILITY_RLF_BOLT_DELAY' ----@field ABILITY_RLF_BOLT_DELAY abilityreallevelfield _ConvertAbilityRealLevelField('Emb2') ---- ----ABILITY_RLF_BOLT_LIFETIME 'common.ABILITY_RLF_BOLT_LIFETIME' ----@field ABILITY_RLF_BOLT_LIFETIME abilityreallevelfield _ConvertAbilityRealLevelField('Emb3') ---- ----ABILITY_RLF_ALTITUDE_ADJUSTMENT_DURATION 'common.ABILITY_RLF_ALTITUDE_ADJUSTMENT_DURATION' ----@field ABILITY_RLF_ALTITUDE_ADJUSTMENT_DURATION abilityreallevelfield _ConvertAbilityRealLevelField('Eme3') ---- ----ABILITY_RLF_LANDING_DELAY_TIME 'common.ABILITY_RLF_LANDING_DELAY_TIME' ----@field ABILITY_RLF_LANDING_DELAY_TIME abilityreallevelfield _ConvertAbilityRealLevelField('Eme4') ---- ----ABILITY_RLF_ALTERNATE_FORM_HIT_POINT_BONUS 'common.ABILITY_RLF_ALTERNATE_FORM_HIT_POINT_BONUS' ----@field ABILITY_RLF_ALTERNATE_FORM_HIT_POINT_BONUS abilityreallevelfield _ConvertAbilityRealLevelField('Eme5') ---- ----ABILITY_RLF_MOVE_SPEED_BONUS_INFO_PANEL_ONLY 'common.ABILITY_RLF_MOVE_SPEED_BONUS_INFO_PANEL_ONLY' ----@field ABILITY_RLF_MOVE_SPEED_BONUS_INFO_PANEL_ONLY abilityreallevelfield _ConvertAbilityRealLevelField('Ncr5') ---- ----ABILITY_RLF_ATTACK_SPEED_BONUS_INFO_PANEL_ONLY 'common.ABILITY_RLF_ATTACK_SPEED_BONUS_INFO_PANEL_ONLY' ----@field ABILITY_RLF_ATTACK_SPEED_BONUS_INFO_PANEL_ONLY abilityreallevelfield _ConvertAbilityRealLevelField('Ncr6') ---- ----ABILITY_RLF_LIFE_REGENERATION_RATE_PER_SECOND 'common.ABILITY_RLF_LIFE_REGENERATION_RATE_PER_SECOND' ----@field ABILITY_RLF_LIFE_REGENERATION_RATE_PER_SECOND abilityreallevelfield _ConvertAbilityRealLevelField('ave5') ---- ----ABILITY_RLF_STUN_DURATION_USL1 'common.ABILITY_RLF_STUN_DURATION_USL1' ----@field ABILITY_RLF_STUN_DURATION_USL1 abilityreallevelfield _ConvertAbilityRealLevelField('Usl1') ---- ----ABILITY_RLF_ATTACK_DAMAGE_STOLEN_PERCENT 'common.ABILITY_RLF_ATTACK_DAMAGE_STOLEN_PERCENT' ----@field ABILITY_RLF_ATTACK_DAMAGE_STOLEN_PERCENT abilityreallevelfield _ConvertAbilityRealLevelField('Uav1') ---- ----ABILITY_RLF_DAMAGE_UCS1 'common.ABILITY_RLF_DAMAGE_UCS1' ----@field ABILITY_RLF_DAMAGE_UCS1 abilityreallevelfield _ConvertAbilityRealLevelField('Ucs1') ---- ----ABILITY_RLF_MAX_DAMAGE_UCS2 'common.ABILITY_RLF_MAX_DAMAGE_UCS2' ----@field ABILITY_RLF_MAX_DAMAGE_UCS2 abilityreallevelfield _ConvertAbilityRealLevelField('Ucs2') ---- ----ABILITY_RLF_DISTANCE_UCS3 'common.ABILITY_RLF_DISTANCE_UCS3' ----@field ABILITY_RLF_DISTANCE_UCS3 abilityreallevelfield _ConvertAbilityRealLevelField('Ucs3') ---- ----ABILITY_RLF_FINAL_AREA_UCS4 'common.ABILITY_RLF_FINAL_AREA_UCS4' ----@field ABILITY_RLF_FINAL_AREA_UCS4 abilityreallevelfield _ConvertAbilityRealLevelField('Ucs4') ---- ----ABILITY_RLF_DAMAGE_UIN1 'common.ABILITY_RLF_DAMAGE_UIN1' ----@field ABILITY_RLF_DAMAGE_UIN1 abilityreallevelfield _ConvertAbilityRealLevelField('Uin1') ---- ----ABILITY_RLF_DURATION 'common.ABILITY_RLF_DURATION' ----@field ABILITY_RLF_DURATION abilityreallevelfield _ConvertAbilityRealLevelField('Uin2') ---- ----ABILITY_RLF_IMPACT_DELAY 'common.ABILITY_RLF_IMPACT_DELAY' ----@field ABILITY_RLF_IMPACT_DELAY abilityreallevelfield _ConvertAbilityRealLevelField('Uin3') ---- ----ABILITY_RLF_DAMAGE_PER_TARGET_OCL1 'common.ABILITY_RLF_DAMAGE_PER_TARGET_OCL1' ----@field ABILITY_RLF_DAMAGE_PER_TARGET_OCL1 abilityreallevelfield _ConvertAbilityRealLevelField('Ocl1') ---- ----ABILITY_RLF_DAMAGE_REDUCTION_PER_TARGET 'common.ABILITY_RLF_DAMAGE_REDUCTION_PER_TARGET' ----@field ABILITY_RLF_DAMAGE_REDUCTION_PER_TARGET abilityreallevelfield _ConvertAbilityRealLevelField('Ocl3') ---- ----ABILITY_RLF_EFFECT_DELAY_OEQ1 'common.ABILITY_RLF_EFFECT_DELAY_OEQ1' ----@field ABILITY_RLF_EFFECT_DELAY_OEQ1 abilityreallevelfield _ConvertAbilityRealLevelField('Oeq1') ---- ----ABILITY_RLF_DAMAGE_PER_SECOND_TO_BUILDINGS 'common.ABILITY_RLF_DAMAGE_PER_SECOND_TO_BUILDINGS' ----@field ABILITY_RLF_DAMAGE_PER_SECOND_TO_BUILDINGS abilityreallevelfield _ConvertAbilityRealLevelField('Oeq2') ---- ----ABILITY_RLF_UNITS_SLOWED_PERCENT 'common.ABILITY_RLF_UNITS_SLOWED_PERCENT' ----@field ABILITY_RLF_UNITS_SLOWED_PERCENT abilityreallevelfield _ConvertAbilityRealLevelField('Oeq3') ---- ----ABILITY_RLF_FINAL_AREA_OEQ4 'common.ABILITY_RLF_FINAL_AREA_OEQ4' ----@field ABILITY_RLF_FINAL_AREA_OEQ4 abilityreallevelfield _ConvertAbilityRealLevelField('Oeq4') ---- ----ABILITY_RLF_DAMAGE_PER_SECOND_EER1 'common.ABILITY_RLF_DAMAGE_PER_SECOND_EER1' ----@field ABILITY_RLF_DAMAGE_PER_SECOND_EER1 abilityreallevelfield _ConvertAbilityRealLevelField('Eer1') ---- ----ABILITY_RLF_DAMAGE_DEALT_TO_ATTACKERS 'common.ABILITY_RLF_DAMAGE_DEALT_TO_ATTACKERS' ----@field ABILITY_RLF_DAMAGE_DEALT_TO_ATTACKERS abilityreallevelfield _ConvertAbilityRealLevelField('Eah1') ---- ----ABILITY_RLF_LIFE_HEALED 'common.ABILITY_RLF_LIFE_HEALED' ----@field ABILITY_RLF_LIFE_HEALED abilityreallevelfield _ConvertAbilityRealLevelField('Etq1') ---- ----ABILITY_RLF_HEAL_INTERVAL 'common.ABILITY_RLF_HEAL_INTERVAL' ----@field ABILITY_RLF_HEAL_INTERVAL abilityreallevelfield _ConvertAbilityRealLevelField('Etq2') ---- ----ABILITY_RLF_BUILDING_REDUCTION_ETQ3 'common.ABILITY_RLF_BUILDING_REDUCTION_ETQ3' ----@field ABILITY_RLF_BUILDING_REDUCTION_ETQ3 abilityreallevelfield _ConvertAbilityRealLevelField('Etq3') ---- ----ABILITY_RLF_INITIAL_IMMUNITY_DURATION 'common.ABILITY_RLF_INITIAL_IMMUNITY_DURATION' ----@field ABILITY_RLF_INITIAL_IMMUNITY_DURATION abilityreallevelfield _ConvertAbilityRealLevelField('Etq4') ---- ----ABILITY_RLF_MAX_LIFE_DRAINED_PER_SECOND_PERCENT 'common.ABILITY_RLF_MAX_LIFE_DRAINED_PER_SECOND_PERCENT' ----@field ABILITY_RLF_MAX_LIFE_DRAINED_PER_SECOND_PERCENT abilityreallevelfield _ConvertAbilityRealLevelField('Udd1') ---- ----ABILITY_RLF_BUILDING_REDUCTION_UDD2 'common.ABILITY_RLF_BUILDING_REDUCTION_UDD2' ----@field ABILITY_RLF_BUILDING_REDUCTION_UDD2 abilityreallevelfield _ConvertAbilityRealLevelField('Udd2') ---- ----ABILITY_RLF_ARMOR_DURATION 'common.ABILITY_RLF_ARMOR_DURATION' ----@field ABILITY_RLF_ARMOR_DURATION abilityreallevelfield _ConvertAbilityRealLevelField('Ufa1') ---- ----ABILITY_RLF_ARMOR_BONUS_UFA2 'common.ABILITY_RLF_ARMOR_BONUS_UFA2' ----@field ABILITY_RLF_ARMOR_BONUS_UFA2 abilityreallevelfield _ConvertAbilityRealLevelField('Ufa2') ---- ----ABILITY_RLF_AREA_OF_EFFECT_DAMAGE 'common.ABILITY_RLF_AREA_OF_EFFECT_DAMAGE' ----@field ABILITY_RLF_AREA_OF_EFFECT_DAMAGE abilityreallevelfield _ConvertAbilityRealLevelField('Ufn1') ---- ----ABILITY_RLF_SPECIFIC_TARGET_DAMAGE_UFN2 'common.ABILITY_RLF_SPECIFIC_TARGET_DAMAGE_UFN2' ----@field ABILITY_RLF_SPECIFIC_TARGET_DAMAGE_UFN2 abilityreallevelfield _ConvertAbilityRealLevelField('Ufn2') ---- ----ABILITY_RLF_DAMAGE_BONUS_HFA1 'common.ABILITY_RLF_DAMAGE_BONUS_HFA1' ----@field ABILITY_RLF_DAMAGE_BONUS_HFA1 abilityreallevelfield _ConvertAbilityRealLevelField('Hfa1') ---- ----ABILITY_RLF_DAMAGE_DEALT_ESF1 'common.ABILITY_RLF_DAMAGE_DEALT_ESF1' ----@field ABILITY_RLF_DAMAGE_DEALT_ESF1 abilityreallevelfield _ConvertAbilityRealLevelField('Esf1') ---- ----ABILITY_RLF_DAMAGE_INTERVAL_ESF2 'common.ABILITY_RLF_DAMAGE_INTERVAL_ESF2' ----@field ABILITY_RLF_DAMAGE_INTERVAL_ESF2 abilityreallevelfield _ConvertAbilityRealLevelField('Esf2') ---- ----ABILITY_RLF_BUILDING_REDUCTION_ESF3 'common.ABILITY_RLF_BUILDING_REDUCTION_ESF3' ----@field ABILITY_RLF_BUILDING_REDUCTION_ESF3 abilityreallevelfield _ConvertAbilityRealLevelField('Esf3') ---- ----ABILITY_RLF_DAMAGE_BONUS_PERCENT 'common.ABILITY_RLF_DAMAGE_BONUS_PERCENT' ----@field ABILITY_RLF_DAMAGE_BONUS_PERCENT abilityreallevelfield _ConvertAbilityRealLevelField('Ear1') ---- ----ABILITY_RLF_DEFENSE_BONUS_HAV1 'common.ABILITY_RLF_DEFENSE_BONUS_HAV1' ----@field ABILITY_RLF_DEFENSE_BONUS_HAV1 abilityreallevelfield _ConvertAbilityRealLevelField('Hav1') ---- ----ABILITY_RLF_HIT_POINT_BONUS 'common.ABILITY_RLF_HIT_POINT_BONUS' ----@field ABILITY_RLF_HIT_POINT_BONUS abilityreallevelfield _ConvertAbilityRealLevelField('Hav2') ---- ----ABILITY_RLF_DAMAGE_BONUS_HAV3 'common.ABILITY_RLF_DAMAGE_BONUS_HAV3' ----@field ABILITY_RLF_DAMAGE_BONUS_HAV3 abilityreallevelfield _ConvertAbilityRealLevelField('Hav3') ---- ----ABILITY_RLF_MAGIC_DAMAGE_REDUCTION_HAV4 'common.ABILITY_RLF_MAGIC_DAMAGE_REDUCTION_HAV4' ----@field ABILITY_RLF_MAGIC_DAMAGE_REDUCTION_HAV4 abilityreallevelfield _ConvertAbilityRealLevelField('Hav4') ---- ----ABILITY_RLF_CHANCE_TO_BASH 'common.ABILITY_RLF_CHANCE_TO_BASH' ----@field ABILITY_RLF_CHANCE_TO_BASH abilityreallevelfield _ConvertAbilityRealLevelField('Hbh1') ---- ----ABILITY_RLF_DAMAGE_MULTIPLIER_HBH2 'common.ABILITY_RLF_DAMAGE_MULTIPLIER_HBH2' ----@field ABILITY_RLF_DAMAGE_MULTIPLIER_HBH2 abilityreallevelfield _ConvertAbilityRealLevelField('Hbh2') ---- ----ABILITY_RLF_DAMAGE_BONUS_HBH3 'common.ABILITY_RLF_DAMAGE_BONUS_HBH3' ----@field ABILITY_RLF_DAMAGE_BONUS_HBH3 abilityreallevelfield _ConvertAbilityRealLevelField('Hbh3') ---- ----ABILITY_RLF_CHANCE_TO_MISS_HBH4 'common.ABILITY_RLF_CHANCE_TO_MISS_HBH4' ----@field ABILITY_RLF_CHANCE_TO_MISS_HBH4 abilityreallevelfield _ConvertAbilityRealLevelField('Hbh4') ---- ----ABILITY_RLF_DAMAGE_HTB1 'common.ABILITY_RLF_DAMAGE_HTB1' ----@field ABILITY_RLF_DAMAGE_HTB1 abilityreallevelfield _ConvertAbilityRealLevelField('Htb1') ---- ----ABILITY_RLF_AOE_DAMAGE 'common.ABILITY_RLF_AOE_DAMAGE' ----@field ABILITY_RLF_AOE_DAMAGE abilityreallevelfield _ConvertAbilityRealLevelField('Htc1') ---- ----ABILITY_RLF_SPECIFIC_TARGET_DAMAGE_HTC2 'common.ABILITY_RLF_SPECIFIC_TARGET_DAMAGE_HTC2' ----@field ABILITY_RLF_SPECIFIC_TARGET_DAMAGE_HTC2 abilityreallevelfield _ConvertAbilityRealLevelField('Htc2') ---- ----ABILITY_RLF_MOVEMENT_SPEED_REDUCTION_PERCENT_HTC3 'common.ABILITY_RLF_MOVEMENT_SPEED_REDUCTION_PERCENT_HTC3' ----@field ABILITY_RLF_MOVEMENT_SPEED_REDUCTION_PERCENT_HTC3 abilityreallevelfield _ConvertAbilityRealLevelField('Htc3') ---- ----ABILITY_RLF_ATTACK_SPEED_REDUCTION_PERCENT_HTC4 'common.ABILITY_RLF_ATTACK_SPEED_REDUCTION_PERCENT_HTC4' ----@field ABILITY_RLF_ATTACK_SPEED_REDUCTION_PERCENT_HTC4 abilityreallevelfield _ConvertAbilityRealLevelField('Htc4') ---- ----ABILITY_RLF_ARMOR_BONUS_HAD1 'common.ABILITY_RLF_ARMOR_BONUS_HAD1' ----@field ABILITY_RLF_ARMOR_BONUS_HAD1 abilityreallevelfield _ConvertAbilityRealLevelField('Had1') ---- ----ABILITY_RLF_AMOUNT_HEALED_DAMAGED_HHB1 'common.ABILITY_RLF_AMOUNT_HEALED_DAMAGED_HHB1' ----@field ABILITY_RLF_AMOUNT_HEALED_DAMAGED_HHB1 abilityreallevelfield _ConvertAbilityRealLevelField('Hhb1') ---- ----ABILITY_RLF_EXTRA_DAMAGE_HCA1 'common.ABILITY_RLF_EXTRA_DAMAGE_HCA1' ----@field ABILITY_RLF_EXTRA_DAMAGE_HCA1 abilityreallevelfield _ConvertAbilityRealLevelField('Hca1') ---- ----ABILITY_RLF_MOVEMENT_SPEED_FACTOR_HCA2 'common.ABILITY_RLF_MOVEMENT_SPEED_FACTOR_HCA2' ----@field ABILITY_RLF_MOVEMENT_SPEED_FACTOR_HCA2 abilityreallevelfield _ConvertAbilityRealLevelField('Hca2') ---- ----ABILITY_RLF_ATTACK_SPEED_FACTOR_HCA3 'common.ABILITY_RLF_ATTACK_SPEED_FACTOR_HCA3' ----@field ABILITY_RLF_ATTACK_SPEED_FACTOR_HCA3 abilityreallevelfield _ConvertAbilityRealLevelField('Hca3') ---- ----ABILITY_RLF_MOVEMENT_SPEED_INCREASE_PERCENT_OAE1 'common.ABILITY_RLF_MOVEMENT_SPEED_INCREASE_PERCENT_OAE1' ----@field ABILITY_RLF_MOVEMENT_SPEED_INCREASE_PERCENT_OAE1 abilityreallevelfield _ConvertAbilityRealLevelField('Oae1') ---- ----ABILITY_RLF_ATTACK_SPEED_INCREASE_PERCENT_OAE2 'common.ABILITY_RLF_ATTACK_SPEED_INCREASE_PERCENT_OAE2' ----@field ABILITY_RLF_ATTACK_SPEED_INCREASE_PERCENT_OAE2 abilityreallevelfield _ConvertAbilityRealLevelField('Oae2') ---- ----ABILITY_RLF_REINCARNATION_DELAY 'common.ABILITY_RLF_REINCARNATION_DELAY' ----@field ABILITY_RLF_REINCARNATION_DELAY abilityreallevelfield _ConvertAbilityRealLevelField('Ore1') ---- ----ABILITY_RLF_DAMAGE_OSH1 'common.ABILITY_RLF_DAMAGE_OSH1' ----@field ABILITY_RLF_DAMAGE_OSH1 abilityreallevelfield _ConvertAbilityRealLevelField('Osh1') ---- ----ABILITY_RLF_MAXIMUM_DAMAGE_OSH2 'common.ABILITY_RLF_MAXIMUM_DAMAGE_OSH2' ----@field ABILITY_RLF_MAXIMUM_DAMAGE_OSH2 abilityreallevelfield _ConvertAbilityRealLevelField('Osh2') ---- ----ABILITY_RLF_DISTANCE_OSH3 'common.ABILITY_RLF_DISTANCE_OSH3' ----@field ABILITY_RLF_DISTANCE_OSH3 abilityreallevelfield _ConvertAbilityRealLevelField('Osh3') ---- ----ABILITY_RLF_FINAL_AREA_OSH4 'common.ABILITY_RLF_FINAL_AREA_OSH4' ----@field ABILITY_RLF_FINAL_AREA_OSH4 abilityreallevelfield _ConvertAbilityRealLevelField('Osh4') ---- ----ABILITY_RLF_GRAPHIC_DELAY_NFD1 'common.ABILITY_RLF_GRAPHIC_DELAY_NFD1' ----@field ABILITY_RLF_GRAPHIC_DELAY_NFD1 abilityreallevelfield _ConvertAbilityRealLevelField('Nfd1') ---- ----ABILITY_RLF_GRAPHIC_DURATION_NFD2 'common.ABILITY_RLF_GRAPHIC_DURATION_NFD2' ----@field ABILITY_RLF_GRAPHIC_DURATION_NFD2 abilityreallevelfield _ConvertAbilityRealLevelField('Nfd2') ---- ----ABILITY_RLF_DAMAGE_NFD3 'common.ABILITY_RLF_DAMAGE_NFD3' ----@field ABILITY_RLF_DAMAGE_NFD3 abilityreallevelfield _ConvertAbilityRealLevelField('Nfd3') ---- ----ABILITY_RLF_SUMMONED_UNIT_DAMAGE_AMS1 'common.ABILITY_RLF_SUMMONED_UNIT_DAMAGE_AMS1' ----@field ABILITY_RLF_SUMMONED_UNIT_DAMAGE_AMS1 abilityreallevelfield _ConvertAbilityRealLevelField('Ams1') ---- ----ABILITY_RLF_MAGIC_DAMAGE_REDUCTION_AMS2 'common.ABILITY_RLF_MAGIC_DAMAGE_REDUCTION_AMS2' ----@field ABILITY_RLF_MAGIC_DAMAGE_REDUCTION_AMS2 abilityreallevelfield _ConvertAbilityRealLevelField('Ams2') ---- ----ABILITY_RLF_AURA_DURATION 'common.ABILITY_RLF_AURA_DURATION' ----@field ABILITY_RLF_AURA_DURATION abilityreallevelfield _ConvertAbilityRealLevelField('Apl1') ---- ----ABILITY_RLF_DAMAGE_PER_SECOND_APL2 'common.ABILITY_RLF_DAMAGE_PER_SECOND_APL2' ----@field ABILITY_RLF_DAMAGE_PER_SECOND_APL2 abilityreallevelfield _ConvertAbilityRealLevelField('Apl2') ---- ----ABILITY_RLF_DURATION_OF_PLAGUE_WARD 'common.ABILITY_RLF_DURATION_OF_PLAGUE_WARD' ----@field ABILITY_RLF_DURATION_OF_PLAGUE_WARD abilityreallevelfield _ConvertAbilityRealLevelField('Apl3') ---- ----ABILITY_RLF_AMOUNT_OF_HIT_POINTS_REGENERATED 'common.ABILITY_RLF_AMOUNT_OF_HIT_POINTS_REGENERATED' ----@field ABILITY_RLF_AMOUNT_OF_HIT_POINTS_REGENERATED abilityreallevelfield _ConvertAbilityRealLevelField('Oar1') ---- ----ABILITY_RLF_ATTACK_DAMAGE_INCREASE_AKB1 'common.ABILITY_RLF_ATTACK_DAMAGE_INCREASE_AKB1' ----@field ABILITY_RLF_ATTACK_DAMAGE_INCREASE_AKB1 abilityreallevelfield _ConvertAbilityRealLevelField('Akb1') ---- ----ABILITY_RLF_MANA_LOSS_ADM1 'common.ABILITY_RLF_MANA_LOSS_ADM1' ----@field ABILITY_RLF_MANA_LOSS_ADM1 abilityreallevelfield _ConvertAbilityRealLevelField('Adm1') ---- ----ABILITY_RLF_SUMMONED_UNIT_DAMAGE_ADM2 'common.ABILITY_RLF_SUMMONED_UNIT_DAMAGE_ADM2' ----@field ABILITY_RLF_SUMMONED_UNIT_DAMAGE_ADM2 abilityreallevelfield _ConvertAbilityRealLevelField('Adm2') ---- ----ABILITY_RLF_EXPANSION_AMOUNT 'common.ABILITY_RLF_EXPANSION_AMOUNT' ----@field ABILITY_RLF_EXPANSION_AMOUNT abilityreallevelfield _ConvertAbilityRealLevelField('Bli1') ---- ----ABILITY_RLF_INTERVAL_DURATION_BGM2 'common.ABILITY_RLF_INTERVAL_DURATION_BGM2' ----@field ABILITY_RLF_INTERVAL_DURATION_BGM2 abilityreallevelfield _ConvertAbilityRealLevelField('Bgm2') ---- ----ABILITY_RLF_RADIUS_OF_MINING_RING 'common.ABILITY_RLF_RADIUS_OF_MINING_RING' ----@field ABILITY_RLF_RADIUS_OF_MINING_RING abilityreallevelfield _ConvertAbilityRealLevelField('Bgm4') ---- ----ABILITY_RLF_ATTACK_SPEED_INCREASE_PERCENT_BLO1 'common.ABILITY_RLF_ATTACK_SPEED_INCREASE_PERCENT_BLO1' ----@field ABILITY_RLF_ATTACK_SPEED_INCREASE_PERCENT_BLO1 abilityreallevelfield _ConvertAbilityRealLevelField('Blo1') ---- ----ABILITY_RLF_MOVEMENT_SPEED_INCREASE_PERCENT_BLO2 'common.ABILITY_RLF_MOVEMENT_SPEED_INCREASE_PERCENT_BLO2' ----@field ABILITY_RLF_MOVEMENT_SPEED_INCREASE_PERCENT_BLO2 abilityreallevelfield _ConvertAbilityRealLevelField('Blo2') ---- ----ABILITY_RLF_SCALING_FACTOR 'common.ABILITY_RLF_SCALING_FACTOR' ----@field ABILITY_RLF_SCALING_FACTOR abilityreallevelfield _ConvertAbilityRealLevelField('Blo3') ---- ----ABILITY_RLF_HIT_POINTS_PER_SECOND_CAN1 'common.ABILITY_RLF_HIT_POINTS_PER_SECOND_CAN1' ----@field ABILITY_RLF_HIT_POINTS_PER_SECOND_CAN1 abilityreallevelfield _ConvertAbilityRealLevelField('Can1') ---- ----ABILITY_RLF_MAX_HIT_POINTS 'common.ABILITY_RLF_MAX_HIT_POINTS' ----@field ABILITY_RLF_MAX_HIT_POINTS abilityreallevelfield _ConvertAbilityRealLevelField('Can2') ---- ----ABILITY_RLF_DAMAGE_PER_SECOND_DEV2 'common.ABILITY_RLF_DAMAGE_PER_SECOND_DEV2' ----@field ABILITY_RLF_DAMAGE_PER_SECOND_DEV2 abilityreallevelfield _ConvertAbilityRealLevelField('Dev2') ---- ----ABILITY_RLF_MOVEMENT_UPDATE_FREQUENCY_CHD1 'common.ABILITY_RLF_MOVEMENT_UPDATE_FREQUENCY_CHD1' ----@field ABILITY_RLF_MOVEMENT_UPDATE_FREQUENCY_CHD1 abilityreallevelfield _ConvertAbilityRealLevelField('Chd1') ---- ----ABILITY_RLF_ATTACK_UPDATE_FREQUENCY_CHD2 'common.ABILITY_RLF_ATTACK_UPDATE_FREQUENCY_CHD2' ----@field ABILITY_RLF_ATTACK_UPDATE_FREQUENCY_CHD2 abilityreallevelfield _ConvertAbilityRealLevelField('Chd2') ---- ----ABILITY_RLF_SUMMONED_UNIT_DAMAGE_CHD3 'common.ABILITY_RLF_SUMMONED_UNIT_DAMAGE_CHD3' ----@field ABILITY_RLF_SUMMONED_UNIT_DAMAGE_CHD3 abilityreallevelfield _ConvertAbilityRealLevelField('Chd3') ---- ----ABILITY_RLF_MOVEMENT_SPEED_REDUCTION_PERCENT_CRI1 'common.ABILITY_RLF_MOVEMENT_SPEED_REDUCTION_PERCENT_CRI1' ----@field ABILITY_RLF_MOVEMENT_SPEED_REDUCTION_PERCENT_CRI1 abilityreallevelfield _ConvertAbilityRealLevelField('Cri1') ---- ----ABILITY_RLF_ATTACK_SPEED_REDUCTION_PERCENT_CRI2 'common.ABILITY_RLF_ATTACK_SPEED_REDUCTION_PERCENT_CRI2' ----@field ABILITY_RLF_ATTACK_SPEED_REDUCTION_PERCENT_CRI2 abilityreallevelfield _ConvertAbilityRealLevelField('Cri2') ---- ----ABILITY_RLF_DAMAGE_REDUCTION_CRI3 'common.ABILITY_RLF_DAMAGE_REDUCTION_CRI3' ----@field ABILITY_RLF_DAMAGE_REDUCTION_CRI3 abilityreallevelfield _ConvertAbilityRealLevelField('Cri3') ---- ----ABILITY_RLF_CHANCE_TO_MISS_CRS 'common.ABILITY_RLF_CHANCE_TO_MISS_CRS' ----@field ABILITY_RLF_CHANCE_TO_MISS_CRS abilityreallevelfield _ConvertAbilityRealLevelField('Crs1') ---- ----ABILITY_RLF_FULL_DAMAGE_RADIUS_DDA1 'common.ABILITY_RLF_FULL_DAMAGE_RADIUS_DDA1' ----@field ABILITY_RLF_FULL_DAMAGE_RADIUS_DDA1 abilityreallevelfield _ConvertAbilityRealLevelField('Dda1') ---- ----ABILITY_RLF_FULL_DAMAGE_AMOUNT_DDA2 'common.ABILITY_RLF_FULL_DAMAGE_AMOUNT_DDA2' ----@field ABILITY_RLF_FULL_DAMAGE_AMOUNT_DDA2 abilityreallevelfield _ConvertAbilityRealLevelField('Dda2') ---- ----ABILITY_RLF_PARTIAL_DAMAGE_RADIUS 'common.ABILITY_RLF_PARTIAL_DAMAGE_RADIUS' ----@field ABILITY_RLF_PARTIAL_DAMAGE_RADIUS abilityreallevelfield _ConvertAbilityRealLevelField('Dda3') ---- ----ABILITY_RLF_PARTIAL_DAMAGE_AMOUNT 'common.ABILITY_RLF_PARTIAL_DAMAGE_AMOUNT' ----@field ABILITY_RLF_PARTIAL_DAMAGE_AMOUNT abilityreallevelfield _ConvertAbilityRealLevelField('Dda4') ---- ----ABILITY_RLF_BUILDING_DAMAGE_FACTOR_SDS1 'common.ABILITY_RLF_BUILDING_DAMAGE_FACTOR_SDS1' ----@field ABILITY_RLF_BUILDING_DAMAGE_FACTOR_SDS1 abilityreallevelfield _ConvertAbilityRealLevelField('Sds1') ---- ----ABILITY_RLF_MAX_DAMAGE_UCO5 'common.ABILITY_RLF_MAX_DAMAGE_UCO5' ----@field ABILITY_RLF_MAX_DAMAGE_UCO5 abilityreallevelfield _ConvertAbilityRealLevelField('Uco5') ---- ----ABILITY_RLF_MOVE_SPEED_BONUS_UCO6 'common.ABILITY_RLF_MOVE_SPEED_BONUS_UCO6' ----@field ABILITY_RLF_MOVE_SPEED_BONUS_UCO6 abilityreallevelfield _ConvertAbilityRealLevelField('Uco6') ---- ----ABILITY_RLF_DAMAGE_TAKEN_PERCENT_DEF1 'common.ABILITY_RLF_DAMAGE_TAKEN_PERCENT_DEF1' ----@field ABILITY_RLF_DAMAGE_TAKEN_PERCENT_DEF1 abilityreallevelfield _ConvertAbilityRealLevelField('Def1') ---- ----ABILITY_RLF_DAMAGE_DEALT_PERCENT_DEF2 'common.ABILITY_RLF_DAMAGE_DEALT_PERCENT_DEF2' ----@field ABILITY_RLF_DAMAGE_DEALT_PERCENT_DEF2 abilityreallevelfield _ConvertAbilityRealLevelField('Def2') ---- ----ABILITY_RLF_MOVEMENT_SPEED_FACTOR_DEF3 'common.ABILITY_RLF_MOVEMENT_SPEED_FACTOR_DEF3' ----@field ABILITY_RLF_MOVEMENT_SPEED_FACTOR_DEF3 abilityreallevelfield _ConvertAbilityRealLevelField('Def3') ---- ----ABILITY_RLF_ATTACK_SPEED_FACTOR_DEF4 'common.ABILITY_RLF_ATTACK_SPEED_FACTOR_DEF4' ----@field ABILITY_RLF_ATTACK_SPEED_FACTOR_DEF4 abilityreallevelfield _ConvertAbilityRealLevelField('Def4') ---- ----ABILITY_RLF_MAGIC_DAMAGE_REDUCTION_DEF5 'common.ABILITY_RLF_MAGIC_DAMAGE_REDUCTION_DEF5' ----@field ABILITY_RLF_MAGIC_DAMAGE_REDUCTION_DEF5 abilityreallevelfield _ConvertAbilityRealLevelField('Def5') ---- ----ABILITY_RLF_CHANCE_TO_DEFLECT 'common.ABILITY_RLF_CHANCE_TO_DEFLECT' ----@field ABILITY_RLF_CHANCE_TO_DEFLECT abilityreallevelfield _ConvertAbilityRealLevelField('Def6') ---- ----ABILITY_RLF_DEFLECT_DAMAGE_TAKEN_PIERCING 'common.ABILITY_RLF_DEFLECT_DAMAGE_TAKEN_PIERCING' ----@field ABILITY_RLF_DEFLECT_DAMAGE_TAKEN_PIERCING abilityreallevelfield _ConvertAbilityRealLevelField('Def7') ---- ----ABILITY_RLF_DEFLECT_DAMAGE_TAKEN_SPELLS 'common.ABILITY_RLF_DEFLECT_DAMAGE_TAKEN_SPELLS' ----@field ABILITY_RLF_DEFLECT_DAMAGE_TAKEN_SPELLS abilityreallevelfield _ConvertAbilityRealLevelField('Def8') ---- ----ABILITY_RLF_RIP_DELAY 'common.ABILITY_RLF_RIP_DELAY' ----@field ABILITY_RLF_RIP_DELAY abilityreallevelfield _ConvertAbilityRealLevelField('Eat1') ---- ----ABILITY_RLF_EAT_DELAY 'common.ABILITY_RLF_EAT_DELAY' ----@field ABILITY_RLF_EAT_DELAY abilityreallevelfield _ConvertAbilityRealLevelField('Eat2') ---- ----ABILITY_RLF_HIT_POINTS_GAINED_EAT3 'common.ABILITY_RLF_HIT_POINTS_GAINED_EAT3' ----@field ABILITY_RLF_HIT_POINTS_GAINED_EAT3 abilityreallevelfield _ConvertAbilityRealLevelField('Eat3') ---- ----ABILITY_RLF_AIR_UNIT_LOWER_DURATION 'common.ABILITY_RLF_AIR_UNIT_LOWER_DURATION' ----@field ABILITY_RLF_AIR_UNIT_LOWER_DURATION abilityreallevelfield _ConvertAbilityRealLevelField('Ens1') ---- ----ABILITY_RLF_AIR_UNIT_HEIGHT 'common.ABILITY_RLF_AIR_UNIT_HEIGHT' ----@field ABILITY_RLF_AIR_UNIT_HEIGHT abilityreallevelfield _ConvertAbilityRealLevelField('Ens2') ---- ----ABILITY_RLF_MELEE_ATTACK_RANGE 'common.ABILITY_RLF_MELEE_ATTACK_RANGE' ----@field ABILITY_RLF_MELEE_ATTACK_RANGE abilityreallevelfield _ConvertAbilityRealLevelField('Ens3') ---- ----ABILITY_RLF_INTERVAL_DURATION_EGM2 'common.ABILITY_RLF_INTERVAL_DURATION_EGM2' ----@field ABILITY_RLF_INTERVAL_DURATION_EGM2 abilityreallevelfield _ConvertAbilityRealLevelField('Egm2') ---- ----ABILITY_RLF_EFFECT_DELAY_FLA2 'common.ABILITY_RLF_EFFECT_DELAY_FLA2' ----@field ABILITY_RLF_EFFECT_DELAY_FLA2 abilityreallevelfield _ConvertAbilityRealLevelField('Fla2') ---- ----ABILITY_RLF_MINING_DURATION 'common.ABILITY_RLF_MINING_DURATION' ----@field ABILITY_RLF_MINING_DURATION abilityreallevelfield _ConvertAbilityRealLevelField('Gld2') ---- ----ABILITY_RLF_RADIUS_OF_GRAVESTONES 'common.ABILITY_RLF_RADIUS_OF_GRAVESTONES' ----@field ABILITY_RLF_RADIUS_OF_GRAVESTONES abilityreallevelfield _ConvertAbilityRealLevelField('Gyd2') ---- ----ABILITY_RLF_RADIUS_OF_CORPSES 'common.ABILITY_RLF_RADIUS_OF_CORPSES' ----@field ABILITY_RLF_RADIUS_OF_CORPSES abilityreallevelfield _ConvertAbilityRealLevelField('Gyd3') ---- ----ABILITY_RLF_HIT_POINTS_GAINED_HEA1 'common.ABILITY_RLF_HIT_POINTS_GAINED_HEA1' ----@field ABILITY_RLF_HIT_POINTS_GAINED_HEA1 abilityreallevelfield _ConvertAbilityRealLevelField('Hea1') ---- ----ABILITY_RLF_DAMAGE_INCREASE_PERCENT_INF1 'common.ABILITY_RLF_DAMAGE_INCREASE_PERCENT_INF1' ----@field ABILITY_RLF_DAMAGE_INCREASE_PERCENT_INF1 abilityreallevelfield _ConvertAbilityRealLevelField('Inf1') ---- ----ABILITY_RLF_AUTOCAST_RANGE 'common.ABILITY_RLF_AUTOCAST_RANGE' ----@field ABILITY_RLF_AUTOCAST_RANGE abilityreallevelfield _ConvertAbilityRealLevelField('Inf3') ---- ----ABILITY_RLF_LIFE_REGEN_RATE 'common.ABILITY_RLF_LIFE_REGEN_RATE' ----@field ABILITY_RLF_LIFE_REGEN_RATE abilityreallevelfield _ConvertAbilityRealLevelField('Inf4') ---- ----ABILITY_RLF_GRAPHIC_DELAY_LIT1 'common.ABILITY_RLF_GRAPHIC_DELAY_LIT1' ----@field ABILITY_RLF_GRAPHIC_DELAY_LIT1 abilityreallevelfield _ConvertAbilityRealLevelField('Lit1') ---- ----ABILITY_RLF_GRAPHIC_DURATION_LIT2 'common.ABILITY_RLF_GRAPHIC_DURATION_LIT2' ----@field ABILITY_RLF_GRAPHIC_DURATION_LIT2 abilityreallevelfield _ConvertAbilityRealLevelField('Lit2') ---- ----ABILITY_RLF_DAMAGE_PER_SECOND_LSH1 'common.ABILITY_RLF_DAMAGE_PER_SECOND_LSH1' ----@field ABILITY_RLF_DAMAGE_PER_SECOND_LSH1 abilityreallevelfield _ConvertAbilityRealLevelField('Lsh1') ---- ----ABILITY_RLF_MANA_GAINED 'common.ABILITY_RLF_MANA_GAINED' ----@field ABILITY_RLF_MANA_GAINED abilityreallevelfield _ConvertAbilityRealLevelField('Mbt1') ---- ----ABILITY_RLF_HIT_POINTS_GAINED_MBT2 'common.ABILITY_RLF_HIT_POINTS_GAINED_MBT2' ----@field ABILITY_RLF_HIT_POINTS_GAINED_MBT2 abilityreallevelfield _ConvertAbilityRealLevelField('Mbt2') ---- ----ABILITY_RLF_AUTOCAST_REQUIREMENT 'common.ABILITY_RLF_AUTOCAST_REQUIREMENT' ----@field ABILITY_RLF_AUTOCAST_REQUIREMENT abilityreallevelfield _ConvertAbilityRealLevelField('Mbt3') ---- ----ABILITY_RLF_WATER_HEIGHT 'common.ABILITY_RLF_WATER_HEIGHT' ----@field ABILITY_RLF_WATER_HEIGHT abilityreallevelfield _ConvertAbilityRealLevelField('Mbt4') ---- ----ABILITY_RLF_ACTIVATION_DELAY_MIN1 'common.ABILITY_RLF_ACTIVATION_DELAY_MIN1' ----@field ABILITY_RLF_ACTIVATION_DELAY_MIN1 abilityreallevelfield _ConvertAbilityRealLevelField('Min1') ---- ----ABILITY_RLF_INVISIBILITY_TRANSITION_TIME 'common.ABILITY_RLF_INVISIBILITY_TRANSITION_TIME' ----@field ABILITY_RLF_INVISIBILITY_TRANSITION_TIME abilityreallevelfield _ConvertAbilityRealLevelField('Min2') ---- ----ABILITY_RLF_ACTIVATION_RADIUS 'common.ABILITY_RLF_ACTIVATION_RADIUS' ----@field ABILITY_RLF_ACTIVATION_RADIUS abilityreallevelfield _ConvertAbilityRealLevelField('Neu1') ---- ----ABILITY_RLF_AMOUNT_REGENERATED 'common.ABILITY_RLF_AMOUNT_REGENERATED' ----@field ABILITY_RLF_AMOUNT_REGENERATED abilityreallevelfield _ConvertAbilityRealLevelField('Arm1') ---- ----ABILITY_RLF_DAMAGE_PER_SECOND_POI1 'common.ABILITY_RLF_DAMAGE_PER_SECOND_POI1' ----@field ABILITY_RLF_DAMAGE_PER_SECOND_POI1 abilityreallevelfield _ConvertAbilityRealLevelField('Poi1') ---- ----ABILITY_RLF_ATTACK_SPEED_FACTOR_POI2 'common.ABILITY_RLF_ATTACK_SPEED_FACTOR_POI2' ----@field ABILITY_RLF_ATTACK_SPEED_FACTOR_POI2 abilityreallevelfield _ConvertAbilityRealLevelField('Poi2') ---- ----ABILITY_RLF_MOVEMENT_SPEED_FACTOR_POI3 'common.ABILITY_RLF_MOVEMENT_SPEED_FACTOR_POI3' ----@field ABILITY_RLF_MOVEMENT_SPEED_FACTOR_POI3 abilityreallevelfield _ConvertAbilityRealLevelField('Poi3') ---- ----ABILITY_RLF_EXTRA_DAMAGE_POA1 'common.ABILITY_RLF_EXTRA_DAMAGE_POA1' ----@field ABILITY_RLF_EXTRA_DAMAGE_POA1 abilityreallevelfield _ConvertAbilityRealLevelField('Poa1') ---- ----ABILITY_RLF_DAMAGE_PER_SECOND_POA2 'common.ABILITY_RLF_DAMAGE_PER_SECOND_POA2' ----@field ABILITY_RLF_DAMAGE_PER_SECOND_POA2 abilityreallevelfield _ConvertAbilityRealLevelField('Poa2') ---- ----ABILITY_RLF_ATTACK_SPEED_FACTOR_POA3 'common.ABILITY_RLF_ATTACK_SPEED_FACTOR_POA3' ----@field ABILITY_RLF_ATTACK_SPEED_FACTOR_POA3 abilityreallevelfield _ConvertAbilityRealLevelField('Poa3') ---- ----ABILITY_RLF_MOVEMENT_SPEED_FACTOR_POA4 'common.ABILITY_RLF_MOVEMENT_SPEED_FACTOR_POA4' ----@field ABILITY_RLF_MOVEMENT_SPEED_FACTOR_POA4 abilityreallevelfield _ConvertAbilityRealLevelField('Poa4') ---- ----ABILITY_RLF_DAMAGE_AMPLIFICATION 'common.ABILITY_RLF_DAMAGE_AMPLIFICATION' ----@field ABILITY_RLF_DAMAGE_AMPLIFICATION abilityreallevelfield _ConvertAbilityRealLevelField('Pos2') ---- ----ABILITY_RLF_CHANCE_TO_STOMP_PERCENT 'common.ABILITY_RLF_CHANCE_TO_STOMP_PERCENT' ----@field ABILITY_RLF_CHANCE_TO_STOMP_PERCENT abilityreallevelfield _ConvertAbilityRealLevelField('War1') ---- ----ABILITY_RLF_DAMAGE_DEALT_WAR2 'common.ABILITY_RLF_DAMAGE_DEALT_WAR2' ----@field ABILITY_RLF_DAMAGE_DEALT_WAR2 abilityreallevelfield _ConvertAbilityRealLevelField('War2') ---- ----ABILITY_RLF_FULL_DAMAGE_RADIUS_WAR3 'common.ABILITY_RLF_FULL_DAMAGE_RADIUS_WAR3' ----@field ABILITY_RLF_FULL_DAMAGE_RADIUS_WAR3 abilityreallevelfield _ConvertAbilityRealLevelField('War3') ---- ----ABILITY_RLF_HALF_DAMAGE_RADIUS_WAR4 'common.ABILITY_RLF_HALF_DAMAGE_RADIUS_WAR4' ----@field ABILITY_RLF_HALF_DAMAGE_RADIUS_WAR4 abilityreallevelfield _ConvertAbilityRealLevelField('War4') ---- ----ABILITY_RLF_SUMMONED_UNIT_DAMAGE_PRG3 'common.ABILITY_RLF_SUMMONED_UNIT_DAMAGE_PRG3' ----@field ABILITY_RLF_SUMMONED_UNIT_DAMAGE_PRG3 abilityreallevelfield _ConvertAbilityRealLevelField('Prg3') ---- ----ABILITY_RLF_UNIT_PAUSE_DURATION 'common.ABILITY_RLF_UNIT_PAUSE_DURATION' ----@field ABILITY_RLF_UNIT_PAUSE_DURATION abilityreallevelfield _ConvertAbilityRealLevelField('Prg4') ---- ----ABILITY_RLF_HERO_PAUSE_DURATION 'common.ABILITY_RLF_HERO_PAUSE_DURATION' ----@field ABILITY_RLF_HERO_PAUSE_DURATION abilityreallevelfield _ConvertAbilityRealLevelField('Prg5') ---- ----ABILITY_RLF_HIT_POINTS_GAINED_REJ1 'common.ABILITY_RLF_HIT_POINTS_GAINED_REJ1' ----@field ABILITY_RLF_HIT_POINTS_GAINED_REJ1 abilityreallevelfield _ConvertAbilityRealLevelField('Rej1') ---- ----ABILITY_RLF_MANA_POINTS_GAINED_REJ2 'common.ABILITY_RLF_MANA_POINTS_GAINED_REJ2' ----@field ABILITY_RLF_MANA_POINTS_GAINED_REJ2 abilityreallevelfield _ConvertAbilityRealLevelField('Rej2') ---- ----ABILITY_RLF_MINIMUM_LIFE_REQUIRED 'common.ABILITY_RLF_MINIMUM_LIFE_REQUIRED' ----@field ABILITY_RLF_MINIMUM_LIFE_REQUIRED abilityreallevelfield _ConvertAbilityRealLevelField('Rpb3') ---- ----ABILITY_RLF_MINIMUM_MANA_REQUIRED 'common.ABILITY_RLF_MINIMUM_MANA_REQUIRED' ----@field ABILITY_RLF_MINIMUM_MANA_REQUIRED abilityreallevelfield _ConvertAbilityRealLevelField('Rpb4') ---- ----ABILITY_RLF_REPAIR_COST_RATIO 'common.ABILITY_RLF_REPAIR_COST_RATIO' ----@field ABILITY_RLF_REPAIR_COST_RATIO abilityreallevelfield _ConvertAbilityRealLevelField('Rep1') ---- ----ABILITY_RLF_REPAIR_TIME_RATIO 'common.ABILITY_RLF_REPAIR_TIME_RATIO' ----@field ABILITY_RLF_REPAIR_TIME_RATIO abilityreallevelfield _ConvertAbilityRealLevelField('Rep2') ---- ----ABILITY_RLF_POWERBUILD_COST 'common.ABILITY_RLF_POWERBUILD_COST' ----@field ABILITY_RLF_POWERBUILD_COST abilityreallevelfield _ConvertAbilityRealLevelField('Rep3') ---- ----ABILITY_RLF_POWERBUILD_RATE 'common.ABILITY_RLF_POWERBUILD_RATE' ----@field ABILITY_RLF_POWERBUILD_RATE abilityreallevelfield _ConvertAbilityRealLevelField('Rep4') ---- ----ABILITY_RLF_NAVAL_RANGE_BONUS 'common.ABILITY_RLF_NAVAL_RANGE_BONUS' ----@field ABILITY_RLF_NAVAL_RANGE_BONUS abilityreallevelfield _ConvertAbilityRealLevelField('Rep5') ---- ----ABILITY_RLF_DAMAGE_INCREASE_PERCENT_ROA1 'common.ABILITY_RLF_DAMAGE_INCREASE_PERCENT_ROA1' ----@field ABILITY_RLF_DAMAGE_INCREASE_PERCENT_ROA1 abilityreallevelfield _ConvertAbilityRealLevelField('Roa1') ---- ----ABILITY_RLF_LIFE_REGENERATION_RATE 'common.ABILITY_RLF_LIFE_REGENERATION_RATE' ----@field ABILITY_RLF_LIFE_REGENERATION_RATE abilityreallevelfield _ConvertAbilityRealLevelField('Roa3') ---- ----ABILITY_RLF_MANA_REGEN 'common.ABILITY_RLF_MANA_REGEN' ----@field ABILITY_RLF_MANA_REGEN abilityreallevelfield _ConvertAbilityRealLevelField('Roa4') ---- ----ABILITY_RLF_DAMAGE_INCREASE 'common.ABILITY_RLF_DAMAGE_INCREASE' ----@field ABILITY_RLF_DAMAGE_INCREASE abilityreallevelfield _ConvertAbilityRealLevelField('Nbr1') ---- ----ABILITY_RLF_SALVAGE_COST_RATIO 'common.ABILITY_RLF_SALVAGE_COST_RATIO' ----@field ABILITY_RLF_SALVAGE_COST_RATIO abilityreallevelfield _ConvertAbilityRealLevelField('Sal1') ---- ----ABILITY_RLF_IN_FLIGHT_SIGHT_RADIUS 'common.ABILITY_RLF_IN_FLIGHT_SIGHT_RADIUS' ----@field ABILITY_RLF_IN_FLIGHT_SIGHT_RADIUS abilityreallevelfield _ConvertAbilityRealLevelField('Esn1') ---- ----ABILITY_RLF_HOVERING_SIGHT_RADIUS 'common.ABILITY_RLF_HOVERING_SIGHT_RADIUS' ----@field ABILITY_RLF_HOVERING_SIGHT_RADIUS abilityreallevelfield _ConvertAbilityRealLevelField('Esn2') ---- ----ABILITY_RLF_HOVERING_HEIGHT 'common.ABILITY_RLF_HOVERING_HEIGHT' ----@field ABILITY_RLF_HOVERING_HEIGHT abilityreallevelfield _ConvertAbilityRealLevelField('Esn3') ---- ----ABILITY_RLF_DURATION_OF_OWLS 'common.ABILITY_RLF_DURATION_OF_OWLS' ----@field ABILITY_RLF_DURATION_OF_OWLS abilityreallevelfield _ConvertAbilityRealLevelField('Esn5') ---- ----ABILITY_RLF_FADE_DURATION 'common.ABILITY_RLF_FADE_DURATION' ----@field ABILITY_RLF_FADE_DURATION abilityreallevelfield _ConvertAbilityRealLevelField('Shm1') ---- ----ABILITY_RLF_DAY_NIGHT_DURATION 'common.ABILITY_RLF_DAY_NIGHT_DURATION' ----@field ABILITY_RLF_DAY_NIGHT_DURATION abilityreallevelfield _ConvertAbilityRealLevelField('Shm2') ---- ----ABILITY_RLF_ACTION_DURATION 'common.ABILITY_RLF_ACTION_DURATION' ----@field ABILITY_RLF_ACTION_DURATION abilityreallevelfield _ConvertAbilityRealLevelField('Shm3') ---- ----ABILITY_RLF_MOVEMENT_SPEED_FACTOR_SLO1 'common.ABILITY_RLF_MOVEMENT_SPEED_FACTOR_SLO1' ----@field ABILITY_RLF_MOVEMENT_SPEED_FACTOR_SLO1 abilityreallevelfield _ConvertAbilityRealLevelField('Slo1') ---- ----ABILITY_RLF_ATTACK_SPEED_FACTOR_SLO2 'common.ABILITY_RLF_ATTACK_SPEED_FACTOR_SLO2' ----@field ABILITY_RLF_ATTACK_SPEED_FACTOR_SLO2 abilityreallevelfield _ConvertAbilityRealLevelField('Slo2') ---- ----ABILITY_RLF_DAMAGE_PER_SECOND_SPO1 'common.ABILITY_RLF_DAMAGE_PER_SECOND_SPO1' ----@field ABILITY_RLF_DAMAGE_PER_SECOND_SPO1 abilityreallevelfield _ConvertAbilityRealLevelField('Spo1') ---- ----ABILITY_RLF_MOVEMENT_SPEED_FACTOR_SPO2 'common.ABILITY_RLF_MOVEMENT_SPEED_FACTOR_SPO2' ----@field ABILITY_RLF_MOVEMENT_SPEED_FACTOR_SPO2 abilityreallevelfield _ConvertAbilityRealLevelField('Spo2') ---- ----ABILITY_RLF_ATTACK_SPEED_FACTOR_SPO3 'common.ABILITY_RLF_ATTACK_SPEED_FACTOR_SPO3' ----@field ABILITY_RLF_ATTACK_SPEED_FACTOR_SPO3 abilityreallevelfield _ConvertAbilityRealLevelField('Spo3') ---- ----ABILITY_RLF_ACTIVATION_DELAY_STA1 'common.ABILITY_RLF_ACTIVATION_DELAY_STA1' ----@field ABILITY_RLF_ACTIVATION_DELAY_STA1 abilityreallevelfield _ConvertAbilityRealLevelField('Sta1') ---- ----ABILITY_RLF_DETECTION_RADIUS_STA2 'common.ABILITY_RLF_DETECTION_RADIUS_STA2' ----@field ABILITY_RLF_DETECTION_RADIUS_STA2 abilityreallevelfield _ConvertAbilityRealLevelField('Sta2') ---- ----ABILITY_RLF_DETONATION_RADIUS 'common.ABILITY_RLF_DETONATION_RADIUS' ----@field ABILITY_RLF_DETONATION_RADIUS abilityreallevelfield _ConvertAbilityRealLevelField('Sta3') ---- ----ABILITY_RLF_STUN_DURATION_STA4 'common.ABILITY_RLF_STUN_DURATION_STA4' ----@field ABILITY_RLF_STUN_DURATION_STA4 abilityreallevelfield _ConvertAbilityRealLevelField('Sta4') ---- ----ABILITY_RLF_ATTACK_SPEED_BONUS_PERCENT 'common.ABILITY_RLF_ATTACK_SPEED_BONUS_PERCENT' ----@field ABILITY_RLF_ATTACK_SPEED_BONUS_PERCENT abilityreallevelfield _ConvertAbilityRealLevelField('Uhf1') ---- ----ABILITY_RLF_DAMAGE_PER_SECOND_UHF2 'common.ABILITY_RLF_DAMAGE_PER_SECOND_UHF2' ----@field ABILITY_RLF_DAMAGE_PER_SECOND_UHF2 abilityreallevelfield _ConvertAbilityRealLevelField('Uhf2') ---- ----ABILITY_RLF_LUMBER_PER_INTERVAL 'common.ABILITY_RLF_LUMBER_PER_INTERVAL' ----@field ABILITY_RLF_LUMBER_PER_INTERVAL abilityreallevelfield _ConvertAbilityRealLevelField('Wha1') ---- ----ABILITY_RLF_ART_ATTACHMENT_HEIGHT 'common.ABILITY_RLF_ART_ATTACHMENT_HEIGHT' ----@field ABILITY_RLF_ART_ATTACHMENT_HEIGHT abilityreallevelfield _ConvertAbilityRealLevelField('Wha3') ---- ----ABILITY_RLF_TELEPORT_AREA_WIDTH 'common.ABILITY_RLF_TELEPORT_AREA_WIDTH' ----@field ABILITY_RLF_TELEPORT_AREA_WIDTH abilityreallevelfield _ConvertAbilityRealLevelField('Wrp1') ---- ----ABILITY_RLF_TELEPORT_AREA_HEIGHT 'common.ABILITY_RLF_TELEPORT_AREA_HEIGHT' ----@field ABILITY_RLF_TELEPORT_AREA_HEIGHT abilityreallevelfield _ConvertAbilityRealLevelField('Wrp2') ---- ----ABILITY_RLF_LIFE_STOLEN_PER_ATTACK 'common.ABILITY_RLF_LIFE_STOLEN_PER_ATTACK' ----@field ABILITY_RLF_LIFE_STOLEN_PER_ATTACK abilityreallevelfield _ConvertAbilityRealLevelField('Ivam') ---- ----ABILITY_RLF_DAMAGE_BONUS_IDAM 'common.ABILITY_RLF_DAMAGE_BONUS_IDAM' ----@field ABILITY_RLF_DAMAGE_BONUS_IDAM abilityreallevelfield _ConvertAbilityRealLevelField('Idam') ---- ----ABILITY_RLF_CHANCE_TO_HIT_UNITS_PERCENT 'common.ABILITY_RLF_CHANCE_TO_HIT_UNITS_PERCENT' ----@field ABILITY_RLF_CHANCE_TO_HIT_UNITS_PERCENT abilityreallevelfield _ConvertAbilityRealLevelField('Iob2') ---- ----ABILITY_RLF_CHANCE_TO_HIT_HEROS_PERCENT 'common.ABILITY_RLF_CHANCE_TO_HIT_HEROS_PERCENT' ----@field ABILITY_RLF_CHANCE_TO_HIT_HEROS_PERCENT abilityreallevelfield _ConvertAbilityRealLevelField('Iob3') ---- ----ABILITY_RLF_CHANCE_TO_HIT_SUMMONS_PERCENT 'common.ABILITY_RLF_CHANCE_TO_HIT_SUMMONS_PERCENT' ----@field ABILITY_RLF_CHANCE_TO_HIT_SUMMONS_PERCENT abilityreallevelfield _ConvertAbilityRealLevelField('Iob4') ---- ----ABILITY_RLF_DELAY_FOR_TARGET_EFFECT 'common.ABILITY_RLF_DELAY_FOR_TARGET_EFFECT' ----@field ABILITY_RLF_DELAY_FOR_TARGET_EFFECT abilityreallevelfield _ConvertAbilityRealLevelField('Idel') ---- ----ABILITY_RLF_DAMAGE_DEALT_PERCENT_OF_NORMAL 'common.ABILITY_RLF_DAMAGE_DEALT_PERCENT_OF_NORMAL' ----@field ABILITY_RLF_DAMAGE_DEALT_PERCENT_OF_NORMAL abilityreallevelfield _ConvertAbilityRealLevelField('Iild') ---- ----ABILITY_RLF_DAMAGE_RECEIVED_MULTIPLIER 'common.ABILITY_RLF_DAMAGE_RECEIVED_MULTIPLIER' ----@field ABILITY_RLF_DAMAGE_RECEIVED_MULTIPLIER abilityreallevelfield _ConvertAbilityRealLevelField('Iilw') ---- ----ABILITY_RLF_MANA_REGENERATION_BONUS_AS_FRACTION_OF_NORMAL 'common.ABILITY_RLF_MANA_REGENERATION_BONUS_AS_FRACTION_OF_NORMAL' ----@field ABILITY_RLF_MANA_REGENERATION_BONUS_AS_FRACTION_OF_NORMAL abilityreallevelfield _ConvertAbilityRealLevelField('Imrp') ---- ----ABILITY_RLF_MOVEMENT_SPEED_INCREASE_ISPI 'common.ABILITY_RLF_MOVEMENT_SPEED_INCREASE_ISPI' ----@field ABILITY_RLF_MOVEMENT_SPEED_INCREASE_ISPI abilityreallevelfield _ConvertAbilityRealLevelField('Ispi') ---- ----ABILITY_RLF_DAMAGE_PER_SECOND_IDPS 'common.ABILITY_RLF_DAMAGE_PER_SECOND_IDPS' ----@field ABILITY_RLF_DAMAGE_PER_SECOND_IDPS abilityreallevelfield _ConvertAbilityRealLevelField('Idps') ---- ----ABILITY_RLF_ATTACK_DAMAGE_INCREASE_CAC1 'common.ABILITY_RLF_ATTACK_DAMAGE_INCREASE_CAC1' ----@field ABILITY_RLF_ATTACK_DAMAGE_INCREASE_CAC1 abilityreallevelfield _ConvertAbilityRealLevelField('Cac1') ---- ----ABILITY_RLF_DAMAGE_PER_SECOND_COR1 'common.ABILITY_RLF_DAMAGE_PER_SECOND_COR1' ----@field ABILITY_RLF_DAMAGE_PER_SECOND_COR1 abilityreallevelfield _ConvertAbilityRealLevelField('Cor1') ---- ----ABILITY_RLF_ATTACK_SPEED_INCREASE_ISX1 'common.ABILITY_RLF_ATTACK_SPEED_INCREASE_ISX1' ----@field ABILITY_RLF_ATTACK_SPEED_INCREASE_ISX1 abilityreallevelfield _ConvertAbilityRealLevelField('Isx1') ---- ----ABILITY_RLF_DAMAGE_WRS1 'common.ABILITY_RLF_DAMAGE_WRS1' ----@field ABILITY_RLF_DAMAGE_WRS1 abilityreallevelfield _ConvertAbilityRealLevelField('Wrs1') ---- ----ABILITY_RLF_TERRAIN_DEFORMATION_AMPLITUDE 'common.ABILITY_RLF_TERRAIN_DEFORMATION_AMPLITUDE' ----@field ABILITY_RLF_TERRAIN_DEFORMATION_AMPLITUDE abilityreallevelfield _ConvertAbilityRealLevelField('Wrs2') ---- ----ABILITY_RLF_DAMAGE_CTC1 'common.ABILITY_RLF_DAMAGE_CTC1' ----@field ABILITY_RLF_DAMAGE_CTC1 abilityreallevelfield _ConvertAbilityRealLevelField('Ctc1') ---- ----ABILITY_RLF_EXTRA_DAMAGE_TO_TARGET 'common.ABILITY_RLF_EXTRA_DAMAGE_TO_TARGET' ----@field ABILITY_RLF_EXTRA_DAMAGE_TO_TARGET abilityreallevelfield _ConvertAbilityRealLevelField('Ctc2') ---- ----ABILITY_RLF_MOVEMENT_SPEED_REDUCTION_CTC3 'common.ABILITY_RLF_MOVEMENT_SPEED_REDUCTION_CTC3' ----@field ABILITY_RLF_MOVEMENT_SPEED_REDUCTION_CTC3 abilityreallevelfield _ConvertAbilityRealLevelField('Ctc3') ---- ----ABILITY_RLF_ATTACK_SPEED_REDUCTION_CTC4 'common.ABILITY_RLF_ATTACK_SPEED_REDUCTION_CTC4' ----@field ABILITY_RLF_ATTACK_SPEED_REDUCTION_CTC4 abilityreallevelfield _ConvertAbilityRealLevelField('Ctc4') ---- ----ABILITY_RLF_DAMAGE_CTB1 'common.ABILITY_RLF_DAMAGE_CTB1' ----@field ABILITY_RLF_DAMAGE_CTB1 abilityreallevelfield _ConvertAbilityRealLevelField('Ctb1') ---- ----ABILITY_RLF_CASTING_DELAY_SECONDS 'common.ABILITY_RLF_CASTING_DELAY_SECONDS' ----@field ABILITY_RLF_CASTING_DELAY_SECONDS abilityreallevelfield _ConvertAbilityRealLevelField('Uds2') ---- ----ABILITY_RLF_MANA_LOSS_PER_UNIT_DTN1 'common.ABILITY_RLF_MANA_LOSS_PER_UNIT_DTN1' ----@field ABILITY_RLF_MANA_LOSS_PER_UNIT_DTN1 abilityreallevelfield _ConvertAbilityRealLevelField('Dtn1') ---- ----ABILITY_RLF_DAMAGE_TO_SUMMONED_UNITS_DTN2 'common.ABILITY_RLF_DAMAGE_TO_SUMMONED_UNITS_DTN2' ----@field ABILITY_RLF_DAMAGE_TO_SUMMONED_UNITS_DTN2 abilityreallevelfield _ConvertAbilityRealLevelField('Dtn2') ---- ----ABILITY_RLF_TRANSITION_TIME_SECONDS 'common.ABILITY_RLF_TRANSITION_TIME_SECONDS' ----@field ABILITY_RLF_TRANSITION_TIME_SECONDS abilityreallevelfield _ConvertAbilityRealLevelField('Ivs1') ---- ----ABILITY_RLF_MANA_DRAINED_PER_SECOND_NMR1 'common.ABILITY_RLF_MANA_DRAINED_PER_SECOND_NMR1' ----@field ABILITY_RLF_MANA_DRAINED_PER_SECOND_NMR1 abilityreallevelfield _ConvertAbilityRealLevelField('Nmr1') ---- ----ABILITY_RLF_CHANCE_TO_REDUCE_DAMAGE_PERCENT 'common.ABILITY_RLF_CHANCE_TO_REDUCE_DAMAGE_PERCENT' ----@field ABILITY_RLF_CHANCE_TO_REDUCE_DAMAGE_PERCENT abilityreallevelfield _ConvertAbilityRealLevelField('Ssk1') ---- ----ABILITY_RLF_MINIMUM_DAMAGE 'common.ABILITY_RLF_MINIMUM_DAMAGE' ----@field ABILITY_RLF_MINIMUM_DAMAGE abilityreallevelfield _ConvertAbilityRealLevelField('Ssk2') ---- ----ABILITY_RLF_IGNORED_DAMAGE 'common.ABILITY_RLF_IGNORED_DAMAGE' ----@field ABILITY_RLF_IGNORED_DAMAGE abilityreallevelfield _ConvertAbilityRealLevelField('Ssk3') ---- ----ABILITY_RLF_FULL_DAMAGE_DEALT 'common.ABILITY_RLF_FULL_DAMAGE_DEALT' ----@field ABILITY_RLF_FULL_DAMAGE_DEALT abilityreallevelfield _ConvertAbilityRealLevelField('Hfs1') ---- ----ABILITY_RLF_FULL_DAMAGE_INTERVAL 'common.ABILITY_RLF_FULL_DAMAGE_INTERVAL' ----@field ABILITY_RLF_FULL_DAMAGE_INTERVAL abilityreallevelfield _ConvertAbilityRealLevelField('Hfs2') ---- ----ABILITY_RLF_HALF_DAMAGE_DEALT 'common.ABILITY_RLF_HALF_DAMAGE_DEALT' ----@field ABILITY_RLF_HALF_DAMAGE_DEALT abilityreallevelfield _ConvertAbilityRealLevelField('Hfs3') ---- ----ABILITY_RLF_HALF_DAMAGE_INTERVAL 'common.ABILITY_RLF_HALF_DAMAGE_INTERVAL' ----@field ABILITY_RLF_HALF_DAMAGE_INTERVAL abilityreallevelfield _ConvertAbilityRealLevelField('Hfs4') ---- ----ABILITY_RLF_BUILDING_REDUCTION_HFS5 'common.ABILITY_RLF_BUILDING_REDUCTION_HFS5' ----@field ABILITY_RLF_BUILDING_REDUCTION_HFS5 abilityreallevelfield _ConvertAbilityRealLevelField('Hfs5') ---- ----ABILITY_RLF_MAXIMUM_DAMAGE_HFS6 'common.ABILITY_RLF_MAXIMUM_DAMAGE_HFS6' ----@field ABILITY_RLF_MAXIMUM_DAMAGE_HFS6 abilityreallevelfield _ConvertAbilityRealLevelField('Hfs6') ---- ----ABILITY_RLF_MANA_PER_HIT_POINT 'common.ABILITY_RLF_MANA_PER_HIT_POINT' ----@field ABILITY_RLF_MANA_PER_HIT_POINT abilityreallevelfield _ConvertAbilityRealLevelField('Nms1') ---- ----ABILITY_RLF_DAMAGE_ABSORBED_PERCENT 'common.ABILITY_RLF_DAMAGE_ABSORBED_PERCENT' ----@field ABILITY_RLF_DAMAGE_ABSORBED_PERCENT abilityreallevelfield _ConvertAbilityRealLevelField('Nms2') ---- ----ABILITY_RLF_WAVE_DISTANCE 'common.ABILITY_RLF_WAVE_DISTANCE' ----@field ABILITY_RLF_WAVE_DISTANCE abilityreallevelfield _ConvertAbilityRealLevelField('Uim1') ---- ----ABILITY_RLF_WAVE_TIME_SECONDS 'common.ABILITY_RLF_WAVE_TIME_SECONDS' ----@field ABILITY_RLF_WAVE_TIME_SECONDS abilityreallevelfield _ConvertAbilityRealLevelField('Uim2') ---- ----ABILITY_RLF_DAMAGE_DEALT_UIM3 'common.ABILITY_RLF_DAMAGE_DEALT_UIM3' ----@field ABILITY_RLF_DAMAGE_DEALT_UIM3 abilityreallevelfield _ConvertAbilityRealLevelField('Uim3') ---- ----ABILITY_RLF_AIR_TIME_SECONDS_UIM4 'common.ABILITY_RLF_AIR_TIME_SECONDS_UIM4' ----@field ABILITY_RLF_AIR_TIME_SECONDS_UIM4 abilityreallevelfield _ConvertAbilityRealLevelField('Uim4') ---- ----ABILITY_RLF_UNIT_RELEASE_INTERVAL_SECONDS 'common.ABILITY_RLF_UNIT_RELEASE_INTERVAL_SECONDS' ----@field ABILITY_RLF_UNIT_RELEASE_INTERVAL_SECONDS abilityreallevelfield _ConvertAbilityRealLevelField('Uls2') ---- ----ABILITY_RLF_DAMAGE_RETURN_FACTOR 'common.ABILITY_RLF_DAMAGE_RETURN_FACTOR' ----@field ABILITY_RLF_DAMAGE_RETURN_FACTOR abilityreallevelfield _ConvertAbilityRealLevelField('Uls4') ---- ----ABILITY_RLF_DAMAGE_RETURN_THRESHOLD 'common.ABILITY_RLF_DAMAGE_RETURN_THRESHOLD' ----@field ABILITY_RLF_DAMAGE_RETURN_THRESHOLD abilityreallevelfield _ConvertAbilityRealLevelField('Uls5') ---- ----ABILITY_RLF_RETURNED_DAMAGE_FACTOR 'common.ABILITY_RLF_RETURNED_DAMAGE_FACTOR' ----@field ABILITY_RLF_RETURNED_DAMAGE_FACTOR abilityreallevelfield _ConvertAbilityRealLevelField('Uts1') ---- ----ABILITY_RLF_RECEIVED_DAMAGE_FACTOR 'common.ABILITY_RLF_RECEIVED_DAMAGE_FACTOR' ----@field ABILITY_RLF_RECEIVED_DAMAGE_FACTOR abilityreallevelfield _ConvertAbilityRealLevelField('Uts2') ---- ----ABILITY_RLF_DEFENSE_BONUS_UTS3 'common.ABILITY_RLF_DEFENSE_BONUS_UTS3' ----@field ABILITY_RLF_DEFENSE_BONUS_UTS3 abilityreallevelfield _ConvertAbilityRealLevelField('Uts3') ---- ----ABILITY_RLF_DAMAGE_BONUS_NBA1 'common.ABILITY_RLF_DAMAGE_BONUS_NBA1' ----@field ABILITY_RLF_DAMAGE_BONUS_NBA1 abilityreallevelfield _ConvertAbilityRealLevelField('Nba1') ---- ----ABILITY_RLF_SUMMONED_UNIT_DURATION_SECONDS_NBA3 'common.ABILITY_RLF_SUMMONED_UNIT_DURATION_SECONDS_NBA3' ----@field ABILITY_RLF_SUMMONED_UNIT_DURATION_SECONDS_NBA3 abilityreallevelfield _ConvertAbilityRealLevelField('Nba3') ---- ----ABILITY_RLF_MANA_PER_SUMMONED_HITPOINT 'common.ABILITY_RLF_MANA_PER_SUMMONED_HITPOINT' ----@field ABILITY_RLF_MANA_PER_SUMMONED_HITPOINT abilityreallevelfield _ConvertAbilityRealLevelField('Cmg2') ---- ----ABILITY_RLF_CHARGE_FOR_CURRENT_LIFE 'common.ABILITY_RLF_CHARGE_FOR_CURRENT_LIFE' ----@field ABILITY_RLF_CHARGE_FOR_CURRENT_LIFE abilityreallevelfield _ConvertAbilityRealLevelField('Cmg3') ---- ----ABILITY_RLF_HIT_POINTS_DRAINED 'common.ABILITY_RLF_HIT_POINTS_DRAINED' ----@field ABILITY_RLF_HIT_POINTS_DRAINED abilityreallevelfield _ConvertAbilityRealLevelField('Ndr1') ---- ----ABILITY_RLF_MANA_POINTS_DRAINED 'common.ABILITY_RLF_MANA_POINTS_DRAINED' ----@field ABILITY_RLF_MANA_POINTS_DRAINED abilityreallevelfield _ConvertAbilityRealLevelField('Ndr2') ---- ----ABILITY_RLF_DRAIN_INTERVAL_SECONDS 'common.ABILITY_RLF_DRAIN_INTERVAL_SECONDS' ----@field ABILITY_RLF_DRAIN_INTERVAL_SECONDS abilityreallevelfield _ConvertAbilityRealLevelField('Ndr3') ---- ----ABILITY_RLF_LIFE_TRANSFERRED_PER_SECOND 'common.ABILITY_RLF_LIFE_TRANSFERRED_PER_SECOND' ----@field ABILITY_RLF_LIFE_TRANSFERRED_PER_SECOND abilityreallevelfield _ConvertAbilityRealLevelField('Ndr4') ---- ----ABILITY_RLF_MANA_TRANSFERRED_PER_SECOND 'common.ABILITY_RLF_MANA_TRANSFERRED_PER_SECOND' ----@field ABILITY_RLF_MANA_TRANSFERRED_PER_SECOND abilityreallevelfield _ConvertAbilityRealLevelField('Ndr5') ---- ----ABILITY_RLF_BONUS_LIFE_FACTOR 'common.ABILITY_RLF_BONUS_LIFE_FACTOR' ----@field ABILITY_RLF_BONUS_LIFE_FACTOR abilityreallevelfield _ConvertAbilityRealLevelField('Ndr6') ---- ----ABILITY_RLF_BONUS_LIFE_DECAY 'common.ABILITY_RLF_BONUS_LIFE_DECAY' ----@field ABILITY_RLF_BONUS_LIFE_DECAY abilityreallevelfield _ConvertAbilityRealLevelField('Ndr7') ---- ----ABILITY_RLF_BONUS_MANA_FACTOR 'common.ABILITY_RLF_BONUS_MANA_FACTOR' ----@field ABILITY_RLF_BONUS_MANA_FACTOR abilityreallevelfield _ConvertAbilityRealLevelField('Ndr8') ---- ----ABILITY_RLF_BONUS_MANA_DECAY 'common.ABILITY_RLF_BONUS_MANA_DECAY' ----@field ABILITY_RLF_BONUS_MANA_DECAY abilityreallevelfield _ConvertAbilityRealLevelField('Ndr9') ---- ----ABILITY_RLF_CHANCE_TO_MISS_PERCENT 'common.ABILITY_RLF_CHANCE_TO_MISS_PERCENT' ----@field ABILITY_RLF_CHANCE_TO_MISS_PERCENT abilityreallevelfield _ConvertAbilityRealLevelField('Nsi2') ---- ----ABILITY_RLF_MOVEMENT_SPEED_MODIFIER 'common.ABILITY_RLF_MOVEMENT_SPEED_MODIFIER' ----@field ABILITY_RLF_MOVEMENT_SPEED_MODIFIER abilityreallevelfield _ConvertAbilityRealLevelField('Nsi3') ---- ----ABILITY_RLF_ATTACK_SPEED_MODIFIER 'common.ABILITY_RLF_ATTACK_SPEED_MODIFIER' ----@field ABILITY_RLF_ATTACK_SPEED_MODIFIER abilityreallevelfield _ConvertAbilityRealLevelField('Nsi4') ---- ----ABILITY_RLF_DAMAGE_PER_SECOND_TDG1 'common.ABILITY_RLF_DAMAGE_PER_SECOND_TDG1' ----@field ABILITY_RLF_DAMAGE_PER_SECOND_TDG1 abilityreallevelfield _ConvertAbilityRealLevelField('Tdg1') ---- ----ABILITY_RLF_MEDIUM_DAMAGE_RADIUS_TDG2 'common.ABILITY_RLF_MEDIUM_DAMAGE_RADIUS_TDG2' ----@field ABILITY_RLF_MEDIUM_DAMAGE_RADIUS_TDG2 abilityreallevelfield _ConvertAbilityRealLevelField('Tdg2') ---- ----ABILITY_RLF_MEDIUM_DAMAGE_PER_SECOND 'common.ABILITY_RLF_MEDIUM_DAMAGE_PER_SECOND' ----@field ABILITY_RLF_MEDIUM_DAMAGE_PER_SECOND abilityreallevelfield _ConvertAbilityRealLevelField('Tdg3') ---- ----ABILITY_RLF_SMALL_DAMAGE_RADIUS_TDG4 'common.ABILITY_RLF_SMALL_DAMAGE_RADIUS_TDG4' ----@field ABILITY_RLF_SMALL_DAMAGE_RADIUS_TDG4 abilityreallevelfield _ConvertAbilityRealLevelField('Tdg4') ---- ----ABILITY_RLF_SMALL_DAMAGE_PER_SECOND 'common.ABILITY_RLF_SMALL_DAMAGE_PER_SECOND' ----@field ABILITY_RLF_SMALL_DAMAGE_PER_SECOND abilityreallevelfield _ConvertAbilityRealLevelField('Tdg5') ---- ----ABILITY_RLF_AIR_TIME_SECONDS_TSP1 'common.ABILITY_RLF_AIR_TIME_SECONDS_TSP1' ----@field ABILITY_RLF_AIR_TIME_SECONDS_TSP1 abilityreallevelfield _ConvertAbilityRealLevelField('Tsp1') ---- ----ABILITY_RLF_MINIMUM_HIT_INTERVAL_SECONDS 'common.ABILITY_RLF_MINIMUM_HIT_INTERVAL_SECONDS' ----@field ABILITY_RLF_MINIMUM_HIT_INTERVAL_SECONDS abilityreallevelfield _ConvertAbilityRealLevelField('Tsp2') ---- ----ABILITY_RLF_DAMAGE_PER_SECOND_NBF5 'common.ABILITY_RLF_DAMAGE_PER_SECOND_NBF5' ----@field ABILITY_RLF_DAMAGE_PER_SECOND_NBF5 abilityreallevelfield _ConvertAbilityRealLevelField('Nbf5') ---- ----ABILITY_RLF_MAXIMUM_RANGE 'common.ABILITY_RLF_MAXIMUM_RANGE' ----@field ABILITY_RLF_MAXIMUM_RANGE abilityreallevelfield _ConvertAbilityRealLevelField('Ebl1') ---- ----ABILITY_RLF_MINIMUM_RANGE 'common.ABILITY_RLF_MINIMUM_RANGE' ----@field ABILITY_RLF_MINIMUM_RANGE abilityreallevelfield _ConvertAbilityRealLevelField('Ebl2') ---- ----ABILITY_RLF_DAMAGE_PER_TARGET_EFK1 'common.ABILITY_RLF_DAMAGE_PER_TARGET_EFK1' ----@field ABILITY_RLF_DAMAGE_PER_TARGET_EFK1 abilityreallevelfield _ConvertAbilityRealLevelField('Efk1') ---- ----ABILITY_RLF_MAXIMUM_TOTAL_DAMAGE 'common.ABILITY_RLF_MAXIMUM_TOTAL_DAMAGE' ----@field ABILITY_RLF_MAXIMUM_TOTAL_DAMAGE abilityreallevelfield _ConvertAbilityRealLevelField('Efk2') ---- ----ABILITY_RLF_MAXIMUM_SPEED_ADJUSTMENT 'common.ABILITY_RLF_MAXIMUM_SPEED_ADJUSTMENT' ----@field ABILITY_RLF_MAXIMUM_SPEED_ADJUSTMENT abilityreallevelfield _ConvertAbilityRealLevelField('Efk4') ---- ----ABILITY_RLF_DECAYING_DAMAGE 'common.ABILITY_RLF_DECAYING_DAMAGE' ----@field ABILITY_RLF_DECAYING_DAMAGE abilityreallevelfield _ConvertAbilityRealLevelField('Esh1') ---- ----ABILITY_RLF_MOVEMENT_SPEED_FACTOR_ESH2 'common.ABILITY_RLF_MOVEMENT_SPEED_FACTOR_ESH2' ----@field ABILITY_RLF_MOVEMENT_SPEED_FACTOR_ESH2 abilityreallevelfield _ConvertAbilityRealLevelField('Esh2') ---- ----ABILITY_RLF_ATTACK_SPEED_FACTOR_ESH3 'common.ABILITY_RLF_ATTACK_SPEED_FACTOR_ESH3' ----@field ABILITY_RLF_ATTACK_SPEED_FACTOR_ESH3 abilityreallevelfield _ConvertAbilityRealLevelField('Esh3') ---- ----ABILITY_RLF_DECAY_POWER 'common.ABILITY_RLF_DECAY_POWER' ----@field ABILITY_RLF_DECAY_POWER abilityreallevelfield _ConvertAbilityRealLevelField('Esh4') ---- ----ABILITY_RLF_INITIAL_DAMAGE_ESH5 'common.ABILITY_RLF_INITIAL_DAMAGE_ESH5' ----@field ABILITY_RLF_INITIAL_DAMAGE_ESH5 abilityreallevelfield _ConvertAbilityRealLevelField('Esh5') ---- ----ABILITY_RLF_MAXIMUM_LIFE_ABSORBED 'common.ABILITY_RLF_MAXIMUM_LIFE_ABSORBED' ----@field ABILITY_RLF_MAXIMUM_LIFE_ABSORBED abilityreallevelfield _ConvertAbilityRealLevelField('abs1') ---- ----ABILITY_RLF_MAXIMUM_MANA_ABSORBED 'common.ABILITY_RLF_MAXIMUM_MANA_ABSORBED' ----@field ABILITY_RLF_MAXIMUM_MANA_ABSORBED abilityreallevelfield _ConvertAbilityRealLevelField('abs2') ---- ----ABILITY_RLF_MOVEMENT_SPEED_INCREASE_BSK1 'common.ABILITY_RLF_MOVEMENT_SPEED_INCREASE_BSK1' ----@field ABILITY_RLF_MOVEMENT_SPEED_INCREASE_BSK1 abilityreallevelfield _ConvertAbilityRealLevelField('bsk1') ---- ----ABILITY_RLF_ATTACK_SPEED_INCREASE_BSK2 'common.ABILITY_RLF_ATTACK_SPEED_INCREASE_BSK2' ----@field ABILITY_RLF_ATTACK_SPEED_INCREASE_BSK2 abilityreallevelfield _ConvertAbilityRealLevelField('bsk2') ---- ----ABILITY_RLF_DAMAGE_TAKEN_INCREASE 'common.ABILITY_RLF_DAMAGE_TAKEN_INCREASE' ----@field ABILITY_RLF_DAMAGE_TAKEN_INCREASE abilityreallevelfield _ConvertAbilityRealLevelField('bsk3') ---- ----ABILITY_RLF_LIFE_PER_UNIT 'common.ABILITY_RLF_LIFE_PER_UNIT' ----@field ABILITY_RLF_LIFE_PER_UNIT abilityreallevelfield _ConvertAbilityRealLevelField('dvm1') ---- ----ABILITY_RLF_MANA_PER_UNIT 'common.ABILITY_RLF_MANA_PER_UNIT' ----@field ABILITY_RLF_MANA_PER_UNIT abilityreallevelfield _ConvertAbilityRealLevelField('dvm2') ---- ----ABILITY_RLF_LIFE_PER_BUFF 'common.ABILITY_RLF_LIFE_PER_BUFF' ----@field ABILITY_RLF_LIFE_PER_BUFF abilityreallevelfield _ConvertAbilityRealLevelField('dvm3') ---- ----ABILITY_RLF_MANA_PER_BUFF 'common.ABILITY_RLF_MANA_PER_BUFF' ----@field ABILITY_RLF_MANA_PER_BUFF abilityreallevelfield _ConvertAbilityRealLevelField('dvm4') ---- ----ABILITY_RLF_SUMMONED_UNIT_DAMAGE_DVM5 'common.ABILITY_RLF_SUMMONED_UNIT_DAMAGE_DVM5' ----@field ABILITY_RLF_SUMMONED_UNIT_DAMAGE_DVM5 abilityreallevelfield _ConvertAbilityRealLevelField('dvm5') ---- ----ABILITY_RLF_DAMAGE_BONUS_FAK1 'common.ABILITY_RLF_DAMAGE_BONUS_FAK1' ----@field ABILITY_RLF_DAMAGE_BONUS_FAK1 abilityreallevelfield _ConvertAbilityRealLevelField('fak1') ---- ----ABILITY_RLF_MEDIUM_DAMAGE_FACTOR_FAK2 'common.ABILITY_RLF_MEDIUM_DAMAGE_FACTOR_FAK2' ----@field ABILITY_RLF_MEDIUM_DAMAGE_FACTOR_FAK2 abilityreallevelfield _ConvertAbilityRealLevelField('fak2') ---- ----ABILITY_RLF_SMALL_DAMAGE_FACTOR_FAK3 'common.ABILITY_RLF_SMALL_DAMAGE_FACTOR_FAK3' ----@field ABILITY_RLF_SMALL_DAMAGE_FACTOR_FAK3 abilityreallevelfield _ConvertAbilityRealLevelField('fak3') ---- ----ABILITY_RLF_FULL_DAMAGE_RADIUS_FAK4 'common.ABILITY_RLF_FULL_DAMAGE_RADIUS_FAK4' ----@field ABILITY_RLF_FULL_DAMAGE_RADIUS_FAK4 abilityreallevelfield _ConvertAbilityRealLevelField('fak4') ---- ----ABILITY_RLF_HALF_DAMAGE_RADIUS_FAK5 'common.ABILITY_RLF_HALF_DAMAGE_RADIUS_FAK5' ----@field ABILITY_RLF_HALF_DAMAGE_RADIUS_FAK5 abilityreallevelfield _ConvertAbilityRealLevelField('fak5') ---- ----ABILITY_RLF_EXTRA_DAMAGE_PER_SECOND 'common.ABILITY_RLF_EXTRA_DAMAGE_PER_SECOND' ----@field ABILITY_RLF_EXTRA_DAMAGE_PER_SECOND abilityreallevelfield _ConvertAbilityRealLevelField('liq1') ---- ----ABILITY_RLF_MOVEMENT_SPEED_REDUCTION_LIQ2 'common.ABILITY_RLF_MOVEMENT_SPEED_REDUCTION_LIQ2' ----@field ABILITY_RLF_MOVEMENT_SPEED_REDUCTION_LIQ2 abilityreallevelfield _ConvertAbilityRealLevelField('liq2') ---- ----ABILITY_RLF_ATTACK_SPEED_REDUCTION_LIQ3 'common.ABILITY_RLF_ATTACK_SPEED_REDUCTION_LIQ3' ----@field ABILITY_RLF_ATTACK_SPEED_REDUCTION_LIQ3 abilityreallevelfield _ConvertAbilityRealLevelField('liq3') ---- ----ABILITY_RLF_MAGIC_DAMAGE_FACTOR 'common.ABILITY_RLF_MAGIC_DAMAGE_FACTOR' ----@field ABILITY_RLF_MAGIC_DAMAGE_FACTOR abilityreallevelfield _ConvertAbilityRealLevelField('mim1') ---- ----ABILITY_RLF_UNIT_DAMAGE_PER_MANA_POINT 'common.ABILITY_RLF_UNIT_DAMAGE_PER_MANA_POINT' ----@field ABILITY_RLF_UNIT_DAMAGE_PER_MANA_POINT abilityreallevelfield _ConvertAbilityRealLevelField('mfl1') ---- ----ABILITY_RLF_HERO_DAMAGE_PER_MANA_POINT 'common.ABILITY_RLF_HERO_DAMAGE_PER_MANA_POINT' ----@field ABILITY_RLF_HERO_DAMAGE_PER_MANA_POINT abilityreallevelfield _ConvertAbilityRealLevelField('mfl2') ---- ----ABILITY_RLF_UNIT_MAXIMUM_DAMAGE 'common.ABILITY_RLF_UNIT_MAXIMUM_DAMAGE' ----@field ABILITY_RLF_UNIT_MAXIMUM_DAMAGE abilityreallevelfield _ConvertAbilityRealLevelField('mfl3') ---- ----ABILITY_RLF_HERO_MAXIMUM_DAMAGE 'common.ABILITY_RLF_HERO_MAXIMUM_DAMAGE' ----@field ABILITY_RLF_HERO_MAXIMUM_DAMAGE abilityreallevelfield _ConvertAbilityRealLevelField('mfl4') ---- ----ABILITY_RLF_DAMAGE_COOLDOWN 'common.ABILITY_RLF_DAMAGE_COOLDOWN' ----@field ABILITY_RLF_DAMAGE_COOLDOWN abilityreallevelfield _ConvertAbilityRealLevelField('mfl5') ---- ----ABILITY_RLF_DISTRIBUTED_DAMAGE_FACTOR_SPL1 'common.ABILITY_RLF_DISTRIBUTED_DAMAGE_FACTOR_SPL1' ----@field ABILITY_RLF_DISTRIBUTED_DAMAGE_FACTOR_SPL1 abilityreallevelfield _ConvertAbilityRealLevelField('spl1') ---- ----ABILITY_RLF_LIFE_REGENERATED 'common.ABILITY_RLF_LIFE_REGENERATED' ----@field ABILITY_RLF_LIFE_REGENERATED abilityreallevelfield _ConvertAbilityRealLevelField('irl1') ---- ----ABILITY_RLF_MANA_REGENERATED 'common.ABILITY_RLF_MANA_REGENERATED' ----@field ABILITY_RLF_MANA_REGENERATED abilityreallevelfield _ConvertAbilityRealLevelField('irl2') ---- ----ABILITY_RLF_MANA_LOSS_PER_UNIT_IDC1 'common.ABILITY_RLF_MANA_LOSS_PER_UNIT_IDC1' ----@field ABILITY_RLF_MANA_LOSS_PER_UNIT_IDC1 abilityreallevelfield _ConvertAbilityRealLevelField('idc1') ---- ----ABILITY_RLF_SUMMONED_UNIT_DAMAGE_IDC2 'common.ABILITY_RLF_SUMMONED_UNIT_DAMAGE_IDC2' ----@field ABILITY_RLF_SUMMONED_UNIT_DAMAGE_IDC2 abilityreallevelfield _ConvertAbilityRealLevelField('idc2') ---- ----ABILITY_RLF_ACTIVATION_DELAY_IMO2 'common.ABILITY_RLF_ACTIVATION_DELAY_IMO2' ----@field ABILITY_RLF_ACTIVATION_DELAY_IMO2 abilityreallevelfield _ConvertAbilityRealLevelField('imo2') ---- ----ABILITY_RLF_LURE_INTERVAL_SECONDS 'common.ABILITY_RLF_LURE_INTERVAL_SECONDS' ----@field ABILITY_RLF_LURE_INTERVAL_SECONDS abilityreallevelfield _ConvertAbilityRealLevelField('imo3') ---- ----ABILITY_RLF_DAMAGE_BONUS_ISR1 'common.ABILITY_RLF_DAMAGE_BONUS_ISR1' ----@field ABILITY_RLF_DAMAGE_BONUS_ISR1 abilityreallevelfield _ConvertAbilityRealLevelField('isr1') ---- ----ABILITY_RLF_DAMAGE_REDUCTION_ISR2 'common.ABILITY_RLF_DAMAGE_REDUCTION_ISR2' ----@field ABILITY_RLF_DAMAGE_REDUCTION_ISR2 abilityreallevelfield _ConvertAbilityRealLevelField('isr2') ---- ----ABILITY_RLF_DAMAGE_BONUS_IPV1 'common.ABILITY_RLF_DAMAGE_BONUS_IPV1' ----@field ABILITY_RLF_DAMAGE_BONUS_IPV1 abilityreallevelfield _ConvertAbilityRealLevelField('ipv1') ---- ----ABILITY_RLF_LIFE_STEAL_AMOUNT 'common.ABILITY_RLF_LIFE_STEAL_AMOUNT' ----@field ABILITY_RLF_LIFE_STEAL_AMOUNT abilityreallevelfield _ConvertAbilityRealLevelField('ipv2') ---- ----ABILITY_RLF_LIFE_RESTORED_FACTOR 'common.ABILITY_RLF_LIFE_RESTORED_FACTOR' ----@field ABILITY_RLF_LIFE_RESTORED_FACTOR abilityreallevelfield _ConvertAbilityRealLevelField('ast1') ---- ----ABILITY_RLF_MANA_RESTORED_FACTOR 'common.ABILITY_RLF_MANA_RESTORED_FACTOR' ----@field ABILITY_RLF_MANA_RESTORED_FACTOR abilityreallevelfield _ConvertAbilityRealLevelField('ast2') ---- ----ABILITY_RLF_ATTACH_DELAY 'common.ABILITY_RLF_ATTACH_DELAY' ----@field ABILITY_RLF_ATTACH_DELAY abilityreallevelfield _ConvertAbilityRealLevelField('gra1') ---- ----ABILITY_RLF_REMOVE_DELAY 'common.ABILITY_RLF_REMOVE_DELAY' ----@field ABILITY_RLF_REMOVE_DELAY abilityreallevelfield _ConvertAbilityRealLevelField('gra2') ---- ----ABILITY_RLF_HERO_REGENERATION_DELAY 'common.ABILITY_RLF_HERO_REGENERATION_DELAY' ----@field ABILITY_RLF_HERO_REGENERATION_DELAY abilityreallevelfield _ConvertAbilityRealLevelField('Nsa2') ---- ----ABILITY_RLF_UNIT_REGENERATION_DELAY 'common.ABILITY_RLF_UNIT_REGENERATION_DELAY' ----@field ABILITY_RLF_UNIT_REGENERATION_DELAY abilityreallevelfield _ConvertAbilityRealLevelField('Nsa3') ---- ----ABILITY_RLF_MAGIC_DAMAGE_REDUCTION_NSA4 'common.ABILITY_RLF_MAGIC_DAMAGE_REDUCTION_NSA4' ----@field ABILITY_RLF_MAGIC_DAMAGE_REDUCTION_NSA4 abilityreallevelfield _ConvertAbilityRealLevelField('Nsa4') ---- ----ABILITY_RLF_HIT_POINTS_PER_SECOND_NSA5 'common.ABILITY_RLF_HIT_POINTS_PER_SECOND_NSA5' ----@field ABILITY_RLF_HIT_POINTS_PER_SECOND_NSA5 abilityreallevelfield _ConvertAbilityRealLevelField('Nsa5') ---- ----ABILITY_RLF_DAMAGE_TO_SUMMONED_UNITS_IXS1 'common.ABILITY_RLF_DAMAGE_TO_SUMMONED_UNITS_IXS1' ----@field ABILITY_RLF_DAMAGE_TO_SUMMONED_UNITS_IXS1 abilityreallevelfield _ConvertAbilityRealLevelField('Ixs1') ---- ----ABILITY_RLF_MAGIC_DAMAGE_REDUCTION_IXS2 'common.ABILITY_RLF_MAGIC_DAMAGE_REDUCTION_IXS2' ----@field ABILITY_RLF_MAGIC_DAMAGE_REDUCTION_IXS2 abilityreallevelfield _ConvertAbilityRealLevelField('Ixs2') ---- ----ABILITY_RLF_SUMMONED_UNIT_DURATION 'common.ABILITY_RLF_SUMMONED_UNIT_DURATION' ----@field ABILITY_RLF_SUMMONED_UNIT_DURATION abilityreallevelfield _ConvertAbilityRealLevelField('Npa6') ---- ----ABILITY_RLF_SHIELD_COOLDOWN_TIME 'common.ABILITY_RLF_SHIELD_COOLDOWN_TIME' ----@field ABILITY_RLF_SHIELD_COOLDOWN_TIME abilityreallevelfield _ConvertAbilityRealLevelField('Nse1') ---- ----ABILITY_RLF_DAMAGE_PER_SECOND_NDO1 'common.ABILITY_RLF_DAMAGE_PER_SECOND_NDO1' ----@field ABILITY_RLF_DAMAGE_PER_SECOND_NDO1 abilityreallevelfield _ConvertAbilityRealLevelField('Ndo1') ---- ----ABILITY_RLF_SUMMONED_UNIT_DURATION_SECONDS_NDO3 'common.ABILITY_RLF_SUMMONED_UNIT_DURATION_SECONDS_NDO3' ----@field ABILITY_RLF_SUMMONED_UNIT_DURATION_SECONDS_NDO3 abilityreallevelfield _ConvertAbilityRealLevelField('Ndo3') ---- ----ABILITY_RLF_MEDIUM_DAMAGE_RADIUS_FLK1 'common.ABILITY_RLF_MEDIUM_DAMAGE_RADIUS_FLK1' ----@field ABILITY_RLF_MEDIUM_DAMAGE_RADIUS_FLK1 abilityreallevelfield _ConvertAbilityRealLevelField('flk1') ---- ----ABILITY_RLF_SMALL_DAMAGE_RADIUS_FLK2 'common.ABILITY_RLF_SMALL_DAMAGE_RADIUS_FLK2' ----@field ABILITY_RLF_SMALL_DAMAGE_RADIUS_FLK2 abilityreallevelfield _ConvertAbilityRealLevelField('flk2') ---- ----ABILITY_RLF_FULL_DAMAGE_AMOUNT_FLK3 'common.ABILITY_RLF_FULL_DAMAGE_AMOUNT_FLK3' ----@field ABILITY_RLF_FULL_DAMAGE_AMOUNT_FLK3 abilityreallevelfield _ConvertAbilityRealLevelField('flk3') ---- ----ABILITY_RLF_MEDIUM_DAMAGE_AMOUNT 'common.ABILITY_RLF_MEDIUM_DAMAGE_AMOUNT' ----@field ABILITY_RLF_MEDIUM_DAMAGE_AMOUNT abilityreallevelfield _ConvertAbilityRealLevelField('flk4') ---- ----ABILITY_RLF_SMALL_DAMAGE_AMOUNT 'common.ABILITY_RLF_SMALL_DAMAGE_AMOUNT' ----@field ABILITY_RLF_SMALL_DAMAGE_AMOUNT abilityreallevelfield _ConvertAbilityRealLevelField('flk5') ---- ----ABILITY_RLF_MOVEMENT_SPEED_REDUCTION_PERCENT_HBN1 'common.ABILITY_RLF_MOVEMENT_SPEED_REDUCTION_PERCENT_HBN1' ----@field ABILITY_RLF_MOVEMENT_SPEED_REDUCTION_PERCENT_HBN1 abilityreallevelfield _ConvertAbilityRealLevelField('Hbn1') ---- ----ABILITY_RLF_ATTACK_SPEED_REDUCTION_PERCENT_HBN2 'common.ABILITY_RLF_ATTACK_SPEED_REDUCTION_PERCENT_HBN2' ----@field ABILITY_RLF_ATTACK_SPEED_REDUCTION_PERCENT_HBN2 abilityreallevelfield _ConvertAbilityRealLevelField('Hbn2') ---- ----ABILITY_RLF_MAX_MANA_DRAINED_UNITS 'common.ABILITY_RLF_MAX_MANA_DRAINED_UNITS' ----@field ABILITY_RLF_MAX_MANA_DRAINED_UNITS abilityreallevelfield _ConvertAbilityRealLevelField('fbk1') ---- ----ABILITY_RLF_DAMAGE_RATIO_UNITS_PERCENT 'common.ABILITY_RLF_DAMAGE_RATIO_UNITS_PERCENT' ----@field ABILITY_RLF_DAMAGE_RATIO_UNITS_PERCENT abilityreallevelfield _ConvertAbilityRealLevelField('fbk2') ---- ----ABILITY_RLF_MAX_MANA_DRAINED_HEROS 'common.ABILITY_RLF_MAX_MANA_DRAINED_HEROS' ----@field ABILITY_RLF_MAX_MANA_DRAINED_HEROS abilityreallevelfield _ConvertAbilityRealLevelField('fbk3') ---- ----ABILITY_RLF_DAMAGE_RATIO_HEROS_PERCENT 'common.ABILITY_RLF_DAMAGE_RATIO_HEROS_PERCENT' ----@field ABILITY_RLF_DAMAGE_RATIO_HEROS_PERCENT abilityreallevelfield _ConvertAbilityRealLevelField('fbk4') ---- ----ABILITY_RLF_SUMMONED_DAMAGE 'common.ABILITY_RLF_SUMMONED_DAMAGE' ----@field ABILITY_RLF_SUMMONED_DAMAGE abilityreallevelfield _ConvertAbilityRealLevelField('fbk5') ---- ----ABILITY_RLF_DISTRIBUTED_DAMAGE_FACTOR_NCA1 'common.ABILITY_RLF_DISTRIBUTED_DAMAGE_FACTOR_NCA1' ----@field ABILITY_RLF_DISTRIBUTED_DAMAGE_FACTOR_NCA1 abilityreallevelfield _ConvertAbilityRealLevelField('nca1') ---- ----ABILITY_RLF_INITIAL_DAMAGE_PXF1 'common.ABILITY_RLF_INITIAL_DAMAGE_PXF1' ----@field ABILITY_RLF_INITIAL_DAMAGE_PXF1 abilityreallevelfield _ConvertAbilityRealLevelField('pxf1') ---- ----ABILITY_RLF_DAMAGE_PER_SECOND_PXF2 'common.ABILITY_RLF_DAMAGE_PER_SECOND_PXF2' ----@field ABILITY_RLF_DAMAGE_PER_SECOND_PXF2 abilityreallevelfield _ConvertAbilityRealLevelField('pxf2') ---- ----ABILITY_RLF_DAMAGE_PER_SECOND_MLS1 'common.ABILITY_RLF_DAMAGE_PER_SECOND_MLS1' ----@field ABILITY_RLF_DAMAGE_PER_SECOND_MLS1 abilityreallevelfield _ConvertAbilityRealLevelField('mls1') ---- ----ABILITY_RLF_BEAST_COLLISION_RADIUS 'common.ABILITY_RLF_BEAST_COLLISION_RADIUS' ----@field ABILITY_RLF_BEAST_COLLISION_RADIUS abilityreallevelfield _ConvertAbilityRealLevelField('Nst2') ---- ----ABILITY_RLF_DAMAGE_AMOUNT_NST3 'common.ABILITY_RLF_DAMAGE_AMOUNT_NST3' ----@field ABILITY_RLF_DAMAGE_AMOUNT_NST3 abilityreallevelfield _ConvertAbilityRealLevelField('Nst3') ---- ----ABILITY_RLF_DAMAGE_RADIUS 'common.ABILITY_RLF_DAMAGE_RADIUS' ----@field ABILITY_RLF_DAMAGE_RADIUS abilityreallevelfield _ConvertAbilityRealLevelField('Nst4') ---- ----ABILITY_RLF_DAMAGE_DELAY 'common.ABILITY_RLF_DAMAGE_DELAY' ----@field ABILITY_RLF_DAMAGE_DELAY abilityreallevelfield _ConvertAbilityRealLevelField('Nst5') ---- ----ABILITY_RLF_FOLLOW_THROUGH_TIME 'common.ABILITY_RLF_FOLLOW_THROUGH_TIME' ----@field ABILITY_RLF_FOLLOW_THROUGH_TIME abilityreallevelfield _ConvertAbilityRealLevelField('Ncl1') ---- ----ABILITY_RLF_ART_DURATION 'common.ABILITY_RLF_ART_DURATION' ----@field ABILITY_RLF_ART_DURATION abilityreallevelfield _ConvertAbilityRealLevelField('Ncl4') ---- ----ABILITY_RLF_MOVEMENT_SPEED_REDUCTION_PERCENT_NAB1 'common.ABILITY_RLF_MOVEMENT_SPEED_REDUCTION_PERCENT_NAB1' ----@field ABILITY_RLF_MOVEMENT_SPEED_REDUCTION_PERCENT_NAB1 abilityreallevelfield _ConvertAbilityRealLevelField('Nab1') ---- ----ABILITY_RLF_ATTACK_SPEED_REDUCTION_PERCENT_NAB2 'common.ABILITY_RLF_ATTACK_SPEED_REDUCTION_PERCENT_NAB2' ----@field ABILITY_RLF_ATTACK_SPEED_REDUCTION_PERCENT_NAB2 abilityreallevelfield _ConvertAbilityRealLevelField('Nab2') ---- ----ABILITY_RLF_PRIMARY_DAMAGE 'common.ABILITY_RLF_PRIMARY_DAMAGE' ----@field ABILITY_RLF_PRIMARY_DAMAGE abilityreallevelfield _ConvertAbilityRealLevelField('Nab4') ---- ----ABILITY_RLF_SECONDARY_DAMAGE 'common.ABILITY_RLF_SECONDARY_DAMAGE' ----@field ABILITY_RLF_SECONDARY_DAMAGE abilityreallevelfield _ConvertAbilityRealLevelField('Nab5') ---- ----ABILITY_RLF_DAMAGE_INTERVAL_NAB6 'common.ABILITY_RLF_DAMAGE_INTERVAL_NAB6' ----@field ABILITY_RLF_DAMAGE_INTERVAL_NAB6 abilityreallevelfield _ConvertAbilityRealLevelField('Nab6') ---- ----ABILITY_RLF_GOLD_COST_FACTOR 'common.ABILITY_RLF_GOLD_COST_FACTOR' ----@field ABILITY_RLF_GOLD_COST_FACTOR abilityreallevelfield _ConvertAbilityRealLevelField('Ntm1') ---- ----ABILITY_RLF_LUMBER_COST_FACTOR 'common.ABILITY_RLF_LUMBER_COST_FACTOR' ----@field ABILITY_RLF_LUMBER_COST_FACTOR abilityreallevelfield _ConvertAbilityRealLevelField('Ntm2') ---- ----ABILITY_RLF_MOVE_SPEED_BONUS_NEG1 'common.ABILITY_RLF_MOVE_SPEED_BONUS_NEG1' ----@field ABILITY_RLF_MOVE_SPEED_BONUS_NEG1 abilityreallevelfield _ConvertAbilityRealLevelField('Neg1') ---- ----ABILITY_RLF_DAMAGE_BONUS_NEG2 'common.ABILITY_RLF_DAMAGE_BONUS_NEG2' ----@field ABILITY_RLF_DAMAGE_BONUS_NEG2 abilityreallevelfield _ConvertAbilityRealLevelField('Neg2') ---- ----ABILITY_RLF_DAMAGE_AMOUNT_NCS1 'common.ABILITY_RLF_DAMAGE_AMOUNT_NCS1' ----@field ABILITY_RLF_DAMAGE_AMOUNT_NCS1 abilityreallevelfield _ConvertAbilityRealLevelField('Ncs1') ---- ----ABILITY_RLF_DAMAGE_INTERVAL_NCS2 'common.ABILITY_RLF_DAMAGE_INTERVAL_NCS2' ----@field ABILITY_RLF_DAMAGE_INTERVAL_NCS2 abilityreallevelfield _ConvertAbilityRealLevelField('Ncs2') ---- ----ABILITY_RLF_MAX_DAMAGE_NCS4 'common.ABILITY_RLF_MAX_DAMAGE_NCS4' ----@field ABILITY_RLF_MAX_DAMAGE_NCS4 abilityreallevelfield _ConvertAbilityRealLevelField('Ncs4') ---- ----ABILITY_RLF_BUILDING_DAMAGE_FACTOR_NCS5 'common.ABILITY_RLF_BUILDING_DAMAGE_FACTOR_NCS5' ----@field ABILITY_RLF_BUILDING_DAMAGE_FACTOR_NCS5 abilityreallevelfield _ConvertAbilityRealLevelField('Ncs5') ---- ----ABILITY_RLF_EFFECT_DURATION 'common.ABILITY_RLF_EFFECT_DURATION' ----@field ABILITY_RLF_EFFECT_DURATION abilityreallevelfield _ConvertAbilityRealLevelField('Ncs6') ---- ----ABILITY_RLF_SPAWN_INTERVAL_NSY1 'common.ABILITY_RLF_SPAWN_INTERVAL_NSY1' ----@field ABILITY_RLF_SPAWN_INTERVAL_NSY1 abilityreallevelfield _ConvertAbilityRealLevelField('Nsy1') ---- ----ABILITY_RLF_SPAWN_UNIT_DURATION 'common.ABILITY_RLF_SPAWN_UNIT_DURATION' ----@field ABILITY_RLF_SPAWN_UNIT_DURATION abilityreallevelfield _ConvertAbilityRealLevelField('Nsy3') ---- ----ABILITY_RLF_SPAWN_UNIT_OFFSET 'common.ABILITY_RLF_SPAWN_UNIT_OFFSET' ----@field ABILITY_RLF_SPAWN_UNIT_OFFSET abilityreallevelfield _ConvertAbilityRealLevelField('Nsy4') ---- ----ABILITY_RLF_LEASH_RANGE_NSY5 'common.ABILITY_RLF_LEASH_RANGE_NSY5' ----@field ABILITY_RLF_LEASH_RANGE_NSY5 abilityreallevelfield _ConvertAbilityRealLevelField('Nsy5') ---- ----ABILITY_RLF_SPAWN_INTERVAL_NFY1 'common.ABILITY_RLF_SPAWN_INTERVAL_NFY1' ----@field ABILITY_RLF_SPAWN_INTERVAL_NFY1 abilityreallevelfield _ConvertAbilityRealLevelField('Nfy1') ---- ----ABILITY_RLF_LEASH_RANGE_NFY2 'common.ABILITY_RLF_LEASH_RANGE_NFY2' ----@field ABILITY_RLF_LEASH_RANGE_NFY2 abilityreallevelfield _ConvertAbilityRealLevelField('Nfy2') ---- ----ABILITY_RLF_CHANCE_TO_DEMOLISH 'common.ABILITY_RLF_CHANCE_TO_DEMOLISH' ----@field ABILITY_RLF_CHANCE_TO_DEMOLISH abilityreallevelfield _ConvertAbilityRealLevelField('Nde1') ---- ----ABILITY_RLF_DAMAGE_MULTIPLIER_BUILDINGS 'common.ABILITY_RLF_DAMAGE_MULTIPLIER_BUILDINGS' ----@field ABILITY_RLF_DAMAGE_MULTIPLIER_BUILDINGS abilityreallevelfield _ConvertAbilityRealLevelField('Nde2') ---- ----ABILITY_RLF_DAMAGE_MULTIPLIER_UNITS 'common.ABILITY_RLF_DAMAGE_MULTIPLIER_UNITS' ----@field ABILITY_RLF_DAMAGE_MULTIPLIER_UNITS abilityreallevelfield _ConvertAbilityRealLevelField('Nde3') ---- ----ABILITY_RLF_DAMAGE_MULTIPLIER_HEROES 'common.ABILITY_RLF_DAMAGE_MULTIPLIER_HEROES' ----@field ABILITY_RLF_DAMAGE_MULTIPLIER_HEROES abilityreallevelfield _ConvertAbilityRealLevelField('Nde4') ---- ----ABILITY_RLF_BONUS_DAMAGE_MULTIPLIER 'common.ABILITY_RLF_BONUS_DAMAGE_MULTIPLIER' ----@field ABILITY_RLF_BONUS_DAMAGE_MULTIPLIER abilityreallevelfield _ConvertAbilityRealLevelField('Nic1') ---- ----ABILITY_RLF_DEATH_DAMAGE_FULL_AMOUNT 'common.ABILITY_RLF_DEATH_DAMAGE_FULL_AMOUNT' ----@field ABILITY_RLF_DEATH_DAMAGE_FULL_AMOUNT abilityreallevelfield _ConvertAbilityRealLevelField('Nic2') ---- ----ABILITY_RLF_DEATH_DAMAGE_FULL_AREA 'common.ABILITY_RLF_DEATH_DAMAGE_FULL_AREA' ----@field ABILITY_RLF_DEATH_DAMAGE_FULL_AREA abilityreallevelfield _ConvertAbilityRealLevelField('Nic3') ---- ----ABILITY_RLF_DEATH_DAMAGE_HALF_AMOUNT 'common.ABILITY_RLF_DEATH_DAMAGE_HALF_AMOUNT' ----@field ABILITY_RLF_DEATH_DAMAGE_HALF_AMOUNT abilityreallevelfield _ConvertAbilityRealLevelField('Nic4') ---- ----ABILITY_RLF_DEATH_DAMAGE_HALF_AREA 'common.ABILITY_RLF_DEATH_DAMAGE_HALF_AREA' ----@field ABILITY_RLF_DEATH_DAMAGE_HALF_AREA abilityreallevelfield _ConvertAbilityRealLevelField('Nic5') ---- ----ABILITY_RLF_DEATH_DAMAGE_DELAY 'common.ABILITY_RLF_DEATH_DAMAGE_DELAY' ----@field ABILITY_RLF_DEATH_DAMAGE_DELAY abilityreallevelfield _ConvertAbilityRealLevelField('Nic6') ---- ----ABILITY_RLF_DAMAGE_AMOUNT_NSO1 'common.ABILITY_RLF_DAMAGE_AMOUNT_NSO1' ----@field ABILITY_RLF_DAMAGE_AMOUNT_NSO1 abilityreallevelfield _ConvertAbilityRealLevelField('Nso1') ---- ----ABILITY_RLF_DAMAGE_PERIOD 'common.ABILITY_RLF_DAMAGE_PERIOD' ----@field ABILITY_RLF_DAMAGE_PERIOD abilityreallevelfield _ConvertAbilityRealLevelField('Nso2') ---- ----ABILITY_RLF_DAMAGE_PENALTY 'common.ABILITY_RLF_DAMAGE_PENALTY' ----@field ABILITY_RLF_DAMAGE_PENALTY abilityreallevelfield _ConvertAbilityRealLevelField('Nso3') ---- ----ABILITY_RLF_MOVEMENT_SPEED_REDUCTION_PERCENT_NSO4 'common.ABILITY_RLF_MOVEMENT_SPEED_REDUCTION_PERCENT_NSO4' ----@field ABILITY_RLF_MOVEMENT_SPEED_REDUCTION_PERCENT_NSO4 abilityreallevelfield _ConvertAbilityRealLevelField('Nso4') ---- ----ABILITY_RLF_ATTACK_SPEED_REDUCTION_PERCENT_NSO5 'common.ABILITY_RLF_ATTACK_SPEED_REDUCTION_PERCENT_NSO5' ----@field ABILITY_RLF_ATTACK_SPEED_REDUCTION_PERCENT_NSO5 abilityreallevelfield _ConvertAbilityRealLevelField('Nso5') ---- ----ABILITY_RLF_SPLIT_DELAY 'common.ABILITY_RLF_SPLIT_DELAY' ----@field ABILITY_RLF_SPLIT_DELAY abilityreallevelfield _ConvertAbilityRealLevelField('Nlm2') ---- ----ABILITY_RLF_MAX_HITPOINT_FACTOR 'common.ABILITY_RLF_MAX_HITPOINT_FACTOR' ----@field ABILITY_RLF_MAX_HITPOINT_FACTOR abilityreallevelfield _ConvertAbilityRealLevelField('Nlm4') ---- ----ABILITY_RLF_LIFE_DURATION_SPLIT_BONUS 'common.ABILITY_RLF_LIFE_DURATION_SPLIT_BONUS' ----@field ABILITY_RLF_LIFE_DURATION_SPLIT_BONUS abilityreallevelfield _ConvertAbilityRealLevelField('Nlm5') ---- ----ABILITY_RLF_WAVE_INTERVAL 'common.ABILITY_RLF_WAVE_INTERVAL' ----@field ABILITY_RLF_WAVE_INTERVAL abilityreallevelfield _ConvertAbilityRealLevelField('Nvc3') ---- ----ABILITY_RLF_BUILDING_DAMAGE_FACTOR_NVC4 'common.ABILITY_RLF_BUILDING_DAMAGE_FACTOR_NVC4' ----@field ABILITY_RLF_BUILDING_DAMAGE_FACTOR_NVC4 abilityreallevelfield _ConvertAbilityRealLevelField('Nvc4') ---- ----ABILITY_RLF_FULL_DAMAGE_AMOUNT_NVC5 'common.ABILITY_RLF_FULL_DAMAGE_AMOUNT_NVC5' ----@field ABILITY_RLF_FULL_DAMAGE_AMOUNT_NVC5 abilityreallevelfield _ConvertAbilityRealLevelField('Nvc5') ---- ----ABILITY_RLF_HALF_DAMAGE_FACTOR 'common.ABILITY_RLF_HALF_DAMAGE_FACTOR' ----@field ABILITY_RLF_HALF_DAMAGE_FACTOR abilityreallevelfield _ConvertAbilityRealLevelField('Nvc6') ---- ----ABILITY_RLF_INTERVAL_BETWEEN_PULSES 'common.ABILITY_RLF_INTERVAL_BETWEEN_PULSES' ----@field ABILITY_RLF_INTERVAL_BETWEEN_PULSES abilityreallevelfield _ConvertAbilityRealLevelField('Tau5') ---- ----ABILITY_BLF_PERCENT_BONUS_HAB2 'common.ABILITY_BLF_PERCENT_BONUS_HAB2' ----@field ABILITY_BLF_PERCENT_BONUS_HAB2 abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Hab2') ---- ----ABILITY_BLF_USE_TELEPORT_CLUSTERING_HMT3 'common.ABILITY_BLF_USE_TELEPORT_CLUSTERING_HMT3' ----@field ABILITY_BLF_USE_TELEPORT_CLUSTERING_HMT3 abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Hmt3') ---- ----ABILITY_BLF_NEVER_MISS_OCR5 'common.ABILITY_BLF_NEVER_MISS_OCR5' ----@field ABILITY_BLF_NEVER_MISS_OCR5 abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Ocr5') ---- ----ABILITY_BLF_EXCLUDE_ITEM_DAMAGE 'common.ABILITY_BLF_EXCLUDE_ITEM_DAMAGE' ----@field ABILITY_BLF_EXCLUDE_ITEM_DAMAGE abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Ocr6') ---- ----ABILITY_BLF_BACKSTAB_DAMAGE 'common.ABILITY_BLF_BACKSTAB_DAMAGE' ----@field ABILITY_BLF_BACKSTAB_DAMAGE abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Owk4') ---- ----ABILITY_BLF_INHERIT_UPGRADES_UAN3 'common.ABILITY_BLF_INHERIT_UPGRADES_UAN3' ----@field ABILITY_BLF_INHERIT_UPGRADES_UAN3 abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Uan3') ---- ----ABILITY_BLF_MANA_CONVERSION_AS_PERCENT 'common.ABILITY_BLF_MANA_CONVERSION_AS_PERCENT' ----@field ABILITY_BLF_MANA_CONVERSION_AS_PERCENT abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Udp3') ---- ----ABILITY_BLF_LIFE_CONVERSION_AS_PERCENT 'common.ABILITY_BLF_LIFE_CONVERSION_AS_PERCENT' ----@field ABILITY_BLF_LIFE_CONVERSION_AS_PERCENT abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Udp4') ---- ----ABILITY_BLF_LEAVE_TARGET_ALIVE 'common.ABILITY_BLF_LEAVE_TARGET_ALIVE' ----@field ABILITY_BLF_LEAVE_TARGET_ALIVE abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Udp5') ---- ----ABILITY_BLF_PERCENT_BONUS_UAU3 'common.ABILITY_BLF_PERCENT_BONUS_UAU3' ----@field ABILITY_BLF_PERCENT_BONUS_UAU3 abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Uau3') ---- ----ABILITY_BLF_DAMAGE_IS_PERCENT_RECEIVED 'common.ABILITY_BLF_DAMAGE_IS_PERCENT_RECEIVED' ----@field ABILITY_BLF_DAMAGE_IS_PERCENT_RECEIVED abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Eah2') ---- ----ABILITY_BLF_MELEE_BONUS 'common.ABILITY_BLF_MELEE_BONUS' ----@field ABILITY_BLF_MELEE_BONUS abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Ear2') ---- ----ABILITY_BLF_RANGED_BONUS 'common.ABILITY_BLF_RANGED_BONUS' ----@field ABILITY_BLF_RANGED_BONUS abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Ear3') ---- ----ABILITY_BLF_FLAT_BONUS 'common.ABILITY_BLF_FLAT_BONUS' ----@field ABILITY_BLF_FLAT_BONUS abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Ear4') ---- ----ABILITY_BLF_NEVER_MISS_HBH5 'common.ABILITY_BLF_NEVER_MISS_HBH5' ----@field ABILITY_BLF_NEVER_MISS_HBH5 abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Hbh5') ---- ----ABILITY_BLF_PERCENT_BONUS_HAD2 'common.ABILITY_BLF_PERCENT_BONUS_HAD2' ----@field ABILITY_BLF_PERCENT_BONUS_HAD2 abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Had2') ---- ----ABILITY_BLF_CAN_DEACTIVATE 'common.ABILITY_BLF_CAN_DEACTIVATE' ----@field ABILITY_BLF_CAN_DEACTIVATE abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Hds1') ---- ----ABILITY_BLF_RAISED_UNITS_ARE_INVULNERABLE 'common.ABILITY_BLF_RAISED_UNITS_ARE_INVULNERABLE' ----@field ABILITY_BLF_RAISED_UNITS_ARE_INVULNERABLE abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Hre2') ---- ----ABILITY_BLF_PERCENTAGE_OAR2 'common.ABILITY_BLF_PERCENTAGE_OAR2' ----@field ABILITY_BLF_PERCENTAGE_OAR2 abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Oar2') ---- ----ABILITY_BLF_SUMMON_BUSY_UNITS 'common.ABILITY_BLF_SUMMON_BUSY_UNITS' ----@field ABILITY_BLF_SUMMON_BUSY_UNITS abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Btl2') ---- ----ABILITY_BLF_CREATES_BLIGHT 'common.ABILITY_BLF_CREATES_BLIGHT' ----@field ABILITY_BLF_CREATES_BLIGHT abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Bli2') ---- ----ABILITY_BLF_EXPLODES_ON_DEATH 'common.ABILITY_BLF_EXPLODES_ON_DEATH' ----@field ABILITY_BLF_EXPLODES_ON_DEATH abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Sds6') ---- ----ABILITY_BLF_ALWAYS_AUTOCAST_FAE2 'common.ABILITY_BLF_ALWAYS_AUTOCAST_FAE2' ----@field ABILITY_BLF_ALWAYS_AUTOCAST_FAE2 abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Fae2') ---- ----ABILITY_BLF_REGENERATE_ONLY_AT_NIGHT 'common.ABILITY_BLF_REGENERATE_ONLY_AT_NIGHT' ----@field ABILITY_BLF_REGENERATE_ONLY_AT_NIGHT abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Mbt5') ---- ----ABILITY_BLF_SHOW_SELECT_UNIT_BUTTON 'common.ABILITY_BLF_SHOW_SELECT_UNIT_BUTTON' ----@field ABILITY_BLF_SHOW_SELECT_UNIT_BUTTON abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Neu3') ---- ----ABILITY_BLF_SHOW_UNIT_INDICATOR 'common.ABILITY_BLF_SHOW_UNIT_INDICATOR' ----@field ABILITY_BLF_SHOW_UNIT_INDICATOR abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Neu4') ---- ----ABILITY_BLF_CHARGE_OWNING_PLAYER 'common.ABILITY_BLF_CHARGE_OWNING_PLAYER' ----@field ABILITY_BLF_CHARGE_OWNING_PLAYER abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Ans6') ---- ----ABILITY_BLF_PERCENTAGE_ARM2 'common.ABILITY_BLF_PERCENTAGE_ARM2' ----@field ABILITY_BLF_PERCENTAGE_ARM2 abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Arm2') ---- ----ABILITY_BLF_TARGET_IS_INVULNERABLE 'common.ABILITY_BLF_TARGET_IS_INVULNERABLE' ----@field ABILITY_BLF_TARGET_IS_INVULNERABLE abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Pos3') ---- ----ABILITY_BLF_TARGET_IS_MAGIC_IMMUNE 'common.ABILITY_BLF_TARGET_IS_MAGIC_IMMUNE' ----@field ABILITY_BLF_TARGET_IS_MAGIC_IMMUNE abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Pos4') ---- ----ABILITY_BLF_KILL_ON_CASTER_DEATH 'common.ABILITY_BLF_KILL_ON_CASTER_DEATH' ----@field ABILITY_BLF_KILL_ON_CASTER_DEATH abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Ucb6') ---- ----ABILITY_BLF_NO_TARGET_REQUIRED_REJ4 'common.ABILITY_BLF_NO_TARGET_REQUIRED_REJ4' ----@field ABILITY_BLF_NO_TARGET_REQUIRED_REJ4 abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Rej4') ---- ----ABILITY_BLF_ACCEPTS_GOLD 'common.ABILITY_BLF_ACCEPTS_GOLD' ----@field ABILITY_BLF_ACCEPTS_GOLD abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Rtn1') ---- ----ABILITY_BLF_ACCEPTS_LUMBER 'common.ABILITY_BLF_ACCEPTS_LUMBER' ----@field ABILITY_BLF_ACCEPTS_LUMBER abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Rtn2') ---- ----ABILITY_BLF_PREFER_HOSTILES_ROA5 'common.ABILITY_BLF_PREFER_HOSTILES_ROA5' ----@field ABILITY_BLF_PREFER_HOSTILES_ROA5 abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Roa5') ---- ----ABILITY_BLF_PREFER_FRIENDLIES_ROA6 'common.ABILITY_BLF_PREFER_FRIENDLIES_ROA6' ----@field ABILITY_BLF_PREFER_FRIENDLIES_ROA6 abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Roa6') ---- ----ABILITY_BLF_ROOTED_TURNING 'common.ABILITY_BLF_ROOTED_TURNING' ----@field ABILITY_BLF_ROOTED_TURNING abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Roo3') ---- ----ABILITY_BLF_ALWAYS_AUTOCAST_SLO3 'common.ABILITY_BLF_ALWAYS_AUTOCAST_SLO3' ----@field ABILITY_BLF_ALWAYS_AUTOCAST_SLO3 abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Slo3') ---- ----ABILITY_BLF_HIDE_BUTTON 'common.ABILITY_BLF_HIDE_BUTTON' ----@field ABILITY_BLF_HIDE_BUTTON abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Ihid') ---- ----ABILITY_BLF_USE_TELEPORT_CLUSTERING_ITP2 'common.ABILITY_BLF_USE_TELEPORT_CLUSTERING_ITP2' ----@field ABILITY_BLF_USE_TELEPORT_CLUSTERING_ITP2 abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Itp2') ---- ----ABILITY_BLF_IMMUNE_TO_MORPH_EFFECTS 'common.ABILITY_BLF_IMMUNE_TO_MORPH_EFFECTS' ----@field ABILITY_BLF_IMMUNE_TO_MORPH_EFFECTS abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Eth1') ---- ----ABILITY_BLF_DOES_NOT_BLOCK_BUILDINGS 'common.ABILITY_BLF_DOES_NOT_BLOCK_BUILDINGS' ----@field ABILITY_BLF_DOES_NOT_BLOCK_BUILDINGS abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Eth2') ---- ----ABILITY_BLF_AUTO_ACQUIRE_ATTACK_TARGETS 'common.ABILITY_BLF_AUTO_ACQUIRE_ATTACK_TARGETS' ----@field ABILITY_BLF_AUTO_ACQUIRE_ATTACK_TARGETS abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Gho1') ---- ----ABILITY_BLF_IMMUNE_TO_MORPH_EFFECTS_GHO2 'common.ABILITY_BLF_IMMUNE_TO_MORPH_EFFECTS_GHO2' ----@field ABILITY_BLF_IMMUNE_TO_MORPH_EFFECTS_GHO2 abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Gho2') ---- ----ABILITY_BLF_DO_NOT_BLOCK_BUILDINGS 'common.ABILITY_BLF_DO_NOT_BLOCK_BUILDINGS' ----@field ABILITY_BLF_DO_NOT_BLOCK_BUILDINGS abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Gho3') ---- ----ABILITY_BLF_INCLUDE_RANGED_DAMAGE 'common.ABILITY_BLF_INCLUDE_RANGED_DAMAGE' ----@field ABILITY_BLF_INCLUDE_RANGED_DAMAGE abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Ssk4') ---- ----ABILITY_BLF_INCLUDE_MELEE_DAMAGE 'common.ABILITY_BLF_INCLUDE_MELEE_DAMAGE' ----@field ABILITY_BLF_INCLUDE_MELEE_DAMAGE abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Ssk5') ---- ----ABILITY_BLF_MOVE_TO_PARTNER 'common.ABILITY_BLF_MOVE_TO_PARTNER' ----@field ABILITY_BLF_MOVE_TO_PARTNER abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('coa2') ---- ----ABILITY_BLF_CAN_BE_DISPELLED 'common.ABILITY_BLF_CAN_BE_DISPELLED' ----@field ABILITY_BLF_CAN_BE_DISPELLED abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('cyc1') ---- ----ABILITY_BLF_IGNORE_FRIENDLY_BUFFS 'common.ABILITY_BLF_IGNORE_FRIENDLY_BUFFS' ----@field ABILITY_BLF_IGNORE_FRIENDLY_BUFFS abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('dvm6') ---- ----ABILITY_BLF_DROP_ITEMS_ON_DEATH 'common.ABILITY_BLF_DROP_ITEMS_ON_DEATH' ----@field ABILITY_BLF_DROP_ITEMS_ON_DEATH abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('inv2') ---- ----ABILITY_BLF_CAN_USE_ITEMS 'common.ABILITY_BLF_CAN_USE_ITEMS' ----@field ABILITY_BLF_CAN_USE_ITEMS abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('inv3') ---- ----ABILITY_BLF_CAN_GET_ITEMS 'common.ABILITY_BLF_CAN_GET_ITEMS' ----@field ABILITY_BLF_CAN_GET_ITEMS abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('inv4') ---- ----ABILITY_BLF_CAN_DROP_ITEMS 'common.ABILITY_BLF_CAN_DROP_ITEMS' ----@field ABILITY_BLF_CAN_DROP_ITEMS abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('inv5') ---- ----ABILITY_BLF_REPAIRS_ALLOWED 'common.ABILITY_BLF_REPAIRS_ALLOWED' ----@field ABILITY_BLF_REPAIRS_ALLOWED abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('liq4') ---- ----ABILITY_BLF_CASTER_ONLY_SPLASH 'common.ABILITY_BLF_CASTER_ONLY_SPLASH' ----@field ABILITY_BLF_CASTER_ONLY_SPLASH abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('mfl6') ---- ----ABILITY_BLF_NO_TARGET_REQUIRED_IRL4 'common.ABILITY_BLF_NO_TARGET_REQUIRED_IRL4' ----@field ABILITY_BLF_NO_TARGET_REQUIRED_IRL4 abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('irl4') ---- ----ABILITY_BLF_DISPEL_ON_ATTACK 'common.ABILITY_BLF_DISPEL_ON_ATTACK' ----@field ABILITY_BLF_DISPEL_ON_ATTACK abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('irl5') ---- ----ABILITY_BLF_AMOUNT_IS_RAW_VALUE 'common.ABILITY_BLF_AMOUNT_IS_RAW_VALUE' ----@field ABILITY_BLF_AMOUNT_IS_RAW_VALUE abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('ipv3') ---- ----ABILITY_BLF_SHARED_SPELL_COOLDOWN 'common.ABILITY_BLF_SHARED_SPELL_COOLDOWN' ----@field ABILITY_BLF_SHARED_SPELL_COOLDOWN abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('spb2') ---- ----ABILITY_BLF_SLEEP_ONCE 'common.ABILITY_BLF_SLEEP_ONCE' ----@field ABILITY_BLF_SLEEP_ONCE abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('sla1') ---- ----ABILITY_BLF_ALLOW_ON_ANY_PLAYER_SLOT 'common.ABILITY_BLF_ALLOW_ON_ANY_PLAYER_SLOT' ----@field ABILITY_BLF_ALLOW_ON_ANY_PLAYER_SLOT abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('sla2') ---- ----ABILITY_BLF_DISABLE_OTHER_ABILITIES 'common.ABILITY_BLF_DISABLE_OTHER_ABILITIES' ----@field ABILITY_BLF_DISABLE_OTHER_ABILITIES abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Ncl5') ---- ----ABILITY_BLF_ALLOW_BOUNTY 'common.ABILITY_BLF_ALLOW_BOUNTY' ----@field ABILITY_BLF_ALLOW_BOUNTY abilitybooleanlevelfield _ConvertAbilityBooleanLevelField('Ntm4') ---- ----ABILITY_SLF_ICON_NORMAL 'common.ABILITY_SLF_ICON_NORMAL' ----@field ABILITY_SLF_ICON_NORMAL abilitystringlevelfield _ConvertAbilityStringLevelField('aart') ---- ----ABILITY_SLF_CASTER 'common.ABILITY_SLF_CASTER' ----@field ABILITY_SLF_CASTER abilitystringlevelfield _ConvertAbilityStringLevelField('acat') ---- ----ABILITY_SLF_TARGET 'common.ABILITY_SLF_TARGET' ----@field ABILITY_SLF_TARGET abilitystringlevelfield _ConvertAbilityStringLevelField('atat') ---- ----ABILITY_SLF_SPECIAL 'common.ABILITY_SLF_SPECIAL' ----@field ABILITY_SLF_SPECIAL abilitystringlevelfield _ConvertAbilityStringLevelField('asat') ---- ----ABILITY_SLF_EFFECT 'common.ABILITY_SLF_EFFECT' ----@field ABILITY_SLF_EFFECT abilitystringlevelfield _ConvertAbilityStringLevelField('aeat') ---- ----ABILITY_SLF_AREA_EFFECT 'common.ABILITY_SLF_AREA_EFFECT' ----@field ABILITY_SLF_AREA_EFFECT abilitystringlevelfield _ConvertAbilityStringLevelField('aaea') ---- ----ABILITY_SLF_LIGHTNING_EFFECTS 'common.ABILITY_SLF_LIGHTNING_EFFECTS' ----@field ABILITY_SLF_LIGHTNING_EFFECTS abilitystringlevelfield _ConvertAbilityStringLevelField('alig') ---- ----ABILITY_SLF_MISSILE_ART 'common.ABILITY_SLF_MISSILE_ART' ----@field ABILITY_SLF_MISSILE_ART abilitystringlevelfield _ConvertAbilityStringLevelField('amat') ---- ----ABILITY_SLF_TOOLTIP_LEARN 'common.ABILITY_SLF_TOOLTIP_LEARN' ----@field ABILITY_SLF_TOOLTIP_LEARN abilitystringlevelfield _ConvertAbilityStringLevelField('aret') ---- ----ABILITY_SLF_TOOLTIP_LEARN_EXTENDED 'common.ABILITY_SLF_TOOLTIP_LEARN_EXTENDED' ----@field ABILITY_SLF_TOOLTIP_LEARN_EXTENDED abilitystringlevelfield _ConvertAbilityStringLevelField('arut') ---- ----ABILITY_SLF_TOOLTIP_NORMAL 'common.ABILITY_SLF_TOOLTIP_NORMAL' ----@field ABILITY_SLF_TOOLTIP_NORMAL abilitystringlevelfield _ConvertAbilityStringLevelField('atp1') ---- ----ABILITY_SLF_TOOLTIP_TURN_OFF 'common.ABILITY_SLF_TOOLTIP_TURN_OFF' ----@field ABILITY_SLF_TOOLTIP_TURN_OFF abilitystringlevelfield _ConvertAbilityStringLevelField('aut1') ---- ----ABILITY_SLF_TOOLTIP_NORMAL_EXTENDED 'common.ABILITY_SLF_TOOLTIP_NORMAL_EXTENDED' ----@field ABILITY_SLF_TOOLTIP_NORMAL_EXTENDED abilitystringlevelfield _ConvertAbilityStringLevelField('aub1') ---- ----ABILITY_SLF_TOOLTIP_TURN_OFF_EXTENDED 'common.ABILITY_SLF_TOOLTIP_TURN_OFF_EXTENDED' ----@field ABILITY_SLF_TOOLTIP_TURN_OFF_EXTENDED abilitystringlevelfield _ConvertAbilityStringLevelField('auu1') ---- ----ABILITY_SLF_NORMAL_FORM_UNIT_EME1 'common.ABILITY_SLF_NORMAL_FORM_UNIT_EME1' ----@field ABILITY_SLF_NORMAL_FORM_UNIT_EME1 abilitystringlevelfield _ConvertAbilityStringLevelField('Eme1') ---- ----ABILITY_SLF_SPAWNED_UNITS 'common.ABILITY_SLF_SPAWNED_UNITS' ----@field ABILITY_SLF_SPAWNED_UNITS abilitystringlevelfield _ConvertAbilityStringLevelField('Ndp1') ---- ----ABILITY_SLF_ABILITY_FOR_UNIT_CREATION 'common.ABILITY_SLF_ABILITY_FOR_UNIT_CREATION' ----@field ABILITY_SLF_ABILITY_FOR_UNIT_CREATION abilitystringlevelfield _ConvertAbilityStringLevelField('Nrc1') ---- ----ABILITY_SLF_NORMAL_FORM_UNIT_MIL1 'common.ABILITY_SLF_NORMAL_FORM_UNIT_MIL1' ----@field ABILITY_SLF_NORMAL_FORM_UNIT_MIL1 abilitystringlevelfield _ConvertAbilityStringLevelField('Mil1') ---- ----ABILITY_SLF_ALTERNATE_FORM_UNIT_MIL2 'common.ABILITY_SLF_ALTERNATE_FORM_UNIT_MIL2' ----@field ABILITY_SLF_ALTERNATE_FORM_UNIT_MIL2 abilitystringlevelfield _ConvertAbilityStringLevelField('Mil2') ---- ----ABILITY_SLF_BASE_ORDER_ID_ANS5 'common.ABILITY_SLF_BASE_ORDER_ID_ANS5' ----@field ABILITY_SLF_BASE_ORDER_ID_ANS5 abilitystringlevelfield _ConvertAbilityStringLevelField('Ans5') ---- ----ABILITY_SLF_MORPH_UNITS_GROUND 'common.ABILITY_SLF_MORPH_UNITS_GROUND' ----@field ABILITY_SLF_MORPH_UNITS_GROUND abilitystringlevelfield _ConvertAbilityStringLevelField('Ply2') ---- ----ABILITY_SLF_MORPH_UNITS_AIR 'common.ABILITY_SLF_MORPH_UNITS_AIR' ----@field ABILITY_SLF_MORPH_UNITS_AIR abilitystringlevelfield _ConvertAbilityStringLevelField('Ply3') ---- ----ABILITY_SLF_MORPH_UNITS_AMPHIBIOUS 'common.ABILITY_SLF_MORPH_UNITS_AMPHIBIOUS' ----@field ABILITY_SLF_MORPH_UNITS_AMPHIBIOUS abilitystringlevelfield _ConvertAbilityStringLevelField('Ply4') ---- ----ABILITY_SLF_MORPH_UNITS_WATER 'common.ABILITY_SLF_MORPH_UNITS_WATER' ----@field ABILITY_SLF_MORPH_UNITS_WATER abilitystringlevelfield _ConvertAbilityStringLevelField('Ply5') ---- ----ABILITY_SLF_UNIT_TYPE_ONE 'common.ABILITY_SLF_UNIT_TYPE_ONE' ----@field ABILITY_SLF_UNIT_TYPE_ONE abilitystringlevelfield _ConvertAbilityStringLevelField('Rai3') ---- ----ABILITY_SLF_UNIT_TYPE_TWO 'common.ABILITY_SLF_UNIT_TYPE_TWO' ----@field ABILITY_SLF_UNIT_TYPE_TWO abilitystringlevelfield _ConvertAbilityStringLevelField('Rai4') ---- ----ABILITY_SLF_UNIT_TYPE_SOD2 'common.ABILITY_SLF_UNIT_TYPE_SOD2' ----@field ABILITY_SLF_UNIT_TYPE_SOD2 abilitystringlevelfield _ConvertAbilityStringLevelField('Sod2') ---- ----ABILITY_SLF_SUMMON_1_UNIT_TYPE 'common.ABILITY_SLF_SUMMON_1_UNIT_TYPE' ----@field ABILITY_SLF_SUMMON_1_UNIT_TYPE abilitystringlevelfield _ConvertAbilityStringLevelField('Ist1') ---- ----ABILITY_SLF_SUMMON_2_UNIT_TYPE 'common.ABILITY_SLF_SUMMON_2_UNIT_TYPE' ----@field ABILITY_SLF_SUMMON_2_UNIT_TYPE abilitystringlevelfield _ConvertAbilityStringLevelField('Ist2') ---- ----ABILITY_SLF_RACE_TO_CONVERT 'common.ABILITY_SLF_RACE_TO_CONVERT' ----@field ABILITY_SLF_RACE_TO_CONVERT abilitystringlevelfield _ConvertAbilityStringLevelField('Ndc1') ---- ----ABILITY_SLF_PARTNER_UNIT_TYPE 'common.ABILITY_SLF_PARTNER_UNIT_TYPE' ----@field ABILITY_SLF_PARTNER_UNIT_TYPE abilitystringlevelfield _ConvertAbilityStringLevelField('coa1') ---- ----ABILITY_SLF_PARTNER_UNIT_TYPE_ONE 'common.ABILITY_SLF_PARTNER_UNIT_TYPE_ONE' ----@field ABILITY_SLF_PARTNER_UNIT_TYPE_ONE abilitystringlevelfield _ConvertAbilityStringLevelField('dcp1') ---- ----ABILITY_SLF_PARTNER_UNIT_TYPE_TWO 'common.ABILITY_SLF_PARTNER_UNIT_TYPE_TWO' ----@field ABILITY_SLF_PARTNER_UNIT_TYPE_TWO abilitystringlevelfield _ConvertAbilityStringLevelField('dcp2') ---- ----ABILITY_SLF_REQUIRED_UNIT_TYPE 'common.ABILITY_SLF_REQUIRED_UNIT_TYPE' ----@field ABILITY_SLF_REQUIRED_UNIT_TYPE abilitystringlevelfield _ConvertAbilityStringLevelField('tpi1') ---- ----ABILITY_SLF_CONVERTED_UNIT_TYPE 'common.ABILITY_SLF_CONVERTED_UNIT_TYPE' ----@field ABILITY_SLF_CONVERTED_UNIT_TYPE abilitystringlevelfield _ConvertAbilityStringLevelField('tpi2') ---- ----ABILITY_SLF_SPELL_LIST 'common.ABILITY_SLF_SPELL_LIST' ----@field ABILITY_SLF_SPELL_LIST abilitystringlevelfield _ConvertAbilityStringLevelField('spb1') ---- ----ABILITY_SLF_BASE_ORDER_ID_SPB5 'common.ABILITY_SLF_BASE_ORDER_ID_SPB5' ----@field ABILITY_SLF_BASE_ORDER_ID_SPB5 abilitystringlevelfield _ConvertAbilityStringLevelField('spb5') ---- ----ABILITY_SLF_BASE_ORDER_ID_NCL6 'common.ABILITY_SLF_BASE_ORDER_ID_NCL6' ----@field ABILITY_SLF_BASE_ORDER_ID_NCL6 abilitystringlevelfield _ConvertAbilityStringLevelField('Ncl6') ---- ----ABILITY_SLF_ABILITY_UPGRADE_1 'common.ABILITY_SLF_ABILITY_UPGRADE_1' ----@field ABILITY_SLF_ABILITY_UPGRADE_1 abilitystringlevelfield _ConvertAbilityStringLevelField('Neg3') ---- ----ABILITY_SLF_ABILITY_UPGRADE_2 'common.ABILITY_SLF_ABILITY_UPGRADE_2' ----@field ABILITY_SLF_ABILITY_UPGRADE_2 abilitystringlevelfield _ConvertAbilityStringLevelField('Neg4') ---- ----ABILITY_SLF_ABILITY_UPGRADE_3 'common.ABILITY_SLF_ABILITY_UPGRADE_3' ----@field ABILITY_SLF_ABILITY_UPGRADE_3 abilitystringlevelfield _ConvertAbilityStringLevelField('Neg5') ---- ----ABILITY_SLF_ABILITY_UPGRADE_4 'common.ABILITY_SLF_ABILITY_UPGRADE_4' ----@field ABILITY_SLF_ABILITY_UPGRADE_4 abilitystringlevelfield _ConvertAbilityStringLevelField('Neg6') ---- ----ABILITY_SLF_SPAWN_UNIT_ID_NSY2 'common.ABILITY_SLF_SPAWN_UNIT_ID_NSY2' ----@field ABILITY_SLF_SPAWN_UNIT_ID_NSY2 abilitystringlevelfield _ConvertAbilityStringLevelField('Nsy2') ---- ----Item ----Item 'common.ITEM_IF_LEVEL' ----@field ITEM_IF_LEVEL itemintegerfield _ConvertItemIntegerField('ilev') ---- ----ITEM_IF_NUMBER_OF_CHARGES 'common.ITEM_IF_NUMBER_OF_CHARGES' ----@field ITEM_IF_NUMBER_OF_CHARGES itemintegerfield _ConvertItemIntegerField('iuse') ---- ----ITEM_IF_COOLDOWN_GROUP 'common.ITEM_IF_COOLDOWN_GROUP' ----@field ITEM_IF_COOLDOWN_GROUP itemintegerfield _ConvertItemIntegerField('icid') ---- ----ITEM_IF_MAX_HIT_POINTS 'common.ITEM_IF_MAX_HIT_POINTS' ----@field ITEM_IF_MAX_HIT_POINTS itemintegerfield _ConvertItemIntegerField('ihtp') ---- ----ITEM_IF_HIT_POINTS 'common.ITEM_IF_HIT_POINTS' ----@field ITEM_IF_HIT_POINTS itemintegerfield _ConvertItemIntegerField('ihpc') ---- ----ITEM_IF_PRIORITY 'common.ITEM_IF_PRIORITY' ----@field ITEM_IF_PRIORITY itemintegerfield _ConvertItemIntegerField('ipri') ---- ----ITEM_IF_ARMOR_TYPE 'common.ITEM_IF_ARMOR_TYPE' ----@field ITEM_IF_ARMOR_TYPE itemintegerfield _ConvertItemIntegerField('iarm') ---- ----ITEM_IF_TINTING_COLOR_RED 'common.ITEM_IF_TINTING_COLOR_RED' ----@field ITEM_IF_TINTING_COLOR_RED itemintegerfield _ConvertItemIntegerField('iclr') ---- ----ITEM_IF_TINTING_COLOR_GREEN 'common.ITEM_IF_TINTING_COLOR_GREEN' ----@field ITEM_IF_TINTING_COLOR_GREEN itemintegerfield _ConvertItemIntegerField('iclg') ---- ----ITEM_IF_TINTING_COLOR_BLUE 'common.ITEM_IF_TINTING_COLOR_BLUE' ----@field ITEM_IF_TINTING_COLOR_BLUE itemintegerfield _ConvertItemIntegerField('iclb') ---- ----ITEM_IF_TINTING_COLOR_ALPHA 'common.ITEM_IF_TINTING_COLOR_ALPHA' ----@field ITEM_IF_TINTING_COLOR_ALPHA itemintegerfield _ConvertItemIntegerField('ical') ---- ----ITEM_RF_SCALING_VALUE 'common.ITEM_RF_SCALING_VALUE' ----@field ITEM_RF_SCALING_VALUE itemrealfield _ConvertItemRealField('isca') ---- ----ITEM_BF_DROPPED_WHEN_CARRIER_DIES 'common.ITEM_BF_DROPPED_WHEN_CARRIER_DIES' ----@field ITEM_BF_DROPPED_WHEN_CARRIER_DIES itembooleanfield _ConvertItemBooleanField('idrp') ---- ----ITEM_BF_CAN_BE_DROPPED 'common.ITEM_BF_CAN_BE_DROPPED' ----@field ITEM_BF_CAN_BE_DROPPED itembooleanfield _ConvertItemBooleanField('idro') ---- ----ITEM_BF_PERISHABLE 'common.ITEM_BF_PERISHABLE' ----@field ITEM_BF_PERISHABLE itembooleanfield _ConvertItemBooleanField('iper') ---- ----ITEM_BF_INCLUDE_AS_RANDOM_CHOICE 'common.ITEM_BF_INCLUDE_AS_RANDOM_CHOICE' ----@field ITEM_BF_INCLUDE_AS_RANDOM_CHOICE itembooleanfield _ConvertItemBooleanField('iprn') ---- ----ITEM_BF_USE_AUTOMATICALLY_WHEN_ACQUIRED 'common.ITEM_BF_USE_AUTOMATICALLY_WHEN_ACQUIRED' ----@field ITEM_BF_USE_AUTOMATICALLY_WHEN_ACQUIRED itembooleanfield _ConvertItemBooleanField('ipow') ---- ----ITEM_BF_CAN_BE_SOLD_TO_MERCHANTS 'common.ITEM_BF_CAN_BE_SOLD_TO_MERCHANTS' ----@field ITEM_BF_CAN_BE_SOLD_TO_MERCHANTS itembooleanfield _ConvertItemBooleanField('ipaw') ---- ----ITEM_BF_ACTIVELY_USED 'common.ITEM_BF_ACTIVELY_USED' ----@field ITEM_BF_ACTIVELY_USED itembooleanfield _ConvertItemBooleanField('iusa') ---- ----ITEM_SF_MODEL_USED 'common.ITEM_SF_MODEL_USED' ----@field ITEM_SF_MODEL_USED itemstringfield _ConvertItemStringField('ifil') ---- ----Unit ----Unit 'common.UNIT_IF_DEFENSE_TYPE' ----@field UNIT_IF_DEFENSE_TYPE unitintegerfield _ConvertUnitIntegerField('udty') ---- ----UNIT_IF_ARMOR_TYPE 'common.UNIT_IF_ARMOR_TYPE' ----@field UNIT_IF_ARMOR_TYPE unitintegerfield _ConvertUnitIntegerField('uarm') ---- ----UNIT_IF_LOOPING_FADE_IN_RATE 'common.UNIT_IF_LOOPING_FADE_IN_RATE' ----@field UNIT_IF_LOOPING_FADE_IN_RATE unitintegerfield _ConvertUnitIntegerField('ulfi') ---- ----UNIT_IF_LOOPING_FADE_OUT_RATE 'common.UNIT_IF_LOOPING_FADE_OUT_RATE' ----@field UNIT_IF_LOOPING_FADE_OUT_RATE unitintegerfield _ConvertUnitIntegerField('ulfo') ---- ----UNIT_IF_AGILITY 'common.UNIT_IF_AGILITY' ----@field UNIT_IF_AGILITY unitintegerfield _ConvertUnitIntegerField('uagc') ---- ----UNIT_IF_INTELLIGENCE 'common.UNIT_IF_INTELLIGENCE' ----@field UNIT_IF_INTELLIGENCE unitintegerfield _ConvertUnitIntegerField('uinc') ---- ----UNIT_IF_STRENGTH 'common.UNIT_IF_STRENGTH' ----@field UNIT_IF_STRENGTH unitintegerfield _ConvertUnitIntegerField('ustc') ---- ----UNIT_IF_AGILITY_PERMANENT 'common.UNIT_IF_AGILITY_PERMANENT' ----@field UNIT_IF_AGILITY_PERMANENT unitintegerfield _ConvertUnitIntegerField('uagm') ---- ----UNIT_IF_INTELLIGENCE_PERMANENT 'common.UNIT_IF_INTELLIGENCE_PERMANENT' ----@field UNIT_IF_INTELLIGENCE_PERMANENT unitintegerfield _ConvertUnitIntegerField('uinm') ---- ----UNIT_IF_STRENGTH_PERMANENT 'common.UNIT_IF_STRENGTH_PERMANENT' ----@field UNIT_IF_STRENGTH_PERMANENT unitintegerfield _ConvertUnitIntegerField('ustm') ---- ----UNIT_IF_AGILITY_WITH_BONUS 'common.UNIT_IF_AGILITY_WITH_BONUS' ----@field UNIT_IF_AGILITY_WITH_BONUS unitintegerfield _ConvertUnitIntegerField('uagb') ---- ----UNIT_IF_INTELLIGENCE_WITH_BONUS 'common.UNIT_IF_INTELLIGENCE_WITH_BONUS' ----@field UNIT_IF_INTELLIGENCE_WITH_BONUS unitintegerfield _ConvertUnitIntegerField('uinb') ---- ----UNIT_IF_STRENGTH_WITH_BONUS 'common.UNIT_IF_STRENGTH_WITH_BONUS' ----@field UNIT_IF_STRENGTH_WITH_BONUS unitintegerfield _ConvertUnitIntegerField('ustb') ---- ----UNIT_IF_GOLD_BOUNTY_AWARDED_NUMBER_OF_DICE 'common.UNIT_IF_GOLD_BOUNTY_AWARDED_NUMBER_OF_DICE' ----@field UNIT_IF_GOLD_BOUNTY_AWARDED_NUMBER_OF_DICE unitintegerfield _ConvertUnitIntegerField('ubdi') ---- ----UNIT_IF_GOLD_BOUNTY_AWARDED_BASE 'common.UNIT_IF_GOLD_BOUNTY_AWARDED_BASE' ----@field UNIT_IF_GOLD_BOUNTY_AWARDED_BASE unitintegerfield _ConvertUnitIntegerField('ubba') ---- ----UNIT_IF_GOLD_BOUNTY_AWARDED_SIDES_PER_DIE 'common.UNIT_IF_GOLD_BOUNTY_AWARDED_SIDES_PER_DIE' ----@field UNIT_IF_GOLD_BOUNTY_AWARDED_SIDES_PER_DIE unitintegerfield _ConvertUnitIntegerField('ubsi') ---- ----UNIT_IF_LUMBER_BOUNTY_AWARDED_NUMBER_OF_DICE 'common.UNIT_IF_LUMBER_BOUNTY_AWARDED_NUMBER_OF_DICE' ----@field UNIT_IF_LUMBER_BOUNTY_AWARDED_NUMBER_OF_DICE unitintegerfield _ConvertUnitIntegerField('ulbd') ---- ----UNIT_IF_LUMBER_BOUNTY_AWARDED_BASE 'common.UNIT_IF_LUMBER_BOUNTY_AWARDED_BASE' ----@field UNIT_IF_LUMBER_BOUNTY_AWARDED_BASE unitintegerfield _ConvertUnitIntegerField('ulba') ---- ----UNIT_IF_LUMBER_BOUNTY_AWARDED_SIDES_PER_DIE 'common.UNIT_IF_LUMBER_BOUNTY_AWARDED_SIDES_PER_DIE' ----@field UNIT_IF_LUMBER_BOUNTY_AWARDED_SIDES_PER_DIE unitintegerfield _ConvertUnitIntegerField('ulbs') ---- ----UNIT_IF_LEVEL 'common.UNIT_IF_LEVEL' ----@field UNIT_IF_LEVEL unitintegerfield _ConvertUnitIntegerField('ulev') ---- ----UNIT_IF_FORMATION_RANK 'common.UNIT_IF_FORMATION_RANK' ----@field UNIT_IF_FORMATION_RANK unitintegerfield _ConvertUnitIntegerField('ufor') ---- ----UNIT_IF_ORIENTATION_INTERPOLATION 'common.UNIT_IF_ORIENTATION_INTERPOLATION' ----@field UNIT_IF_ORIENTATION_INTERPOLATION unitintegerfield _ConvertUnitIntegerField('uori') ---- ----UNIT_IF_ELEVATION_SAMPLE_POINTS 'common.UNIT_IF_ELEVATION_SAMPLE_POINTS' ----@field UNIT_IF_ELEVATION_SAMPLE_POINTS unitintegerfield _ConvertUnitIntegerField('uept') ---- ----UNIT_IF_TINTING_COLOR_RED 'common.UNIT_IF_TINTING_COLOR_RED' ----@field UNIT_IF_TINTING_COLOR_RED unitintegerfield _ConvertUnitIntegerField('uclr') ---- ----UNIT_IF_TINTING_COLOR_GREEN 'common.UNIT_IF_TINTING_COLOR_GREEN' ----@field UNIT_IF_TINTING_COLOR_GREEN unitintegerfield _ConvertUnitIntegerField('uclg') ---- ----UNIT_IF_TINTING_COLOR_BLUE 'common.UNIT_IF_TINTING_COLOR_BLUE' ----@field UNIT_IF_TINTING_COLOR_BLUE unitintegerfield _ConvertUnitIntegerField('uclb') ---- ----UNIT_IF_TINTING_COLOR_ALPHA 'common.UNIT_IF_TINTING_COLOR_ALPHA' ----@field UNIT_IF_TINTING_COLOR_ALPHA unitintegerfield _ConvertUnitIntegerField('ucal') ---- ----UNIT_IF_MOVE_TYPE 'common.UNIT_IF_MOVE_TYPE' ----@field UNIT_IF_MOVE_TYPE unitintegerfield _ConvertUnitIntegerField('umvt') ---- ----UNIT_IF_TARGETED_AS 'common.UNIT_IF_TARGETED_AS' ----@field UNIT_IF_TARGETED_AS unitintegerfield _ConvertUnitIntegerField('utar') ---- ----UNIT_IF_UNIT_CLASSIFICATION 'common.UNIT_IF_UNIT_CLASSIFICATION' ----@field UNIT_IF_UNIT_CLASSIFICATION unitintegerfield _ConvertUnitIntegerField('utyp') ---- ----UNIT_IF_HIT_POINTS_REGENERATION_TYPE 'common.UNIT_IF_HIT_POINTS_REGENERATION_TYPE' ----@field UNIT_IF_HIT_POINTS_REGENERATION_TYPE unitintegerfield _ConvertUnitIntegerField('uhrt') ---- ----UNIT_IF_PLACEMENT_PREVENTED_BY 'common.UNIT_IF_PLACEMENT_PREVENTED_BY' ----@field UNIT_IF_PLACEMENT_PREVENTED_BY unitintegerfield _ConvertUnitIntegerField('upar') ---- ----UNIT_IF_PRIMARY_ATTRIBUTE 'common.UNIT_IF_PRIMARY_ATTRIBUTE' ----@field UNIT_IF_PRIMARY_ATTRIBUTE unitintegerfield _ConvertUnitIntegerField('upra') ---- ----UNIT_RF_STRENGTH_PER_LEVEL 'common.UNIT_RF_STRENGTH_PER_LEVEL' ----@field UNIT_RF_STRENGTH_PER_LEVEL unitrealfield _ConvertUnitRealField('ustp') ---- ----UNIT_RF_AGILITY_PER_LEVEL 'common.UNIT_RF_AGILITY_PER_LEVEL' ----@field UNIT_RF_AGILITY_PER_LEVEL unitrealfield _ConvertUnitRealField('uagp') ---- ----UNIT_RF_INTELLIGENCE_PER_LEVEL 'common.UNIT_RF_INTELLIGENCE_PER_LEVEL' ----@field UNIT_RF_INTELLIGENCE_PER_LEVEL unitrealfield _ConvertUnitRealField('uinp') ---- ----UNIT_RF_HIT_POINTS_REGENERATION_RATE 'common.UNIT_RF_HIT_POINTS_REGENERATION_RATE' ----@field UNIT_RF_HIT_POINTS_REGENERATION_RATE unitrealfield _ConvertUnitRealField('uhpr') ---- ----UNIT_RF_MANA_REGENERATION 'common.UNIT_RF_MANA_REGENERATION' ----@field UNIT_RF_MANA_REGENERATION unitrealfield _ConvertUnitRealField('umpr') ---- ----UNIT_RF_DEATH_TIME 'common.UNIT_RF_DEATH_TIME' ----@field UNIT_RF_DEATH_TIME unitrealfield _ConvertUnitRealField('udtm') ---- ----UNIT_RF_FLY_HEIGHT 'common.UNIT_RF_FLY_HEIGHT' ----@field UNIT_RF_FLY_HEIGHT unitrealfield _ConvertUnitRealField('ufyh') ---- ----UNIT_RF_TURN_RATE 'common.UNIT_RF_TURN_RATE' ----@field UNIT_RF_TURN_RATE unitrealfield _ConvertUnitRealField('umvr') ---- ----UNIT_RF_ELEVATION_SAMPLE_RADIUS 'common.UNIT_RF_ELEVATION_SAMPLE_RADIUS' ----@field UNIT_RF_ELEVATION_SAMPLE_RADIUS unitrealfield _ConvertUnitRealField('uerd') ---- ----UNIT_RF_FOG_OF_WAR_SAMPLE_RADIUS 'common.UNIT_RF_FOG_OF_WAR_SAMPLE_RADIUS' ----@field UNIT_RF_FOG_OF_WAR_SAMPLE_RADIUS unitrealfield _ConvertUnitRealField('ufrd') ---- ----UNIT_RF_MAXIMUM_PITCH_ANGLE_DEGREES 'common.UNIT_RF_MAXIMUM_PITCH_ANGLE_DEGREES' ----@field UNIT_RF_MAXIMUM_PITCH_ANGLE_DEGREES unitrealfield _ConvertUnitRealField('umxp') ---- ----UNIT_RF_MAXIMUM_ROLL_ANGLE_DEGREES 'common.UNIT_RF_MAXIMUM_ROLL_ANGLE_DEGREES' ----@field UNIT_RF_MAXIMUM_ROLL_ANGLE_DEGREES unitrealfield _ConvertUnitRealField('umxr') ---- ----UNIT_RF_SCALING_VALUE 'common.UNIT_RF_SCALING_VALUE' ----@field UNIT_RF_SCALING_VALUE unitrealfield _ConvertUnitRealField('usca') ---- ----UNIT_RF_ANIMATION_RUN_SPEED 'common.UNIT_RF_ANIMATION_RUN_SPEED' ----@field UNIT_RF_ANIMATION_RUN_SPEED unitrealfield _ConvertUnitRealField('urun') ---- ----UNIT_RF_SELECTION_SCALE 'common.UNIT_RF_SELECTION_SCALE' ----@field UNIT_RF_SELECTION_SCALE unitrealfield _ConvertUnitRealField('ussc') ---- ----UNIT_RF_SELECTION_CIRCLE_HEIGHT 'common.UNIT_RF_SELECTION_CIRCLE_HEIGHT' ----@field UNIT_RF_SELECTION_CIRCLE_HEIGHT unitrealfield _ConvertUnitRealField('uslz') ---- ----UNIT_RF_SHADOW_IMAGE_HEIGHT 'common.UNIT_RF_SHADOW_IMAGE_HEIGHT' ----@field UNIT_RF_SHADOW_IMAGE_HEIGHT unitrealfield _ConvertUnitRealField('ushh') ---- ----UNIT_RF_SHADOW_IMAGE_WIDTH 'common.UNIT_RF_SHADOW_IMAGE_WIDTH' ----@field UNIT_RF_SHADOW_IMAGE_WIDTH unitrealfield _ConvertUnitRealField('ushw') ---- ----UNIT_RF_SHADOW_IMAGE_CENTER_X 'common.UNIT_RF_SHADOW_IMAGE_CENTER_X' ----@field UNIT_RF_SHADOW_IMAGE_CENTER_X unitrealfield _ConvertUnitRealField('ushx') ---- ----UNIT_RF_SHADOW_IMAGE_CENTER_Y 'common.UNIT_RF_SHADOW_IMAGE_CENTER_Y' ----@field UNIT_RF_SHADOW_IMAGE_CENTER_Y unitrealfield _ConvertUnitRealField('ushy') ---- ----UNIT_RF_ANIMATION_WALK_SPEED 'common.UNIT_RF_ANIMATION_WALK_SPEED' ----@field UNIT_RF_ANIMATION_WALK_SPEED unitrealfield _ConvertUnitRealField('uwal') ---- ----UNIT_RF_DEFENSE 'common.UNIT_RF_DEFENSE' ----@field UNIT_RF_DEFENSE unitrealfield _ConvertUnitRealField('udfc') ---- ----UNIT_RF_SIGHT_RADIUS 'common.UNIT_RF_SIGHT_RADIUS' ----@field UNIT_RF_SIGHT_RADIUS unitrealfield _ConvertUnitRealField('usir') ---- ----UNIT_RF_PRIORITY 'common.UNIT_RF_PRIORITY' ----@field UNIT_RF_PRIORITY unitrealfield _ConvertUnitRealField('upri') ---- ----UNIT_RF_SPEED 'common.UNIT_RF_SPEED' ----@field UNIT_RF_SPEED unitrealfield _ConvertUnitRealField('umvc') ---- ----UNIT_RF_OCCLUDER_HEIGHT 'common.UNIT_RF_OCCLUDER_HEIGHT' ----@field UNIT_RF_OCCLUDER_HEIGHT unitrealfield _ConvertUnitRealField('uocc') ---- ----UNIT_RF_HP 'common.UNIT_RF_HP' ----@field UNIT_RF_HP unitrealfield _ConvertUnitRealField('uhpc') ---- ----UNIT_RF_MANA 'common.UNIT_RF_MANA' ----@field UNIT_RF_MANA unitrealfield _ConvertUnitRealField('umpc') ---- ----UNIT_RF_ACQUISITION_RANGE 'common.UNIT_RF_ACQUISITION_RANGE' ----@field UNIT_RF_ACQUISITION_RANGE unitrealfield _ConvertUnitRealField('uacq') ---- ----UNIT_RF_CAST_BACK_SWING 'common.UNIT_RF_CAST_BACK_SWING' ----@field UNIT_RF_CAST_BACK_SWING unitrealfield _ConvertUnitRealField('ucbs') ---- ----UNIT_RF_CAST_POINT 'common.UNIT_RF_CAST_POINT' ----@field UNIT_RF_CAST_POINT unitrealfield _ConvertUnitRealField('ucpt') ---- ----UNIT_RF_MINIMUM_ATTACK_RANGE 'common.UNIT_RF_MINIMUM_ATTACK_RANGE' ----@field UNIT_RF_MINIMUM_ATTACK_RANGE unitrealfield _ConvertUnitRealField('uamn') ---- ----UNIT_BF_RAISABLE 'common.UNIT_BF_RAISABLE' ----@field UNIT_BF_RAISABLE unitbooleanfield _ConvertUnitBooleanField('urai') ---- ----UNIT_BF_DECAYABLE 'common.UNIT_BF_DECAYABLE' ----@field UNIT_BF_DECAYABLE unitbooleanfield _ConvertUnitBooleanField('udec') ---- ----UNIT_BF_IS_A_BUILDING 'common.UNIT_BF_IS_A_BUILDING' ----@field UNIT_BF_IS_A_BUILDING unitbooleanfield _ConvertUnitBooleanField('ubdg') ---- ----UNIT_BF_USE_EXTENDED_LINE_OF_SIGHT 'common.UNIT_BF_USE_EXTENDED_LINE_OF_SIGHT' ----@field UNIT_BF_USE_EXTENDED_LINE_OF_SIGHT unitbooleanfield _ConvertUnitBooleanField('ulos') ---- ----UNIT_BF_NEUTRAL_BUILDING_SHOWS_MINIMAP_ICON 'common.UNIT_BF_NEUTRAL_BUILDING_SHOWS_MINIMAP_ICON' ----@field UNIT_BF_NEUTRAL_BUILDING_SHOWS_MINIMAP_ICON unitbooleanfield _ConvertUnitBooleanField('unbm') ---- ----UNIT_BF_HERO_HIDE_HERO_INTERFACE_ICON 'common.UNIT_BF_HERO_HIDE_HERO_INTERFACE_ICON' ----@field UNIT_BF_HERO_HIDE_HERO_INTERFACE_ICON unitbooleanfield _ConvertUnitBooleanField('uhhb') ---- ----UNIT_BF_HERO_HIDE_HERO_MINIMAP_DISPLAY 'common.UNIT_BF_HERO_HIDE_HERO_MINIMAP_DISPLAY' ----@field UNIT_BF_HERO_HIDE_HERO_MINIMAP_DISPLAY unitbooleanfield _ConvertUnitBooleanField('uhhm') ---- ----UNIT_BF_HERO_HIDE_HERO_DEATH_MESSAGE 'common.UNIT_BF_HERO_HIDE_HERO_DEATH_MESSAGE' ----@field UNIT_BF_HERO_HIDE_HERO_DEATH_MESSAGE unitbooleanfield _ConvertUnitBooleanField('uhhd') ---- ----UNIT_BF_HIDE_MINIMAP_DISPLAY 'common.UNIT_BF_HIDE_MINIMAP_DISPLAY' ----@field UNIT_BF_HIDE_MINIMAP_DISPLAY unitbooleanfield _ConvertUnitBooleanField('uhom') ---- ----UNIT_BF_SCALE_PROJECTILES 'common.UNIT_BF_SCALE_PROJECTILES' ----@field UNIT_BF_SCALE_PROJECTILES unitbooleanfield _ConvertUnitBooleanField('uscb') ---- ----UNIT_BF_SELECTION_CIRCLE_ON_WATER 'common.UNIT_BF_SELECTION_CIRCLE_ON_WATER' ----@field UNIT_BF_SELECTION_CIRCLE_ON_WATER unitbooleanfield _ConvertUnitBooleanField('usew') ---- ----UNIT_BF_HAS_WATER_SHADOW 'common.UNIT_BF_HAS_WATER_SHADOW' ----@field UNIT_BF_HAS_WATER_SHADOW unitbooleanfield _ConvertUnitBooleanField('ushr') ---- ----UNIT_SF_NAME 'common.UNIT_SF_NAME' ----@field UNIT_SF_NAME unitstringfield _ConvertUnitStringField('unam') ---- ----UNIT_SF_PROPER_NAMES 'common.UNIT_SF_PROPER_NAMES' ----@field UNIT_SF_PROPER_NAMES unitstringfield _ConvertUnitStringField('upro') ---- ----UNIT_SF_GROUND_TEXTURE 'common.UNIT_SF_GROUND_TEXTURE' ----@field UNIT_SF_GROUND_TEXTURE unitstringfield _ConvertUnitStringField('uubs') ---- ----UNIT_SF_SHADOW_IMAGE_UNIT 'common.UNIT_SF_SHADOW_IMAGE_UNIT' ----@field UNIT_SF_SHADOW_IMAGE_UNIT unitstringfield _ConvertUnitStringField('ushu') ---- ----Unit Weapon ----Unit Weapon 'common.UNIT_WEAPON_IF_ATTACK_DAMAGE_NUMBER_OF_DICE' ----@field UNIT_WEAPON_IF_ATTACK_DAMAGE_NUMBER_OF_DICE unitweaponintegerfield _ConvertUnitWeaponIntegerField('ua1d') ---- ----UNIT_WEAPON_IF_ATTACK_DAMAGE_BASE 'common.UNIT_WEAPON_IF_ATTACK_DAMAGE_BASE' ----@field UNIT_WEAPON_IF_ATTACK_DAMAGE_BASE unitweaponintegerfield _ConvertUnitWeaponIntegerField('ua1b') ---- ----UNIT_WEAPON_IF_ATTACK_DAMAGE_SIDES_PER_DIE 'common.UNIT_WEAPON_IF_ATTACK_DAMAGE_SIDES_PER_DIE' ----@field UNIT_WEAPON_IF_ATTACK_DAMAGE_SIDES_PER_DIE unitweaponintegerfield _ConvertUnitWeaponIntegerField('ua1s') ---- ----UNIT_WEAPON_IF_ATTACK_MAXIMUM_NUMBER_OF_TARGETS 'common.UNIT_WEAPON_IF_ATTACK_MAXIMUM_NUMBER_OF_TARGETS' ----@field UNIT_WEAPON_IF_ATTACK_MAXIMUM_NUMBER_OF_TARGETS unitweaponintegerfield _ConvertUnitWeaponIntegerField('utc1') ---- ----UNIT_WEAPON_IF_ATTACK_ATTACK_TYPE 'common.UNIT_WEAPON_IF_ATTACK_ATTACK_TYPE' ----@field UNIT_WEAPON_IF_ATTACK_ATTACK_TYPE unitweaponintegerfield _ConvertUnitWeaponIntegerField('ua1t') ---- ----UNIT_WEAPON_IF_ATTACK_WEAPON_SOUND 'common.UNIT_WEAPON_IF_ATTACK_WEAPON_SOUND' ----@field UNIT_WEAPON_IF_ATTACK_WEAPON_SOUND unitweaponintegerfield _ConvertUnitWeaponIntegerField('ucs1') ---- ----UNIT_WEAPON_IF_ATTACK_AREA_OF_EFFECT_TARGETS 'common.UNIT_WEAPON_IF_ATTACK_AREA_OF_EFFECT_TARGETS' ----@field UNIT_WEAPON_IF_ATTACK_AREA_OF_EFFECT_TARGETS unitweaponintegerfield _ConvertUnitWeaponIntegerField('ua1p') ---- ----UNIT_WEAPON_IF_ATTACK_TARGETS_ALLOWED 'common.UNIT_WEAPON_IF_ATTACK_TARGETS_ALLOWED' ----@field UNIT_WEAPON_IF_ATTACK_TARGETS_ALLOWED unitweaponintegerfield _ConvertUnitWeaponIntegerField('ua1g') ---- ----UNIT_WEAPON_RF_ATTACK_BACKSWING_POINT 'common.UNIT_WEAPON_RF_ATTACK_BACKSWING_POINT' ----@field UNIT_WEAPON_RF_ATTACK_BACKSWING_POINT unitweaponrealfield _ConvertUnitWeaponRealField('ubs1') ---- ----UNIT_WEAPON_RF_ATTACK_DAMAGE_POINT 'common.UNIT_WEAPON_RF_ATTACK_DAMAGE_POINT' ----@field UNIT_WEAPON_RF_ATTACK_DAMAGE_POINT unitweaponrealfield _ConvertUnitWeaponRealField('udp1') ---- ----UNIT_WEAPON_RF_ATTACK_BASE_COOLDOWN 'common.UNIT_WEAPON_RF_ATTACK_BASE_COOLDOWN' ----@field UNIT_WEAPON_RF_ATTACK_BASE_COOLDOWN unitweaponrealfield _ConvertUnitWeaponRealField('ua1c') ---- ----UNIT_WEAPON_RF_ATTACK_DAMAGE_LOSS_FACTOR 'common.UNIT_WEAPON_RF_ATTACK_DAMAGE_LOSS_FACTOR' ----@field UNIT_WEAPON_RF_ATTACK_DAMAGE_LOSS_FACTOR unitweaponrealfield _ConvertUnitWeaponRealField('udl1') ---- ----UNIT_WEAPON_RF_ATTACK_DAMAGE_FACTOR_MEDIUM 'common.UNIT_WEAPON_RF_ATTACK_DAMAGE_FACTOR_MEDIUM' ----@field UNIT_WEAPON_RF_ATTACK_DAMAGE_FACTOR_MEDIUM unitweaponrealfield _ConvertUnitWeaponRealField('uhd1') ---- ----UNIT_WEAPON_RF_ATTACK_DAMAGE_FACTOR_SMALL 'common.UNIT_WEAPON_RF_ATTACK_DAMAGE_FACTOR_SMALL' ----@field UNIT_WEAPON_RF_ATTACK_DAMAGE_FACTOR_SMALL unitweaponrealfield _ConvertUnitWeaponRealField('uqd1') ---- ----UNIT_WEAPON_RF_ATTACK_DAMAGE_SPILL_DISTANCE 'common.UNIT_WEAPON_RF_ATTACK_DAMAGE_SPILL_DISTANCE' ----@field UNIT_WEAPON_RF_ATTACK_DAMAGE_SPILL_DISTANCE unitweaponrealfield _ConvertUnitWeaponRealField('usd1') ---- ----UNIT_WEAPON_RF_ATTACK_DAMAGE_SPILL_RADIUS 'common.UNIT_WEAPON_RF_ATTACK_DAMAGE_SPILL_RADIUS' ----@field UNIT_WEAPON_RF_ATTACK_DAMAGE_SPILL_RADIUS unitweaponrealfield _ConvertUnitWeaponRealField('usr1') ---- ----UNIT_WEAPON_RF_ATTACK_PROJECTILE_SPEED 'common.UNIT_WEAPON_RF_ATTACK_PROJECTILE_SPEED' ----@field UNIT_WEAPON_RF_ATTACK_PROJECTILE_SPEED unitweaponrealfield _ConvertUnitWeaponRealField('ua1z') ---- ----UNIT_WEAPON_RF_ATTACK_PROJECTILE_ARC 'common.UNIT_WEAPON_RF_ATTACK_PROJECTILE_ARC' ----@field UNIT_WEAPON_RF_ATTACK_PROJECTILE_ARC unitweaponrealfield _ConvertUnitWeaponRealField('uma1') ---- ----UNIT_WEAPON_RF_ATTACK_AREA_OF_EFFECT_FULL_DAMAGE 'common.UNIT_WEAPON_RF_ATTACK_AREA_OF_EFFECT_FULL_DAMAGE' ----@field UNIT_WEAPON_RF_ATTACK_AREA_OF_EFFECT_FULL_DAMAGE unitweaponrealfield _ConvertUnitWeaponRealField('ua1f') ---- ----UNIT_WEAPON_RF_ATTACK_AREA_OF_EFFECT_MEDIUM_DAMAGE 'common.UNIT_WEAPON_RF_ATTACK_AREA_OF_EFFECT_MEDIUM_DAMAGE' ----@field UNIT_WEAPON_RF_ATTACK_AREA_OF_EFFECT_MEDIUM_DAMAGE unitweaponrealfield _ConvertUnitWeaponRealField('ua1h') ---- ----UNIT_WEAPON_RF_ATTACK_AREA_OF_EFFECT_SMALL_DAMAGE 'common.UNIT_WEAPON_RF_ATTACK_AREA_OF_EFFECT_SMALL_DAMAGE' ----@field UNIT_WEAPON_RF_ATTACK_AREA_OF_EFFECT_SMALL_DAMAGE unitweaponrealfield _ConvertUnitWeaponRealField('ua1q') ---- ----UNIT_WEAPON_RF_ATTACK_RANGE 'common.UNIT_WEAPON_RF_ATTACK_RANGE' ----@field UNIT_WEAPON_RF_ATTACK_RANGE unitweaponrealfield _ConvertUnitWeaponRealField('ua1r') ---- ----UNIT_WEAPON_BF_ATTACK_SHOW_UI 'common.UNIT_WEAPON_BF_ATTACK_SHOW_UI' ----@field UNIT_WEAPON_BF_ATTACK_SHOW_UI unitweaponbooleanfield _ConvertUnitWeaponBooleanField('uwu1') ---- ----UNIT_WEAPON_BF_ATTACKS_ENABLED 'common.UNIT_WEAPON_BF_ATTACKS_ENABLED' ----@field UNIT_WEAPON_BF_ATTACKS_ENABLED unitweaponbooleanfield _ConvertUnitWeaponBooleanField('uaen') ---- ----UNIT_WEAPON_BF_ATTACK_PROJECTILE_HOMING_ENABLED 'common.UNIT_WEAPON_BF_ATTACK_PROJECTILE_HOMING_ENABLED' ----@field UNIT_WEAPON_BF_ATTACK_PROJECTILE_HOMING_ENABLED unitweaponbooleanfield _ConvertUnitWeaponBooleanField('umh1') ---- ----UNIT_WEAPON_SF_ATTACK_PROJECTILE_ART 'common.UNIT_WEAPON_SF_ATTACK_PROJECTILE_ART' ----@field UNIT_WEAPON_SF_ATTACK_PROJECTILE_ART unitweaponstringfield _ConvertUnitWeaponStringField('ua1m') ---- ----Move Type ----Move Type 'common.MOVE_TYPE_UNKNOWN' ----@field MOVE_TYPE_UNKNOWN movetype _ConvertMoveType(0) ---- ----MOVE_TYPE_FOOT 'common.MOVE_TYPE_FOOT' ----@field MOVE_TYPE_FOOT movetype _ConvertMoveType(1) ---- ----MOVE_TYPE_FLY 'common.MOVE_TYPE_FLY' ----@field MOVE_TYPE_FLY movetype _ConvertMoveType(2) ---- ----MOVE_TYPE_HORSE 'common.MOVE_TYPE_HORSE' ----@field MOVE_TYPE_HORSE movetype _ConvertMoveType(4) ---- ----MOVE_TYPE_HOVER 'common.MOVE_TYPE_HOVER' ----@field MOVE_TYPE_HOVER movetype _ConvertMoveType(8) ---- ----MOVE_TYPE_FLOAT 'common.MOVE_TYPE_FLOAT' ----@field MOVE_TYPE_FLOAT movetype _ConvertMoveType(16) ---- ----MOVE_TYPE_AMPHIBIOUS 'common.MOVE_TYPE_AMPHIBIOUS' ----@field MOVE_TYPE_AMPHIBIOUS movetype _ConvertMoveType(32) ---- ----MOVE_TYPE_UNBUILDABLE 'common.MOVE_TYPE_UNBUILDABLE' ----@field MOVE_TYPE_UNBUILDABLE movetype _ConvertMoveType(64) ---- ----Target Flag ----Target Flag 'common.TARGET_FLAG_NONE' ----@field TARGET_FLAG_NONE targetflag _ConvertTargetFlag(1) ---- ----TARGET_FLAG_GROUND 'common.TARGET_FLAG_GROUND' ----@field TARGET_FLAG_GROUND targetflag _ConvertTargetFlag(2) ---- ----TARGET_FLAG_AIR 'common.TARGET_FLAG_AIR' ----@field TARGET_FLAG_AIR targetflag _ConvertTargetFlag(4) ---- ----TARGET_FLAG_STRUCTURE 'common.TARGET_FLAG_STRUCTURE' ----@field TARGET_FLAG_STRUCTURE targetflag _ConvertTargetFlag(8) ---- ----TARGET_FLAG_WARD 'common.TARGET_FLAG_WARD' ----@field TARGET_FLAG_WARD targetflag _ConvertTargetFlag(16) ---- ----TARGET_FLAG_ITEM 'common.TARGET_FLAG_ITEM' ----@field TARGET_FLAG_ITEM targetflag _ConvertTargetFlag(32) ---- ----TARGET_FLAG_TREE 'common.TARGET_FLAG_TREE' ----@field TARGET_FLAG_TREE targetflag _ConvertTargetFlag(64) ---- ----TARGET_FLAG_WALL 'common.TARGET_FLAG_WALL' ----@field TARGET_FLAG_WALL targetflag _ConvertTargetFlag(128) ---- ----TARGET_FLAG_DEBRIS 'common.TARGET_FLAG_DEBRIS' ----@field TARGET_FLAG_DEBRIS targetflag _ConvertTargetFlag(256) ---- ----TARGET_FLAG_DECORATION 'common.TARGET_FLAG_DECORATION' ----@field TARGET_FLAG_DECORATION targetflag _ConvertTargetFlag(512) ---- ----TARGET_FLAG_BRIDGE 'common.TARGET_FLAG_BRIDGE' ----@field TARGET_FLAG_BRIDGE targetflag _ConvertTargetFlag(1024) ---- ----defense type ----defense type 'common.DEFENSE_TYPE_LIGHT' ----@field DEFENSE_TYPE_LIGHT defensetype _ConvertDefenseType(0) ---- ----DEFENSE_TYPE_MEDIUM 'common.DEFENSE_TYPE_MEDIUM' ----@field DEFENSE_TYPE_MEDIUM defensetype _ConvertDefenseType(1) ---- ----DEFENSE_TYPE_LARGE 'common.DEFENSE_TYPE_LARGE' ----@field DEFENSE_TYPE_LARGE defensetype _ConvertDefenseType(2) ---- ----DEFENSE_TYPE_FORT 'common.DEFENSE_TYPE_FORT' ----@field DEFENSE_TYPE_FORT defensetype _ConvertDefenseType(3) ---- ----DEFENSE_TYPE_NORMAL 'common.DEFENSE_TYPE_NORMAL' ----@field DEFENSE_TYPE_NORMAL defensetype _ConvertDefenseType(4) ---- ----DEFENSE_TYPE_HERO 'common.DEFENSE_TYPE_HERO' ----@field DEFENSE_TYPE_HERO defensetype _ConvertDefenseType(5) ---- ----DEFENSE_TYPE_DIVINE 'common.DEFENSE_TYPE_DIVINE' ----@field DEFENSE_TYPE_DIVINE defensetype _ConvertDefenseType(6) ---- ----DEFENSE_TYPE_NONE 'common.DEFENSE_TYPE_NONE' ----@field DEFENSE_TYPE_NONE defensetype _ConvertDefenseType(7) ---- ----Hero Attribute ----Hero Attribute 'common.HERO_ATTRIBUTE_STR' ----@field HERO_ATTRIBUTE_STR heroattribute _ConvertHeroAttribute(1) ---- ----HERO_ATTRIBUTE_INT 'common.HERO_ATTRIBUTE_INT' ----@field HERO_ATTRIBUTE_INT heroattribute _ConvertHeroAttribute(2) ---- ----HERO_ATTRIBUTE_AGI 'common.HERO_ATTRIBUTE_AGI' ----@field HERO_ATTRIBUTE_AGI heroattribute _ConvertHeroAttribute(3) ---- ----Armor Type ----Armor Type 'common.ARMOR_TYPE_WHOKNOWS' ----@field ARMOR_TYPE_WHOKNOWS armortype _ConvertArmorType(0) ---- ----ARMOR_TYPE_FLESH 'common.ARMOR_TYPE_FLESH' ----@field ARMOR_TYPE_FLESH armortype _ConvertArmorType(1) ---- ----ARMOR_TYPE_METAL 'common.ARMOR_TYPE_METAL' ----@field ARMOR_TYPE_METAL armortype _ConvertArmorType(2) ---- ----ARMOR_TYPE_WOOD 'common.ARMOR_TYPE_WOOD' ----@field ARMOR_TYPE_WOOD armortype _ConvertArmorType(3) ---- ----ARMOR_TYPE_ETHREAL 'common.ARMOR_TYPE_ETHREAL' ----@field ARMOR_TYPE_ETHREAL armortype _ConvertArmorType(4) ---- ----ARMOR_TYPE_STONE 'common.ARMOR_TYPE_STONE' ----@field ARMOR_TYPE_STONE armortype _ConvertArmorType(5) ---- ----Regeneration Type ----Regeneration Type 'common.REGENERATION_TYPE_NONE' ----@field REGENERATION_TYPE_NONE regentype _ConvertRegenType(0) ---- ----REGENERATION_TYPE_ALWAYS 'common.REGENERATION_TYPE_ALWAYS' ----@field REGENERATION_TYPE_ALWAYS regentype _ConvertRegenType(1) ---- ----REGENERATION_TYPE_BLIGHT 'common.REGENERATION_TYPE_BLIGHT' ----@field REGENERATION_TYPE_BLIGHT regentype _ConvertRegenType(2) ---- ----REGENERATION_TYPE_DAY 'common.REGENERATION_TYPE_DAY' ----@field REGENERATION_TYPE_DAY regentype _ConvertRegenType(3) ---- ----REGENERATION_TYPE_NIGHT 'common.REGENERATION_TYPE_NIGHT' ----@field REGENERATION_TYPE_NIGHT regentype _ConvertRegenType(4) ---- ----Unit Category ----Unit Category 'common.UNIT_CATEGORY_GIANT' ----@field UNIT_CATEGORY_GIANT unitcategory _ConvertUnitCategory(1) ---- ----UNIT_CATEGORY_UNDEAD 'common.UNIT_CATEGORY_UNDEAD' ----@field UNIT_CATEGORY_UNDEAD unitcategory _ConvertUnitCategory(2) ---- ----UNIT_CATEGORY_SUMMONED 'common.UNIT_CATEGORY_SUMMONED' ----@field UNIT_CATEGORY_SUMMONED unitcategory _ConvertUnitCategory(4) ---- ----UNIT_CATEGORY_MECHANICAL 'common.UNIT_CATEGORY_MECHANICAL' ----@field UNIT_CATEGORY_MECHANICAL unitcategory _ConvertUnitCategory(8) ---- ----UNIT_CATEGORY_PEON 'common.UNIT_CATEGORY_PEON' ----@field UNIT_CATEGORY_PEON unitcategory _ConvertUnitCategory(16) ---- ----UNIT_CATEGORY_SAPPER 'common.UNIT_CATEGORY_SAPPER' ----@field UNIT_CATEGORY_SAPPER unitcategory _ConvertUnitCategory(32) ---- ----UNIT_CATEGORY_TOWNHALL 'common.UNIT_CATEGORY_TOWNHALL' ----@field UNIT_CATEGORY_TOWNHALL unitcategory _ConvertUnitCategory(64) ---- ----UNIT_CATEGORY_ANCIENT 'common.UNIT_CATEGORY_ANCIENT' ----@field UNIT_CATEGORY_ANCIENT unitcategory _ConvertUnitCategory(128) ---- ----UNIT_CATEGORY_NEUTRAL 'common.UNIT_CATEGORY_NEUTRAL' ----@field UNIT_CATEGORY_NEUTRAL unitcategory _ConvertUnitCategory(256) ---- ----UNIT_CATEGORY_WARD 'common.UNIT_CATEGORY_WARD' ----@field UNIT_CATEGORY_WARD unitcategory _ConvertUnitCategory(512) ---- ----UNIT_CATEGORY_STANDON 'common.UNIT_CATEGORY_STANDON' ----@field UNIT_CATEGORY_STANDON unitcategory _ConvertUnitCategory(1024) ---- ----UNIT_CATEGORY_TAUREN 'common.UNIT_CATEGORY_TAUREN' ----@field UNIT_CATEGORY_TAUREN unitcategory _ConvertUnitCategory(2048) ---- ----Pathing Flag ----Pathing Flag 'common.PATHING_FLAG_UNWALKABLE' ----@field PATHING_FLAG_UNWALKABLE pathingflag _ConvertPathingFlag(2) ---- ----PATHING_FLAG_UNFLYABLE 'common.PATHING_FLAG_UNFLYABLE' ----@field PATHING_FLAG_UNFLYABLE pathingflag _ConvertPathingFlag(4) ---- ----PATHING_FLAG_UNBUILDABLE 'common.PATHING_FLAG_UNBUILDABLE' ----@field PATHING_FLAG_UNBUILDABLE pathingflag _ConvertPathingFlag(8) ---- ----PATHING_FLAG_UNPEONHARVEST 'common.PATHING_FLAG_UNPEONHARVEST' ----@field PATHING_FLAG_UNPEONHARVEST pathingflag _ConvertPathingFlag(16) ---- ----PATHING_FLAG_BLIGHTED 'common.PATHING_FLAG_BLIGHTED' ----@field PATHING_FLAG_BLIGHTED pathingflag _ConvertPathingFlag(32) ---- ----PATHING_FLAG_UNFLOATABLE 'common.PATHING_FLAG_UNFLOATABLE' ----@field PATHING_FLAG_UNFLOATABLE pathingflag _ConvertPathingFlag(64) ---- ----PATHING_FLAG_UNAMPHIBIOUS 'common.PATHING_FLAG_UNAMPHIBIOUS' ----@field PATHING_FLAG_UNAMPHIBIOUS pathingflag _ConvertPathingFlag(128) ---- ----PATHING_FLAG_UNITEMPLACABLE 'common.PATHING_FLAG_UNITEMPLACABLE' ----@field PATHING_FLAG_UNITEMPLACABLE pathingflag _ConvertPathingFlag(256) -local common = {} - ----转换种族 ----@param i integer ----@return race -function common.ConvertRace(i) end - ----转换联盟类型 ----@param i integer ----@return alliancetype -function common.ConvertAllianceType(i) end - ----ConvertRacePref ----@param i integer ----@return racepreference -function common.ConvertRacePref(i) end - ----ConvertIGameState ----@param i integer ----@return igamestate -function common.ConvertIGameState(i) end - ----ConvertFGameState ----@param i integer ----@return fgamestate -function common.ConvertFGameState(i) end - ----ConvertPlayerState ----@param i integer ----@return playerstate -function common.ConvertPlayerState(i) end - ----ConvertPlayerScore ----@param i integer ----@return playerscore -function common.ConvertPlayerScore(i) end - ----ConvertPlayerGameResult ----@param i integer ----@return playergameresult -function common.ConvertPlayerGameResult(i) end - ----ConvertUnitState ----@param i integer ----@return unitstate -function common.ConvertUnitState(i) end - ----ConvertAIDifficulty ----@param i integer ----@return aidifficulty -function common.ConvertAIDifficulty(i) end - ----ConvertGameEvent ----@param i integer ----@return gameevent -function common.ConvertGameEvent(i) end - ----ConvertPlayerEvent ----@param i integer ----@return playerevent -function common.ConvertPlayerEvent(i) end - ----ConvertPlayerUnitEvent ----@param i integer ----@return playerunitevent -function common.ConvertPlayerUnitEvent(i) end - ----ConvertWidgetEvent ----@param i integer ----@return widgetevent -function common.ConvertWidgetEvent(i) end - ----ConvertDialogEvent ----@param i integer ----@return dialogevent -function common.ConvertDialogEvent(i) end - ----ConvertUnitEvent ----@param i integer ----@return unitevent -function common.ConvertUnitEvent(i) end - ----ConvertLimitOp ----@param i integer ----@return limitop -function common.ConvertLimitOp(i) end - ----ConvertUnitType ----@param i integer ----@return unittype -function common.ConvertUnitType(i) end - ----ConvertGameSpeed ----@param i integer ----@return gamespeed -function common.ConvertGameSpeed(i) end - ----ConvertPlacement ----@param i integer ----@return placement -function common.ConvertPlacement(i) end - ----ConvertStartLocPrio ----@param i integer ----@return startlocprio -function common.ConvertStartLocPrio(i) end - ----ConvertGameDifficulty ----@param i integer ----@return gamedifficulty -function common.ConvertGameDifficulty(i) end - ----ConvertGameType ----@param i integer ----@return gametype -function common.ConvertGameType(i) end - ----ConvertMapFlag ----@param i integer ----@return mapflag -function common.ConvertMapFlag(i) end - ----ConvertMapVisibility ----@param i integer ----@return mapvisibility -function common.ConvertMapVisibility(i) end - ----ConvertMapSetting ----@param i integer ----@return mapsetting -function common.ConvertMapSetting(i) end - ----ConvertMapDensity ----@param i integer ----@return mapdensity -function common.ConvertMapDensity(i) end - ----ConvertMapControl ----@param i integer ----@return mapcontrol -function common.ConvertMapControl(i) end - ----ConvertPlayerColor ----@param i integer ----@return playercolor -function common.ConvertPlayerColor(i) end - ----ConvertPlayerSlotState ----@param i integer ----@return playerslotstate -function common.ConvertPlayerSlotState(i) end - ----ConvertVolumeGroup ----@param i integer ----@return volumegroup -function common.ConvertVolumeGroup(i) end - ----ConvertCameraField ----@param i integer ----@return camerafield -function common.ConvertCameraField(i) end - ----ConvertBlendMode ----@param i integer ----@return blendmode -function common.ConvertBlendMode(i) end - ----ConvertRarityControl ----@param i integer ----@return raritycontrol -function common.ConvertRarityControl(i) end - ----ConvertTexMapFlags ----@param i integer ----@return texmapflags -function common.ConvertTexMapFlags(i) end - ----ConvertFogState ----@param i integer ----@return fogstate -function common.ConvertFogState(i) end - ----ConvertEffectType ----@param i integer ----@return effecttype -function common.ConvertEffectType(i) end - ----ConvertVersion ----@param i integer ----@return version -function common.ConvertVersion(i) end - ----ConvertItemType ----@param i integer ----@return itemtype -function common.ConvertItemType(i) end - ----ConvertAttackType ----@param i integer ----@return attacktype -function common.ConvertAttackType(i) end - ----ConvertDamageType ----@param i integer ----@return damagetype -function common.ConvertDamageType(i) end - ----ConvertWeaponType ----@param i integer ----@return weapontype -function common.ConvertWeaponType(i) end - ----ConvertSoundType ----@param i integer ----@return soundtype -function common.ConvertSoundType(i) end - ----ConvertPathingType ----@param i integer ----@return pathingtype -function common.ConvertPathingType(i) end - ----ConvertMouseButtonType ----@param i integer ----@return mousebuttontype -function common.ConvertMouseButtonType(i) end - ----ConvertAnimType ----@param i integer ----@return animtype -function common.ConvertAnimType(i) end - ----ConvertSubAnimType ----@param i integer ----@return subanimtype -function common.ConvertSubAnimType(i) end - ----ConvertOriginFrameType ----@param i integer ----@return originframetype -function common.ConvertOriginFrameType(i) end - ----ConvertFramePointType ----@param i integer ----@return framepointtype -function common.ConvertFramePointType(i) end - ----ConvertTextAlignType ----@param i integer ----@return textaligntype -function common.ConvertTextAlignType(i) end - ----ConvertFrameEventType ----@param i integer ----@return frameeventtype -function common.ConvertFrameEventType(i) end - ----ConvertOsKeyType ----@param i integer ----@return oskeytype -function common.ConvertOsKeyType(i) end - ----ConvertAbilityIntegerField ----@param i integer ----@return abilityintegerfield -function common.ConvertAbilityIntegerField(i) end - ----ConvertAbilityRealField ----@param i integer ----@return abilityrealfield -function common.ConvertAbilityRealField(i) end - ----ConvertAbilityBooleanField ----@param i integer ----@return abilitybooleanfield -function common.ConvertAbilityBooleanField(i) end - ----ConvertAbilityStringField ----@param i integer ----@return abilitystringfield -function common.ConvertAbilityStringField(i) end - ----ConvertAbilityIntegerLevelField ----@param i integer ----@return abilityintegerlevelfield -function common.ConvertAbilityIntegerLevelField(i) end - ----ConvertAbilityRealLevelField ----@param i integer ----@return abilityreallevelfield -function common.ConvertAbilityRealLevelField(i) end - ----ConvertAbilityBooleanLevelField ----@param i integer ----@return abilitybooleanlevelfield -function common.ConvertAbilityBooleanLevelField(i) end - ----ConvertAbilityStringLevelField ----@param i integer ----@return abilitystringlevelfield -function common.ConvertAbilityStringLevelField(i) end - ----ConvertAbilityIntegerLevelArrayField ----@param i integer ----@return abilityintegerlevelarrayfield -function common.ConvertAbilityIntegerLevelArrayField(i) end - ----ConvertAbilityRealLevelArrayField ----@param i integer ----@return abilityreallevelarrayfield -function common.ConvertAbilityRealLevelArrayField(i) end - ----ConvertAbilityBooleanLevelArrayField ----@param i integer ----@return abilitybooleanlevelarrayfield -function common.ConvertAbilityBooleanLevelArrayField(i) end - ----ConvertAbilityStringLevelArrayField ----@param i integer ----@return abilitystringlevelarrayfield -function common.ConvertAbilityStringLevelArrayField(i) end - ----ConvertUnitIntegerField ----@param i integer ----@return unitintegerfield -function common.ConvertUnitIntegerField(i) end - ----ConvertUnitRealField ----@param i integer ----@return unitrealfield -function common.ConvertUnitRealField(i) end - ----ConvertUnitBooleanField ----@param i integer ----@return unitbooleanfield -function common.ConvertUnitBooleanField(i) end - ----ConvertUnitStringField ----@param i integer ----@return unitstringfield -function common.ConvertUnitStringField(i) end - ----ConvertUnitWeaponIntegerField ----@param i integer ----@return unitweaponintegerfield -function common.ConvertUnitWeaponIntegerField(i) end - ----ConvertUnitWeaponRealField ----@param i integer ----@return unitweaponrealfield -function common.ConvertUnitWeaponRealField(i) end - ----ConvertUnitWeaponBooleanField ----@param i integer ----@return unitweaponbooleanfield -function common.ConvertUnitWeaponBooleanField(i) end - ----ConvertUnitWeaponStringField ----@param i integer ----@return unitweaponstringfield -function common.ConvertUnitWeaponStringField(i) end - ----ConvertItemIntegerField ----@param i integer ----@return itemintegerfield -function common.ConvertItemIntegerField(i) end - ----ConvertItemRealField ----@param i integer ----@return itemrealfield -function common.ConvertItemRealField(i) end - ----ConvertItemBooleanField ----@param i integer ----@return itembooleanfield -function common.ConvertItemBooleanField(i) end - ----ConvertItemStringField ----@param i integer ----@return itemstringfield -function common.ConvertItemStringField(i) end - ----ConvertMoveType ----@param i integer ----@return movetype -function common.ConvertMoveType(i) end - ----ConvertTargetFlag ----@param i integer ----@return targetflag -function common.ConvertTargetFlag(i) end - ----ConvertArmorType ----@param i integer ----@return armortype -function common.ConvertArmorType(i) end - ----ConvertHeroAttribute ----@param i integer ----@return heroattribute -function common.ConvertHeroAttribute(i) end - ----ConvertDefenseType ----@param i integer ----@return defensetype -function common.ConvertDefenseType(i) end - ----ConvertRegenType ----@param i integer ----@return regentype -function common.ConvertRegenType(i) end - ----ConvertUnitCategory ----@param i integer ----@return unitcategory -function common.ConvertUnitCategory(i) end - ----ConvertPathingFlag ----@param i integer ----@return pathingflag -function common.ConvertPathingFlag(i) end - ----OrderId ----@param orderIdString string ----@return integer -function common.OrderId(orderIdString) end - ----OrderId2String ----@param orderId integer ----@return string -function common.OrderId2String(orderId) end - ----UnitId ----@param unitIdString string ----@return integer -function common.UnitId(unitIdString) end - ----UnitId2String ----@param unitId integer ----@return string -function common.UnitId2String(unitId) end - ----Not currently working correctly... ----@param abilityIdString string ----@return integer -function common.AbilityId(abilityIdString) end - ----AbilityId2String ----@param abilityId integer ----@return string -function common.AbilityId2String(abilityId) end - ----Looks up the "name" field for any object (unit, item, ability) ----物体名称 [C] ----@param objectId integer ----@return string -function common.GetObjectName(objectId) end - ----获取最大的玩家数 ----@return integer -function common.GetBJMaxPlayers() end - ----GetBJPlayerNeutralVictim ----@return integer -function common.GetBJPlayerNeutralVictim() end - ----GetBJPlayerNeutralExtra ----@return integer -function common.GetBJPlayerNeutralExtra() end - ----GetBJMaxPlayerSlots ----@return integer -function common.GetBJMaxPlayerSlots() end - ----GetPlayerNeutralPassive ----@return integer -function common.GetPlayerNeutralPassive() end - ----GetPlayerNeutralAggressive ----@return integer -function common.GetPlayerNeutralAggressive() end - ----MathAPI ----转换 度 到 弧度 ----@param degrees real ----@return real -function common.Deg2Rad(degrees) end - ----转换 弧度 到 度 ----@param radians real ----@return real -function common.Rad2Deg(radians) end - ----正弦(弧度) [R] ----@param radians real ----@return real -function common.Sin(radians) end - ----余弦(弧度) [R] ----@param radians real ----@return real -function common.Cos(radians) end - ----正切(弧度) [R] ----@param radians real ----@return real -function common.Tan(radians) end - ----Expect values between -1 and 1...returns 0 for invalid input ----反正弦(弧度) [R] ----@param y real ----@return real -function common.Asin(y) end - ----反余弦(弧度) [R] ----@param x real ----@return real -function common.Acos(x) end - ----反正切(弧度) [R] ----@param x real ----@return real -function common.Atan(x) end - ----Returns 0 if x and y are both 0 ----反正切(Y:X)(弧度) [R] ----@param y real ----@param x real ----@return real -function common.Atan2(y,x) end - ----Returns 0 if x < 0 ----平方根 ----@param x real ----@return real -function common.SquareRoot(x) end - ----computes x to the y power ----y 0.0 > 1 ----x 0.0 and y < 0 > 0 ----求幂 ----@param x real ----@param power real ----@return real -function common.Pow(x,power) end - ----MathRound ----@param r real ----@return integer -function common.MathRound(r) end - ----String Utility API ----转换整数变量为实数 ----@param i integer ----@return real -function common.I2R(i) end - ----转换实数为整数 ----@param r real ----@return integer -function common.R2I(r) end - ----将整数转换为字符串 ----@param i integer ----@return string -function common.I2S(i) end - ----将实数转换为字符串 ----@param r real ----@return string -function common.R2S(r) end - ----将实数转换为格式化字符串 ----@param r real ----@param width integer ----@param precision integer ----@return string -function common.R2SW(r,width,precision) end - ----转换字串符为整数 ----@param s string ----@return integer -function common.S2I(s) end - ----转换字符串为实数 ----@param s string ----@return real -function common.S2R(s) end - ----GetHandleId ----@param h handle ----@return integer -function common.GetHandleId(h) end - ----截取字符串 [R] ----@param source string ----@param start integer ----@param end_ integer ----@return string -function common.SubString(source,start,end_) end - ----字串符长度 ----@param s string ----@return integer -function common.StringLength(s) end - ----将字串符转换为大小写字母 ----@param source string ----@param upper boolean ----@return string -function common.StringCase(source,upper) end - ----StringHash ----@param s string ----@return integer -function common.StringHash(s) end - ----本地字符串 [R] ----@param source string ----@return string -function common.GetLocalizedString(source) end - ----本地热键 ----@param source string ----@return integer -function common.GetLocalizedHotkey(source) end - ----SetMapName ----@param name string -function common.SetMapName(name) end - ----SetMapDescription ----@param description string -function common.SetMapDescription(description) end - ----SetTeams ----@param teamcount integer -function common.SetTeams(teamcount) end - ----SetPlayers ----@param playercount integer -function common.SetPlayers(playercount) end - ----DefineStartLocation ----@param whichStartLoc integer ----@param x real ----@param y real -function common.DefineStartLocation(whichStartLoc,x,y) end - ----DefineStartLocationLoc ----@param whichStartLoc integer ----@param whichLocation location -function common.DefineStartLocationLoc(whichStartLoc,whichLocation) end - ----SetStartLocPrioCount ----@param whichStartLoc integer ----@param prioSlotCount integer -function common.SetStartLocPrioCount(whichStartLoc,prioSlotCount) end - ----SetStartLocPrio ----@param whichStartLoc integer ----@param prioSlotIndex integer ----@param otherStartLocIndex integer ----@param priority startlocprio -function common.SetStartLocPrio(whichStartLoc,prioSlotIndex,otherStartLocIndex,priority) end - ----GetStartLocPrioSlot ----@param whichStartLoc integer ----@param prioSlotIndex integer ----@return integer -function common.GetStartLocPrioSlot(whichStartLoc,prioSlotIndex) end - ----GetStartLocPrio ----@param whichStartLoc integer ----@param prioSlotIndex integer ----@return startlocprio -function common.GetStartLocPrio(whichStartLoc,prioSlotIndex) end - ----SetEnemyStartLocPrioCount ----@param whichStartLoc integer ----@param prioSlotCount integer -function common.SetEnemyStartLocPrioCount(whichStartLoc,prioSlotCount) end - ----SetEnemyStartLocPrio ----@param whichStartLoc integer ----@param prioSlotIndex integer ----@param otherStartLocIndex integer ----@param priority startlocprio -function common.SetEnemyStartLocPrio(whichStartLoc,prioSlotIndex,otherStartLocIndex,priority) end - ----SetGameTypeSupported ----@param whichGameType gametype ----@param value boolean -function common.SetGameTypeSupported(whichGameType,value) end - ----设置地图参数 ----@param whichMapFlag mapflag ----@param value boolean -function common.SetMapFlag(whichMapFlag,value) end - ----SetGamePlacement ----@param whichPlacementType placement -function common.SetGamePlacement(whichPlacementType) end - ----设定游戏速度 ----@param whichspeed gamespeed -function common.SetGameSpeed(whichspeed) end - ----设置游戏难度 [R] ----@param whichdifficulty gamedifficulty -function common.SetGameDifficulty(whichdifficulty) end - ----SetResourceDensity ----@param whichdensity mapdensity -function common.SetResourceDensity(whichdensity) end - ----SetCreatureDensity ----@param whichdensity mapdensity -function common.SetCreatureDensity(whichdensity) end - ----队伍数量 ----@return integer -function common.GetTeams() end - ----玩家数量 ----@return integer -function common.GetPlayers() end - ----IsGameTypeSupported ----@param whichGameType gametype ----@return boolean -function common.IsGameTypeSupported(whichGameType) end - ----GetGameTypeSelected ----@return gametype -function common.GetGameTypeSelected() end - ----地图参数 ----@param whichMapFlag mapflag ----@return boolean -function common.IsMapFlagSet(whichMapFlag) end - ----GetGamePlacement ----@return placement -function common.GetGamePlacement() end - ----当前游戏速度 ----@return gamespeed -function common.GetGameSpeed() end - ----难度等级 ----@return gamedifficulty -function common.GetGameDifficulty() end - ----GetResourceDensity ----@return mapdensity -function common.GetResourceDensity() end - ----GetCreatureDensity ----@return mapdensity -function common.GetCreatureDensity() end - ----GetStartLocationX ----@param whichStartLocation integer ----@return real -function common.GetStartLocationX(whichStartLocation) end - ----GetStartLocationY ----@param whichStartLocation integer ----@return real -function common.GetStartLocationY(whichStartLocation) end - ----GetStartLocationLoc ----@param whichStartLocation integer ----@return location -function common.GetStartLocationLoc(whichStartLocation) end - ----设置玩家队伍 ----@param whichPlayer player ----@param whichTeam integer -function common.SetPlayerTeam(whichPlayer,whichTeam) end - ----SetPlayerStartLocation ----@param whichPlayer player ----@param startLocIndex integer -function common.SetPlayerStartLocation(whichPlayer,startLocIndex) end - ----forces player to have the specified start loc and marks the start loc as occupied ----which removes it from consideration for subsequently placed players ----( i.e. you can use this to put people in a fixed loc and then ----use random placement for any unplaced players etc ) ----use random placement for any unplaced players etc ) ----@param whichPlayer player ----@param startLocIndex integer -function common.ForcePlayerStartLocation(whichPlayer,startLocIndex) end - ----改变玩家颜色 [R] ----@param whichPlayer player ----@param color playercolor -function common.SetPlayerColor(whichPlayer,color) end - ----设置联盟状态(指定项目) [R] ----@param sourcePlayer player ----@param otherPlayer player ----@param whichAllianceSetting alliancetype ----@param value boolean -function common.SetPlayerAlliance(sourcePlayer,otherPlayer,whichAllianceSetting,value) end - ----设置税率 [R] ----@param sourcePlayer player ----@param otherPlayer player ----@param whichResource playerstate ----@param rate integer -function common.SetPlayerTaxRate(sourcePlayer,otherPlayer,whichResource,rate) end - ----SetPlayerRacePreference ----@param whichPlayer player ----@param whichRacePreference racepreference -function common.SetPlayerRacePreference(whichPlayer,whichRacePreference) end - ----SetPlayerRaceSelectable ----@param whichPlayer player ----@param value boolean -function common.SetPlayerRaceSelectable(whichPlayer,value) end - ----SetPlayerController ----@param whichPlayer player ----@param controlType mapcontrol -function common.SetPlayerController(whichPlayer,controlType) end - ----设置玩家名字 ----@param whichPlayer player ----@param name string -function common.SetPlayerName(whichPlayer,name) end - ----显示/隐藏计分屏显示 [R] ----@param whichPlayer player ----@param flag boolean -function common.SetPlayerOnScoreScreen(whichPlayer,flag) end - ----玩家在的队伍 ----@param whichPlayer player ----@return integer -function common.GetPlayerTeam(whichPlayer) end - ----GetPlayerStartLocation ----@param whichPlayer player ----@return integer -function common.GetPlayerStartLocation(whichPlayer) end - ----玩家的颜色 ----@param whichPlayer player ----@return playercolor -function common.GetPlayerColor(whichPlayer) end - ----GetPlayerSelectable ----@param whichPlayer player ----@return boolean -function common.GetPlayerSelectable(whichPlayer) end - ----玩家控制者 ----@param whichPlayer player ----@return mapcontrol -function common.GetPlayerController(whichPlayer) end - ----玩家游戏属性 ----@param whichPlayer player ----@return playerslotstate -function common.GetPlayerSlotState(whichPlayer) end - ----玩家税率 [R] ----@param sourcePlayer player ----@param otherPlayer player ----@param whichResource playerstate ----@return integer -function common.GetPlayerTaxRate(sourcePlayer,otherPlayer,whichResource) end - ----玩家的种族选择 ----@param whichPlayer player ----@param pref racepreference ----@return boolean -function common.IsPlayerRacePrefSet(whichPlayer,pref) end - ----玩家名字 ----@param whichPlayer player ----@return string -function common.GetPlayerName(whichPlayer) end - ----Timer API ----新建计时器 [R] ----@return timer -function common.CreateTimer() end - ----删除计时器 [R] ----@param whichTimer timer -function common.DestroyTimer(whichTimer) end - ----运行计时器 [C] ----@param whichTimer timer ----@param timeout real ----@param periodic boolean ----@param handlerFunc code -function common.TimerStart(whichTimer,timeout,periodic,handlerFunc) end - ----计时器经过的时间 ----@param whichTimer timer ----@return real -function common.TimerGetElapsed(whichTimer) end - ----计时器剩余时间 ----@param whichTimer timer ----@return real -function common.TimerGetRemaining(whichTimer) end - ----计时器初始的时间 ----@param whichTimer timer ----@return real -function common.TimerGetTimeout(whichTimer) end - ----暂停计时器 [R] ----@param whichTimer timer -function common.PauseTimer(whichTimer) end - ----恢复计时器 [R] ----@param whichTimer timer -function common.ResumeTimer(whichTimer) end - ----事件响应 - 计时器期满 ----@return timer -function common.GetExpiredTimer() end - ----Group API ----新建的单位组 [R] ----@return group -function common.CreateGroup() end - ----删除单位组 [R] ----@param whichGroup group -function common.DestroyGroup(whichGroup) end - ----添加单位 [R] ----@param whichGroup group ----@param whichUnit unit ----@return boolean -function common.GroupAddUnit(whichGroup,whichUnit) end - ----移除单位 [R] ----@param whichGroup group ----@param whichUnit unit ----@return boolean -function common.GroupRemoveUnit(whichGroup,whichUnit) end - ----清除 ----@param whichGroup group -function common.GroupClear(whichGroup) end - ----GroupEnumUnitsOfType ----@param whichGroup group ----@param unitname string ----@param filter boolexpr -function common.GroupEnumUnitsOfType(whichGroup,unitname,filter) end - ----GroupEnumUnitsOfPlayer ----@param whichGroup group ----@param whichPlayer player ----@param filter boolexpr -function common.GroupEnumUnitsOfPlayer(whichGroup,whichPlayer,filter) end - ----GroupEnumUnitsOfTypeCounted ----@param whichGroup group ----@param unitname string ----@param filter boolexpr ----@param countLimit integer -function common.GroupEnumUnitsOfTypeCounted(whichGroup,unitname,filter,countLimit) end - ----GroupEnumUnitsInRect ----@param whichGroup group ----@param r rect ----@param filter boolexpr -function common.GroupEnumUnitsInRect(whichGroup,r,filter) end - ----GroupEnumUnitsInRectCounted ----@param whichGroup group ----@param r rect ----@param filter boolexpr ----@param countLimit integer -function common.GroupEnumUnitsInRectCounted(whichGroup,r,filter,countLimit) end - ----选取单位添加到单位组(坐标) ----@param whichGroup group ----@param x real ----@param y real ----@param radius real ----@param filter boolexpr -function common.GroupEnumUnitsInRange(whichGroup,x,y,radius,filter) end - ----选取单位添加到单位组(点) ----@param whichGroup group ----@param whichLocation location ----@param radius real ----@param filter boolexpr -function common.GroupEnumUnitsInRangeOfLoc(whichGroup,whichLocation,radius,filter) end - ----选取单位添加到单位组(坐标)(不建议使用) ----@param whichGroup group ----@param x real ----@param y real ----@param radius real ----@param filter boolexpr ----@param countLimit integer -function common.GroupEnumUnitsInRangeCounted(whichGroup,x,y,radius,filter,countLimit) end - ----选取单位添加到单位组(点)(不建议使用) ----@param whichGroup group ----@param whichLocation location ----@param radius real ----@param filter boolexpr ----@param countLimit integer -function common.GroupEnumUnitsInRangeOfLocCounted(whichGroup,whichLocation,radius,filter,countLimit) end - ----GroupEnumUnitsSelected ----@param whichGroup group ----@param whichPlayer player ----@param filter boolexpr -function common.GroupEnumUnitsSelected(whichGroup,whichPlayer,filter) end - ----发送单位组命令到 没有目标 ----@param whichGroup group ----@param order string ----@return boolean -function common.GroupImmediateOrder(whichGroup,order) end - ----发布命令(无目标)(ID) ----@param whichGroup group ----@param order integer ----@return boolean -function common.GroupImmediateOrderById(whichGroup,order) end - ----发布命令(指定坐标) [R] ----@param whichGroup group ----@param order string ----@param x real ----@param y real ----@return boolean -function common.GroupPointOrder(whichGroup,order,x,y) end - ----发送单位组命令到 点 ----@param whichGroup group ----@param order string ----@param whichLocation location ----@return boolean -function common.GroupPointOrderLoc(whichGroup,order,whichLocation) end - ----发布命令(指定坐标)(ID) ----@param whichGroup group ----@param order integer ----@param x real ----@param y real ----@return boolean -function common.GroupPointOrderById(whichGroup,order,x,y) end - ----发布命令(指定点)(ID) ----@param whichGroup group ----@param order integer ----@param whichLocation location ----@return boolean -function common.GroupPointOrderByIdLoc(whichGroup,order,whichLocation) end - ----发送单位组命令到 单位 ----@param whichGroup group ----@param order string ----@param targetWidget widget ----@return boolean -function common.GroupTargetOrder(whichGroup,order,targetWidget) end - ----发布命令(指定单位)(ID) ----@param whichGroup group ----@param order integer ----@param targetWidget widget ----@return boolean -function common.GroupTargetOrderById(whichGroup,order,targetWidget) end - ----This will be difficult to support with potentially disjoint, cell-based regions ----as it would involve enumerating all the cells that are covered by a particularregion ----a better implementation would be a trigger that adds relevant units as they enter ----and removes them if they leave... ----选取所有单位在单位组做 多动作 ----@param whichGroup group ----@param callback code -function common.ForGroup(whichGroup,callback) end - ----单位组中第一个单位 ----@param whichGroup group ----@return unit -function common.FirstOfGroup(whichGroup) end - ----Force API ----新建玩家组 [R] ----@return force -function common.CreateForce() end - ----删除玩家组 [R] ----@param whichForce force -function common.DestroyForce(whichForce) end - ----添加玩家 [R] ----@param whichForce force ----@param whichPlayer player -function common.ForceAddPlayer(whichForce,whichPlayer) end - ----移除玩家 [R] ----@param whichForce force ----@param whichPlayer player -function common.ForceRemovePlayer(whichForce,whichPlayer) end - ----清除玩家 ----@param whichForce force -function common.ForceClear(whichForce) end - ----ForceEnumPlayers ----@param whichForce force ----@param filter boolexpr -function common.ForceEnumPlayers(whichForce,filter) end - ----ForceEnumPlayersCounted ----@param whichForce force ----@param filter boolexpr ----@param countLimit integer -function common.ForceEnumPlayersCounted(whichForce,filter,countLimit) end - ----ForceEnumAllies ----@param whichForce force ----@param whichPlayer player ----@param filter boolexpr -function common.ForceEnumAllies(whichForce,whichPlayer,filter) end - ----ForceEnumEnemies ----@param whichForce force ----@param whichPlayer player ----@param filter boolexpr -function common.ForceEnumEnemies(whichForce,whichPlayer,filter) end - ----选取所有玩家在玩家组做动作(单一的) ----@param whichForce force ----@param callback code -function common.ForForce(whichForce,callback) end - ----Region and Location API ----将坐标转换为区域 ----@param minx real ----@param miny real ----@param maxx real ----@param maxy real ----@return rect -function common.Rect(minx,miny,maxx,maxy) end - ----将点转换为区域 ----@param min location ----@param max location ----@return rect -function common.RectFromLoc(min,max) end - ----删除矩形区域 [R] ----@param whichRect rect -function common.RemoveRect(whichRect) end - ----设置矩形区域(指定坐标) [R] ----@param whichRect rect ----@param minx real ----@param miny real ----@param maxx real ----@param maxy real -function common.SetRect(whichRect,minx,miny,maxx,maxy) end - ----设置矩形区域(指定点) [R] ----@param whichRect rect ----@param min location ----@param max location -function common.SetRectFromLoc(whichRect,min,max) end - ----移动矩形区域(指定坐标) [R] ----@param whichRect rect ----@param newCenterX real ----@param newCenterY real -function common.MoveRectTo(whichRect,newCenterX,newCenterY) end - ----移动区域 ----@param whichRect rect ----@param newCenterLoc location -function common.MoveRectToLoc(whichRect,newCenterLoc) end - ----区域中心的 X 坐标 ----@param whichRect rect ----@return real -function common.GetRectCenterX(whichRect) end - ----区域中心的 Y 坐标 ----@param whichRect rect ----@return real -function common.GetRectCenterY(whichRect) end - ----区域最小 X 坐标 ----@param whichRect rect ----@return real -function common.GetRectMinX(whichRect) end - ----区域最小 Y 坐标 ----@param whichRect rect ----@return real -function common.GetRectMinY(whichRect) end - ----区域最大 X 坐标 ----@param whichRect rect ----@return real -function common.GetRectMaxX(whichRect) end - ----区域最大 Y 坐标 ----@param whichRect rect ----@return real -function common.GetRectMaxY(whichRect) end - ----新建区域 [R] ----@return region -function common.CreateRegion() end - ----删除不规则区域 [R] ----@param whichRegion region -function common.RemoveRegion(whichRegion) end - ----添加区域 [R] ----@param whichRegion region ----@param r rect -function common.RegionAddRect(whichRegion,r) end - ----移除区域 [R] ----@param whichRegion region ----@param r rect -function common.RegionClearRect(whichRegion,r) end - ----添加单元点(指定坐标) [R] ----@param whichRegion region ----@param x real ----@param y real -function common.RegionAddCell(whichRegion,x,y) end - ----添加单元点(指定点) [R] ----@param whichRegion region ----@param whichLocation location -function common.RegionAddCellAtLoc(whichRegion,whichLocation) end - ----移除单元点(指定坐标) [R] ----@param whichRegion region ----@param x real ----@param y real -function common.RegionClearCell(whichRegion,x,y) end - ----移除单元点(指定点) [R] ----@param whichRegion region ----@param whichLocation location -function common.RegionClearCellAtLoc(whichRegion,whichLocation) end - ----转换坐标到点 ----@param x real ----@param y real ----@return location -function common.Location(x,y) end - ----清除点 [R] ----@param whichLocation location -function common.RemoveLocation(whichLocation) end - ----移动点 [R] ----@param whichLocation location ----@param newX real ----@param newY real -function common.MoveLocation(whichLocation,newX,newY) end - ----X 坐标 ----@param whichLocation location ----@return real -function common.GetLocationX(whichLocation) end - ----Y 坐标 ----@param whichLocation location ----@return real -function common.GetLocationY(whichLocation) end - ----This function is asynchronous. The values it returns are not guaranteed synchronous between each player. ----If you attempt to use it in a synchronous manner, it may cause a desync. ----点的Z轴高度 [R] ----@param whichLocation location ----@return real -function common.GetLocationZ(whichLocation) end - ----单位检查 ----@param whichRegion region ----@param whichUnit unit ----@return boolean -function common.IsUnitInRegion(whichRegion,whichUnit) end - ----包含坐标 ----@param whichRegion region ----@param x real ----@param y real ----@return boolean -function common.IsPointInRegion(whichRegion,x,y) end - ----包含点 ----@param whichRegion region ----@param whichLocation location ----@return boolean -function common.IsLocationInRegion(whichRegion,whichLocation) end - ----Returns full map bounds, including unplayable borders, in world coordinates ----Returns full map bounds, including unplayable borders, in world coordinates ----@return rect -function common.GetWorldBounds() end - ----Native trigger interface ----新建触发 [R] ----@return trigger -function common.CreateTrigger() end - ----删除触发器 [R] ----@param whichTrigger trigger -function common.DestroyTrigger(whichTrigger) end - ----ResetTrigger ----@param whichTrigger trigger -function common.ResetTrigger(whichTrigger) end - ----打开触发器 ----@param whichTrigger trigger -function common.EnableTrigger(whichTrigger) end - ----关掉触发器 ----@param whichTrigger trigger -function common.DisableTrigger(whichTrigger) end - ----触发器打开 ----@param whichTrigger trigger ----@return boolean -function common.IsTriggerEnabled(whichTrigger) end - ----TriggerWaitOnSleeps ----@param whichTrigger trigger ----@param flag boolean -function common.TriggerWaitOnSleeps(whichTrigger,flag) end - ----IsTriggerWaitOnSleeps ----@param whichTrigger trigger ----@return boolean -function common.IsTriggerWaitOnSleeps(whichTrigger) end - ----匹配的单位 ----@return unit -function common.GetFilterUnit() end - ----选取的单位 ----@return unit -function common.GetEnumUnit() end - ----匹配的可毁坏物 ----@return destructable -function common.GetFilterDestructable() end - ----选取的可毁坏物 ----@return destructable -function common.GetEnumDestructable() end - ----匹配的物品 ----@return item -function common.GetFilterItem() end - ----选取的物品 ----@return item -function common.GetEnumItem() end - ----ParseTags ----@param taggedString string ----@return string -function common.ParseTags(taggedString) end - ----匹配的玩家 ----@return player -function common.GetFilterPlayer() end - ----选取的玩家 ----@return player -function common.GetEnumPlayer() end - ----当前触发器 ----@return trigger -function common.GetTriggeringTrigger() end - ----GetTriggerEventId ----@return eventid -function common.GetTriggerEventId() end - ----触发器赋值统计 ----@param whichTrigger trigger ----@return integer -function common.GetTriggerEvalCount(whichTrigger) end - ----触发器运行次数统计 ----@param whichTrigger trigger ----@return integer -function common.GetTriggerExecCount(whichTrigger) end - ----运行函数 [R] ----@param funcName string -function common.ExecuteFunc(funcName) end - ----Boolean Expr API ( for compositing trigger conditions and unit filter funcs...) ----@param operandA boolexpr ----@param operandB boolexpr ----@return boolexpr -function common.And(operandA,operandB) end - ----Or ----@param operandA boolexpr ----@param operandB boolexpr ----@return boolexpr -function common.Or(operandA,operandB) end - ----Not ----@param operand boolexpr ----@return boolexpr -function common.Not(operand) end - ----限制条件为 ----@param func code ----@return conditionfunc -function common.Condition(func) end - ----DestroyCondition ----@param c conditionfunc -function common.DestroyCondition(c) end - ----Filter ----@param func code ----@return filterfunc -function common.Filter(func) end - ----DestroyFilter ----@param f filterfunc -function common.DestroyFilter(f) end - ----DestroyBoolExpr ----@param e boolexpr -function common.DestroyBoolExpr(e) end - ----变量的值 ----@param whichTrigger trigger ----@param varName string ----@param opcode limitop ----@param limitval real ----@return event -function common.TriggerRegisterVariableEvent(whichTrigger,varName,opcode,limitval) end - ----Creates it's own timer and triggers when it expires ----Creates it's own timer and triggers when it expires ----@param whichTrigger trigger ----@param timeout real ----@param periodic boolean ----@return event -function common.TriggerRegisterTimerEvent(whichTrigger,timeout,periodic) end - ----Triggers when the timer you tell it about expires ----Triggers when the timer you tell it about expires ----@param whichTrigger trigger ----@param t timer ----@return event -function common.TriggerRegisterTimerExpireEvent(whichTrigger,t) end - ----TriggerRegisterGameStateEvent ----@param whichTrigger trigger ----@param whichState gamestate ----@param opcode limitop ----@param limitval real ----@return event -function common.TriggerRegisterGameStateEvent(whichTrigger,whichState,opcode,limitval) end - ----TriggerRegisterDialogEvent ----@param whichTrigger trigger ----@param whichDialog dialog ----@return event -function common.TriggerRegisterDialogEvent(whichTrigger,whichDialog) end - ----对话框按钮被点击 [R] ----@param whichTrigger trigger ----@param whichButton button ----@return event -function common.TriggerRegisterDialogButtonEvent(whichTrigger,whichButton) end - ----EVENT_GAME_STATE_LIMIT ----EVENT_GAME_STATE_LIMIT ----@return gamestate -function common.GetEventGameState() end - ----比赛游戏事件 ----@param whichTrigger trigger ----@param whichGameEvent gameevent ----@return event -function common.TriggerRegisterGameEvent(whichTrigger,whichGameEvent) end - ----EVENT_GAME_VICTORY ----EVENT_GAME_VICTORY ----@return player -function common.GetWinningPlayer() end - ----单位进入不规则区域(指定条件) [R] ----@param whichTrigger trigger ----@param whichRegion region ----@param filter boolexpr ----@return event -function common.TriggerRegisterEnterRegion(whichTrigger,whichRegion,filter) end - ----EVENT_GAME_ENTER_REGION ----触发区域 [R] ----@return region -function common.GetTriggeringRegion() end - ----正在进入的单位 ----@return unit -function common.GetEnteringUnit() end - ----单位离开不规则区域(指定条件) [R] ----@param whichTrigger trigger ----@param whichRegion region ----@param filter boolexpr ----@return event -function common.TriggerRegisterLeaveRegion(whichTrigger,whichRegion,filter) end - ----正在离开的单位 ----@return unit -function common.GetLeavingUnit() end - ----鼠标点击可追踪物 [R] ----@param whichTrigger trigger ----@param t trackable ----@return event -function common.TriggerRegisterTrackableHitEvent(whichTrigger,t) end - ----鼠标移动到追踪对象 [R] ----@param whichTrigger trigger ----@param t trackable ----@return event -function common.TriggerRegisterTrackableTrackEvent(whichTrigger,t) end - ----EVENT_COMMAND_BUTTON_CLICK ----EVENT_COMMAND_BUTTON_CLICK ----@param whichTrigger trigger ----@param whichAbility integer ----@param order string ----@return event -function common.TriggerRegisterCommandEvent(whichTrigger,whichAbility,order) end - ----TriggerRegisterUpgradeCommandEvent ----@param whichTrigger trigger ----@param whichUpgrade integer ----@return event -function common.TriggerRegisterUpgradeCommandEvent(whichTrigger,whichUpgrade) end - ----EVENT_GAME_TRACKABLE_HIT ----EVENT_GAME_TRACKABLE_TRACK ----事件响应 - 触发可追踪物 [R] ----@return trackable -function common.GetTriggeringTrackable() end - ----EVENT_DIALOG_BUTTON_CLICK ----EVENT_DIALOG_BUTTON_CLICK ----@return button -function common.GetClickedButton() end - ----GetClickedDialog ----@return dialog -function common.GetClickedDialog() end - ----EVENT_GAME_TOURNAMENT_FINISH_SOON ----比赛剩余时间 ----@return real -function common.GetTournamentFinishSoonTimeRemaining() end - ----比赛结束规则 ----@return integer -function common.GetTournamentFinishNowRule() end - ----GetTournamentFinishNowPlayer ----@return player -function common.GetTournamentFinishNowPlayer() end - ----对战比赛得分 ----@param whichPlayer player ----@return integer -function common.GetTournamentScore(whichPlayer) end - ----EVENT_GAME_SAVE ----储存游戏文件名 ----@return string -function common.GetSaveBasicFilename() end - ----TriggerRegisterPlayerEvent ----@param whichTrigger trigger ----@param whichPlayer player ----@param whichPlayerEvent playerevent ----@return event -function common.TriggerRegisterPlayerEvent(whichTrigger,whichPlayer,whichPlayerEvent) end - ----EVENT_PLAYER_DEFEAT ----EVENT_PLAYER_VICTORY ----触发玩家 ----@return player -function common.GetTriggerPlayer() end - ----TriggerRegisterPlayerUnitEvent ----@param whichTrigger trigger ----@param whichPlayer player ----@param whichPlayerUnitEvent playerunitevent ----@param filter boolexpr ----@return event -function common.TriggerRegisterPlayerUnitEvent(whichTrigger,whichPlayer,whichPlayerUnitEvent,filter) end - ----EVENT_PLAYER_HERO_LEVEL ----EVENT_UNIT_HERO_LEVEL ----英雄升级 ----@return unit -function common.GetLevelingUnit() end - ----EVENT_PLAYER_HERO_SKILL ----EVENT_UNIT_HERO_SKILL ----学习技能的英雄 ----@return unit -function common.GetLearningUnit() end - ----学习技能 [R] ----@return integer -function common.GetLearnedSkill() end - ----学习的技能的等级 ----@return integer -function common.GetLearnedSkillLevel() end - ----EVENT_PLAYER_HERO_REVIVABLE ----可复活的英雄 ----@return unit -function common.GetRevivableUnit() end - ----EVENT_PLAYER_HERO_REVIVE_START ----EVENT_PLAYER_HERO_REVIVE_CANCEL ----EVENT_PLAYER_HERO_REVIVE_FINISH ----EVENT_UNIT_HERO_REVIVE_START ----EVENT_UNIT_HERO_REVIVE_CANCEL ----EVENT_UNIT_HERO_REVIVE_FINISH ----复活英雄 ----@return unit -function common.GetRevivingUnit() end - ----EVENT_PLAYER_UNIT_ATTACKED ----攻击的单位 ----@return unit -function common.GetAttacker() end - ----EVENT_PLAYER_UNIT_RESCUED ----EVENT_PLAYER_UNIT_RESCUED ----@return unit -function common.GetRescuer() end - ----EVENT_PLAYER_UNIT_DEATH ----垂死的单位 ----@return unit -function common.GetDyingUnit() end - ----GetKillingUnit ----@return unit -function common.GetKillingUnit() end - ----EVENT_PLAYER_UNIT_DECAY ----尸体腐烂单位 ----@return unit -function common.GetDecayingUnit() end - ----EVENT_PLAYER_UNIT_CONSTRUCT_START ----正在建造的建筑 ----@return unit -function common.GetConstructingStructure() end - ----EVENT_PLAYER_UNIT_CONSTRUCT_FINISH ----EVENT_PLAYER_UNIT_CONSTRUCT_CANCEL ----取消建造中的建筑 ----@return unit -function common.GetCancelledStructure() end - ----已建造的建筑 ----@return unit -function common.GetConstructedStructure() end - ----EVENT_PLAYER_UNIT_RESEARCH_START ----EVENT_PLAYER_UNIT_RESEARCH_CANCEL ----EVENT_PLAYER_UNIT_RESEARCH_FINISH ----研究科技单位 ----@return unit -function common.GetResearchingUnit() end - ----研究的 科技-类型 ----@return integer -function common.GetResearched() end - ----EVENT_PLAYER_UNIT_TRAIN_START ----EVENT_PLAYER_UNIT_TRAIN_CANCEL ----EVENT_PLAYER_UNIT_TRAIN_FINISH ----EVENT_PLAYER_UNIT_TRAIN_FINISH ----@return integer -function common.GetTrainedUnitType() end - ----EVENT_PLAYER_UNIT_TRAIN_FINISH ----@return unit -function common.GetTrainedUnit() end - ----EVENT_PLAYER_UNIT_DETECTED ----EVENT_PLAYER_UNIT_DETECTED ----@return unit -function common.GetDetectedUnit() end - ----EVENT_PLAYER_UNIT_SUMMONED ----正在召唤的单位 ----@return unit -function common.GetSummoningUnit() end - ----已召唤单位 ----@return unit -function common.GetSummonedUnit() end - ----EVENT_PLAYER_UNIT_LOADED ----EVENT_PLAYER_UNIT_LOADED ----@return unit -function common.GetTransportUnit() end - ----GetLoadedUnit ----@return unit -function common.GetLoadedUnit() end - ----EVENT_PLAYER_UNIT_SELL ----出售单位 ----@return unit -function common.GetSellingUnit() end - ----被出售单位 ----@return unit -function common.GetSoldUnit() end - ----在购买的单位 ----@return unit -function common.GetBuyingUnit() end - ----EVENT_PLAYER_UNIT_SELL_ITEM ----卖出的物品 ----@return item -function common.GetSoldItem() end - ----EVENT_PLAYER_UNIT_CHANGE_OWNER ----改变了所有者的单位 ----@return unit -function common.GetChangingUnit() end - ----前一个所有者 ----@return player -function common.GetChangingUnitPrevOwner() end - ----EVENT_PLAYER_UNIT_DROP_ITEM ----EVENT_PLAYER_UNIT_PICKUP_ITEM ----EVENT_PLAYER_UNIT_USE_ITEM ----英雄操作物品 ----@return unit -function common.GetManipulatingUnit() end - ----物品存在操作 ----@return item -function common.GetManipulatedItem() end - ----EVENT_PLAYER_UNIT_ISSUED_ORDER ----收到命令的单位 ----@return unit -function common.GetOrderedUnit() end - ----GetIssuedOrderId ----@return integer -function common.GetIssuedOrderId() end - ----EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER ----命令发布点X坐标 [R] ----@return real -function common.GetOrderPointX() end - ----命令发布点Y坐标 [R] ----@return real -function common.GetOrderPointY() end - ----目标的位置 ----@return location -function common.GetOrderPointLoc() end - ----EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER ----EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER ----@return widget -function common.GetOrderTarget() end - ----目标的可毁坏物 ----@return destructable -function common.GetOrderTargetDestructable() end - ----目标的物品 ----@return item -function common.GetOrderTargetItem() end - ----目标的单位 ----@return unit -function common.GetOrderTargetUnit() end - ----EVENT_UNIT_SPELL_CHANNEL ----EVENT_UNIT_SPELL_CAST ----EVENT_UNIT_SPELL_EFFECT ----EVENT_UNIT_SPELL_FINISH ----EVENT_UNIT_SPELL_ENDCAST ----EVENT_PLAYER_UNIT_SPELL_CHANNEL ----EVENT_PLAYER_UNIT_SPELL_CAST ----EVENT_PLAYER_UNIT_SPELL_EFFECT ----EVENT_PLAYER_UNIT_SPELL_FINISH ----EVENT_PLAYER_UNIT_SPELL_ENDCAST ----技能单位 ----@return unit -function common.GetSpellAbilityUnit() end - ----使用的技能 ----@return integer -function common.GetSpellAbilityId() end - ----使用的技能 ----@return ability -function common.GetSpellAbility() end - ----对其使用技能的目标点 ----@return location -function common.GetSpellTargetLoc() end - ----GetSpellTargetX ----@return real -function common.GetSpellTargetX() end - ----GetSpellTargetY ----@return real -function common.GetSpellTargetY() end - ----对其使用技能的目标可毁坏物 ----@return destructable -function common.GetSpellTargetDestructable() end - ----对其使用技能的目标物品 ----@return item -function common.GetSpellTargetItem() end - ----对其使用技能的目标单位 ----@return unit -function common.GetSpellTargetUnit() end - ----联盟状态改变(特殊) ----@param whichTrigger trigger ----@param whichPlayer player ----@param whichAlliance alliancetype ----@return event -function common.TriggerRegisterPlayerAllianceChange(whichTrigger,whichPlayer,whichAlliance) end - ----属性 ----@param whichTrigger trigger ----@param whichPlayer player ----@param whichState playerstate ----@param opcode limitop ----@param limitval real ----@return event -function common.TriggerRegisterPlayerStateEvent(whichTrigger,whichPlayer,whichState,opcode,limitval) end - ----EVENT_PLAYER_STATE_LIMIT ----EVENT_PLAYER_STATE_LIMIT ----@return playerstate -function common.GetEventPlayerState() end - ----玩家输入聊天信息 ----@param whichTrigger trigger ----@param whichPlayer player ----@param chatMessageToDetect string ----@param exactMatchOnly boolean ----@return event -function common.TriggerRegisterPlayerChatEvent(whichTrigger,whichPlayer,chatMessageToDetect,exactMatchOnly) end - ----returns the actual string they typed in ( same as what you registered for ----if you required exact match ) ----输入的聊天字符 ----@return string -function common.GetEventPlayerChatString() end - ----returns the string that you registered for ----匹配的聊天字符 ----@return string -function common.GetEventPlayerChatStringMatched() end - ----可毁坏物死亡 ----@param whichTrigger trigger ----@param whichWidget widget ----@return event -function common.TriggerRegisterDeathEvent(whichTrigger,whichWidget) end - ----触发单位 ----@return unit -function common.GetTriggerUnit() end - ----TriggerRegisterUnitStateEvent ----@param whichTrigger trigger ----@param whichUnit unit ----@param whichState unitstate ----@param opcode limitop ----@param limitval real ----@return event -function common.TriggerRegisterUnitStateEvent(whichTrigger,whichUnit,whichState,opcode,limitval) end - ----EVENT_UNIT_STATE_LIMIT ----EVENT_UNIT_STATE_LIMIT ----获取单位状态 ----@return unitstate -function common.GetEventUnitState() end - ----详细单位的事件 ----@param whichTrigger trigger ----@param whichUnit unit ----@param whichEvent unitevent ----@return event -function common.TriggerRegisterUnitEvent(whichTrigger,whichUnit,whichEvent) end - ----EVENT_UNIT_DAMAGED ----被伤害的生命值 ----@return real -function common.GetEventDamage() end - ----伤害来源 ----@return unit -function common.GetEventDamageSource() end - ----EVENT_UNIT_DETECTED ----EVENT_UNIT_DETECTED ----@return player -function common.GetEventDetectingPlayer() end - ----TriggerRegisterFilterUnitEvent ----@param whichTrigger trigger ----@param whichUnit unit ----@param whichEvent unitevent ----@param filter boolexpr ----@return event -function common.TriggerRegisterFilterUnitEvent(whichTrigger,whichUnit,whichEvent,filter) end - ----EVENT_UNIT_ACQUIRED_TARGET ----EVENT_UNIT_TARGET_IN_RANGE ----目标单位 ----@return unit -function common.GetEventTargetUnit() end - ----TriggerRegisterUnitInRange ----@param whichTrigger trigger ----@param whichUnit unit ----@param range real ----@param filter boolexpr ----@return event -function common.TriggerRegisterUnitInRange(whichTrigger,whichUnit,range,filter) end - ----添加触发器限制条件 ----@param whichTrigger trigger ----@param condition boolexpr ----@return triggercondition -function common.TriggerAddCondition(whichTrigger,condition) end - ----TriggerRemoveCondition ----@param whichTrigger trigger ----@param whichCondition triggercondition -function common.TriggerRemoveCondition(whichTrigger,whichCondition) end - ----TriggerClearConditions ----@param whichTrigger trigger -function common.TriggerClearConditions(whichTrigger) end - ----添加触发器动作 ----@param whichTrigger trigger ----@param actionFunc code ----@return triggeraction -function common.TriggerAddAction(whichTrigger,actionFunc) end - ----TriggerRemoveAction ----@param whichTrigger trigger ----@param whichAction triggeraction -function common.TriggerRemoveAction(whichTrigger,whichAction) end - ----TriggerClearActions ----@param whichTrigger trigger -function common.TriggerClearActions(whichTrigger) end - ----等待 ----@param timeout real -function common.TriggerSleepAction(timeout) end - ----TriggerWaitForSound ----@param s sound ----@param offset real -function common.TriggerWaitForSound(s,offset) end - ----触发器条件成立 ----@param whichTrigger trigger ----@return boolean -function common.TriggerEvaluate(whichTrigger) end - ----运行触发器 (忽略条件) ----@param whichTrigger trigger -function common.TriggerExecute(whichTrigger) end - ----TriggerExecuteWait ----@param whichTrigger trigger -function common.TriggerExecuteWait(whichTrigger) end - ----TriggerSyncStart -function common.TriggerSyncStart() end - ----TriggerSyncReady -function common.TriggerSyncReady() end - ----Widget API ----Widget API ----@param whichWidget widget ----@return real -function common.GetWidgetLife(whichWidget) end - ----SetWidgetLife ----@param whichWidget widget ----@param newLife real -function common.SetWidgetLife(whichWidget,newLife) end - ----GetWidgetX ----@param whichWidget widget ----@return real -function common.GetWidgetX(whichWidget) end - ----GetWidgetY ----@param whichWidget widget ----@return real -function common.GetWidgetY(whichWidget) end - ----GetTriggerWidget ----@return widget -function common.GetTriggerWidget() end - ----Destructable Object API ----Facing arguments are specified in degrees ----Facing arguments are specified in degrees ----@param objectid integer ----@param x real ----@param y real ----@param face real ----@param scale real ----@param variation integer ----@return destructable -function common.CreateDestructable(objectid,x,y,face,scale,variation) end - ----新建可破坏物 [R] ----@param objectid integer ----@param x real ----@param y real ----@param z real ----@param face real ----@param scale real ----@param variation integer ----@return destructable -function common.CreateDestructableZ(objectid,x,y,z,face,scale,variation) end - ----CreateDeadDestructable ----@param objectid integer ----@param x real ----@param y real ----@param face real ----@param scale real ----@param variation integer ----@return destructable -function common.CreateDeadDestructable(objectid,x,y,face,scale,variation) end - ----新建可破坏物(死亡的) [R] ----@param objectid integer ----@param x real ----@param y real ----@param z real ----@param face real ----@param scale real ----@param variation integer ----@return destructable -function common.CreateDeadDestructableZ(objectid,x,y,z,face,scale,variation) end - ----删除 可毁坏物 ----@param d destructable -function common.RemoveDestructable(d) end - ----杀死 可毁坏物 ----@param d destructable -function common.KillDestructable(d) end - ----SetDestructableInvulnerable ----@param d destructable ----@param flag boolean -function common.SetDestructableInvulnerable(d,flag) end - ----IsDestructableInvulnerable ----@param d destructable ----@return boolean -function common.IsDestructableInvulnerable(d) end - ----EnumDestructablesInRect ----@param r rect ----@param filter boolexpr ----@param actionFunc code -function common.EnumDestructablesInRect(r,filter,actionFunc) end - ----建筑的类型 ----@param d destructable ----@return integer -function common.GetDestructableTypeId(d) end - ----可破坏物所在X轴坐标 [R] ----@param d destructable ----@return real -function common.GetDestructableX(d) end - ----可破坏物所在Y轴坐标 [R] ----@param d destructable ----@return real -function common.GetDestructableY(d) end - ----设置 可毁坏物 生命 (值) ----@param d destructable ----@param life real -function common.SetDestructableLife(d,life) end - ----生命值 (可毁坏物) ----@param d destructable ----@return real -function common.GetDestructableLife(d) end - ----SetDestructableMaxLife ----@param d destructable ----@param max real -function common.SetDestructableMaxLife(d,max) end - ----最大生命值 (可毁坏物) ----@param d destructable ----@return real -function common.GetDestructableMaxLife(d) end - ----复活 可毁坏物 ----@param d destructable ----@param life real ----@param birth boolean -function common.DestructableRestoreLife(d,life,birth) end - ----QueueDestructableAnimation ----@param d destructable ----@param whichAnimation string -function common.QueueDestructableAnimation(d,whichAnimation) end - ----SetDestructableAnimation ----@param d destructable ----@param whichAnimation string -function common.SetDestructableAnimation(d,whichAnimation) end - ----改变可破坏物动画播放速度 [R] ----@param d destructable ----@param speedFactor real -function common.SetDestructableAnimationSpeed(d,speedFactor) end - ----显示/隐藏 [R] ----@param d destructable ----@param flag boolean -function common.ShowDestructable(d,flag) end - ----闭塞高度 (可毁坏物) ----@param d destructable ----@return real -function common.GetDestructableOccluderHeight(d) end - ----设置闭塞高度 ----@param d destructable ----@param height real -function common.SetDestructableOccluderHeight(d,height) end - ----可毁坏物的名字 ----@param d destructable ----@return string -function common.GetDestructableName(d) end - ----GetTriggerDestructable ----@return destructable -function common.GetTriggerDestructable() end - ----Item API ----创建 ----@param itemid integer ----@param x real ----@param y real ----@return item -function common.CreateItem(itemid,x,y) end - ----删除物品 ----@param whichItem item -function common.RemoveItem(whichItem) end - ----物品的所有者 ----@param whichItem item ----@return player -function common.GetItemPlayer(whichItem) end - ----物品的类别 ----@param i item ----@return integer -function common.GetItemTypeId(i) end - ----物品的X轴坐标 [R] ----@param i item ----@return real -function common.GetItemX(i) end - ----物品的Y轴坐标 [R] ----@param i item ----@return real -function common.GetItemY(i) end - ----移动物品到坐标(立即)(指定坐标) [R] ----@param i item ----@param x real ----@param y real -function common.SetItemPosition(i,x,y) end - ----SetItemDropOnDeath ----@param whichItem item ----@param flag boolean -function common.SetItemDropOnDeath(whichItem,flag) end - ----SetItemDroppable ----@param i item ----@param flag boolean -function common.SetItemDroppable(i,flag) end - ----设置物品能否变卖 ----@param i item ----@param flag boolean -function common.SetItemPawnable(i,flag) end - ----SetItemPlayer ----@param whichItem item ----@param whichPlayer player ----@param changeColor boolean -function common.SetItemPlayer(whichItem,whichPlayer,changeColor) end - ----SetItemInvulnerable ----@param whichItem item ----@param flag boolean -function common.SetItemInvulnerable(whichItem,flag) end - ----物品是无敌的 ----@param whichItem item ----@return boolean -function common.IsItemInvulnerable(whichItem) end - ----显示/隐藏 [R] ----@param whichItem item ----@param show boolean -function common.SetItemVisible(whichItem,show) end - ----物品可见 [R] ----@param whichItem item ----@return boolean -function common.IsItemVisible(whichItem) end - ----物品所有者 ----@param whichItem item ----@return boolean -function common.IsItemOwned(whichItem) end - ----物品是拾取时自动使用的 [R] ----@param whichItem item ----@return boolean -function common.IsItemPowerup(whichItem) end - ----物品可被市场随机出售 [R] ----@param whichItem item ----@return boolean -function common.IsItemSellable(whichItem) end - ----物品可被抵押 [R] ----@param whichItem item ----@return boolean -function common.IsItemPawnable(whichItem) end - ----IsItemIdPowerup ----@param itemId integer ----@return boolean -function common.IsItemIdPowerup(itemId) end - ----IsItemIdSellable ----@param itemId integer ----@return boolean -function common.IsItemIdSellable(itemId) end - ----IsItemIdPawnable ----@param itemId integer ----@return boolean -function common.IsItemIdPawnable(itemId) end - ----EnumItemsInRect ----@param r rect ----@param filter boolexpr ----@param actionFunc code -function common.EnumItemsInRect(r,filter,actionFunc) end - ----物品等级 ----@param whichItem item ----@return integer -function common.GetItemLevel(whichItem) end - ----GetItemType ----@param whichItem item ----@return itemtype -function common.GetItemType(whichItem) end - ----设置重生神符的产生单位类型 ----@param whichItem item ----@param unitId integer -function common.SetItemDropID(whichItem,unitId) end - ----物品名 ----@param whichItem item ----@return string -function common.GetItemName(whichItem) end - ----物品的数量 ----@param whichItem item ----@return integer -function common.GetItemCharges(whichItem) end - ----设置物品数量[使用次数] ----@param whichItem item ----@param charges integer -function common.SetItemCharges(whichItem,charges) end - ----物品自定义值 ----@param whichItem item ----@return integer -function common.GetItemUserData(whichItem) end - ----设置物品自定义数据 ----@param whichItem item ----@param data integer -function common.SetItemUserData(whichItem,data) end - ----Unit API ----Facing arguments are specified in degrees ----新建单位(指定坐标) [R] ----@param id player ----@param unitid integer ----@param x real ----@param y real ----@param face real ----@return unit -function common.CreateUnit(id,unitid,x,y,face) end - ----CreateUnitByName ----@param whichPlayer player ----@param unitname string ----@param x real ----@param y real ----@param face real ----@return unit -function common.CreateUnitByName(whichPlayer,unitname,x,y,face) end - ----新建单位(指定点) [R] ----@param id player ----@param unitid integer ----@param whichLocation location ----@param face real ----@return unit -function common.CreateUnitAtLoc(id,unitid,whichLocation,face) end - ----CreateUnitAtLocByName ----@param id player ----@param unitname string ----@param whichLocation location ----@param face real ----@return unit -function common.CreateUnitAtLocByName(id,unitname,whichLocation,face) end - ----新建尸体 [R] ----@param whichPlayer player ----@param unitid integer ----@param x real ----@param y real ----@param face real ----@return unit -function common.CreateCorpse(whichPlayer,unitid,x,y,face) end - ----杀死单位 ----@param whichUnit unit -function common.KillUnit(whichUnit) end - ----删除单位 ----@param whichUnit unit -function common.RemoveUnit(whichUnit) end - ----显示/隐藏 [R] ----@param whichUnit unit ----@param show boolean -function common.ShowUnit(whichUnit,show) end - ----设置单位属性 [R] ----@param whichUnit unit ----@param whichUnitState unitstate ----@param newVal real -function common.SetUnitState(whichUnit,whichUnitState,newVal) end - ----设置X坐标 [R] ----@param whichUnit unit ----@param newX real -function common.SetUnitX(whichUnit,newX) end - ----设置Y坐标 [R] ----@param whichUnit unit ----@param newY real -function common.SetUnitY(whichUnit,newY) end - ----移动单位(立即)(指定坐标) [R] ----@param whichUnit unit ----@param newX real ----@param newY real -function common.SetUnitPosition(whichUnit,newX,newY) end - ----移动单位 (立刻) ----@param whichUnit unit ----@param whichLocation location -function common.SetUnitPositionLoc(whichUnit,whichLocation) end - ----设置单位面向角度 [R] ----@param whichUnit unit ----@param facingAngle real -function common.SetUnitFacing(whichUnit,facingAngle) end - ----设置单位面对角度 ----@param whichUnit unit ----@param facingAngle real ----@param duration real -function common.SetUnitFacingTimed(whichUnit,facingAngle,duration) end - ----设置单位移动速度 ----@param whichUnit unit ----@param newSpeed real -function common.SetUnitMoveSpeed(whichUnit,newSpeed) end - ----SetUnitFlyHeight ----@param whichUnit unit ----@param newHeight real ----@param rate real -function common.SetUnitFlyHeight(whichUnit,newHeight,rate) end - ----SetUnitTurnSpeed ----@param whichUnit unit ----@param newTurnSpeed real -function common.SetUnitTurnSpeed(whichUnit,newTurnSpeed) end - ----改变单位转向角度(弧度制) [R] ----@param whichUnit unit ----@param newPropWindowAngle real -function common.SetUnitPropWindow(whichUnit,newPropWindowAngle) end - ----SetUnitAcquireRange ----@param whichUnit unit ----@param newAcquireRange real -function common.SetUnitAcquireRange(whichUnit,newAcquireRange) end - ----锁定指定单位的警戒点 [R] ----@param whichUnit unit ----@param creepGuard boolean -function common.SetUnitCreepGuard(whichUnit,creepGuard) end - ----单位射程 (当前) ----@param whichUnit unit ----@return real -function common.GetUnitAcquireRange(whichUnit) end - ----转向速度 (当前) ----@param whichUnit unit ----@return real -function common.GetUnitTurnSpeed(whichUnit) end - ----当前转向角度(弧度制) [R] ----@param whichUnit unit ----@return real -function common.GetUnitPropWindow(whichUnit) end - ----飞行高度 (当前) ----@param whichUnit unit ----@return real -function common.GetUnitFlyHeight(whichUnit) end - ----单位射程 (默认) ----@param whichUnit unit ----@return real -function common.GetUnitDefaultAcquireRange(whichUnit) end - ----转向速度 (默认) ----@param whichUnit unit ----@return real -function common.GetUnitDefaultTurnSpeed(whichUnit) end - ----GetUnitDefaultPropWindow ----@param whichUnit unit ----@return real -function common.GetUnitDefaultPropWindow(whichUnit) end - ----飞行高度 (默认) ----@param whichUnit unit ----@return real -function common.GetUnitDefaultFlyHeight(whichUnit) end - ----改变单位所有者 ----@param whichUnit unit ----@param whichPlayer player ----@param changeColor boolean -function common.SetUnitOwner(whichUnit,whichPlayer,changeColor) end - ----改变单位颜色 ----@param whichUnit unit ----@param whichColor playercolor -function common.SetUnitColor(whichUnit,whichColor) end - ----改变单位尺寸(按倍数) [R] ----@param whichUnit unit ----@param scaleX real ----@param scaleY real ----@param scaleZ real -function common.SetUnitScale(whichUnit,scaleX,scaleY,scaleZ) end - ----改变单位动画播放速度(按倍数) [R] ----@param whichUnit unit ----@param timeScale real -function common.SetUnitTimeScale(whichUnit,timeScale) end - ----SetUnitBlendTime ----@param whichUnit unit ----@param blendTime real -function common.SetUnitBlendTime(whichUnit,blendTime) end - ----改变单位的颜色(RGB:0-255) [R] ----@param whichUnit unit ----@param red integer ----@param green integer ----@param blue integer ----@param alpha integer -function common.SetUnitVertexColor(whichUnit,red,green,blue,alpha) end - ----QueueUnitAnimation ----@param whichUnit unit ----@param whichAnimation string -function common.QueueUnitAnimation(whichUnit,whichAnimation) end - ----播放单位动作 ----@param whichUnit unit ----@param whichAnimation string -function common.SetUnitAnimation(whichUnit,whichAnimation) end - ----播放单位指定序号动动作 [R] ----@param whichUnit unit ----@param whichAnimation integer -function common.SetUnitAnimationByIndex(whichUnit,whichAnimation) end - ----播放单位动作 (指定概率) ----@param whichUnit unit ----@param whichAnimation string ----@param rarity raritycontrol -function common.SetUnitAnimationWithRarity(whichUnit,whichAnimation,rarity) end - ----添加/删除 单位动画附加名 [R] ----@param whichUnit unit ----@param animProperties string ----@param add boolean -function common.AddUnitAnimationProperties(whichUnit,animProperties,add) end - ----锁定单位脸面对方向 ----@param whichUnit unit ----@param whichBone string ----@param lookAtTarget unit ----@param offsetX real ----@param offsetY real ----@param offsetZ real -function common.SetUnitLookAt(whichUnit,whichBone,lookAtTarget,offsetX,offsetY,offsetZ) end - ----重置单位面对方向 ----@param whichUnit unit -function common.ResetUnitLookAt(whichUnit) end - ----设置可否营救(对玩家) [R] ----@param whichUnit unit ----@param byWhichPlayer player ----@param flag boolean -function common.SetUnitRescuable(whichUnit,byWhichPlayer,flag) end - ----设置营救单位的营救距离 ----@param whichUnit unit ----@param range real -function common.SetUnitRescueRange(whichUnit,range) end - ----设置英雄力量 [R] ----@param whichHero unit ----@param newStr integer ----@param permanent boolean -function common.SetHeroStr(whichHero,newStr,permanent) end - ----设置英雄敏捷 [R] ----@param whichHero unit ----@param newAgi integer ----@param permanent boolean -function common.SetHeroAgi(whichHero,newAgi,permanent) end - ----设置英雄智力 [R] ----@param whichHero unit ----@param newInt integer ----@param permanent boolean -function common.SetHeroInt(whichHero,newInt,permanent) end - ----英雄力量 [R] ----@param whichHero unit ----@param includeBonuses boolean ----@return integer -function common.GetHeroStr(whichHero,includeBonuses) end - ----英雄敏捷 [R] ----@param whichHero unit ----@param includeBonuses boolean ----@return integer -function common.GetHeroAgi(whichHero,includeBonuses) end - ----英雄智力 [R] ----@param whichHero unit ----@param includeBonuses boolean ----@return integer -function common.GetHeroInt(whichHero,includeBonuses) end - ----降低等级 [R] ----@param whichHero unit ----@param howManyLevels integer ----@return boolean -function common.UnitStripHeroLevel(whichHero,howManyLevels) end - ----英雄的经验值 ----@param whichHero unit ----@return integer -function common.GetHeroXP(whichHero) end - ----设置英雄经验值 ----@param whichHero unit ----@param newXpVal integer ----@param showEyeCandy boolean -function common.SetHeroXP(whichHero,newXpVal,showEyeCandy) end - ----未用完的技能点数 ----@param whichHero unit ----@return integer -function common.GetHeroSkillPoints(whichHero) end - ----添加剩余技能点 [R] ----@param whichHero unit ----@param skillPointDelta integer ----@return boolean -function common.UnitModifySkillPoints(whichHero,skillPointDelta) end - ----增加经验值 [R] ----@param whichHero unit ----@param xpToAdd integer ----@param showEyeCandy boolean -function common.AddHeroXP(whichHero,xpToAdd,showEyeCandy) end - ----设置英雄等级 ----@param whichHero unit ----@param level integer ----@param showEyeCandy boolean -function common.SetHeroLevel(whichHero,level,showEyeCandy) end - ----英雄等级 ----@param whichHero unit ----@return integer -function common.GetHeroLevel(whichHero) end - ----单位等级 ----@param whichUnit unit ----@return integer -function common.GetUnitLevel(whichUnit) end - ----英雄的姓名 ----@param whichHero unit ----@return string -function common.GetHeroProperName(whichHero) end - ----允许/禁止经验获取 [R] ----@param whichHero unit ----@param flag boolean -function common.SuspendHeroXP(whichHero,flag) end - ----英雄获得经验值 ----@param whichHero unit ----@return boolean -function common.IsSuspendedXP(whichHero) end - ----英雄学习技能 ----@param whichHero unit ----@param abilcode integer -function common.SelectHeroSkill(whichHero,abilcode) end - ----单位技能等级 [R] ----@param whichUnit unit ----@param abilcode integer ----@return integer -function common.GetUnitAbilityLevel(whichUnit,abilcode) end - ----降低技能等级 [R] ----@param whichUnit unit ----@param abilcode integer ----@return integer -function common.DecUnitAbilityLevel(whichUnit,abilcode) end - ----提升技能等级 [R] ----@param whichUnit unit ----@param abilcode integer ----@return integer -function common.IncUnitAbilityLevel(whichUnit,abilcode) end - ----设置技能等级 [R] ----@param whichUnit unit ----@param abilcode integer ----@param level integer ----@return integer -function common.SetUnitAbilityLevel(whichUnit,abilcode,level) end - ----立即复活(指定坐标) [R] ----@param whichHero unit ----@param x real ----@param y real ----@param doEyecandy boolean ----@return boolean -function common.ReviveHero(whichHero,x,y,doEyecandy) end - ----复活英雄(立即) ----@param whichHero unit ----@param loc location ----@param doEyecandy boolean ----@return boolean -function common.ReviveHeroLoc(whichHero,loc,doEyecandy) end - ----SetUnitExploded ----@param whichUnit unit ----@param exploded boolean -function common.SetUnitExploded(whichUnit,exploded) end - ----设置单位 无敌/可攻击 ----@param whichUnit unit ----@param flag boolean -function common.SetUnitInvulnerable(whichUnit,flag) end - ----暂停/恢复 [R] ----@param whichUnit unit ----@param flag boolean -function common.PauseUnit(whichUnit,flag) end - ----IsUnitPaused ----@param whichHero unit ----@return boolean -function common.IsUnitPaused(whichHero) end - ----设置碰撞 打开/关闭 ----@param whichUnit unit ----@param flag boolean -function common.SetUnitPathing(whichUnit,flag) end - ----清除所有选定 -function common.ClearSelection() end - ----SelectUnit ----@param whichUnit unit ----@param flag boolean -function common.SelectUnit(whichUnit,flag) end - ----单位的 附加值 ----@param whichUnit unit ----@return integer -function common.GetUnitPointValue(whichUnit) end - ----单位-类型的 附加值 ----@param unitType integer ----@return integer -function common.GetUnitPointValueByType(unitType) end - ----给予物品 [R] ----@param whichUnit unit ----@param whichItem item ----@return boolean -function common.UnitAddItem(whichUnit,whichItem) end - ----UnitAddItemById ----@param whichUnit unit ----@param itemId integer ----@return item -function common.UnitAddItemById(whichUnit,itemId) end - ----新建物品到指定物品栏 [R] ----@param whichUnit unit ----@param itemId integer ----@param itemSlot integer ----@return boolean -function common.UnitAddItemToSlotById(whichUnit,itemId,itemSlot) end - ----UnitRemoveItem ----@param whichUnit unit ----@param whichItem item -function common.UnitRemoveItem(whichUnit,whichItem) end - ----UnitRemoveItemFromSlot ----@param whichUnit unit ----@param itemSlot integer ----@return item -function common.UnitRemoveItemFromSlot(whichUnit,itemSlot) end - ----英雄已有物品 ----@param whichUnit unit ----@param whichItem item ----@return boolean -function common.UnitHasItem(whichUnit,whichItem) end - ----单位持有物品 ----@param whichUnit unit ----@param itemSlot integer ----@return item -function common.UnitItemInSlot(whichUnit,itemSlot) end - ----UnitInventorySize ----@param whichUnit unit ----@return integer -function common.UnitInventorySize(whichUnit) end - ----发布丢弃物品命令(指定坐标) [R] ----@param whichUnit unit ----@param whichItem item ----@param x real ----@param y real ----@return boolean -function common.UnitDropItemPoint(whichUnit,whichItem,x,y) end - ----移动物品到物品栏 [R] ----@param whichUnit unit ----@param whichItem item ----@param slot integer ----@return boolean -function common.UnitDropItemSlot(whichUnit,whichItem,slot) end - ----UnitDropItemTarget ----@param whichUnit unit ----@param whichItem item ----@param target widget ----@return boolean -function common.UnitDropItemTarget(whichUnit,whichItem,target) end - ----使用物品 ----@param whichUnit unit ----@param whichItem item ----@return boolean -function common.UnitUseItem(whichUnit,whichItem) end - ----使用物品(指定坐标) ----@param whichUnit unit ----@param whichItem item ----@param x real ----@param y real ----@return boolean -function common.UnitUseItemPoint(whichUnit,whichItem,x,y) end - ----对单位使用物品 ----@param whichUnit unit ----@param whichItem item ----@param target widget ----@return boolean -function common.UnitUseItemTarget(whichUnit,whichItem,target) end - ----单位所在X轴坐标 [R] ----@param whichUnit unit ----@return real -function common.GetUnitX(whichUnit) end - ----单位所在Y轴坐标 [R] ----@param whichUnit unit ----@return real -function common.GetUnitY(whichUnit) end - ----单位的位置 ----@param whichUnit unit ----@return location -function common.GetUnitLoc(whichUnit) end - ----单位面向角度 ----@param whichUnit unit ----@return real -function common.GetUnitFacing(whichUnit) end - ----单位移动速度 (当前) ----@param whichUnit unit ----@return real -function common.GetUnitMoveSpeed(whichUnit) end - ----单位移动速度 (默认) ----@param whichUnit unit ----@return real -function common.GetUnitDefaultMoveSpeed(whichUnit) end - ----属性 [R] ----@param whichUnit unit ----@param whichUnitState unitstate ----@return real -function common.GetUnitState(whichUnit,whichUnitState) end - ----单位的所有者 ----@param whichUnit unit ----@return player -function common.GetOwningPlayer(whichUnit) end - ----单位的类型 ----@param whichUnit unit ----@return integer -function common.GetUnitTypeId(whichUnit) end - ----单位的种族 ----@param whichUnit unit ----@return race -function common.GetUnitRace(whichUnit) end - ----单位名字 ----@param whichUnit unit ----@return string -function common.GetUnitName(whichUnit) end - ----GetUnitFoodUsed ----@param whichUnit unit ----@return integer -function common.GetUnitFoodUsed(whichUnit) end - ----GetUnitFoodMade ----@param whichUnit unit ----@return integer -function common.GetUnitFoodMade(whichUnit) end - ----单位-类型 提供的人口 ----@param unitId integer ----@return integer -function common.GetFoodMade(unitId) end - ----单位-类型 使用的人口 ----@param unitId integer ----@return integer -function common.GetFoodUsed(unitId) end - ----允许/禁止 人口占用 [R] ----@param whichUnit unit ----@param useFood boolean -function common.SetUnitUseFood(whichUnit,useFood) end - ----聚集点 ----@param whichUnit unit ----@return location -function common.GetUnitRallyPoint(whichUnit) end - ----拥有源聚集点单位 ----@param whichUnit unit ----@return unit -function common.GetUnitRallyUnit(whichUnit) end - ----单位 聚集点 ----@param whichUnit unit ----@return destructable -function common.GetUnitRallyDestructable(whichUnit) end - ----单位在 单位组 ----@param whichUnit unit ----@param whichGroup group ----@return boolean -function common.IsUnitInGroup(whichUnit,whichGroup) end - ----是玩家组里玩家的单位 ----@param whichUnit unit ----@param whichForce force ----@return boolean -function common.IsUnitInForce(whichUnit,whichForce) end - ----是玩家的单位 ----@param whichUnit unit ----@param whichPlayer player ----@return boolean -function common.IsUnitOwnedByPlayer(whichUnit,whichPlayer) end - ----单位所属玩家的同盟玩家 ----@param whichUnit unit ----@param whichPlayer player ----@return boolean -function common.IsUnitAlly(whichUnit,whichPlayer) end - ----单位所属玩家的敌对玩家 ----@param whichUnit unit ----@param whichPlayer player ----@return boolean -function common.IsUnitEnemy(whichUnit,whichPlayer) end - ----单位对于玩家可见 ----@param whichUnit unit ----@param whichPlayer player ----@return boolean -function common.IsUnitVisible(whichUnit,whichPlayer) end - ----被检测到 ----@param whichUnit unit ----@param whichPlayer player ----@return boolean -function common.IsUnitDetected(whichUnit,whichPlayer) end - ----单位对于玩家不可见 ----@param whichUnit unit ----@param whichPlayer player ----@return boolean -function common.IsUnitInvisible(whichUnit,whichPlayer) end - ----单位被战争迷雾遮挡 ----@param whichUnit unit ----@param whichPlayer player ----@return boolean -function common.IsUnitFogged(whichUnit,whichPlayer) end - ----单位被黑色阴影遮挡 ----@param whichUnit unit ----@param whichPlayer player ----@return boolean -function common.IsUnitMasked(whichUnit,whichPlayer) end - ----玩家已选定单位 ----@param whichUnit unit ----@param whichPlayer player ----@return boolean -function common.IsUnitSelected(whichUnit,whichPlayer) end - ----单位种族检查 ----@param whichUnit unit ----@param whichRace race ----@return boolean -function common.IsUnitRace(whichUnit,whichRace) end - ----检查单位 分类 ----@param whichUnit unit ----@param whichUnitType unittype ----@return boolean -function common.IsUnitType(whichUnit,whichUnitType) end - ----IsUnit ----@param whichUnit unit ----@param whichSpecifiedUnit unit ----@return boolean -function common.IsUnit(whichUnit,whichSpecifiedUnit) end - ----在指定单位范围内 [R] ----@param whichUnit unit ----@param otherUnit unit ----@param distance real ----@return boolean -function common.IsUnitInRange(whichUnit,otherUnit,distance) end - ----在指定坐标范围内 [R] ----@param whichUnit unit ----@param x real ----@param y real ----@param distance real ----@return boolean -function common.IsUnitInRangeXY(whichUnit,x,y,distance) end - ----在指定点范围内 [R] ----@param whichUnit unit ----@param whichLocation location ----@param distance real ----@return boolean -function common.IsUnitInRangeLoc(whichUnit,whichLocation,distance) end - ----IsUnitHidden ----@param whichUnit unit ----@return boolean -function common.IsUnitHidden(whichUnit) end - ----IsUnitIllusion ----@param whichUnit unit ----@return boolean -function common.IsUnitIllusion(whichUnit) end - ----IsUnitInTransport ----@param whichUnit unit ----@param whichTransport unit ----@return boolean -function common.IsUnitInTransport(whichUnit,whichTransport) end - ----IsUnitLoaded ----@param whichUnit unit ----@return boolean -function common.IsUnitLoaded(whichUnit) end - ----单位类型是英雄单位 ----@param unitId integer ----@return boolean -function common.IsHeroUnitId(unitId) end - ----检查单位-类型 分类 ----@param unitId integer ----@param whichUnitType unittype ----@return boolean -function common.IsUnitIdType(unitId,whichUnitType) end - ----共享视野 [R] ----@param whichUnit unit ----@param whichPlayer player ----@param share boolean -function common.UnitShareVision(whichUnit,whichPlayer,share) end - ----暂停尸体腐烂 [R] ----@param whichUnit unit ----@param suspend boolean -function common.UnitSuspendDecay(whichUnit,suspend) end - ----添加类别 [R] ----@param whichUnit unit ----@param whichUnitType unittype ----@return boolean -function common.UnitAddType(whichUnit,whichUnitType) end - ----删除类别 [R] ----@param whichUnit unit ----@param whichUnitType unittype ----@return boolean -function common.UnitRemoveType(whichUnit,whichUnitType) end - ----添加技能 [R] ----@param whichUnit unit ----@param abilityId integer ----@return boolean -function common.UnitAddAbility(whichUnit,abilityId) end - ----删除技能 [R] ----@param whichUnit unit ----@param abilityId integer ----@return boolean -function common.UnitRemoveAbility(whichUnit,abilityId) end - ----设置技能永久性 [R] ----@param whichUnit unit ----@param permanent boolean ----@param abilityId integer ----@return boolean -function common.UnitMakeAbilityPermanent(whichUnit,permanent,abilityId) end - ----删除魔法效果(指定极性) [R] ----@param whichUnit unit ----@param removePositive boolean ----@param removeNegative boolean -function common.UnitRemoveBuffs(whichUnit,removePositive,removeNegative) end - ----删除魔法效果(详细类别) [R] ----@param whichUnit unit ----@param removePositive boolean ----@param removeNegative boolean ----@param magic boolean ----@param physical boolean ----@param timedLife boolean ----@param aura boolean ----@param autoDispel boolean -function common.UnitRemoveBuffsEx(whichUnit,removePositive,removeNegative,magic,physical,timedLife,aura,autoDispel) end - ----UnitHasBuffsEx ----@param whichUnit unit ----@param removePositive boolean ----@param removeNegative boolean ----@param magic boolean ----@param physical boolean ----@param timedLife boolean ----@param aura boolean ----@param autoDispel boolean ----@return boolean -function common.UnitHasBuffsEx(whichUnit,removePositive,removeNegative,magic,physical,timedLife,aura,autoDispel) end - ----拥有Buff数量 [R] ----@param whichUnit unit ----@param removePositive boolean ----@param removeNegative boolean ----@param magic boolean ----@param physical boolean ----@param timedLife boolean ----@param aura boolean ----@param autoDispel boolean ----@return integer -function common.UnitCountBuffsEx(whichUnit,removePositive,removeNegative,magic,physical,timedLife,aura,autoDispel) end - ----UnitAddSleep ----@param whichUnit unit ----@param add boolean -function common.UnitAddSleep(whichUnit,add) end - ----UnitCanSleep ----@param whichUnit unit ----@return boolean -function common.UnitCanSleep(whichUnit) end - ----设置单位睡眠(无论何时) ----@param whichUnit unit ----@param add boolean -function common.UnitAddSleepPerm(whichUnit,add) end - ----单位在睡觉 ----@param whichUnit unit ----@return boolean -function common.UnitCanSleepPerm(whichUnit) end - ----UnitIsSleeping ----@param whichUnit unit ----@return boolean -function common.UnitIsSleeping(whichUnit) end - ----UnitWakeUp ----@param whichUnit unit -function common.UnitWakeUp(whichUnit) end - ----设置生命周期 [R] ----@param whichUnit unit ----@param buffId integer ----@param duration real -function common.UnitApplyTimedLife(whichUnit,buffId,duration) end - ----UnitIgnoreAlarm ----@param whichUnit unit ----@param flag boolean ----@return boolean -function common.UnitIgnoreAlarm(whichUnit,flag) end - ----UnitIgnoreAlarmToggled ----@param whichUnit unit ----@return boolean -function common.UnitIgnoreAlarmToggled(whichUnit) end - ----重设单位技能Cooldown ----@param whichUnit unit -function common.UnitResetCooldown(whichUnit) end - ----设置建筑物 建筑升级比 ----@param whichUnit unit ----@param constructionPercentage integer -function common.UnitSetConstructionProgress(whichUnit,constructionPercentage) end - ----设置建筑物 科技升级比 ----@param whichUnit unit ----@param upgradePercentage integer -function common.UnitSetUpgradeProgress(whichUnit,upgradePercentage) end - ----暂停/恢复生命周期 [R] ----@param whichUnit unit ----@param flag boolean -function common.UnitPauseTimedLife(whichUnit,flag) end - ----UnitSetUsesAltIcon ----@param whichUnit unit ----@param flag boolean -function common.UnitSetUsesAltIcon(whichUnit,flag) end - ----伤害区域 [R] ----@param whichUnit unit ----@param delay real ----@param radius real ----@param x real ----@param y real ----@param amount real ----@param attack boolean ----@param ranged boolean ----@param attackType attacktype ----@param damageType damagetype ----@param weaponType weapontype ----@return boolean -function common.UnitDamagePoint(whichUnit,delay,radius,x,y,amount,attack,ranged,attackType,damageType,weaponType) end - ----伤害目标 [R] ----@param whichUnit unit ----@param target widget ----@param amount real ----@param attack boolean ----@param ranged boolean ----@param attackType attacktype ----@param damageType damagetype ----@param weaponType weapontype ----@return boolean -function common.UnitDamageTarget(whichUnit,target,amount,attack,ranged,attackType,damageType,weaponType) end - ----给单位发送命令到 没有目标 ----@param whichUnit unit ----@param order string ----@return boolean -function common.IssueImmediateOrder(whichUnit,order) end - ----发布命令(无目标)(ID) ----@param whichUnit unit ----@param order integer ----@return boolean -function common.IssueImmediateOrderById(whichUnit,order) end - ----发布命令(指定坐标) ----@param whichUnit unit ----@param order string ----@param x real ----@param y real ----@return boolean -function common.IssuePointOrder(whichUnit,order,x,y) end - ----给单位发送命令到 点 ----@param whichUnit unit ----@param order string ----@param whichLocation location ----@return boolean -function common.IssuePointOrderLoc(whichUnit,order,whichLocation) end - ----发布命令(指定坐标)(ID) ----@param whichUnit unit ----@param order integer ----@param x real ----@param y real ----@return boolean -function common.IssuePointOrderById(whichUnit,order,x,y) end - ----发布命令(指定点)(ID) ----@param whichUnit unit ----@param order integer ----@param whichLocation location ----@return boolean -function common.IssuePointOrderByIdLoc(whichUnit,order,whichLocation) end - ----给单位发送命令到 单位 ----@param whichUnit unit ----@param order string ----@param targetWidget widget ----@return boolean -function common.IssueTargetOrder(whichUnit,order,targetWidget) end - ----发布命令(指定单位)(ID) ----@param whichUnit unit ----@param order integer ----@param targetWidget widget ----@return boolean -function common.IssueTargetOrderById(whichUnit,order,targetWidget) end - ----IssueInstantPointOrder ----@param whichUnit unit ----@param order string ----@param x real ----@param y real ----@param instantTargetWidget widget ----@return boolean -function common.IssueInstantPointOrder(whichUnit,order,x,y,instantTargetWidget) end - ----IssueInstantPointOrderById ----@param whichUnit unit ----@param order integer ----@param x real ----@param y real ----@param instantTargetWidget widget ----@return boolean -function common.IssueInstantPointOrderById(whichUnit,order,x,y,instantTargetWidget) end - ----IssueInstantTargetOrder ----@param whichUnit unit ----@param order string ----@param targetWidget widget ----@param instantTargetWidget widget ----@return boolean -function common.IssueInstantTargetOrder(whichUnit,order,targetWidget,instantTargetWidget) end - ----IssueInstantTargetOrderById ----@param whichUnit unit ----@param order integer ----@param targetWidget widget ----@param instantTargetWidget widget ----@return boolean -function common.IssueInstantTargetOrderById(whichUnit,order,targetWidget,instantTargetWidget) end - ----IssueBuildOrder ----@param whichPeon unit ----@param unitToBuild string ----@param x real ----@param y real ----@return boolean -function common.IssueBuildOrder(whichPeon,unitToBuild,x,y) end - ----发布建造命令(指定坐标) [R] ----@param whichPeon unit ----@param unitId integer ----@param x real ----@param y real ----@return boolean -function common.IssueBuildOrderById(whichPeon,unitId,x,y) end - ----发布中介命令(无目标) ----@param forWhichPlayer player ----@param neutralStructure unit ----@param unitToBuild string ----@return boolean -function common.IssueNeutralImmediateOrder(forWhichPlayer,neutralStructure,unitToBuild) end - ----发布中介命令(无目标)(ID) ----@param forWhichPlayer player ----@param neutralStructure unit ----@param unitId integer ----@return boolean -function common.IssueNeutralImmediateOrderById(forWhichPlayer,neutralStructure,unitId) end - ----发布中介命令(指定坐标) ----@param forWhichPlayer player ----@param neutralStructure unit ----@param unitToBuild string ----@param x real ----@param y real ----@return boolean -function common.IssueNeutralPointOrder(forWhichPlayer,neutralStructure,unitToBuild,x,y) end - ----发布中介命令(指定坐标)(ID) ----@param forWhichPlayer player ----@param neutralStructure unit ----@param unitId integer ----@param x real ----@param y real ----@return boolean -function common.IssueNeutralPointOrderById(forWhichPlayer,neutralStructure,unitId,x,y) end - ----发布中介命令(指定单位) ----@param forWhichPlayer player ----@param neutralStructure unit ----@param unitToBuild string ----@param target widget ----@return boolean -function common.IssueNeutralTargetOrder(forWhichPlayer,neutralStructure,unitToBuild,target) end - ----发布中介命令(指定单位)(ID) ----@param forWhichPlayer player ----@param neutralStructure unit ----@param unitId integer ----@param target widget ----@return boolean -function common.IssueNeutralTargetOrderById(forWhichPlayer,neutralStructure,unitId,target) end - ----单位当前的命令 ----@param whichUnit unit ----@return integer -function common.GetUnitCurrentOrder(whichUnit) end - ----设置金矿资源 ----@param whichUnit unit ----@param amount integer -function common.SetResourceAmount(whichUnit,amount) end - ----添加金矿资源 ----@param whichUnit unit ----@param amount integer -function common.AddResourceAmount(whichUnit,amount) end - ----黄金资源数量 ----@param whichUnit unit ----@return integer -function common.GetResourceAmount(whichUnit) end - ----传送门目的地X坐标 ----@param waygate unit ----@return real -function common.WaygateGetDestinationX(waygate) end - ----传送门目的地Y坐标 ----@param waygate unit ----@return real -function common.WaygateGetDestinationY(waygate) end - ----设置传送门目的坐标 [R] ----@param waygate unit ----@param x real ----@param y real -function common.WaygateSetDestination(waygate,x,y) end - ----WaygateActivate ----@param waygate unit ----@param activate boolean -function common.WaygateActivate(waygate,activate) end - ----WaygateIsActive ----@param waygate unit ----@return boolean -function common.WaygateIsActive(waygate) end - ----增加 物品-类型 (到所有商店) ----@param itemId integer ----@param currentStock integer ----@param stockMax integer -function common.AddItemToAllStock(itemId,currentStock,stockMax) end - ----AddItemToStock ----@param whichUnit unit ----@param itemId integer ----@param currentStock integer ----@param stockMax integer -function common.AddItemToStock(whichUnit,itemId,currentStock,stockMax) end - ----增加 单位-类型 (到所有商店) ----@param unitId integer ----@param currentStock integer ----@param stockMax integer -function common.AddUnitToAllStock(unitId,currentStock,stockMax) end - ----AddUnitToStock ----@param whichUnit unit ----@param unitId integer ----@param currentStock integer ----@param stockMax integer -function common.AddUnitToStock(whichUnit,unitId,currentStock,stockMax) end - ----删除 物品-类型 (从所有商店) ----@param itemId integer -function common.RemoveItemFromAllStock(itemId) end - ----RemoveItemFromStock ----@param whichUnit unit ----@param itemId integer -function common.RemoveItemFromStock(whichUnit,itemId) end - ----删除 单位-类型 (从所有商店) ----@param unitId integer -function common.RemoveUnitFromAllStock(unitId) end - ----RemoveUnitFromStock ----@param whichUnit unit ----@param unitId integer -function common.RemoveUnitFromStock(whichUnit,unitId) end - ----限制物品的位置 (从所有商店) ----@param slots integer -function common.SetAllItemTypeSlots(slots) end - ----限制单位的位置 (从所有商店) ----@param slots integer -function common.SetAllUnitTypeSlots(slots) end - ----限制物品的位置 (从商店) ----@param whichUnit unit ----@param slots integer -function common.SetItemTypeSlots(whichUnit,slots) end - ----限制单位的位置 (从商店) ----@param whichUnit unit ----@param slots integer -function common.SetUnitTypeSlots(whichUnit,slots) end - ----单位自定义值 ----@param whichUnit unit ----@return integer -function common.GetUnitUserData(whichUnit) end - ----设置单位自定义数据 ----@param whichUnit unit ----@param data integer -function common.SetUnitUserData(whichUnit,data) end - ----Player API ----Player API ----@param number integer ----@return player -function common.Player(number) end - ----本地玩家 [R] ----@return player -function common.GetLocalPlayer() end - ----玩家是玩家的同盟 ----@param whichPlayer player ----@param otherPlayer player ----@return boolean -function common.IsPlayerAlly(whichPlayer,otherPlayer) end - ----玩家是玩家的敌人 ----@param whichPlayer player ----@param otherPlayer player ----@return boolean -function common.IsPlayerEnemy(whichPlayer,otherPlayer) end - ----玩家在玩家组 ----@param whichPlayer player ----@param whichForce force ----@return boolean -function common.IsPlayerInForce(whichPlayer,whichForce) end - ----玩家是裁判或观察者 [R] ----@param whichPlayer player ----@return boolean -function common.IsPlayerObserver(whichPlayer) end - ----坐标可见 ----@param x real ----@param y real ----@param whichPlayer player ----@return boolean -function common.IsVisibleToPlayer(x,y,whichPlayer) end - ----点对于玩家可见 ----@param whichLocation location ----@param whichPlayer player ----@return boolean -function common.IsLocationVisibleToPlayer(whichLocation,whichPlayer) end - ----坐标在迷雾中 ----@param x real ----@param y real ----@param whichPlayer player ----@return boolean -function common.IsFoggedToPlayer(x,y,whichPlayer) end - ----点被迷雾遮挡 ----@param whichLocation location ----@param whichPlayer player ----@return boolean -function common.IsLocationFoggedToPlayer(whichLocation,whichPlayer) end - ----坐标在黑色阴影中 ----@param x real ----@param y real ----@param whichPlayer player ----@return boolean -function common.IsMaskedToPlayer(x,y,whichPlayer) end - ----点被黑色阴影遮挡 ----@param whichLocation location ----@param whichPlayer player ----@return boolean -function common.IsLocationMaskedToPlayer(whichLocation,whichPlayer) end - ----玩家的种族 ----@param whichPlayer player ----@return race -function common.GetPlayerRace(whichPlayer) end - ----玩家ID - 1 [R] ----@param whichPlayer player ----@return integer -function common.GetPlayerId(whichPlayer) end - ----单位数量 ----@param whichPlayer player ----@param includeIncomplete boolean ----@return integer -function common.GetPlayerUnitCount(whichPlayer,includeIncomplete) end - ----GetPlayerTypedUnitCount ----@param whichPlayer player ----@param unitName string ----@param includeIncomplete boolean ----@param includeUpgrades boolean ----@return integer -function common.GetPlayerTypedUnitCount(whichPlayer,unitName,includeIncomplete,includeUpgrades) end - ----获得建筑数量 ----@param whichPlayer player ----@param includeIncomplete boolean ----@return integer -function common.GetPlayerStructureCount(whichPlayer,includeIncomplete) end - ----获得玩家属性 ----@param whichPlayer player ----@param whichPlayerState playerstate ----@return integer -function common.GetPlayerState(whichPlayer,whichPlayerState) end - ----获得玩家得分 ----@param whichPlayer player ----@param whichPlayerScore playerscore ----@return integer -function common.GetPlayerScore(whichPlayer,whichPlayerScore) end - ----玩家与玩家结盟 ----@param sourcePlayer player ----@param otherPlayer player ----@param whichAllianceSetting alliancetype ----@return boolean -function common.GetPlayerAlliance(sourcePlayer,otherPlayer,whichAllianceSetting) end - ----GetPlayerHandicap ----@param whichPlayer player ----@return real -function common.GetPlayerHandicap(whichPlayer) end - ----GetPlayerHandicapXP ----@param whichPlayer player ----@return real -function common.GetPlayerHandicapXP(whichPlayer) end - ----GetPlayerHandicapReviveTime ----@param whichPlayer player ----@return real -function common.GetPlayerHandicapReviveTime(whichPlayer) end - ----GetPlayerHandicapDamage ----@param whichPlayer player ----@return real -function common.GetPlayerHandicapDamage(whichPlayer) end - ----设置生命上限 [R] ----@param whichPlayer player ----@param handicap real -function common.SetPlayerHandicap(whichPlayer,handicap) end - ----设置经验获得率 [R] ----@param whichPlayer player ----@param handicap real -function common.SetPlayerHandicapXP(whichPlayer,handicap) end - ----SetPlayerHandicapReviveTime ----@param whichPlayer player ----@param handicap real -function common.SetPlayerHandicapReviveTime(whichPlayer,handicap) end - ----SetPlayerHandicapDamage ----@param whichPlayer player ----@param handicap real -function common.SetPlayerHandicapDamage(whichPlayer,handicap) end - ----SetPlayerTechMaxAllowed ----@param whichPlayer player ----@param techid integer ----@param maximum integer -function common.SetPlayerTechMaxAllowed(whichPlayer,techid,maximum) end - ----GetPlayerTechMaxAllowed ----@param whichPlayer player ----@param techid integer ----@return integer -function common.GetPlayerTechMaxAllowed(whichPlayer,techid) end - ----增加科技等级 ----@param whichPlayer player ----@param techid integer ----@param levels integer -function common.AddPlayerTechResearched(whichPlayer,techid,levels) end - ----SetPlayerTechResearched ----@param whichPlayer player ----@param techid integer ----@param setToLevel integer -function common.SetPlayerTechResearched(whichPlayer,techid,setToLevel) end - ----GetPlayerTechResearched ----@param whichPlayer player ----@param techid integer ----@param specificonly boolean ----@return boolean -function common.GetPlayerTechResearched(whichPlayer,techid,specificonly) end - ----获取玩家科技数量 ----@param whichPlayer player ----@param techid integer ----@param specificonly boolean ----@return integer -function common.GetPlayerTechCount(whichPlayer,techid,specificonly) end - ----SetPlayerUnitsOwner ----@param whichPlayer player ----@param newOwner integer -function common.SetPlayerUnitsOwner(whichPlayer,newOwner) end - ----CripplePlayer ----@param whichPlayer player ----@param toWhichPlayers force ----@param flag boolean -function common.CripplePlayer(whichPlayer,toWhichPlayers,flag) end - ----允许/禁用 技能 [R] ----@param whichPlayer player ----@param abilid integer ----@param avail boolean -function common.SetPlayerAbilityAvailable(whichPlayer,abilid,avail) end - ----设置玩家属性 ----@param whichPlayer player ----@param whichPlayerState playerstate ----@param value integer -function common.SetPlayerState(whichPlayer,whichPlayerState,value) end - ----踢除玩家 ----@param whichPlayer player ----@param gameResult playergameresult -function common.RemovePlayer(whichPlayer,gameResult) end - ----Used to store hero level data for the scorescreen ----before units are moved to neutral passive in melee games ----@param whichPlayer player -function common.CachePlayerHeroData(whichPlayer) end - ----Fog of War API ----设置地图迷雾(矩形区域) [R] ----@param forWhichPlayer player ----@param whichState fogstate ----@param where rect ----@param useSharedVision boolean -function common.SetFogStateRect(forWhichPlayer,whichState,where,useSharedVision) end - ----设置地图迷雾(圆范围) [R] ----@param forWhichPlayer player ----@param whichState fogstate ----@param centerx real ----@param centerY real ----@param radius real ----@param useSharedVision boolean -function common.SetFogStateRadius(forWhichPlayer,whichState,centerx,centerY,radius,useSharedVision) end - ----SetFogStateRadiusLoc ----@param forWhichPlayer player ----@param whichState fogstate ----@param center location ----@param radius real ----@param useSharedVision boolean -function common.SetFogStateRadiusLoc(forWhichPlayer,whichState,center,radius,useSharedVision) end - ----启用/禁用黑色阴影 [R] ----@param enable boolean -function common.FogMaskEnable(enable) end - ----允许黑色阴影 ----@return boolean -function common.IsFogMaskEnabled() end - ----启用/禁用 战争迷雾 [R] ----@param enable boolean -function common.FogEnable(enable) end - ----允许战争迷雾 ----@return boolean -function common.IsFogEnabled() end - ----新建可见度修正器(矩形区域) [R] ----@param forWhichPlayer player ----@param whichState fogstate ----@param where rect ----@param useSharedVision boolean ----@param afterUnits boolean ----@return fogmodifier -function common.CreateFogModifierRect(forWhichPlayer,whichState,where,useSharedVision,afterUnits) end - ----新建可见度修正器(圆范围) [R] ----@param forWhichPlayer player ----@param whichState fogstate ----@param centerx real ----@param centerY real ----@param radius real ----@param useSharedVision boolean ----@param afterUnits boolean ----@return fogmodifier -function common.CreateFogModifierRadius(forWhichPlayer,whichState,centerx,centerY,radius,useSharedVision,afterUnits) end - ----CreateFogModifierRadiusLoc ----@param forWhichPlayer player ----@param whichState fogstate ----@param center location ----@param radius real ----@param useSharedVision boolean ----@param afterUnits boolean ----@return fogmodifier -function common.CreateFogModifierRadiusLoc(forWhichPlayer,whichState,center,radius,useSharedVision,afterUnits) end - ----删除可见度修正器 ----@param whichFogModifier fogmodifier -function common.DestroyFogModifier(whichFogModifier) end - ----允许可见度修正器 ----@param whichFogModifier fogmodifier -function common.FogModifierStart(whichFogModifier) end - ----禁止可见度修正器 ----@param whichFogModifier fogmodifier -function common.FogModifierStop(whichFogModifier) end - ----Game API ----Game API ----@return version -function common.VersionGet() end - ----VersionCompatible ----@param whichVersion version ----@return boolean -function common.VersionCompatible(whichVersion) end - ----VersionSupported ----@param whichVersion version ----@return boolean -function common.VersionSupported(whichVersion) end - ----EndGame ----@param doScoreScreen boolean -function common.EndGame(doScoreScreen) end - ----Async only! ----切换关卡 [R] ----@param newLevel string ----@param doScoreScreen boolean -function common.ChangeLevel(newLevel,doScoreScreen) end - ----RestartGame ----@param doScoreScreen boolean -function common.RestartGame(doScoreScreen) end - ----ReloadGame -function common.ReloadGame() end - ----%%% SetCampaignMenuRace is deprecated. It must remain to support ----old maps which use it, but all new maps should use SetCampaignMenuRaceEx ----old maps which use it, but all new maps should use SetCampaignMenuRaceEx ----@param r race -function common.SetCampaignMenuRace(r) end - ----SetCampaignMenuRaceEx ----@param campaignIndex integer -function common.SetCampaignMenuRaceEx(campaignIndex) end - ----ForceCampaignSelectScreen -function common.ForceCampaignSelectScreen() end - ----LoadGame ----@param saveFileName string ----@param doScoreScreen boolean -function common.LoadGame(saveFileName,doScoreScreen) end - ----保存进度 [R] ----@param saveFileName string -function common.SaveGame(saveFileName) end - ----RenameSaveDirectory ----@param sourceDirName string ----@param destDirName string ----@return boolean -function common.RenameSaveDirectory(sourceDirName,destDirName) end - ----RemoveSaveDirectory ----@param sourceDirName string ----@return boolean -function common.RemoveSaveDirectory(sourceDirName) end - ----CopySaveGame ----@param sourceSaveName string ----@param destSaveName string ----@return boolean -function common.CopySaveGame(sourceSaveName,destSaveName) end - ----游戏进度是存在的 ----@param saveName string ----@return boolean -function common.SaveGameExists(saveName) end - ----SetMaxCheckpointSaves ----@param maxCheckpointSaves integer -function common.SetMaxCheckpointSaves(maxCheckpointSaves) end - ----SaveGameCheckpoint ----@param saveFileName string ----@param showWindow boolean -function common.SaveGameCheckpoint(saveFileName,showWindow) end - ----SyncSelections -function common.SyncSelections() end - ----SetFloatGameState ----@param whichFloatGameState fgamestate ----@param value real -function common.SetFloatGameState(whichFloatGameState,value) end - ----GetFloatGameState ----@param whichFloatGameState fgamestate ----@return real -function common.GetFloatGameState(whichFloatGameState) end - ----SetIntegerGameState ----@param whichIntegerGameState igamestate ----@param value integer -function common.SetIntegerGameState(whichIntegerGameState,value) end - ----GetIntegerGameState ----@param whichIntegerGameState igamestate ----@return integer -function common.GetIntegerGameState(whichIntegerGameState) end - ----Campaign API ----Campaign API ----@param cleared boolean -function common.SetTutorialCleared(cleared) end - ----SetMissionAvailable ----@param campaignNumber integer ----@param missionNumber integer ----@param available boolean -function common.SetMissionAvailable(campaignNumber,missionNumber,available) end - ----SetCampaignAvailable ----@param campaignNumber integer ----@param available boolean -function common.SetCampaignAvailable(campaignNumber,available) end - ----SetOpCinematicAvailable ----@param campaignNumber integer ----@param available boolean -function common.SetOpCinematicAvailable(campaignNumber,available) end - ----SetEdCinematicAvailable ----@param campaignNumber integer ----@param available boolean -function common.SetEdCinematicAvailable(campaignNumber,available) end - ----GetDefaultDifficulty ----@return gamedifficulty -function common.GetDefaultDifficulty() end - ----SetDefaultDifficulty ----@param g gamedifficulty -function common.SetDefaultDifficulty(g) end - ----SetCustomCampaignButtonVisible ----@param whichButton integer ----@param visible boolean -function common.SetCustomCampaignButtonVisible(whichButton,visible) end - ----GetCustomCampaignButtonVisible ----@param whichButton integer ----@return boolean -function common.GetCustomCampaignButtonVisible(whichButton) end - ----关闭游戏录像功能 [R] -function common.DoNotSaveReplay() end - ----Dialog API ----新建对话框 [R] ----@return dialog -function common.DialogCreate() end - ----删除 [R] ----@param whichDialog dialog -function common.DialogDestroy(whichDialog) end - ----DialogClear ----@param whichDialog dialog -function common.DialogClear(whichDialog) end - ----DialogSetMessage ----@param whichDialog dialog ----@param messageText string -function common.DialogSetMessage(whichDialog,messageText) end - ----添加对话框按钮 [R] ----@param whichDialog dialog ----@param buttonText string ----@param hotkey integer ----@return button -function common.DialogAddButton(whichDialog,buttonText,hotkey) end - ----添加退出游戏按钮 [R] ----@param whichDialog dialog ----@param doScoreScreen boolean ----@param buttonText string ----@param hotkey integer ----@return button -function common.DialogAddQuitButton(whichDialog,doScoreScreen,buttonText,hotkey) end - ----显示/隐藏 [R] ----@param whichPlayer player ----@param whichDialog dialog ----@param flag boolean -function common.DialogDisplay(whichPlayer,whichDialog,flag) end - ----Creates a new or reads in an existing game cache file stored ----in the current campaign profile dir ----读取所有缓存 ----@return boolean -function common.ReloadGameCachesFromDisk() end - ----新建游戏缓存 [R] ----@param campaignFile string ----@return gamecache -function common.InitGameCache(campaignFile) end - ----SaveGameCache ----@param whichCache gamecache ----@return boolean -function common.SaveGameCache(whichCache) end - ----记录整数 ----@param cache gamecache ----@param missionKey string ----@param key string ----@param value integer -function common.StoreInteger(cache,missionKey,key,value) end - ----记录实数 ----@param cache gamecache ----@param missionKey string ----@param key string ----@param value real -function common.StoreReal(cache,missionKey,key,value) end - ----记录布尔值 ----@param cache gamecache ----@param missionKey string ----@param key string ----@param value boolean -function common.StoreBoolean(cache,missionKey,key,value) end - ----StoreUnit ----@param cache gamecache ----@param missionKey string ----@param key string ----@param whichUnit unit ----@return boolean -function common.StoreUnit(cache,missionKey,key,whichUnit) end - ----记录字符串 ----@param cache gamecache ----@param missionKey string ----@param key string ----@param value string ----@return boolean -function common.StoreString(cache,missionKey,key,value) end - ----SyncStoredInteger ----@param cache gamecache ----@param missionKey string ----@param key string -function common.SyncStoredInteger(cache,missionKey,key) end - ----SyncStoredReal ----@param cache gamecache ----@param missionKey string ----@param key string -function common.SyncStoredReal(cache,missionKey,key) end - ----SyncStoredBoolean ----@param cache gamecache ----@param missionKey string ----@param key string -function common.SyncStoredBoolean(cache,missionKey,key) end - ----SyncStoredUnit ----@param cache gamecache ----@param missionKey string ----@param key string -function common.SyncStoredUnit(cache,missionKey,key) end - ----SyncStoredString ----@param cache gamecache ----@param missionKey string ----@param key string -function common.SyncStoredString(cache,missionKey,key) end - ----HaveStoredInteger ----@param cache gamecache ----@param missionKey string ----@param key string ----@return boolean -function common.HaveStoredInteger(cache,missionKey,key) end - ----HaveStoredReal ----@param cache gamecache ----@param missionKey string ----@param key string ----@return boolean -function common.HaveStoredReal(cache,missionKey,key) end - ----HaveStoredBoolean ----@param cache gamecache ----@param missionKey string ----@param key string ----@return boolean -function common.HaveStoredBoolean(cache,missionKey,key) end - ----HaveStoredUnit ----@param cache gamecache ----@param missionKey string ----@param key string ----@return boolean -function common.HaveStoredUnit(cache,missionKey,key) end - ----HaveStoredString ----@param cache gamecache ----@param missionKey string ----@param key string ----@return boolean -function common.HaveStoredString(cache,missionKey,key) end - ----删除缓存 [C] ----@param cache gamecache -function common.FlushGameCache(cache) end - ----删除类别 ----@param cache gamecache ----@param missionKey string -function common.FlushStoredMission(cache,missionKey) end - ----FlushStoredInteger ----@param cache gamecache ----@param missionKey string ----@param key string -function common.FlushStoredInteger(cache,missionKey,key) end - ----FlushStoredReal ----@param cache gamecache ----@param missionKey string ----@param key string -function common.FlushStoredReal(cache,missionKey,key) end - ----FlushStoredBoolean ----@param cache gamecache ----@param missionKey string ----@param key string -function common.FlushStoredBoolean(cache,missionKey,key) end - ----FlushStoredUnit ----@param cache gamecache ----@param missionKey string ----@param key string -function common.FlushStoredUnit(cache,missionKey,key) end - ----FlushStoredString ----@param cache gamecache ----@param missionKey string ----@param key string -function common.FlushStoredString(cache,missionKey,key) end - ----Will return 0 if the specified value's data is not found in the cache ----缓存读取整数 [C] ----@param cache gamecache ----@param missionKey string ----@param key string ----@return integer -function common.GetStoredInteger(cache,missionKey,key) end - ----缓存读取实数 [C] ----@param cache gamecache ----@param missionKey string ----@param key string ----@return real -function common.GetStoredReal(cache,missionKey,key) end - ----读取布尔值[R] ----@param cache gamecache ----@param missionKey string ----@param key string ----@return boolean -function common.GetStoredBoolean(cache,missionKey,key) end - ----读取字符串 [C] ----@param cache gamecache ----@param missionKey string ----@param key string ----@return string -function common.GetStoredString(cache,missionKey,key) end - ----RestoreUnit ----@param cache gamecache ----@param missionKey string ----@param key string ----@param forWhichPlayer player ----@param x real ----@param y real ----@param facing real ----@return unit -function common.RestoreUnit(cache,missionKey,key,forWhichPlayer,x,y,facing) end - ----<1.24> 新建哈希表 [C] ----@return hashtable -function common.InitHashtable() end - ----<1.24> 保存整数 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param value integer -function common.SaveInteger(table,parentKey,childKey,value) end - ----<1.24> 保存实数 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param value real -function common.SaveReal(table,parentKey,childKey,value) end - ----<1.24> 保存布尔 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param value boolean -function common.SaveBoolean(table,parentKey,childKey,value) end - ----<1.24> 保存字符串 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param value string ----@return boolean -function common.SaveStr(table,parentKey,childKey,value) end - ----<1.24> 保存玩家 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichPlayer player ----@return boolean -function common.SavePlayerHandle(table,parentKey,childKey,whichPlayer) end - ----SaveWidgetHandle ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichWidget widget ----@return boolean -function common.SaveWidgetHandle(table,parentKey,childKey,whichWidget) end - ----<1.24> 保存可破坏物 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichDestructable destructable ----@return boolean -function common.SaveDestructableHandle(table,parentKey,childKey,whichDestructable) end - ----<1.24> 保存物品 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichItem item ----@return boolean -function common.SaveItemHandle(table,parentKey,childKey,whichItem) end - ----<1.24> 保存单位 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichUnit unit ----@return boolean -function common.SaveUnitHandle(table,parentKey,childKey,whichUnit) end - ----SaveAbilityHandle ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichAbility ability ----@return boolean -function common.SaveAbilityHandle(table,parentKey,childKey,whichAbility) end - ----<1.24> 保存计时器 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichTimer timer ----@return boolean -function common.SaveTimerHandle(table,parentKey,childKey,whichTimer) end - ----<1.24> 保存触发器 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichTrigger trigger ----@return boolean -function common.SaveTriggerHandle(table,parentKey,childKey,whichTrigger) end - ----<1.24> 保存触发条件 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichTriggercondition triggercondition ----@return boolean -function common.SaveTriggerConditionHandle(table,parentKey,childKey,whichTriggercondition) end - ----<1.24> 保存触发动作 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichTriggeraction triggeraction ----@return boolean -function common.SaveTriggerActionHandle(table,parentKey,childKey,whichTriggeraction) end - ----<1.24> 保存触发事件 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichEvent event ----@return boolean -function common.SaveTriggerEventHandle(table,parentKey,childKey,whichEvent) end - ----<1.24> 保存玩家组 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichForce force ----@return boolean -function common.SaveForceHandle(table,parentKey,childKey,whichForce) end - ----<1.24> 保存单位组 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichGroup group ----@return boolean -function common.SaveGroupHandle(table,parentKey,childKey,whichGroup) end - ----<1.24> 保存点 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichLocation location ----@return boolean -function common.SaveLocationHandle(table,parentKey,childKey,whichLocation) end - ----<1.24> 保存区域(矩型) [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichRect rect ----@return boolean -function common.SaveRectHandle(table,parentKey,childKey,whichRect) end - ----<1.24> 保存布尔表达式 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichBoolexpr boolexpr ----@return boolean -function common.SaveBooleanExprHandle(table,parentKey,childKey,whichBoolexpr) end - ----<1.24> 保存音效 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichSound sound ----@return boolean -function common.SaveSoundHandle(table,parentKey,childKey,whichSound) end - ----<1.24> 保存特效 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichEffect effect ----@return boolean -function common.SaveEffectHandle(table,parentKey,childKey,whichEffect) end - ----<1.24> 保存单位池 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichUnitpool unitpool ----@return boolean -function common.SaveUnitPoolHandle(table,parentKey,childKey,whichUnitpool) end - ----<1.24> 保存物品池 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichItempool itempool ----@return boolean -function common.SaveItemPoolHandle(table,parentKey,childKey,whichItempool) end - ----<1.24> 保存任务 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichQuest quest ----@return boolean -function common.SaveQuestHandle(table,parentKey,childKey,whichQuest) end - ----<1.24> 保存任务要求 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichQuestitem questitem ----@return boolean -function common.SaveQuestItemHandle(table,parentKey,childKey,whichQuestitem) end - ----<1.24> 保存失败条件 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichDefeatcondition defeatcondition ----@return boolean -function common.SaveDefeatConditionHandle(table,parentKey,childKey,whichDefeatcondition) end - ----<1.24> 保存计时器窗口 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichTimerdialog timerdialog ----@return boolean -function common.SaveTimerDialogHandle(table,parentKey,childKey,whichTimerdialog) end - ----<1.24> 保存排行榜 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichLeaderboard leaderboard ----@return boolean -function common.SaveLeaderboardHandle(table,parentKey,childKey,whichLeaderboard) end - ----<1.24> 保存多面板 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichMultiboard multiboard ----@return boolean -function common.SaveMultiboardHandle(table,parentKey,childKey,whichMultiboard) end - ----<1.24> 保存多面板项目 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichMultiboarditem multiboarditem ----@return boolean -function common.SaveMultiboardItemHandle(table,parentKey,childKey,whichMultiboarditem) end - ----<1.24> 保存可追踪物 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichTrackable trackable ----@return boolean -function common.SaveTrackableHandle(table,parentKey,childKey,whichTrackable) end - ----<1.24> 保存对话框 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichDialog dialog ----@return boolean -function common.SaveDialogHandle(table,parentKey,childKey,whichDialog) end - ----<1.24> 保存对话框按钮 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichButton button ----@return boolean -function common.SaveButtonHandle(table,parentKey,childKey,whichButton) end - ----<1.24> 保存漂浮文字 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichTexttag texttag ----@return boolean -function common.SaveTextTagHandle(table,parentKey,childKey,whichTexttag) end - ----<1.24> 保存闪电效果 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichLightning lightning ----@return boolean -function common.SaveLightningHandle(table,parentKey,childKey,whichLightning) end - ----<1.24> 保存图像 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichImage image ----@return boolean -function common.SaveImageHandle(table,parentKey,childKey,whichImage) end - ----<1.24> 保存地面纹理变化 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichUbersplat ubersplat ----@return boolean -function common.SaveUbersplatHandle(table,parentKey,childKey,whichUbersplat) end - ----<1.24> 保存区域(不规则) [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichRegion region ----@return boolean -function common.SaveRegionHandle(table,parentKey,childKey,whichRegion) end - ----<1.24> 保存迷雾状态 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichFogState fogstate ----@return boolean -function common.SaveFogStateHandle(table,parentKey,childKey,whichFogState) end - ----<1.24> 保存可见度修正器 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichFogModifier fogmodifier ----@return boolean -function common.SaveFogModifierHandle(table,parentKey,childKey,whichFogModifier) end - ----<1.24> 保存实体对象 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichAgent agent ----@return boolean -function common.SaveAgentHandle(table,parentKey,childKey,whichAgent) end - ----<1.24> 保存哈希表 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichHashtable hashtable ----@return boolean -function common.SaveHashtableHandle(table,parentKey,childKey,whichHashtable) end - ----SaveFrameHandle ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@param whichFrameHandle framehandle ----@return boolean -function common.SaveFrameHandle(table,parentKey,childKey,whichFrameHandle) end - ----<1.24> 从哈希表提取整数 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return integer -function common.LoadInteger(table,parentKey,childKey) end - ----<1.24> 从哈希表提取实数 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return real -function common.LoadReal(table,parentKey,childKey) end - ----<1.24> 从哈希表提取布尔 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return boolean -function common.LoadBoolean(table,parentKey,childKey) end - ----<1.24> 从哈希表提取字符串 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return string -function common.LoadStr(table,parentKey,childKey) end - ----<1.24> 从哈希表提取玩家 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return player -function common.LoadPlayerHandle(table,parentKey,childKey) end - ----LoadWidgetHandle ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return widget -function common.LoadWidgetHandle(table,parentKey,childKey) end - ----<1.24> 从哈希表提取可破坏物 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return destructable -function common.LoadDestructableHandle(table,parentKey,childKey) end - ----<1.24> 从哈希表提取物品 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return item -function common.LoadItemHandle(table,parentKey,childKey) end - ----<1.24> 从哈希表提取单位 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return unit -function common.LoadUnitHandle(table,parentKey,childKey) end - ----LoadAbilityHandle ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return ability -function common.LoadAbilityHandle(table,parentKey,childKey) end - ----<1.24> 从哈希表提取计时器 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return timer -function common.LoadTimerHandle(table,parentKey,childKey) end - ----<1.24> 从哈希表提取触发器 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return trigger -function common.LoadTriggerHandle(table,parentKey,childKey) end - ----<1.24> 从哈希表提取触发条件 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return triggercondition -function common.LoadTriggerConditionHandle(table,parentKey,childKey) end - ----<1.24> 从哈希表提取触发动作 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return triggeraction -function common.LoadTriggerActionHandle(table,parentKey,childKey) end - ----<1.24> 从哈希表提取触发事件 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return event -function common.LoadTriggerEventHandle(table,parentKey,childKey) end - ----<1.24> 从哈希表提取玩家组 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return force -function common.LoadForceHandle(table,parentKey,childKey) end - ----<1.24> 从哈希表提取单位组 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return group -function common.LoadGroupHandle(table,parentKey,childKey) end - ----<1.24> 从哈希表提取点 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return location -function common.LoadLocationHandle(table,parentKey,childKey) end - ----<1.24> 从哈希表提取区域(矩型) [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return rect -function common.LoadRectHandle(table,parentKey,childKey) end - ----<1.24> 从哈希表提取布尔表达式 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return boolexpr -function common.LoadBooleanExprHandle(table,parentKey,childKey) end - ----<1.24> 从哈希表提取音效 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return sound -function common.LoadSoundHandle(table,parentKey,childKey) end - ----<1.24> 从哈希表提取特效 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return effect -function common.LoadEffectHandle(table,parentKey,childKey) end - ----<1.24> 从哈希表提取单位池 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return unitpool -function common.LoadUnitPoolHandle(table,parentKey,childKey) end - ----<1.24> 从哈希表提取物品池 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return itempool -function common.LoadItemPoolHandle(table,parentKey,childKey) end - ----<1.24> 从哈希表提取任务 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return quest -function common.LoadQuestHandle(table,parentKey,childKey) end - ----<1.24> 从哈希表提取任务要求 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return questitem -function common.LoadQuestItemHandle(table,parentKey,childKey) end - ----<1.24> 从哈希表提取失败条件 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return defeatcondition -function common.LoadDefeatConditionHandle(table,parentKey,childKey) end - ----<1.24> 从哈希表提取计时器窗口 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return timerdialog -function common.LoadTimerDialogHandle(table,parentKey,childKey) end - ----<1.24> 从哈希表提取排行榜 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return leaderboard -function common.LoadLeaderboardHandle(table,parentKey,childKey) end - ----<1.24> 从哈希表提取多面板 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return multiboard -function common.LoadMultiboardHandle(table,parentKey,childKey) end - ----<1.24> 从哈希表提取多面板项目 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return multiboarditem -function common.LoadMultiboardItemHandle(table,parentKey,childKey) end - ----<1.24> 从哈希表提取可追踪物 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return trackable -function common.LoadTrackableHandle(table,parentKey,childKey) end - ----<1.24> 从哈希表提取对话框 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return dialog -function common.LoadDialogHandle(table,parentKey,childKey) end - ----<1.24> 从哈希表提取对话框按钮 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return button -function common.LoadButtonHandle(table,parentKey,childKey) end - ----<1.24> 从哈希表提取漂浮文字 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return texttag -function common.LoadTextTagHandle(table,parentKey,childKey) end - ----<1.24> 从哈希表提取闪电效果 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return lightning -function common.LoadLightningHandle(table,parentKey,childKey) end - ----<1.24> 从哈希表提取图象 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return image -function common.LoadImageHandle(table,parentKey,childKey) end - ----<1.24> 从哈希表提取地面纹理变化 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return ubersplat -function common.LoadUbersplatHandle(table,parentKey,childKey) end - ----<1.24> 从哈希表提取区域(不规则) [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return region -function common.LoadRegionHandle(table,parentKey,childKey) end - ----<1.24> 从哈希表提取迷雾状态 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return fogstate -function common.LoadFogStateHandle(table,parentKey,childKey) end - ----<1.24> 从哈希表提取可见度修正器 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return fogmodifier -function common.LoadFogModifierHandle(table,parentKey,childKey) end - ----<1.24> 从哈希表提取哈希表 [C] ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return hashtable -function common.LoadHashtableHandle(table,parentKey,childKey) end - ----LoadFrameHandle ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return framehandle -function common.LoadFrameHandle(table,parentKey,childKey) end - ----HaveSavedInteger ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return boolean -function common.HaveSavedInteger(table,parentKey,childKey) end - ----HaveSavedReal ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return boolean -function common.HaveSavedReal(table,parentKey,childKey) end - ----HaveSavedBoolean ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return boolean -function common.HaveSavedBoolean(table,parentKey,childKey) end - ----HaveSavedString ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return boolean -function common.HaveSavedString(table,parentKey,childKey) end - ----HaveSavedHandle ----@param table hashtable ----@param parentKey integer ----@param childKey integer ----@return boolean -function common.HaveSavedHandle(table,parentKey,childKey) end - ----RemoveSavedInteger ----@param table hashtable ----@param parentKey integer ----@param childKey integer -function common.RemoveSavedInteger(table,parentKey,childKey) end - ----RemoveSavedReal ----@param table hashtable ----@param parentKey integer ----@param childKey integer -function common.RemoveSavedReal(table,parentKey,childKey) end - ----RemoveSavedBoolean ----@param table hashtable ----@param parentKey integer ----@param childKey integer -function common.RemoveSavedBoolean(table,parentKey,childKey) end - ----RemoveSavedString ----@param table hashtable ----@param parentKey integer ----@param childKey integer -function common.RemoveSavedString(table,parentKey,childKey) end - ----RemoveSavedHandle ----@param table hashtable ----@param parentKey integer ----@param childKey integer -function common.RemoveSavedHandle(table,parentKey,childKey) end - ----<1.24> 清空哈希表 [C] ----@param table hashtable -function common.FlushParentHashtable(table) end - ----<1.24> 清空哈希表主索引 [C] ----@param table hashtable ----@param parentKey integer -function common.FlushChildHashtable(table,parentKey) end - ----Randomization API ----随机数字 ----@param lowBound integer ----@param highBound integer ----@return integer -function common.GetRandomInt(lowBound,highBound) end - ----随机数 ----@param lowBound real ----@param highBound real ----@return real -function common.GetRandomReal(lowBound,highBound) end - ----新建单位池 [R] ----@return unitpool -function common.CreateUnitPool() end - ----删除单位池 [R] ----@param whichPool unitpool -function common.DestroyUnitPool(whichPool) end - ----添加单位类型 [R] ----@param whichPool unitpool ----@param unitId integer ----@param weight real -function common.UnitPoolAddUnitType(whichPool,unitId,weight) end - ----删除单位类型 [R] ----@param whichPool unitpool ----@param unitId integer -function common.UnitPoolRemoveUnitType(whichPool,unitId) end - ----选择放置单位 [R] ----@param whichPool unitpool ----@param forWhichPlayer player ----@param x real ----@param y real ----@param facing real ----@return unit -function common.PlaceRandomUnit(whichPool,forWhichPlayer,x,y,facing) end - ----新建物品池 [R] ----@return itempool -function common.CreateItemPool() end - ----删除物品池 [R] ----@param whichItemPool itempool -function common.DestroyItemPool(whichItemPool) end - ----添加物品类型 [R] ----@param whichItemPool itempool ----@param itemId integer ----@param weight real -function common.ItemPoolAddItemType(whichItemPool,itemId,weight) end - ----删除物品类型 [R] ----@param whichItemPool itempool ----@param itemId integer -function common.ItemPoolRemoveItemType(whichItemPool,itemId) end - ----选择放置物品 [R] ----@param whichItemPool itempool ----@param x real ----@param y real ----@return item -function common.PlaceRandomItem(whichItemPool,x,y) end - ----Choose any random unit/item. (NP means Neutral Passive) ----Choose any random unit/item. (NP means Neutral Passive) ----@param level integer ----@return integer -function common.ChooseRandomCreep(level) end - ----ChooseRandomNPBuilding ----@return integer -function common.ChooseRandomNPBuilding() end - ----ChooseRandomItem ----@param level integer ----@return integer -function common.ChooseRandomItem(level) end - ----ChooseRandomItemEx ----@param whichType itemtype ----@param level integer ----@return integer -function common.ChooseRandomItemEx(whichType,level) end - ----设置随机种子 ----@param seed integer -function common.SetRandomSeed(seed) end - ----Visual API ----Visual API ----@param a real ----@param b real ----@param c real ----@param d real ----@param e real -function common.SetTerrainFog(a,b,c,d,e) end - ----ResetTerrainFog -function common.ResetTerrainFog() end - ----SetUnitFog ----@param a real ----@param b real ----@param c real ----@param d real ----@param e real -function common.SetUnitFog(a,b,c,d,e) end - ----设置迷雾 [R] ----@param style integer ----@param zstart real ----@param zend real ----@param density real ----@param red real ----@param green real ----@param blue real -function common.SetTerrainFogEx(style,zstart,zend,density,red,green,blue) end - ----对玩家显示文本消息(自动限时) [R] ----@param toPlayer player ----@param x real ----@param y real ----@param message string -function common.DisplayTextToPlayer(toPlayer,x,y,message) end - ----对玩家显示文本消息(指定时间) [R] ----@param toPlayer player ----@param x real ----@param y real ----@param duration real ----@param message string -function common.DisplayTimedTextToPlayer(toPlayer,x,y,duration,message) end - ----DisplayTimedTextFromPlayer ----@param toPlayer player ----@param x real ----@param y real ----@param duration real ----@param message string -function common.DisplayTimedTextFromPlayer(toPlayer,x,y,duration,message) end - ----清空文本信息(所有玩家) [R] -function common.ClearTextMessages() end - ----SetDayNightModels ----@param terrainDNCFile string ----@param unitDNCFile string -function common.SetDayNightModels(terrainDNCFile,unitDNCFile) end - ----SetPortraitLight ----@param portraitDNCFile string -function common.SetPortraitLight(portraitDNCFile) end - ----设置天空 ----@param skyModelFile string -function common.SetSkyModel(skyModelFile) end - ----启用/禁用玩家控制权(所有玩家) [R] ----@param b boolean -function common.EnableUserControl(b) end - ----EnableUserUI ----@param b boolean -function common.EnableUserUI(b) end - ----SuspendTimeOfDay ----@param b boolean -function common.SuspendTimeOfDay(b) end - ----设置昼夜时间流逝速度 [R] ----@param r real -function common.SetTimeOfDayScale(r) end - ----GetTimeOfDayScale ----@return real -function common.GetTimeOfDayScale() end - ----开启/关闭 信箱模式(所有玩家) [R] ----@param flag boolean ----@param fadeDuration real -function common.ShowInterface(flag,fadeDuration) end - ----暂停/恢复游戏 [R] ----@param flag boolean -function common.PauseGame(flag) end - ----闪动指示器(对单位) [R] ----@param whichUnit unit ----@param red integer ----@param green integer ----@param blue integer ----@param alpha integer -function common.UnitAddIndicator(whichUnit,red,green,blue,alpha) end - ----AddIndicator ----@param whichWidget widget ----@param red integer ----@param green integer ----@param blue integer ----@param alpha integer -function common.AddIndicator(whichWidget,red,green,blue,alpha) end - ----小地图信号(所有玩家) [R] ----@param x real ----@param y real ----@param duration real -function common.PingMinimap(x,y,duration) end - ----小地图信号(指定颜色)(所有玩家) [R] ----@param x real ----@param y real ----@param duration real ----@param red integer ----@param green integer ----@param blue integer ----@param extraEffects boolean -function common.PingMinimapEx(x,y,duration,red,green,blue,extraEffects) end - ----CreateMinimapIconOnUnit ----@param whichUnit unit ----@param red integer ----@param green integer ----@param blue integer ----@param pingPath string ----@param fogVisibility fogstate ----@return minimapicon -function common.CreateMinimapIconOnUnit(whichUnit,red,green,blue,pingPath,fogVisibility) end - ----CreateMinimapIconAtLoc ----@param where location ----@param red integer ----@param green integer ----@param blue integer ----@param pingPath string ----@param fogVisibility fogstate ----@return minimapicon -function common.CreateMinimapIconAtLoc(where,red,green,blue,pingPath,fogVisibility) end - ----CreateMinimapIcon ----@param x real ----@param y real ----@param red integer ----@param green integer ----@param blue integer ----@param pingPath string ----@param fogVisibility fogstate ----@return minimapicon -function common.CreateMinimapIcon(x,y,red,green,blue,pingPath,fogVisibility) end - ----SkinManagerGetLocalPath ----@param key string ----@return string -function common.SkinManagerGetLocalPath(key) end - ----DestroyMinimapIcon ----@param pingId minimapicon -function common.DestroyMinimapIcon(pingId) end - ----SetMinimapIconVisible ----@param whichMinimapIcon minimapicon ----@param visible boolean -function common.SetMinimapIconVisible(whichMinimapIcon,visible) end - ----SetMinimapIconOrphanDestroy ----@param whichMinimapIcon minimapicon ----@param doDestroy boolean -function common.SetMinimapIconOrphanDestroy(whichMinimapIcon,doDestroy) end - ----允许/禁止闭塞(所有玩家) [R] ----@param flag boolean -function common.EnableOcclusion(flag) end - ----SetIntroShotText ----@param introText string -function common.SetIntroShotText(introText) end - ----SetIntroShotModel ----@param introModelPath string -function common.SetIntroShotModel(introModelPath) end - ----允许/禁止 边界染色(所有玩家) [R] ----@param b boolean -function common.EnableWorldFogBoundary(b) end - ----PlayModelCinematic ----@param modelName string -function common.PlayModelCinematic(modelName) end - ----PlayCinematic ----@param movieName string -function common.PlayCinematic(movieName) end - ----ForceUIKey ----@param key string -function common.ForceUIKey(key) end - ----ForceUICancel -function common.ForceUICancel() end - ----DisplayLoadDialog -function common.DisplayLoadDialog() end - ----改变小地图的特殊图标 ----@param iconPath string -function common.SetAltMinimapIcon(iconPath) end - ----禁用 重新开始任务按钮 ----@param flag boolean -function common.DisableRestartMission(flag) end - ----新建漂浮文字 [R] ----@return texttag -function common.CreateTextTag() end - ----DestroyTextTag ----@param t texttag -function common.DestroyTextTag(t) end - ----改变文字内容 [R] ----@param t texttag ----@param s string ----@param height real -function common.SetTextTagText(t,s,height) end - ----改变位置(坐标) [R] ----@param t texttag ----@param x real ----@param y real ----@param heightOffset real -function common.SetTextTagPos(t,x,y,heightOffset) end - ----SetTextTagPosUnit ----@param t texttag ----@param whichUnit unit ----@param heightOffset real -function common.SetTextTagPosUnit(t,whichUnit,heightOffset) end - ----改变颜色 [R] ----@param t texttag ----@param red integer ----@param green integer ----@param blue integer ----@param alpha integer -function common.SetTextTagColor(t,red,green,blue,alpha) end - ----设置速率 [R] ----@param t texttag ----@param xvel real ----@param yvel real -function common.SetTextTagVelocity(t,xvel,yvel) end - ----显示/隐藏 (所有玩家) [R] ----@param t texttag ----@param flag boolean -function common.SetTextTagVisibility(t,flag) end - ----SetTextTagSuspended ----@param t texttag ----@param flag boolean -function common.SetTextTagSuspended(t,flag) end - ----SetTextTagPermanent ----@param t texttag ----@param flag boolean -function common.SetTextTagPermanent(t,flag) end - ----SetTextTagAge ----@param t texttag ----@param age real -function common.SetTextTagAge(t,age) end - ----SetTextTagLifespan ----@param t texttag ----@param lifespan real -function common.SetTextTagLifespan(t,lifespan) end - ----SetTextTagFadepoint ----@param t texttag ----@param fadepoint real -function common.SetTextTagFadepoint(t,fadepoint) end - ----保留英雄按钮 ----@param reserved integer -function common.SetReservedLocalHeroButtons(reserved) end - ----结盟滤色镜的设置值 ----@return integer -function common.GetAllyColorFilterState() end - ----设置结盟滤色镜 ----@param state integer -function common.SetAllyColorFilterState(state) end - ----野生单位显示是开启的 ----@return boolean -function common.GetCreepCampFilterState() end - ----显示/隐藏野生生物图标在小地图 ----@param state boolean -function common.SetCreepCampFilterState(state) end - ----允许/禁止小地图按钮 ----@param enableAlly boolean ----@param enableCreep boolean -function common.EnableMinimapFilterButtons(enableAlly,enableCreep) end - ----允许/禁止框选 ----@param state boolean ----@param ui boolean -function common.EnableDragSelect(state,ui) end - ----允许/禁止预选 ----@param state boolean ----@param ui boolean -function common.EnablePreSelect(state,ui) end - ----允许/禁止选择 ----@param state boolean ----@param ui boolean -function common.EnableSelect(state,ui) end - ----Trackable API ----新建可追踪物 [R] ----@param trackableModelPath string ----@param x real ----@param y real ----@param facing real ----@return trackable -function common.CreateTrackable(trackableModelPath,x,y,facing) end - ----Quest API ----新建任务 [R] ----@return quest -function common.CreateQuest() end - ----DestroyQuest ----@param whichQuest quest -function common.DestroyQuest(whichQuest) end - ----QuestSetTitle ----@param whichQuest quest ----@param title string -function common.QuestSetTitle(whichQuest,title) end - ----QuestSetDescription ----@param whichQuest quest ----@param description string -function common.QuestSetDescription(whichQuest,description) end - ----QuestSetIconPath ----@param whichQuest quest ----@param iconPath string -function common.QuestSetIconPath(whichQuest,iconPath) end - ----QuestSetRequired ----@param whichQuest quest ----@param required boolean -function common.QuestSetRequired(whichQuest,required) end - ----QuestSetCompleted ----@param whichQuest quest ----@param completed boolean -function common.QuestSetCompleted(whichQuest,completed) end - ----QuestSetDiscovered ----@param whichQuest quest ----@param discovered boolean -function common.QuestSetDiscovered(whichQuest,discovered) end - ----QuestSetFailed ----@param whichQuest quest ----@param failed boolean -function common.QuestSetFailed(whichQuest,failed) end - ----启用/禁用 任务 [R] ----@param whichQuest quest ----@param enabled boolean -function common.QuestSetEnabled(whichQuest,enabled) end - ----任务是必须完成的 ----@param whichQuest quest ----@return boolean -function common.IsQuestRequired(whichQuest) end - ----任务完成 ----@param whichQuest quest ----@return boolean -function common.IsQuestCompleted(whichQuest) end - ----任务已发现 ----@param whichQuest quest ----@return boolean -function common.IsQuestDiscovered(whichQuest) end - ----任务失败 ----@param whichQuest quest ----@return boolean -function common.IsQuestFailed(whichQuest) end - ----允许任务 ----@param whichQuest quest ----@return boolean -function common.IsQuestEnabled(whichQuest) end - ----QuestCreateItem ----@param whichQuest quest ----@return questitem -function common.QuestCreateItem(whichQuest) end - ----QuestItemSetDescription ----@param whichQuestItem questitem ----@param description string -function common.QuestItemSetDescription(whichQuestItem,description) end - ----QuestItemSetCompleted ----@param whichQuestItem questitem ----@param completed boolean -function common.QuestItemSetCompleted(whichQuestItem,completed) end - ----任务条件完成 ----@param whichQuestItem questitem ----@return boolean -function common.IsQuestItemCompleted(whichQuestItem) end - ----CreateDefeatCondition ----@return defeatcondition -function common.CreateDefeatCondition() end - ----DestroyDefeatCondition ----@param whichCondition defeatcondition -function common.DestroyDefeatCondition(whichCondition) end - ----DefeatConditionSetDescription ----@param whichCondition defeatcondition ----@param description string -function common.DefeatConditionSetDescription(whichCondition,description) end - ----FlashQuestDialogButton -function common.FlashQuestDialogButton() end - ----ForceQuestDialogUpdate -function common.ForceQuestDialogUpdate() end - ----Timer Dialog API ----新建计时器窗口 [R] ----@param t timer ----@return timerdialog -function common.CreateTimerDialog(t) end - ----销毁计时器窗口 ----@param whichDialog timerdialog -function common.DestroyTimerDialog(whichDialog) end - ----设置计时器窗口标题 ----@param whichDialog timerdialog ----@param title string -function common.TimerDialogSetTitle(whichDialog,title) end - ----改变计时器窗口文字颜色 [R] ----@param whichDialog timerdialog ----@param red integer ----@param green integer ----@param blue integer ----@param alpha integer -function common.TimerDialogSetTitleColor(whichDialog,red,green,blue,alpha) end - ----改变计时器窗口计时颜色 [R] ----@param whichDialog timerdialog ----@param red integer ----@param green integer ----@param blue integer ----@param alpha integer -function common.TimerDialogSetTimeColor(whichDialog,red,green,blue,alpha) end - ----设置计时器窗口速率 [R] ----@param whichDialog timerdialog ----@param speedMultFactor real -function common.TimerDialogSetSpeed(whichDialog,speedMultFactor) end - ----显示/隐藏 计时器窗口(所有玩家) [R] ----@param whichDialog timerdialog ----@param display boolean -function common.TimerDialogDisplay(whichDialog,display) end - ----判断计时器窗口是否显示 ----@param whichDialog timerdialog ----@return boolean -function common.IsTimerDialogDisplayed(whichDialog) end - ----TimerDialogSetRealTimeRemaining ----@param whichDialog timerdialog ----@param timeRemaining real -function common.TimerDialogSetRealTimeRemaining(whichDialog,timeRemaining) end - ----Create a leaderboard object ----新建排行榜 [R] ----@return leaderboard -function common.CreateLeaderboard() end - ----DestroyLeaderboard ----@param lb leaderboard -function common.DestroyLeaderboard(lb) end - ----显示/隐藏 [R] ----@param lb leaderboard ----@param show boolean -function common.LeaderboardDisplay(lb,show) end - ----IsLeaderboardDisplayed ----@param lb leaderboard ----@return boolean -function common.IsLeaderboardDisplayed(lb) end - ----行数 ----@param lb leaderboard ----@return integer -function common.LeaderboardGetItemCount(lb) end - ----LeaderboardSetSizeByItemCount ----@param lb leaderboard ----@param count integer -function common.LeaderboardSetSizeByItemCount(lb,count) end - ----LeaderboardAddItem ----@param lb leaderboard ----@param label string ----@param value integer ----@param p player -function common.LeaderboardAddItem(lb,label,value,p) end - ----LeaderboardRemoveItem ----@param lb leaderboard ----@param index integer -function common.LeaderboardRemoveItem(lb,index) end - ----LeaderboardRemovePlayerItem ----@param lb leaderboard ----@param p player -function common.LeaderboardRemovePlayerItem(lb,p) end - ----清空 [R] ----@param lb leaderboard -function common.LeaderboardClear(lb) end - ----LeaderboardSortItemsByValue ----@param lb leaderboard ----@param ascending boolean -function common.LeaderboardSortItemsByValue(lb,ascending) end - ----LeaderboardSortItemsByPlayer ----@param lb leaderboard ----@param ascending boolean -function common.LeaderboardSortItemsByPlayer(lb,ascending) end - ----LeaderboardSortItemsByLabel ----@param lb leaderboard ----@param ascending boolean -function common.LeaderboardSortItemsByLabel(lb,ascending) end - ----LeaderboardHasPlayerItem ----@param lb leaderboard ----@param p player ----@return boolean -function common.LeaderboardHasPlayerItem(lb,p) end - ----LeaderboardGetPlayerIndex ----@param lb leaderboard ----@param p player ----@return integer -function common.LeaderboardGetPlayerIndex(lb,p) end - ----LeaderboardSetLabel ----@param lb leaderboard ----@param label string -function common.LeaderboardSetLabel(lb,label) end - ----LeaderboardGetLabelText ----@param lb leaderboard ----@return string -function common.LeaderboardGetLabelText(lb) end - ----设置玩家使用的排行榜 [R] ----@param toPlayer player ----@param lb leaderboard -function common.PlayerSetLeaderboard(toPlayer,lb) end - ----PlayerGetLeaderboard ----@param toPlayer player ----@return leaderboard -function common.PlayerGetLeaderboard(toPlayer) end - ----设置文字颜色 [R] ----@param lb leaderboard ----@param red integer ----@param green integer ----@param blue integer ----@param alpha integer -function common.LeaderboardSetLabelColor(lb,red,green,blue,alpha) end - ----设置数值颜色 [R] ----@param lb leaderboard ----@param red integer ----@param green integer ----@param blue integer ----@param alpha integer -function common.LeaderboardSetValueColor(lb,red,green,blue,alpha) end - ----LeaderboardSetStyle ----@param lb leaderboard ----@param showLabel boolean ----@param showNames boolean ----@param showValues boolean ----@param showIcons boolean -function common.LeaderboardSetStyle(lb,showLabel,showNames,showValues,showIcons) end - ----LeaderboardSetItemValue ----@param lb leaderboard ----@param whichItem integer ----@param val integer -function common.LeaderboardSetItemValue(lb,whichItem,val) end - ----LeaderboardSetItemLabel ----@param lb leaderboard ----@param whichItem integer ----@param val string -function common.LeaderboardSetItemLabel(lb,whichItem,val) end - ----LeaderboardSetItemStyle ----@param lb leaderboard ----@param whichItem integer ----@param showLabel boolean ----@param showValue boolean ----@param showIcon boolean -function common.LeaderboardSetItemStyle(lb,whichItem,showLabel,showValue,showIcon) end - ----LeaderboardSetItemLabelColor ----@param lb leaderboard ----@param whichItem integer ----@param red integer ----@param green integer ----@param blue integer ----@param alpha integer -function common.LeaderboardSetItemLabelColor(lb,whichItem,red,green,blue,alpha) end - ----LeaderboardSetItemValueColor ----@param lb leaderboard ----@param whichItem integer ----@param red integer ----@param green integer ----@param blue integer ----@param alpha integer -function common.LeaderboardSetItemValueColor(lb,whichItem,red,green,blue,alpha) end - ----Create a multiboard object ----新建多面板 [R] ----@return multiboard -function common.CreateMultiboard() end - ----DestroyMultiboard ----@param lb multiboard -function common.DestroyMultiboard(lb) end - ----显示/隐藏 [R] ----@param lb multiboard ----@param show boolean -function common.MultiboardDisplay(lb,show) end - ----多列面板 是已显示的 ----@param lb multiboard ----@return boolean -function common.IsMultiboardDisplayed(lb) end - ----最大/最小化 [R] ----@param lb multiboard ----@param minimize boolean -function common.MultiboardMinimize(lb,minimize) end - ----多列面板 是最小化的 ----@param lb multiboard ----@return boolean -function common.IsMultiboardMinimized(lb) end - ----清除 多列面板 ----@param lb multiboard -function common.MultiboardClear(lb) end - ----改变 多列面板 标题 ----@param lb multiboard ----@param label string -function common.MultiboardSetTitleText(lb,label) end - ----多列面板 的标题 ----@param lb multiboard ----@return string -function common.MultiboardGetTitleText(lb) end - ----设置标题颜色 [R] ----@param lb multiboard ----@param red integer ----@param green integer ----@param blue integer ----@param alpha integer -function common.MultiboardSetTitleTextColor(lb,red,green,blue,alpha) end - ----获得多列面板 的行数 ----@param lb multiboard ----@return integer -function common.MultiboardGetRowCount(lb) end - ----获得多列面板 的列数 ----@param lb multiboard ----@return integer -function common.MultiboardGetColumnCount(lb) end - ----改变多列面板'列数' ----@param lb multiboard ----@param count integer -function common.MultiboardSetColumnCount(lb,count) end - ----改变多列面板'行数' ----@param lb multiboard ----@param count integer -function common.MultiboardSetRowCount(lb,count) end - ----broadcast settings to all items ----设置所有项目显示风格 [R] ----@param lb multiboard ----@param showValues boolean ----@param showIcons boolean -function common.MultiboardSetItemsStyle(lb,showValues,showIcons) end - ----设置所有项目文本 [R] ----@param lb multiboard ----@param value string -function common.MultiboardSetItemsValue(lb,value) end - ----设置所有项目颜色 [R] ----@param lb multiboard ----@param red integer ----@param green integer ----@param blue integer ----@param alpha integer -function common.MultiboardSetItemsValueColor(lb,red,green,blue,alpha) end - ----设置所有项目宽度 [R] ----@param lb multiboard ----@param width real -function common.MultiboardSetItemsWidth(lb,width) end - ----设置所有项目图标 [R] ----@param lb multiboard ----@param iconPath string -function common.MultiboardSetItemsIcon(lb,iconPath) end - ----funcs for modifying individual items ----多面板项目 [R] ----@param lb multiboard ----@param row integer ----@param column integer ----@return multiboarditem -function common.MultiboardGetItem(lb,row,column) end - ----删除多面板项目 [R] ----@param mbi multiboarditem -function common.MultiboardReleaseItem(mbi) end - ----设置指定项目显示风格 [R] ----@param mbi multiboarditem ----@param showValue boolean ----@param showIcon boolean -function common.MultiboardSetItemStyle(mbi,showValue,showIcon) end - ----设置指定项目文本 [R] ----@param mbi multiboarditem ----@param val string -function common.MultiboardSetItemValue(mbi,val) end - ----设置指定项目颜色 [R] ----@param mbi multiboarditem ----@param red integer ----@param green integer ----@param blue integer ----@param alpha integer -function common.MultiboardSetItemValueColor(mbi,red,green,blue,alpha) end - ----设置指定项目宽度 [R] ----@param mbi multiboarditem ----@param width real -function common.MultiboardSetItemWidth(mbi,width) end - ----设置指定项目图标 [R] ----@param mbi multiboarditem ----@param iconFileName string -function common.MultiboardSetItemIcon(mbi,iconFileName) end - ----meant to unequivocally suspend display of existing and ----subsequently displayed multiboards ----显示/隐藏多面板模式 [R] ----@param flag boolean -function common.MultiboardSuppressDisplay(flag) end - ----Camera API ----Camera API ----@param x real ----@param y real -function common.SetCameraPosition(x,y) end - ----设置空格键转向点(所有玩家) [R] ----@param x real ----@param y real -function common.SetCameraQuickPosition(x,y) end - ----设置可用镜头区域(所有玩家) [R] ----@param x1 real ----@param y1 real ----@param x2 real ----@param y2 real ----@param x3 real ----@param y3 real ----@param x4 real ----@param y4 real -function common.SetCameraBounds(x1,y1,x2,y2,x3,y3,x4,y4) end - ----停止播放镜头(所有玩家) [R] -function common.StopCamera() end - ----重置游戏镜头(所有玩家) [R] ----@param duration real -function common.ResetToGameCamera(duration) end - ----PanCameraTo ----@param x real ----@param y real -function common.PanCameraTo(x,y) end - ----平移镜头(所有玩家)(限时) [R] ----@param x real ----@param y real ----@param duration real -function common.PanCameraToTimed(x,y,duration) end - ----PanCameraToWithZ ----@param x real ----@param y real ----@param zOffsetDest real -function common.PanCameraToWithZ(x,y,zOffsetDest) end - ----指定高度平移镜头(所有玩家)(限时) [R] ----@param x real ----@param y real ----@param zOffsetDest real ----@param duration real -function common.PanCameraToTimedWithZ(x,y,zOffsetDest,duration) end - ----播放电影镜头(所有玩家) [R] ----@param cameraModelFile string -function common.SetCinematicCamera(cameraModelFile) end - ----指定点旋转镜头(所有玩家)(弧度)(限时) [R] ----@param x real ----@param y real ----@param radiansToSweep real ----@param duration real -function common.SetCameraRotateMode(x,y,radiansToSweep,duration) end - ----设置镜头属性(所有玩家)(限时) [R] ----@param whichField camerafield ----@param value real ----@param duration real -function common.SetCameraField(whichField,value,duration) end - ----AdjustCameraField ----@param whichField camerafield ----@param offset real ----@param duration real -function common.AdjustCameraField(whichField,offset,duration) end - ----锁定镜头到单位(所有玩家) [R] ----@param whichUnit unit ----@param xoffset real ----@param yoffset real ----@param inheritOrientation boolean -function common.SetCameraTargetController(whichUnit,xoffset,yoffset,inheritOrientation) end - ----锁定镜头到单位(固定镜头源)(所有玩家) [R] ----@param whichUnit unit ----@param xoffset real ----@param yoffset real -function common.SetCameraOrientController(whichUnit,xoffset,yoffset) end - ----CreateCameraSetup ----@return camerasetup -function common.CreateCameraSetup() end - ----CameraSetupSetField ----@param whichSetup camerasetup ----@param whichField camerafield ----@param value real ----@param duration real -function common.CameraSetupSetField(whichSetup,whichField,value,duration) end - ----镜头属性(指定镜头) [R] ----@param whichSetup camerasetup ----@param whichField camerafield ----@return real -function common.CameraSetupGetField(whichSetup,whichField) end - ----CameraSetupSetDestPosition ----@param whichSetup camerasetup ----@param x real ----@param y real ----@param duration real -function common.CameraSetupSetDestPosition(whichSetup,x,y,duration) end - ----摄象机的目标 ----@param whichSetup camerasetup ----@return location -function common.CameraSetupGetDestPositionLoc(whichSetup) end - ----CameraSetupGetDestPositionX ----@param whichSetup camerasetup ----@return real -function common.CameraSetupGetDestPositionX(whichSetup) end - ----CameraSetupGetDestPositionY ----@param whichSetup camerasetup ----@return real -function common.CameraSetupGetDestPositionY(whichSetup) end - ----CameraSetupApply ----@param whichSetup camerasetup ----@param doPan boolean ----@param panTimed boolean -function common.CameraSetupApply(whichSetup,doPan,panTimed) end - ----CameraSetupApplyWithZ ----@param whichSetup camerasetup ----@param zDestOffset real -function common.CameraSetupApplyWithZ(whichSetup,zDestOffset) end - ----应用镜头(所有玩家)(限时) [R] ----@param whichSetup camerasetup ----@param doPan boolean ----@param forceDuration real -function common.CameraSetupApplyForceDuration(whichSetup,doPan,forceDuration) end - ----CameraSetupApplyForceDurationWithZ ----@param whichSetup camerasetup ----@param zDestOffset real ----@param forceDuration real -function common.CameraSetupApplyForceDurationWithZ(whichSetup,zDestOffset,forceDuration) end - ----CameraSetTargetNoise ----@param mag real ----@param velocity real -function common.CameraSetTargetNoise(mag,velocity) end - ----CameraSetSourceNoise ----@param mag real ----@param velocity real -function common.CameraSetSourceNoise(mag,velocity) end - ----摇晃镜头目标(所有玩家) [R] ----@param mag real ----@param velocity real ----@param vertOnly boolean -function common.CameraSetTargetNoiseEx(mag,velocity,vertOnly) end - ----摇晃镜头源(所有玩家) [R] ----@param mag real ----@param velocity real ----@param vertOnly boolean -function common.CameraSetSourceNoiseEx(mag,velocity,vertOnly) end - ----CameraSetSmoothingFactor ----@param factor real -function common.CameraSetSmoothingFactor(factor) end - ----CameraSetFocalDistance ----@param distance real -function common.CameraSetFocalDistance(distance) end - ----CameraSetDepthOfFieldScale ----@param scale real -function common.CameraSetDepthOfFieldScale(scale) end - ----SetCineFilterTexture ----@param filename string -function common.SetCineFilterTexture(filename) end - ----SetCineFilterBlendMode ----@param whichMode blendmode -function common.SetCineFilterBlendMode(whichMode) end - ----SetCineFilterTexMapFlags ----@param whichFlags texmapflags -function common.SetCineFilterTexMapFlags(whichFlags) end - ----SetCineFilterStartUV ----@param minu real ----@param minv real ----@param maxu real ----@param maxv real -function common.SetCineFilterStartUV(minu,minv,maxu,maxv) end - ----SetCineFilterEndUV ----@param minu real ----@param minv real ----@param maxu real ----@param maxv real -function common.SetCineFilterEndUV(minu,minv,maxu,maxv) end - ----SetCineFilterStartColor ----@param red integer ----@param green integer ----@param blue integer ----@param alpha integer -function common.SetCineFilterStartColor(red,green,blue,alpha) end - ----SetCineFilterEndColor ----@param red integer ----@param green integer ----@param blue integer ----@param alpha integer -function common.SetCineFilterEndColor(red,green,blue,alpha) end - ----SetCineFilterDuration ----@param duration real -function common.SetCineFilterDuration(duration) end - ----DisplayCineFilter ----@param flag boolean -function common.DisplayCineFilter(flag) end - ----IsCineFilterDisplayed ----@return boolean -function common.IsCineFilterDisplayed() end - ----SetCinematicScene ----@param portraitUnitId integer ----@param color playercolor ----@param speakerTitle string ----@param text string ----@param sceneDuration real ----@param voiceoverDuration real -function common.SetCinematicScene(portraitUnitId,color,speakerTitle,text,sceneDuration,voiceoverDuration) end - ----EndCinematicScene -function common.EndCinematicScene() end - ----ForceCinematicSubtitles ----@param flag boolean -function common.ForceCinematicSubtitles(flag) end - ----SetCinematicAudio ----@param cinematicAudio boolean -function common.SetCinematicAudio(cinematicAudio) end - ----GetCameraMargin ----@param whichMargin integer ----@return real -function common.GetCameraMargin(whichMargin) end - ----These return values for the local players camera only... ----These return values for the local players camera only... ----@return real -function common.GetCameraBoundMinX() end - ----GetCameraBoundMinY ----@return real -function common.GetCameraBoundMinY() end - ----GetCameraBoundMaxX ----@return real -function common.GetCameraBoundMaxX() end - ----GetCameraBoundMaxY ----@return real -function common.GetCameraBoundMaxY() end - ----当前摄象机的数值 ----@param whichField camerafield ----@return real -function common.GetCameraField(whichField) end - ----当前摄象机的目标的 X 坐标 ----@return real -function common.GetCameraTargetPositionX() end - ----当前摄象机的目标的 Y 坐标 ----@return real -function common.GetCameraTargetPositionY() end - ----当前摄象机的目标的 Z 坐标 ----@return real -function common.GetCameraTargetPositionZ() end - ----当前摄象机的目标 ----@return location -function common.GetCameraTargetPositionLoc() end - ----当前摄象机的位置的 X 坐标 ----@return real -function common.GetCameraEyePositionX() end - ----当前摄象机的位置的 Y 坐标 ----@return real -function common.GetCameraEyePositionY() end - ----当前摄象机的位置的 Z 坐标 ----@return real -function common.GetCameraEyePositionZ() end - ----当前照相机的位置 ----@return location -function common.GetCameraEyePositionLoc() end - ----Sound API ----@param environmentName string -function common.NewSoundEnvironment(environmentName) end - ----CreateSound ----@param fileName string ----@param looping boolean ----@param is3D boolean ----@param stopwhenoutofrange boolean ----@param fadeInRate integer ----@param fadeOutRate integer ----@param eaxSetting string ----@return sound -function common.CreateSound(fileName,looping,is3D,stopwhenoutofrange,fadeInRate,fadeOutRate,eaxSetting) end - ----CreateSoundFilenameWithLabel ----@param fileName string ----@param looping boolean ----@param is3D boolean ----@param stopwhenoutofrange boolean ----@param fadeInRate integer ----@param fadeOutRate integer ----@param SLKEntryName string ----@return sound -function common.CreateSoundFilenameWithLabel(fileName,looping,is3D,stopwhenoutofrange,fadeInRate,fadeOutRate,SLKEntryName) end - ----CreateSoundFromLabel ----@param soundLabel string ----@param looping boolean ----@param is3D boolean ----@param stopwhenoutofrange boolean ----@param fadeInRate integer ----@param fadeOutRate integer ----@return sound -function common.CreateSoundFromLabel(soundLabel,looping,is3D,stopwhenoutofrange,fadeInRate,fadeOutRate) end - ----CreateMIDISound ----@param soundLabel string ----@param fadeInRate integer ----@param fadeOutRate integer ----@return sound -function common.CreateMIDISound(soundLabel,fadeInRate,fadeOutRate) end - ----SetSoundParamsFromLabel ----@param soundHandle sound ----@param soundLabel string -function common.SetSoundParamsFromLabel(soundHandle,soundLabel) end - ----SetSoundDistanceCutoff ----@param soundHandle sound ----@param cutoff real -function common.SetSoundDistanceCutoff(soundHandle,cutoff) end - ----SetSoundChannel ----@param soundHandle sound ----@param channel integer -function common.SetSoundChannel(soundHandle,channel) end - ----设置音效音量 [R] ----@param soundHandle sound ----@param volume integer -function common.SetSoundVolume(soundHandle,volume) end - ----SetSoundPitch ----@param soundHandle sound ----@param pitch real -function common.SetSoundPitch(soundHandle,pitch) end - ----the following method must be called immediately after calling "StartSound" ----设置音效播放时间点 [R] ----@param soundHandle sound ----@param millisecs integer -function common.SetSoundPlayPosition(soundHandle,millisecs) end - ----these calls are only valid if the sound was created with 3d enabled ----设置3D声音距离 ----@param soundHandle sound ----@param minDist real ----@param maxDist real -function common.SetSoundDistances(soundHandle,minDist,maxDist) end - ----SetSoundConeAngles ----@param soundHandle sound ----@param inside real ----@param outside real ----@param outsideVolume integer -function common.SetSoundConeAngles(soundHandle,inside,outside,outsideVolume) end - ----SetSoundConeOrientation ----@param soundHandle sound ----@param x real ----@param y real ----@param z real -function common.SetSoundConeOrientation(soundHandle,x,y,z) end - ----设置3D音效位置(指定坐标) [R] ----@param soundHandle sound ----@param x real ----@param y real ----@param z real -function common.SetSoundPosition(soundHandle,x,y,z) end - ----SetSoundVelocity ----@param soundHandle sound ----@param x real ----@param y real ----@param z real -function common.SetSoundVelocity(soundHandle,x,y,z) end - ----AttachSoundToUnit ----@param soundHandle sound ----@param whichUnit unit -function common.AttachSoundToUnit(soundHandle,whichUnit) end - ----StartSound ----@param soundHandle sound -function common.StartSound(soundHandle) end - ----StopSound ----@param soundHandle sound ----@param killWhenDone boolean ----@param fadeOut boolean -function common.StopSound(soundHandle,killWhenDone,fadeOut) end - ----KillSoundWhenDone ----@param soundHandle sound -function common.KillSoundWhenDone(soundHandle) end - ----Music Interface. Note that if music is disabled, these calls do nothing ----设置背景音乐列表 [R] ----@param musicName string ----@param random boolean ----@param index integer -function common.SetMapMusic(musicName,random,index) end - ----ClearMapMusic -function common.ClearMapMusic() end - ----PlayMusic ----@param musicName string -function common.PlayMusic(musicName) end - ----PlayMusicEx ----@param musicName string ----@param frommsecs integer ----@param fadeinmsecs integer -function common.PlayMusicEx(musicName,frommsecs,fadeinmsecs) end - ----StopMusic ----@param fadeOut boolean -function common.StopMusic(fadeOut) end - ----ResumeMusic -function common.ResumeMusic() end - ----播放主题音乐 [C] ----@param musicFileName string -function common.PlayThematicMusic(musicFileName) end - ----跳播主题音乐 [R] ----@param musicFileName string ----@param frommsecs integer -function common.PlayThematicMusicEx(musicFileName,frommsecs) end - ----停止主题音乐[C] -function common.EndThematicMusic() end - ----设置背景音乐音量 [R] ----@param volume integer -function common.SetMusicVolume(volume) end - ----设置背景音乐播放时间点 [R] ----@param millisecs integer -function common.SetMusicPlayPosition(millisecs) end - ----SetThematicMusicVolume ----@param volume integer -function common.SetThematicMusicVolume(volume) end - ----设置主题音乐播放时间点 [R] ----@param millisecs integer -function common.SetThematicMusicPlayPosition(millisecs) end - ----other music and sound calls ----other music and sound calls ----@param soundHandle sound ----@param duration integer -function common.SetSoundDuration(soundHandle,duration) end - ----GetSoundDuration ----@param soundHandle sound ----@return integer -function common.GetSoundDuration(soundHandle) end - ----GetSoundFileDuration ----@param musicFileName string ----@return integer -function common.GetSoundFileDuration(musicFileName) end - ----设置多通道音量 [R] ----@param vgroup volumegroup ----@param scale real -function common.VolumeGroupSetVolume(vgroup,scale) end - ----VolumeGroupReset -function common.VolumeGroupReset() end - ----GetSoundIsPlaying ----@param soundHandle sound ----@return boolean -function common.GetSoundIsPlaying(soundHandle) end - ----GetSoundIsLoading ----@param soundHandle sound ----@return boolean -function common.GetSoundIsLoading(soundHandle) end - ----RegisterStackedSound ----@param soundHandle sound ----@param byPosition boolean ----@param rectwidth real ----@param rectheight real -function common.RegisterStackedSound(soundHandle,byPosition,rectwidth,rectheight) end - ----UnregisterStackedSound ----@param soundHandle sound ----@param byPosition boolean ----@param rectwidth real ----@param rectheight real -function common.UnregisterStackedSound(soundHandle,byPosition,rectwidth,rectheight) end - ----SetSoundFacialAnimationLabel ----@param soundHandle sound ----@param animationLabel string ----@return boolean -function common.SetSoundFacialAnimationLabel(soundHandle,animationLabel) end - ----SetSoundFacialAnimationGroupLabel ----@param soundHandle sound ----@param groupLabel string ----@return boolean -function common.SetSoundFacialAnimationGroupLabel(soundHandle,groupLabel) end - ----SetSoundFacialAnimationSetFilepath ----@param soundHandle sound ----@param animationSetFilepath string ----@return boolean -function common.SetSoundFacialAnimationSetFilepath(soundHandle,animationSetFilepath) end - ----Subtitle support that is attached to the soundHandle rather than as disperate data with the legacy UI ----Subtitle support that is attached to the soundHandle rather than as disperate data with the legacy UI ----@param soundHandle sound ----@param speakerName string ----@return boolean -function common.SetDialogueSpeakerNameKey(soundHandle,speakerName) end - ----GetDialogueSpeakerNameKey ----@param soundHandle sound ----@return string -function common.GetDialogueSpeakerNameKey(soundHandle) end - ----SetDialogueTextKey ----@param soundHandle sound ----@param dialogueText string ----@return boolean -function common.SetDialogueTextKey(soundHandle,dialogueText) end - ----GetDialogueTextKey ----@param soundHandle sound ----@return string -function common.GetDialogueTextKey(soundHandle) end - ----Effects API ----新建天气效果 [R] ----@param where rect ----@param effectID integer ----@return weathereffect -function common.AddWeatherEffect(where,effectID) end - ----RemoveWeatherEffect ----@param whichEffect weathereffect -function common.RemoveWeatherEffect(whichEffect) end - ----打开/关闭天气效果 ----@param whichEffect weathereffect ----@param enable boolean -function common.EnableWeatherEffect(whichEffect,enable) end - ----新建地形变化:弹坑 [R] ----@param x real ----@param y real ----@param radius real ----@param depth real ----@param duration integer ----@param permanent boolean ----@return terraindeformation -function common.TerrainDeformCrater(x,y,radius,depth,duration,permanent) end - ----新建地形变化:波纹 [R] ----@param x real ----@param y real ----@param radius real ----@param depth real ----@param duration integer ----@param count integer ----@param spaceWaves real ----@param timeWaves real ----@param radiusStartPct real ----@param limitNeg boolean ----@return terraindeformation -function common.TerrainDeformRipple(x,y,radius,depth,duration,count,spaceWaves,timeWaves,radiusStartPct,limitNeg) end - ----新建地形变化:冲击波 [R] ----@param x real ----@param y real ----@param dirX real ----@param dirY real ----@param distance real ----@param speed real ----@param radius real ----@param depth real ----@param trailTime integer ----@param count integer ----@return terraindeformation -function common.TerrainDeformWave(x,y,dirX,dirY,distance,speed,radius,depth,trailTime,count) end - ----新建地形变化:随机 [R] ----@param x real ----@param y real ----@param radius real ----@param minDelta real ----@param maxDelta real ----@param duration integer ----@param updateInterval integer ----@return terraindeformation -function common.TerrainDeformRandom(x,y,radius,minDelta,maxDelta,duration,updateInterval) end - ----停止地形变化 [R] ----@param deformation terraindeformation ----@param duration integer -function common.TerrainDeformStop(deformation,duration) end - ----停止所有地域变形 -function common.TerrainDeformStopAll() end - ----新建特效(创建到坐标) [R] ----@param modelName string ----@param x real ----@param y real ----@return effect -function common.AddSpecialEffect(modelName,x,y) end - ----新建特效(创建到点) [R] ----@param modelName string ----@param where location ----@return effect -function common.AddSpecialEffectLoc(modelName,where) end - ----新建特效(创建到单位) [R] ----@param modelName string ----@param targetWidget widget ----@param attachPointName string ----@return effect -function common.AddSpecialEffectTarget(modelName,targetWidget,attachPointName) end - ----DestroyEffect ----@param whichEffect effect -function common.DestroyEffect(whichEffect) end - ----AddSpellEffect ----@param abilityString string ----@param t effecttype ----@param x real ----@param y real ----@return effect -function common.AddSpellEffect(abilityString,t,x,y) end - ----AddSpellEffectLoc ----@param abilityString string ----@param t effecttype ----@param where location ----@return effect -function common.AddSpellEffectLoc(abilityString,t,where) end - ----新建特效(指定技能,创建到坐标) [R] ----@param abilityId integer ----@param t effecttype ----@param x real ----@param y real ----@return effect -function common.AddSpellEffectById(abilityId,t,x,y) end - ----新建特效(指定技能,创建到点) [R] ----@param abilityId integer ----@param t effecttype ----@param where location ----@return effect -function common.AddSpellEffectByIdLoc(abilityId,t,where) end - ----AddSpellEffectTarget ----@param modelName string ----@param t effecttype ----@param targetWidget widget ----@param attachPoint string ----@return effect -function common.AddSpellEffectTarget(modelName,t,targetWidget,attachPoint) end - ----新建特效(指定技能,创建到单位) [R] ----@param abilityId integer ----@param t effecttype ----@param targetWidget widget ----@param attachPoint string ----@return effect -function common.AddSpellEffectTargetById(abilityId,t,targetWidget,attachPoint) end - ----新建闪电效果 [R] ----@param codeName string ----@param checkVisibility boolean ----@param x1 real ----@param y1 real ----@param x2 real ----@param y2 real ----@return lightning -function common.AddLightning(codeName,checkVisibility,x1,y1,x2,y2) end - ----新建闪电效果(指定Z轴) [R] ----@param codeName string ----@param checkVisibility boolean ----@param x1 real ----@param y1 real ----@param z1 real ----@param x2 real ----@param y2 real ----@param z2 real ----@return lightning -function common.AddLightningEx(codeName,checkVisibility,x1,y1,z1,x2,y2,z2) end - ----DestroyLightning ----@param whichBolt lightning ----@return boolean -function common.DestroyLightning(whichBolt) end - ----MoveLightning ----@param whichBolt lightning ----@param checkVisibility boolean ----@param x1 real ----@param y1 real ----@param x2 real ----@param y2 real ----@return boolean -function common.MoveLightning(whichBolt,checkVisibility,x1,y1,x2,y2) end - ----移动闪电效果(指定坐标) [R] ----@param whichBolt lightning ----@param checkVisibility boolean ----@param x1 real ----@param y1 real ----@param z1 real ----@param x2 real ----@param y2 real ----@param z2 real ----@return boolean -function common.MoveLightningEx(whichBolt,checkVisibility,x1,y1,z1,x2,y2,z2) end - ----GetLightningColorA ----@param whichBolt lightning ----@return real -function common.GetLightningColorA(whichBolt) end - ----GetLightningColorR ----@param whichBolt lightning ----@return real -function common.GetLightningColorR(whichBolt) end - ----GetLightningColorG ----@param whichBolt lightning ----@return real -function common.GetLightningColorG(whichBolt) end - ----GetLightningColorB ----@param whichBolt lightning ----@return real -function common.GetLightningColorB(whichBolt) end - ----SetLightningColor ----@param whichBolt lightning ----@param r real ----@param g real ----@param b real ----@param a real ----@return boolean -function common.SetLightningColor(whichBolt,r,g,b,a) end - ----GetAbilityEffect ----@param abilityString string ----@param t effecttype ----@param index integer ----@return string -function common.GetAbilityEffect(abilityString,t,index) end - ----GetAbilityEffectById ----@param abilityId integer ----@param t effecttype ----@param index integer ----@return string -function common.GetAbilityEffectById(abilityId,t,index) end - ----GetAbilitySound ----@param abilityString string ----@param t soundtype ----@return string -function common.GetAbilitySound(abilityString,t) end - ----GetAbilitySoundById ----@param abilityId integer ----@param t soundtype ----@return string -function common.GetAbilitySoundById(abilityId,t) end - ----Terrain API ----地形悬崖高度(指定坐标) [R] ----@param x real ----@param y real ----@return integer -function common.GetTerrainCliffLevel(x,y) end - ----设置水颜色 [R] ----@param red integer ----@param green integer ----@param blue integer ----@param alpha integer -function common.SetWaterBaseColor(red,green,blue,alpha) end - ----设置 水变形 开/关 ----@param val boolean -function common.SetWaterDeforms(val) end - ----指定坐标地形 [R] ----@param x real ----@param y real ----@return integer -function common.GetTerrainType(x,y) end - ----地形样式(指定坐标) [R] ----@param x real ----@param y real ----@return integer -function common.GetTerrainVariance(x,y) end - ----改变地形类型(指定坐标) [R] ----@param x real ----@param y real ----@param terrainType integer ----@param variation integer ----@param area integer ----@param shape integer -function common.SetTerrainType(x,y,terrainType,variation,area,shape) end - ----地形通行状态关闭(指定坐标) [R] ----@param x real ----@param y real ----@param t pathingtype ----@return boolean -function common.IsTerrainPathable(x,y,t) end - ----设置地形通行状态(指定坐标) [R] ----@param x real ----@param y real ----@param t pathingtype ----@param flag boolean -function common.SetTerrainPathable(x,y,t,flag) end - ----Image API ----新建图像 [R] ----@param file string ----@param sizeX real ----@param sizeY real ----@param sizeZ real ----@param posX real ----@param posY real ----@param posZ real ----@param originX real ----@param originY real ----@param originZ real ----@param imageType integer ----@return image -function common.CreateImage(file,sizeX,sizeY,sizeZ,posX,posY,posZ,originX,originY,originZ,imageType) end - ----删除图像 ----@param whichImage image -function common.DestroyImage(whichImage) end - ----显示/隐藏 [R] ----@param whichImage image ----@param flag boolean -function common.ShowImage(whichImage,flag) end - ----改变图像高度 ----@param whichImage image ----@param flag boolean ----@param height real -function common.SetImageConstantHeight(whichImage,flag,height) end - ----改变图像位置(指定坐标) [R] ----@param whichImage image ----@param x real ----@param y real ----@param z real -function common.SetImagePosition(whichImage,x,y,z) end - ----改变图像颜色 [R] ----@param whichImage image ----@param red integer ----@param green integer ----@param blue integer ----@param alpha integer -function common.SetImageColor(whichImage,red,green,blue,alpha) end - ----改变图像着色状态 ----@param whichImage image ----@param flag boolean -function common.SetImageRender(whichImage,flag) end - ----改变图像永久着色状态 ----@param whichImage image ----@param flag boolean -function common.SetImageRenderAlways(whichImage,flag) end - ----改变图像水上状态 ----@param whichImage image ----@param flag boolean ----@param useWaterAlpha boolean -function common.SetImageAboveWater(whichImage,flag,useWaterAlpha) end - ----改变图像类型 ----@param whichImage image ----@param imageType integer -function common.SetImageType(whichImage,imageType) end - ----Ubersplat API ----新建地面纹理变化 [R] ----@param x real ----@param y real ----@param name string ----@param red integer ----@param green integer ----@param blue integer ----@param alpha integer ----@param forcePaused boolean ----@param noBirthTime boolean ----@return ubersplat -function common.CreateUbersplat(x,y,name,red,green,blue,alpha,forcePaused,noBirthTime) end - ----删除地面纹理 ----@param whichSplat ubersplat -function common.DestroyUbersplat(whichSplat) end - ----重置地面纹理 ----@param whichSplat ubersplat -function common.ResetUbersplat(whichSplat) end - ----完成地面纹理 ----@param whichSplat ubersplat -function common.FinishUbersplat(whichSplat) end - ----显示/隐藏 地面纹理变化[R] ----@param whichSplat ubersplat ----@param flag boolean -function common.ShowUbersplat(whichSplat,flag) end - ----改变地面纹理着色状态 ----@param whichSplat ubersplat ----@param flag boolean -function common.SetUbersplatRender(whichSplat,flag) end - ----改变地面纹理永久着色状态 ----@param whichSplat ubersplat ----@param flag boolean -function common.SetUbersplatRenderAlways(whichSplat,flag) end - ----Blight API ----创建/删除荒芜地表(圆范围)(指定坐标) [R] ----@param whichPlayer player ----@param x real ----@param y real ----@param radius real ----@param addBlight boolean -function common.SetBlight(whichPlayer,x,y,radius,addBlight) end - ----创建/删除荒芜地表(矩形区域) [R] ----@param whichPlayer player ----@param r rect ----@param addBlight boolean -function common.SetBlightRect(whichPlayer,r,addBlight) end - ----SetBlightPoint ----@param whichPlayer player ----@param x real ----@param y real ----@param addBlight boolean -function common.SetBlightPoint(whichPlayer,x,y,addBlight) end - ----SetBlightLoc ----@param whichPlayer player ----@param whichLocation location ----@param radius real ----@param addBlight boolean -function common.SetBlightLoc(whichPlayer,whichLocation,radius,addBlight) end - ----新建不死族金矿 [R] ----@param id player ----@param x real ----@param y real ----@param face real ----@return unit -function common.CreateBlightedGoldmine(id,x,y,face) end - ----坐标点被荒芜地表覆盖 [R] ----@param x real ----@param y real ----@return boolean -function common.IsPointBlighted(x,y) end - ----Doodad API ----播放圆范围内地形装饰物动画 [R] ----@param x real ----@param y real ----@param radius real ----@param doodadID integer ----@param nearestOnly boolean ----@param animName string ----@param animRandom boolean -function common.SetDoodadAnimation(x,y,radius,doodadID,nearestOnly,animName,animRandom) end - ----播放矩形区域内地形装饰物动画 [R] ----@param r rect ----@param doodadID integer ----@param animName string ----@param animRandom boolean -function common.SetDoodadAnimationRect(r,doodadID,animName,animRandom) end - ----Computer AI interface ----启动对战 AI ----@param num player ----@param script string -function common.StartMeleeAI(num,script) end - ----启动战役 AI ----@param num player ----@param script string -function common.StartCampaignAI(num,script) end - ----发送 AI 命令 ----@param num player ----@param command integer ----@param data integer -function common.CommandAI(num,command,data) end - ----暂停/恢复 AI脚本运行 [R] ----@param p player ----@param pause boolean -function common.PauseCompAI(p,pause) end - ----对战 AI ----@param num player ----@return aidifficulty -function common.GetAIDifficulty(num) end - ----忽略单位的防守职责 ----@param hUnit unit -function common.RemoveGuardPosition(hUnit) end - ----恢复单位的防守职责 ----@param hUnit unit -function common.RecycleGuardPosition(hUnit) end - ----忽略所有单位的防守职责 ----@param num player -function common.RemoveAllGuardPositions(num) end - ----** Cheat标签 ** ----@param cheatStr string -function common.Cheat(cheatStr) end - ----无法胜利 [R] ----@return boolean -function common.IsNoVictoryCheat() end - ----无法失败 [R] ----@return boolean -function common.IsNoDefeatCheat() end - ----预读文件 ----@param filename string -function common.Preload(filename) end - ----开始预读 ----@param timeout real -function common.PreloadEnd(timeout) end - ----PreloadStart -function common.PreloadStart() end - ----PreloadRefresh -function common.PreloadRefresh() end - ----PreloadEndEx -function common.PreloadEndEx() end - ----PreloadGenClear -function common.PreloadGenClear() end - ----PreloadGenStart -function common.PreloadGenStart() end - ----PreloadGenEnd ----@param filename string -function common.PreloadGenEnd(filename) end - ----预读一批文件 ----@param filename string -function common.Preloader(filename) end - ----Automation Test ----Automation Test ----@param testType string -function common.AutomationSetTestType(testType) end - ----AutomationTestStart ----@param testName string -function common.AutomationTestStart(testName) end - ----AutomationTestEnd -function common.AutomationTestEnd() end - ----AutomationTestingFinished -function common.AutomationTestingFinished() end - ----RequestExtraIntegerData ----@param dataType integer ----@param whichPlayer player ----@param param1 string ----@param param2 string ----@param param3 boolean ----@param param4 integer ----@param param5 integer ----@param param6 integer ----@return integer -function common.RequestExtraIntegerData(dataType,whichPlayer,param1,param2,param3,param4,param5,param6) end - ----RequestExtraBooleanData ----@param dataType integer ----@param whichPlayer player ----@param param1 string ----@param param2 string ----@param param3 boolean ----@param param4 integer ----@param param5 integer ----@param param6 integer ----@return boolean -function common.RequestExtraBooleanData(dataType,whichPlayer,param1,param2,param3,param4,param5,param6) end - ----RequestExtraStringData ----@param dataType integer ----@param whichPlayer player ----@param param1 string ----@param param2 string ----@param param3 boolean ----@param param4 integer ----@param param5 integer ----@param param6 integer ----@return string -function common.RequestExtraStringData(dataType,whichPlayer,param1,param2,param3,param4,param5,param6) end - ----RequestExtraRealData ----@param dataType integer ----@param whichPlayer player ----@param param1 string ----@param param2 string ----@param param3 boolean ----@param param4 integer ----@param param5 integer ----@param param6 integer ----@return real -function common.RequestExtraRealData(dataType,whichPlayer,param1,param2,param3,param4,param5,param6) end - ----CreateCommandButtonEffect ----@param abilityId integer ----@param order string ----@return commandbuttoneffect -function common.CreateCommandButtonEffect(abilityId,order) end - ----CreateUpgradeCommandButtonEffect ----@param whichUprgade integer ----@return commandbuttoneffect -function common.CreateUpgradeCommandButtonEffect(whichUprgade) end - ----CreateLearnCommandButtonEffect ----@param abilityId integer ----@return commandbuttoneffect -function common.CreateLearnCommandButtonEffect(abilityId) end - ----DestroyCommandButtonEffect ----@param whichEffect commandbuttoneffect -function common.DestroyCommandButtonEffect(whichEffect) end - -return common -- cgit v1.2.3 From ad1341b497f815325dd591083356644f1b69fcb1 Mon Sep 17 00:00:00 2001 From: carsakiller Date: Fri, 27 Oct 2023 20:42:07 -0400 Subject: refactor: replace lfs with LuaCATS submodule --- meta/3rd/lfs | 1 + meta/3rd/lfs/config.json | 9 --- meta/3rd/lfs/library/lfs.lua | 158 ------------------------------------------- 3 files changed, 1 insertion(+), 167 deletions(-) create mode 160000 meta/3rd/lfs delete mode 100644 meta/3rd/lfs/config.json delete mode 100644 meta/3rd/lfs/library/lfs.lua (limited to 'meta') diff --git a/meta/3rd/lfs b/meta/3rd/lfs new file mode 160000 index 00000000..9b5cfc15 --- /dev/null +++ b/meta/3rd/lfs @@ -0,0 +1 @@ +Subproject commit 9b5cfc15be744c829c66519cb11e49669ae7e39b diff --git a/meta/3rd/lfs/config.json b/meta/3rd/lfs/config.json deleted file mode 100644 index b7400123..00000000 --- a/meta/3rd/lfs/config.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name" : "luafilesystem", - "words" : [ "require[%s%(\"']+lfs[%)\"']" ], - "settings" : { - "Lua.diagnostics.globals" : [ - "lfs" - ] - } -} diff --git a/meta/3rd/lfs/library/lfs.lua b/meta/3rd/lfs/library/lfs.lua deleted file mode 100644 index 4016152a..00000000 --- a/meta/3rd/lfs/library/lfs.lua +++ /dev/null @@ -1,158 +0,0 @@ ----@meta - ----@class LuaFileSystem.Attributes ----@field [LuaFileSystem.AttributeName] any ----@field ['mode'] LuaFileSystem.AttributeMode - ----@alias LuaFileSystem.AttributeMode ----|'file' ----|'directory' ----|'link' ----|'socket' ----|'char device' ----|"block device" ----|"named pipe" - ----@alias LuaFileSystem.AttributeName ----|'dev' -- on Unix systems, this represents the device that the inode resides on. On Windows systems, represents the drive number of the disk containing the file ----|'ino' -- on Unix systems, this represents the inode number. On Windows systems this has no meaning ----|'mode' -- string representing the associated protection mode (the values could be file, directory, link, socket, named pipe, char device, block device or other) ----|'nlink' -- number of hard links to the file ----|'uid' -- user-id of owner (Unix only, always 0 on Windows) ----|'gid' -- group-id of owner (Unix only, always 0 on Windows) ----|'rdev' -- on Unix systems, represents the device type, for special file inodes. On Windows systems represents the same as dev ----|'access' -- time of last access ----|'modification' -- time of last data modification ----|'change' -- time of last file status change ----|'size' -- file size, in bytes ----|'permissions' -- file permissions string ----|'blocks' -- block allocated for file; (Unix only) ----|'blksize' -- optimal file system I/O blocksize; (Unix only) - ----@class LuaFileSystem -local lfs = {} - ---[[ -Returns a table with the file attributes corresponding to filepath (or nil followed by an error message and a system-dependent error code in case of error). If the second optional argument is given and is a string, then only the value of the named attribute is returned (this use is equivalent to lfs.attributes(filepath)[request_name], but the table is not created and only one attribute is retrieved from the O.S.). if a table is passed as the second argument, it (result_table) is filled with attributes and returned instead of a new table. The attributes are described as follows; attribute mode is a string, all the others are numbers, and the time related attributes use the same time reference of os.time: -]] ----@overload fun(filepath:string):LuaFileSystem.Attributes ----@overload fun(filepath:string, result_table:LuaFileSystem.Attributes) ----@param filepath string ----@param request_name LuaFileSystem.AttributeName ----@return string|integer|LuaFileSystem.AttributeMode -function lfs.attributes(filepath, request_name) -end - ---[[ -Changes the current working directory to the given path. -Returns true in case of success or nil plus an error string. -]] ----@param path string ----@return boolean, string -function lfs.chdir(path) -end - ---[[ -Creates a lockfile (called lockfile.lfs) in path if it does not exist and returns the lock. If the lock already exists checks if it's stale, using the second parameter (default for the second parameter is INT_MAX, which in practice means the lock will never be stale. To free the the lock call lock:free(). -In case of any errors it returns nil and the error message. In particular, if the lock exists and is not stale it returns the "File exists" message. -]] ----@param path string ----@param seconds_stale? number ----@return boolean, string -function lfs.lock_dir(path, seconds_stale) -end - ----Returns a string with the current working directory or nil plus an error string. ----@return string -function lfs.currentdir() -end - ---[[ -Lua iterator over the entries of a given directory. Each time the iterator is called with dir_obj it returns a directory entry's name as a string, or nil if there are no more entries. You can also iterate by calling dir_obj:next(), and explicitly close the directory before the iteration finished with dir_obj:close(). Raises an error if path is not a directory. -]] ----@param path string ----@return fun():string -function lfs.dir(path) -end - ---[[ -Locks a file or a part of it. This function works on open files; the file handle should be specified as the first argument. The string mode could be either r (for a read/shared lock) or w (for a write/exclusive lock). The optional arguments start and length can be used to specify a starting point and its length; both should be numbers. -Returns true if the operation was successful; in case of error, it returns nil plus an error string. -]] ----@param filehandle file* ----@param mode openmode ----@param start? integer ----@param length? integer ----@return boolean, string -function lfs.lock(filehandle, mode, start, length) -end - ---[[ - Creates a link. The first argument is the object to link to and the second is the name of the link. If the optional third argument is true, the link will by a symbolic link (by default, a hard link is created). -]] ----@param old string ----@param new string ----@param symlink? boolean ----@return boolean, string -function lfs.link(old, new, symlink) -end - ---[[ - Creates a new directory. The argument is the name of the new directory. - Returns true in case of success or nil, an error message and a system-dependent error code in case of error. -]] ----@param dirname string ----@return boolean, string -function lfs.mkdir(dirname) -end - ---[[ - Removes an existing directory. The argument is the name of the directory. - Returns true in case of success or nil, an error message and a system-dependent error code in case of error. -]] ----@param dirname string ----@return boolean, string -function lfs.rmdir(dirname) -end - ---[[ -Sets the writing mode for a file. The mode string can be either "binary" or "text". Returns true followed the previous mode string for the file, or nil followed by an error string in case of errors. On non-Windows platforms, where the two modes are identical, setting the mode has no effect, and the mode is always returned as binary. -]] ----@param file string ----@param mode 'binary'|'text' ----@return boolean, string -function lfs.setmode(file, mode) -end - ---[[ -Identical to lfs.attributes except that it obtains information about the link itself (not the file it refers to). It also adds a target field, containing the file name that the symlink points to. On Windows this function does not yet support links, and is identical to lfs.attributes. -]] ----@param filepath string ----@param request_name? LuaFileSystem.AttributeName ----@return LuaFileSystem.Attributes -function lfs.symlinkattributes(filepath, request_name) -end - ---[[ -Set access and modification times of a file. This function is a bind to utime function. The first argument is the filename, the second argument (atime) is the access time, and the third argument (mtime) is the modification time. Both times are provided in seconds (which should be generated with Lua standard function os.time). If the modification time is omitted, the access time provided is used; if both times are omitted, the current time is used. -Returns true in case of success or nil, an error message and a system-dependent error code in case of error. -]] ----@param filepath string ----@param atime? integer ----@param mtime? integer ----@return boolean, string -function lfs.touch(filepath, atime, mtime) -end - ---[[ -Unlocks a file or a part of it. This function works on open files; the file handle should be specified as the first argument. The optional arguments start and length can be used to specify a starting point and its length; both should be numbers. -Returns true if the operation was successful; in case of error, it returns nil plus an error string. -]] ----@param filehandle file* ----@param start? integer ----@param length? integer ----@return boolean, string -function lfs.unlock(filehandle, start, length) -end - -return lfs -- cgit v1.2.3 From e2b951f1485e7626867e64b667a6ebde6e9c3771 Mon Sep 17 00:00:00 2001 From: carsakiller Date: Fri, 27 Oct 2023 20:42:07 -0400 Subject: refactor: replace love2d with LuaCATS submodule --- meta/3rd/love2d | 1 + meta/3rd/love2d/config.json | 10 - meta/3rd/love2d/library/love.lua | 334 --- meta/3rd/love2d/library/love/audio.lua | 989 ------- meta/3rd/love2d/library/love/data.lua | 264 -- meta/3rd/love2d/library/love/event.lua | 244 -- meta/3rd/love2d/library/love/filesystem.lua | 653 ----- meta/3rd/love2d/library/love/font.lua | 281 -- meta/3rd/love2d/library/love/graphics.lua | 3956 --------------------------- meta/3rd/love2d/library/love/image.lua | 694 ----- meta/3rd/love2d/library/love/joystick.lua | 464 ---- meta/3rd/love2d/library/love/keyboard.lua | 1484 ---------- meta/3rd/love2d/library/love/math.lua | 711 ----- meta/3rd/love2d/library/love/mouse.lua | 283 -- meta/3rd/love2d/library/love/physics.lua | 3287 ---------------------- meta/3rd/love2d/library/love/sound.lua | 189 -- meta/3rd/love2d/library/love/system.lua | 115 - meta/3rd/love2d/library/love/thread.lua | 210 -- meta/3rd/love2d/library/love/timer.lua | 68 - meta/3rd/love2d/library/love/touch.lua | 40 - meta/3rd/love2d/library/love/video.lua | 92 - meta/3rd/love2d/library/love/window.lua | 473 ---- 22 files changed, 1 insertion(+), 14841 deletions(-) create mode 160000 meta/3rd/love2d delete mode 100644 meta/3rd/love2d/config.json delete mode 100644 meta/3rd/love2d/library/love.lua delete mode 100644 meta/3rd/love2d/library/love/audio.lua delete mode 100644 meta/3rd/love2d/library/love/data.lua delete mode 100644 meta/3rd/love2d/library/love/event.lua delete mode 100644 meta/3rd/love2d/library/love/filesystem.lua delete mode 100644 meta/3rd/love2d/library/love/font.lua delete mode 100644 meta/3rd/love2d/library/love/graphics.lua delete mode 100644 meta/3rd/love2d/library/love/image.lua delete mode 100644 meta/3rd/love2d/library/love/joystick.lua delete mode 100644 meta/3rd/love2d/library/love/keyboard.lua delete mode 100644 meta/3rd/love2d/library/love/math.lua delete mode 100644 meta/3rd/love2d/library/love/mouse.lua delete mode 100644 meta/3rd/love2d/library/love/physics.lua delete mode 100644 meta/3rd/love2d/library/love/sound.lua delete mode 100644 meta/3rd/love2d/library/love/system.lua delete mode 100644 meta/3rd/love2d/library/love/thread.lua delete mode 100644 meta/3rd/love2d/library/love/timer.lua delete mode 100644 meta/3rd/love2d/library/love/touch.lua delete mode 100644 meta/3rd/love2d/library/love/video.lua delete mode 100644 meta/3rd/love2d/library/love/window.lua (limited to 'meta') diff --git a/meta/3rd/love2d b/meta/3rd/love2d new file mode 160000 index 00000000..dad72a7e --- /dev/null +++ b/meta/3rd/love2d @@ -0,0 +1 @@ +Subproject commit dad72a7eae31f35bf4c6529e5b81f6187b5b7377 diff --git a/meta/3rd/love2d/config.json b/meta/3rd/love2d/config.json deleted file mode 100644 index d44784d3..00000000 --- a/meta/3rd/love2d/config.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name" : "LÖVE", - "words" : ["love%.%w+"], - "settings" : { - "Lua.runtime.version" : "LuaJIT", - "Lua.runtime.special" : { - "love.filesystem.load" : "loadfile" - } - } -} diff --git a/meta/3rd/love2d/library/love.lua b/meta/3rd/love2d/library/love.lua deleted file mode 100644 index 7ca517a5..00000000 --- a/meta/3rd/love2d/library/love.lua +++ /dev/null @@ -1,334 +0,0 @@ ----@meta - --- version: 11.4 ---- ----[Open in Browser](https://love2d.org/wiki/love) ---- ----@class love -love = {} - ---- ----Gets the current running version of LÖVE. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.getVersion) ---- ----@return number major # The major version of LÖVE, i.e. 0 for version 0.9.1. ----@return number minor # The minor version of LÖVE, i.e. 9 for version 0.9.1. ----@return number revision # The revision version of LÖVE, i.e. 1 for version 0.9.1. ----@return string codename # The codename of the current version, i.e. 'Baby Inspector' for version 0.9.1. -function love.getVersion() end - ---- ----Gets whether LÖVE displays warnings when using deprecated functionality. It is disabled by default in fused mode, and enabled by default otherwise. ---- ----When deprecation output is enabled, the first use of a formally deprecated LÖVE API will show a message at the bottom of the screen for a short time, and print the message to the console. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.hasDeprecationOutput) ---- ----@return boolean enabled # Whether deprecation output is enabled. -function love.hasDeprecationOutput() end - ---- ----Gets whether the given version is compatible with the current running version of LÖVE. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.isVersionCompatible) ---- ----@overload fun(major: number, minor: number, revision: number):boolean ----@param version string # The version to check (for example '11.3' or '0.10.2'). ----@return boolean compatible # Whether the given version is compatible with the current running version of LÖVE. -function love.isVersionCompatible(version) end - ---- ----Sets whether LÖVE displays warnings when using deprecated functionality. It is disabled by default in fused mode, and enabled by default otherwise. ---- ----When deprecation output is enabled, the first use of a formally deprecated LÖVE API will show a message at the bottom of the screen for a short time, and print the message to the console. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.setDeprecationOutput) ---- ----@param enable boolean # Whether to enable or disable deprecation output. -function love.setDeprecationOutput(enable) end - ---- ----The superclass of all data. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love) ---- ----@class love.Data: love.Object -local Data = {} - ---- ----Creates a new copy of the Data object. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Data:clone) ---- ----@return love.Data clone # The new copy. -function Data:clone() end - ---- ----Gets an FFI pointer to the Data. ---- ----This function should be preferred instead of Data:getPointer because the latter uses light userdata which can't store more all possible memory addresses on some new ARM64 architectures, when LuaJIT is used. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Data:getFFIPointer) ---- ----@return ffi.cdata* pointer # A raw void* pointer to the Data, or nil if FFI is unavailable. -function Data:getFFIPointer() end - ---- ----Gets a pointer to the Data. Can be used with libraries such as LuaJIT's FFI. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Data:getPointer) ---- ----@return lightuserdata pointer # A raw pointer to the Data. -function Data:getPointer() end - ---- ----Gets the Data's size in bytes. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Data:getSize) ---- ----@return number size # The size of the Data in bytes. -function Data:getSize() end - ---- ----Gets the full Data as a string. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Data:getString) ---- ----@return string data # The raw data. -function Data:getString() end - ---- ----The superclass of all LÖVE types. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love) ---- ----@class love.Object -local Object = {} - ---- ----Destroys the object's Lua reference. The object will be completely deleted if it's not referenced by any other LÖVE object or thread. ---- ----This method can be used to immediately clean up resources without waiting for Lua's garbage collector. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Object:release) ---- ----@return boolean success # True if the object was released by this call, false if it had been previously released. -function Object:release() end - ---- ----Gets the type of the object as a string. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Object:type) ---- ----@return string type # The type as a string. -function Object:type() end - ---- ----Checks whether an object is of a certain type. If the object has the type with the specified name in its hierarchy, this function will return true. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Object:typeOf) ---- ----@param name string # The name of the type to check for. ----@return boolean b # True if the object is of the specified type, false otherwise. -function Object:typeOf(name) end - ---- ----If a file called conf.lua is present in your game folder (or .love file), it is run before the LÖVE modules are loaded. You can use this file to overwrite the love.conf function, which is later called by the LÖVE 'boot' script. Using the love.conf function, you can set some configuration options, and change things like the default size of the window, which modules are loaded, and other stuff. ---- ----@alias love.conf fun(t: table) - ---- ----Callback function triggered when a directory is dragged and dropped onto the window. ---- ----@alias love.directorydropped fun(path: string) - ---- ----Called when the device display orientation changed, for example, user rotated their phone 180 degrees. ---- ----@alias love.displayrotated fun(index: number, orientation: love.DisplayOrientation) - ---- ----Callback function used to draw on the screen every frame. ---- ----@alias love.draw fun() - ---- ----The error handler, used to display error messages. ---- ----@alias love.errorhandler fun(msg: string):function - ---- ----Callback function triggered when a file is dragged and dropped onto the window. ---- ----@alias love.filedropped fun(file: love.DroppedFile) - ---- ----Callback function triggered when window receives or loses focus. ---- ----@alias love.focus fun(focus: boolean) - ---- ----Called when a Joystick's virtual gamepad axis is moved. ---- ----@alias love.gamepadaxis fun(joystick: love.Joystick, axis: love.GamepadAxis, value: number) - ---- ----Called when a Joystick's virtual gamepad button is pressed. ---- ----@alias love.gamepadpressed fun(joystick: love.Joystick, button: love.GamepadButton) - ---- ----Called when a Joystick's virtual gamepad button is released. ---- ----@alias love.gamepadreleased fun(joystick: love.Joystick, button: love.GamepadButton) - ---- ----Called when a Joystick is connected. ---- ----@alias love.joystickadded fun(joystick: love.Joystick) - ---- ----Called when a joystick axis moves. ---- ----@alias love.joystickaxis fun(joystick: love.Joystick, axis: number, value: number) - ---- ----Called when a joystick hat direction changes. ---- ----@alias love.joystickhat fun(joystick: love.Joystick, hat: number, direction: love.JoystickHat) - ---- ----Called when a joystick button is pressed. ---- ----@alias love.joystickpressed fun(joystick: love.Joystick, button: number) - ---- ----Called when a joystick button is released. ---- ----@alias love.joystickreleased fun(joystick: love.Joystick, button: number) - ---- ----Called when a Joystick is disconnected. ---- ----@alias love.joystickremoved fun(joystick: love.Joystick) - ---- ----Callback function triggered when a key is pressed. ---- ----@alias love.keypressed fun(key: love.KeyConstant, scancode: love.Scancode, isrepeat: boolean)|fun(key: love.KeyConstant, isrepeat: boolean) - ---- ----Callback function triggered when a keyboard key is released. ---- ----@alias love.keyreleased fun(key: love.KeyConstant, scancode: love.Scancode) - ---- ----This function is called exactly once at the beginning of the game. ---- ----@alias love.load fun(arg: table, unfilteredArg: table) - ---- ----Callback function triggered when the system is running out of memory on mobile devices. ---- ----Mobile operating systems may forcefully kill the game if it uses too much memory, so any non-critical resource should be removed if possible (by setting all variables referencing the resources to '''nil'''), when this event is triggered. Sounds and images in particular tend to use the most memory. ---- ----@alias love.lowmemory fun() - ---- ----Callback function triggered when window receives or loses mouse focus. ---- ----@alias love.mousefocus fun(focus: boolean) - ---- ----Callback function triggered when the mouse is moved. ---- ----@alias love.mousemoved fun(x: number, y: number, dx: number, dy: number, istouch: boolean) - ---- ----Callback function triggered when a mouse button is pressed. ---- ----@alias love.mousepressed fun(x: number, y: number, button: number, istouch: boolean, presses: number) - ---- ----Callback function triggered when a mouse button is released. ---- ----@alias love.mousereleased fun(x: number, y: number, button: number, istouch: boolean, presses: number) - ---- ----Callback function triggered when the game is closed. ---- ----@alias love.quit fun():boolean - ---- ----Called when the window is resized, for example if the user resizes the window, or if love.window.setMode is called with an unsupported width or height in fullscreen and the window chooses the closest appropriate size. ---- ----@alias love.resize fun(w: number, h: number) - ---- ----The main function, containing the main loop. A sensible default is used when left out. ---- ----@alias love.run fun():function - ---- ----Called when the candidate text for an IME (Input Method Editor) has changed. ---- ----The candidate text is not the final text that the user will eventually choose. Use love.textinput for that. ---- ----@alias love.textedited fun(text: string, start: number, length: number) - ---- ----Called when text has been entered by the user. For example if shift-2 is pressed on an American keyboard layout, the text '@' will be generated. ---- ----@alias love.textinput fun(text: string) - ---- ----Callback function triggered when a Thread encounters an error. ---- ----@alias love.threaderror fun(thread: love.Thread, errorstr: string) - ---- ----Callback function triggered when a touch press moves inside the touch screen. ---- ----@alias love.touchmoved fun(id: lightuserdata, x: number, y: number, dx: number, dy: number, pressure: number) - ---- ----Callback function triggered when the touch screen is touched. ---- ----@alias love.touchpressed fun(id: lightuserdata, x: number, y: number, dx: number, dy: number, pressure: number) - ---- ----Callback function triggered when the touch screen stops being touched. ---- ----@alias love.touchreleased fun(id: lightuserdata, x: number, y: number, dx: number, dy: number, pressure: number) - ---- ----Callback function used to update the state of the game every frame. ---- ----@alias love.update fun(dt: number) - ---- ----Callback function triggered when window is minimized/hidden or unminimized by the user. ---- ----@alias love.visible fun(visible: boolean) - ---- ----Callback function triggered when the mouse wheel is moved. ---- ----@alias love.wheelmoved fun(x: number, y: number) - -return love diff --git a/meta/3rd/love2d/library/love/audio.lua b/meta/3rd/love2d/library/love/audio.lua deleted file mode 100644 index 9444ee46..00000000 --- a/meta/3rd/love2d/library/love/audio.lua +++ /dev/null @@ -1,989 +0,0 @@ ----@meta - ---- ----Provides an interface to create noise with the user's speakers. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.audio) ---- ----@class love.audio -love.audio = {} - ---- ----Gets a list of the names of the currently enabled effects. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.audio.getActiveEffects) ---- ----@return table effects # The list of the names of the currently enabled effects. -function love.audio.getActiveEffects() end - ---- ----Gets the current number of simultaneously playing sources. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.audio.getActiveSourceCount) ---- ----@return number count # The current number of simultaneously playing sources. -function love.audio.getActiveSourceCount() end - ---- ----Returns the distance attenuation model. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.audio.getDistanceModel) ---- ----@return love.DistanceModel model # The current distance model. The default is 'inverseclamped'. -function love.audio.getDistanceModel() end - ---- ----Gets the current global scale factor for velocity-based doppler effects. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.audio.getDopplerScale) ---- ----@return number scale # The current doppler scale factor. -function love.audio.getDopplerScale() end - ---- ----Gets the settings associated with an effect. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.audio.getEffect) ---- ----@param name string # The name of the effect. ----@return table settings # The settings associated with the effect. -function love.audio.getEffect(name) end - ---- ----Gets the maximum number of active effects supported by the system. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.audio.getMaxSceneEffects) ---- ----@return number maximum # The maximum number of active effects. -function love.audio.getMaxSceneEffects() end - ---- ----Gets the maximum number of active Effects in a single Source object, that the system can support. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.audio.getMaxSourceEffects) ---- ----@return number maximum # The maximum number of active Effects per Source. -function love.audio.getMaxSourceEffects() end - ---- ----Returns the orientation of the listener. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.audio.getOrientation) ---- ----@return number fx # Forward vector of the listener orientation. ----@return number fy # Forward vector of the listener orientation. ----@return number fz # Forward vector of the listener orientation. ----@return number ux # Up vector of the listener orientation. ----@return number uy # Up vector of the listener orientation. ----@return number uz # Up vector of the listener orientation. -function love.audio.getOrientation() end - ---- ----Returns the position of the listener. Please note that positional audio only works for mono (i.e. non-stereo) sources. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.audio.getPosition) ---- ----@return number x # The X position of the listener. ----@return number y # The Y position of the listener. ----@return number z # The Z position of the listener. -function love.audio.getPosition() end - ---- ----Gets a list of RecordingDevices on the system. ---- ----The first device in the list is the user's default recording device. The list may be empty if there are no microphones connected to the system. ---- ----Audio recording is currently not supported on iOS. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.audio.getRecordingDevices) ---- ----@return table devices # The list of connected recording devices. -function love.audio.getRecordingDevices() end - ---- ----Gets the current number of simultaneously playing sources. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.audio.getSourceCount) ---- ----@return number numSources # The current number of simultaneously playing sources. -function love.audio.getSourceCount() end - ---- ----Returns the velocity of the listener. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.audio.getVelocity) ---- ----@return number x # The X velocity of the listener. ----@return number y # The Y velocity of the listener. ----@return number z # The Z velocity of the listener. -function love.audio.getVelocity() end - ---- ----Returns the master volume. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.audio.getVolume) ---- ----@return number volume # The current master volume -function love.audio.getVolume() end - ---- ----Gets whether audio effects are supported in the system. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.audio.isEffectsSupported) ---- ----@return boolean supported # True if effects are supported, false otherwise. -function love.audio.isEffectsSupported() end - ---- ----Creates a new Source usable for real-time generated sound playback with Source:queue. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.audio.newQueueableSource) ---- ----@param samplerate number # Number of samples per second when playing. ----@param bitdepth number # Bits per sample (8 or 16). ----@param channels number # 1 for mono or 2 for stereo. ----@param buffercount? number # The number of buffers that can be queued up at any given time with Source:queue. Cannot be greater than 64. A sensible default (~8) is chosen if no value is specified. ----@return love.Source source # The new Source usable with Source:queue. -function love.audio.newQueueableSource(samplerate, bitdepth, channels, buffercount) end - ---- ----Creates a new Source from a filepath, File, Decoder or SoundData. ---- ----Sources created from SoundData are always static. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.audio.newSource) ---- ----@overload fun(file: love.File, type: love.SourceType):love.Source ----@overload fun(decoder: love.Decoder, type: love.SourceType):love.Source ----@overload fun(data: love.FileData, type: love.SourceType):love.Source ----@overload fun(data: love.SoundData):love.Source ----@param filename string # The filepath to the audio file. ----@param type love.SourceType # Streaming or static source. ----@return love.Source source # A new Source that can play the specified audio. -function love.audio.newSource(filename, type) end - ---- ----Pauses specific or all currently played Sources. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.audio.pause) ---- ----@overload fun(source: love.Source, ...) ----@overload fun(sources: table) ----@return table Sources # A table containing a list of Sources that were paused by this call. -function love.audio.pause() end - ---- ----Plays the specified Source. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.audio.play) ---- ----@overload fun(sources: table) ----@overload fun(source1: love.Source, source2: love.Source, ...) ----@param source love.Source # The Source to play. -function love.audio.play(source) end - ---- ----Sets the distance attenuation model. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.audio.setDistanceModel) ---- ----@param model love.DistanceModel # The new distance model. -function love.audio.setDistanceModel(model) end - ---- ----Sets a global scale factor for velocity-based doppler effects. The default scale value is 1. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.audio.setDopplerScale) ---- ----@param scale number # The new doppler scale factor. The scale must be greater than 0. -function love.audio.setDopplerScale(scale) end - ---- ----Defines an effect that can be applied to a Source. ---- ----Not all system supports audio effects. Use love.audio.isEffectsSupported to check. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.audio.setEffect) ---- ----@overload fun(name: string, enabled?: boolean):boolean ----@param name string # The name of the effect. ----@param settings {type: love.EffectType, volume: number} # The settings to use for this effect, with the following fields: ----@return boolean success # Whether the effect was successfully created. -function love.audio.setEffect(name, settings) end - ---- ----Sets whether the system should mix the audio with the system's audio. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.audio.setMixWithSystem) ---- ----@param mix boolean # True to enable mixing, false to disable it. ----@return boolean success # True if the change succeeded, false otherwise. -function love.audio.setMixWithSystem(mix) end - ---- ----Sets the orientation of the listener. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.audio.setOrientation) ---- ----@param fx number # Forward vector of the listener orientation. ----@param fy number # Forward vector of the listener orientation. ----@param fz number # Forward vector of the listener orientation. ----@param ux number # Up vector of the listener orientation. ----@param uy number # Up vector of the listener orientation. ----@param uz number # Up vector of the listener orientation. -function love.audio.setOrientation(fx, fy, fz, ux, uy, uz) end - ---- ----Sets the position of the listener, which determines how sounds play. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.audio.setPosition) ---- ----@param x number # The x position of the listener. ----@param y number # The y position of the listener. ----@param z number # The z position of the listener. -function love.audio.setPosition(x, y, z) end - ---- ----Sets the velocity of the listener. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.audio.setVelocity) ---- ----@param x number # The X velocity of the listener. ----@param y number # The Y velocity of the listener. ----@param z number # The Z velocity of the listener. -function love.audio.setVelocity(x, y, z) end - ---- ----Sets the master volume. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.audio.setVolume) ---- ----@param volume number # 1.0 is max and 0.0 is off. -function love.audio.setVolume(volume) end - ---- ----Stops currently played sources. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.audio.stop) ---- ----@overload fun(source: love.Source) ----@overload fun(source1: love.Source, source2: love.Source, ...) ----@overload fun(sources: table) -function love.audio.stop() end - ---- ----Represents an audio input device capable of recording sounds. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.audio) ---- ----@class love.RecordingDevice: love.Object -local RecordingDevice = {} - ---- ----Gets the number of bits per sample in the data currently being recorded. ---- ---- ----[Open in Browser](https://love2d.org/wiki/RecordingDevice:getBitDepth) ---- ----@return number bits # The number of bits per sample in the data that's currently being recorded. -function RecordingDevice:getBitDepth() end - ---- ----Gets the number of channels currently being recorded (mono or stereo). ---- ---- ----[Open in Browser](https://love2d.org/wiki/RecordingDevice:getChannelCount) ---- ----@return number channels # The number of channels being recorded (1 for mono, 2 for stereo). -function RecordingDevice:getChannelCount() end - ---- ----Gets all recorded audio SoundData stored in the device's internal ring buffer. ---- ----The internal ring buffer is cleared when this function is called, so calling it again will only get audio recorded after the previous call. If the device's internal ring buffer completely fills up before getData is called, the oldest data that doesn't fit into the buffer will be lost. ---- ---- ----[Open in Browser](https://love2d.org/wiki/RecordingDevice:getData) ---- ----@return love.SoundData data # The recorded audio data, or nil if the device isn't recording. -function RecordingDevice:getData() end - ---- ----Gets the name of the recording device. ---- ---- ----[Open in Browser](https://love2d.org/wiki/RecordingDevice:getName) ---- ----@return string name # The name of the device. -function RecordingDevice:getName() end - ---- ----Gets the number of currently recorded samples. ---- ---- ----[Open in Browser](https://love2d.org/wiki/RecordingDevice:getSampleCount) ---- ----@return number samples # The number of samples that have been recorded so far. -function RecordingDevice:getSampleCount() end - ---- ----Gets the number of samples per second currently being recorded. ---- ---- ----[Open in Browser](https://love2d.org/wiki/RecordingDevice:getSampleRate) ---- ----@return number rate # The number of samples being recorded per second (sample rate). -function RecordingDevice:getSampleRate() end - ---- ----Gets whether the device is currently recording. ---- ---- ----[Open in Browser](https://love2d.org/wiki/RecordingDevice:isRecording) ---- ----@return boolean recording # True if the recording, false otherwise. -function RecordingDevice:isRecording() end - ---- ----Begins recording audio using this device. ---- ---- ----[Open in Browser](https://love2d.org/wiki/RecordingDevice:start) ---- ----@param samplecount number # The maximum number of samples to store in an internal ring buffer when recording. RecordingDevice:getData clears the internal buffer when called. ----@param samplerate? number # The number of samples per second to store when recording. ----@param bitdepth? number # The number of bits per sample. ----@param channels? number # Whether to record in mono or stereo. Most microphones don't support more than 1 channel. ----@return boolean success # True if the device successfully began recording using the specified parameters, false if not. -function RecordingDevice:start(samplecount, samplerate, bitdepth, channels) end - ---- ----Stops recording audio from this device. Any sound data currently in the device's buffer will be returned. ---- ---- ----[Open in Browser](https://love2d.org/wiki/RecordingDevice:stop) ---- ----@return love.SoundData data # The sound data currently in the device's buffer, or nil if the device wasn't recording. -function RecordingDevice:stop() end - ---- ----A Source represents audio you can play back. ---- ----You can do interesting things with Sources, like set the volume, pitch, and its position relative to the listener. Please note that positional audio only works for mono (i.e. non-stereo) sources. ---- ----The Source controls (play/pause/stop) act according to the following state table. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.audio) ---- ----@class love.Source: love.Object -local Source = {} - ---- ----Creates an identical copy of the Source in the stopped state. ---- ----Static Sources will use significantly less memory and take much less time to be created if Source:clone is used to create them instead of love.audio.newSource, so this method should be preferred when making multiple Sources which play the same sound. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:clone) ---- ----@return love.Source source # The new identical copy of this Source. -function Source:clone() end - ---- ----Gets a list of the Source's active effect names. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:getActiveEffects) ---- ----@return table effects # A list of the source's active effect names. -function Source:getActiveEffects() end - ---- ----Gets the amount of air absorption applied to the Source. ---- ----By default the value is set to 0 which means that air absorption effects are disabled. A value of 1 will apply high frequency attenuation to the Source at a rate of 0.05 dB per meter. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:getAirAbsorption) ---- ----@return number amount # The amount of air absorption applied to the Source. -function Source:getAirAbsorption() end - ---- ----Gets the reference and maximum attenuation distances of the Source. The values, combined with the current DistanceModel, affect how the Source's volume attenuates based on distance from the listener. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:getAttenuationDistances) ---- ----@return number ref # The current reference attenuation distance. If the current DistanceModel is clamped, this is the minimum distance before the Source is no longer attenuated. ----@return number max # The current maximum attenuation distance. -function Source:getAttenuationDistances() end - ---- ----Gets the number of channels in the Source. Only 1-channel (mono) Sources can use directional and positional effects. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:getChannelCount) ---- ----@return number channels # 1 for mono, 2 for stereo. -function Source:getChannelCount() end - ---- ----Gets the Source's directional volume cones. Together with Source:setDirection, the cone angles allow for the Source's volume to vary depending on its direction. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:getCone) ---- ----@return number innerAngle # The inner angle from the Source's direction, in radians. The Source will play at normal volume if the listener is inside the cone defined by this angle. ----@return number outerAngle # The outer angle from the Source's direction, in radians. The Source will play at a volume between the normal and outer volumes, if the listener is in between the cones defined by the inner and outer angles. ----@return number outerVolume # The Source's volume when the listener is outside both the inner and outer cone angles. -function Source:getCone() end - ---- ----Gets the direction of the Source. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:getDirection) ---- ----@return number x # The X part of the direction vector. ----@return number y # The Y part of the direction vector. ----@return number z # The Z part of the direction vector. -function Source:getDirection() end - ---- ----Gets the duration of the Source. For streaming Sources it may not always be sample-accurate, and may return -1 if the duration cannot be determined at all. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:getDuration) ---- ----@param unit? love.TimeUnit # The time unit for the return value. ----@return number duration # The duration of the Source, or -1 if it cannot be determined. -function Source:getDuration(unit) end - ---- ----Gets the filter settings associated to a specific effect. ---- ----This function returns nil if the effect was applied with no filter settings associated to it. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:getEffect) ---- ----@param name string # The name of the effect. ----@param filtersettings table # An optional empty table that will be filled with the filter settings. ----@return {volume: number, highgain: number, lowgain: number} filtersettings # The settings for the filter associated to this effect, or nil if the effect is not present in this Source or has no filter associated. The table has the following fields: -function Source:getEffect(name, filtersettings) end - ---- ----Gets the filter settings currently applied to the Source. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:getFilter) ---- ----@return {type: love.FilterType, volume: number, highgain: number, lowgain: number} settings # The filter settings to use for this Source, or nil if the Source has no active filter. The table has the following fields: -function Source:getFilter() end - ---- ----Gets the number of free buffer slots in a queueable Source. If the queueable Source is playing, this value will increase up to the amount the Source was created with. If the queueable Source is stopped, it will process all of its internal buffers first, in which case this function will always return the amount it was created with. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:getFreeBufferCount) ---- ----@return number buffers # How many more SoundData objects can be queued up. -function Source:getFreeBufferCount() end - ---- ----Gets the current pitch of the Source. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:getPitch) ---- ----@return number pitch # The pitch, where 1.0 is normal. -function Source:getPitch() end - ---- ----Gets the position of the Source. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:getPosition) ---- ----@return number x # The X position of the Source. ----@return number y # The Y position of the Source. ----@return number z # The Z position of the Source. -function Source:getPosition() end - ---- ----Returns the rolloff factor of the source. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:getRolloff) ---- ----@return number rolloff # The rolloff factor. -function Source:getRolloff() end - ---- ----Gets the type of the Source. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:getType) ---- ----@return love.SourceType sourcetype # The type of the source. -function Source:getType() end - ---- ----Gets the velocity of the Source. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:getVelocity) ---- ----@return number x # The X part of the velocity vector. ----@return number y # The Y part of the velocity vector. ----@return number z # The Z part of the velocity vector. -function Source:getVelocity() end - ---- ----Gets the current volume of the Source. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:getVolume) ---- ----@return number volume # The volume of the Source, where 1.0 is normal volume. -function Source:getVolume() end - ---- ----Returns the volume limits of the source. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:getVolumeLimits) ---- ----@return number min # The minimum volume. ----@return number max # The maximum volume. -function Source:getVolumeLimits() end - ---- ----Returns whether the Source will loop. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:isLooping) ---- ----@return boolean loop # True if the Source will loop, false otherwise. -function Source:isLooping() end - ---- ----Returns whether the Source is playing. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:isPlaying) ---- ----@return boolean playing # True if the Source is playing, false otherwise. -function Source:isPlaying() end - ---- ----Gets whether the Source's position, velocity, direction, and cone angles are relative to the listener. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:isRelative) ---- ----@return boolean relative # True if the position, velocity, direction and cone angles are relative to the listener, false if they're absolute. -function Source:isRelative() end - ---- ----Pauses the Source. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:pause) ---- -function Source:pause() end - ---- ----Starts playing the Source. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:play) ---- ----@return boolean success # Whether the Source was able to successfully start playing. -function Source:play() end - ---- ----Queues SoundData for playback in a queueable Source. ---- ----This method requires the Source to be created via love.audio.newQueueableSource. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:queue) ---- ----@param sounddata love.SoundData # The data to queue. The SoundData's sample rate, bit depth, and channel count must match the Source's. ----@return boolean success # True if the data was successfully queued for playback, false if there were no available buffers to use for queueing. -function Source:queue(sounddata) end - ---- ----Sets the currently playing position of the Source. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:seek) ---- ----@param offset number # The position to seek to. ----@param unit? love.TimeUnit # The unit of the position value. -function Source:seek(offset, unit) end - ---- ----Sets the amount of air absorption applied to the Source. ---- ----By default the value is set to 0 which means that air absorption effects are disabled. A value of 1 will apply high frequency attenuation to the Source at a rate of 0.05 dB per meter. ---- ----Air absorption can simulate sound transmission through foggy air, dry air, smoky atmosphere, etc. It can be used to simulate different atmospheric conditions within different locations in an area. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:setAirAbsorption) ---- ----@param amount number # The amount of air absorption applied to the Source. Must be between 0 and 10. -function Source:setAirAbsorption(amount) end - ---- ----Sets the reference and maximum attenuation distances of the Source. The parameters, combined with the current DistanceModel, affect how the Source's volume attenuates based on distance. ---- ----Distance attenuation is only applicable to Sources based on mono (rather than stereo) audio. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:setAttenuationDistances) ---- ----@param ref number # The new reference attenuation distance. If the current DistanceModel is clamped, this is the minimum attenuation distance. ----@param max number # The new maximum attenuation distance. -function Source:setAttenuationDistances(ref, max) end - ---- ----Sets the Source's directional volume cones. Together with Source:setDirection, the cone angles allow for the Source's volume to vary depending on its direction. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:setCone) ---- ----@param innerAngle number # The inner angle from the Source's direction, in radians. The Source will play at normal volume if the listener is inside the cone defined by this angle. ----@param outerAngle number # The outer angle from the Source's direction, in radians. The Source will play at a volume between the normal and outer volumes, if the listener is in between the cones defined by the inner and outer angles. ----@param outerVolume? number # The Source's volume when the listener is outside both the inner and outer cone angles. -function Source:setCone(innerAngle, outerAngle, outerVolume) end - ---- ----Sets the direction vector of the Source. A zero vector makes the source non-directional. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:setDirection) ---- ----@param x number # The X part of the direction vector. ----@param y number # The Y part of the direction vector. ----@param z number # The Z part of the direction vector. -function Source:setDirection(x, y, z) end - ---- ----Applies an audio effect to the Source. ---- ----The effect must have been previously defined using love.audio.setEffect. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:setEffect) ---- ----@overload fun(self: love.Source, name: string, filtersettings: table):boolean ----@param name string # The name of the effect previously set up with love.audio.setEffect. ----@param enable? boolean # If false and the given effect name was previously enabled on this Source, disables the effect. ----@return boolean success # Whether the effect was successfully applied to this Source. -function Source:setEffect(name, enable) end - ---- ----Sets a low-pass, high-pass, or band-pass filter to apply when playing the Source. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:setFilter) ---- ----@overload fun(self: love.Source) ----@param settings {type: love.FilterType, volume: number, highgain: number, lowgain: number} # The filter settings to use for this Source, with the following fields: ----@return boolean success # Whether the filter was successfully applied to the Source. -function Source:setFilter(settings) end - ---- ----Sets whether the Source should loop. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:setLooping) ---- ----@param loop boolean # True if the source should loop, false otherwise. -function Source:setLooping(loop) end - ---- ----Sets the pitch of the Source. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:setPitch) ---- ----@param pitch number # Calculated with regard to 1 being the base pitch. Each reduction by 50 percent equals a pitch shift of -12 semitones (one octave reduction). Each doubling equals a pitch shift of 12 semitones (one octave increase). Zero is not a legal value. -function Source:setPitch(pitch) end - ---- ----Sets the position of the Source. Please note that this only works for mono (i.e. non-stereo) sound files! ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:setPosition) ---- ----@param x number # The X position of the Source. ----@param y number # The Y position of the Source. ----@param z number # The Z position of the Source. -function Source:setPosition(x, y, z) end - ---- ----Sets whether the Source's position, velocity, direction, and cone angles are relative to the listener, or absolute. ---- ----By default, all sources are absolute and therefore relative to the origin of love's coordinate system 0, 0. Only absolute sources are affected by the position of the listener. Please note that positional audio only works for mono (i.e. non-stereo) sources. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:setRelative) ---- ----@param enable? boolean # True to make the position, velocity, direction and cone angles relative to the listener, false to make them absolute. -function Source:setRelative(enable) end - ---- ----Sets the rolloff factor which affects the strength of the used distance attenuation. ---- ----Extended information and detailed formulas can be found in the chapter '3.4. Attenuation By Distance' of OpenAL 1.1 specification. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:setRolloff) ---- ----@param rolloff number # The new rolloff factor. -function Source:setRolloff(rolloff) end - ---- ----Sets the velocity of the Source. ---- ----This does '''not''' change the position of the Source, but lets the application know how it has to calculate the doppler effect. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:setVelocity) ---- ----@param x number # The X part of the velocity vector. ----@param y number # The Y part of the velocity vector. ----@param z number # The Z part of the velocity vector. -function Source:setVelocity(x, y, z) end - ---- ----Sets the current volume of the Source. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:setVolume) ---- ----@param volume number # The volume for a Source, where 1.0 is normal volume. Volume cannot be raised above 1.0. -function Source:setVolume(volume) end - ---- ----Sets the volume limits of the source. The limits have to be numbers from 0 to 1. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:setVolumeLimits) ---- ----@param min number # The minimum volume. ----@param max number # The maximum volume. -function Source:setVolumeLimits(min, max) end - ---- ----Stops a Source. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:stop) ---- -function Source:stop() end - ---- ----Gets the currently playing position of the Source. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Source:tell) ---- ----@param unit? love.TimeUnit # The type of unit for the return value. ----@return number position # The currently playing position of the Source. -function Source:tell(unit) end - ---- ----The different distance models. ---- ----Extended information can be found in the chapter "3.4. Attenuation By Distance" of the OpenAL 1.1 specification. ---- ---- ----[Open in Browser](https://love2d.org/wiki/DistanceModel) ---- ----@alias love.DistanceModel ---- ----Sources do not get attenuated. ---- ----| "none" ---- ----Inverse distance attenuation. ---- ----| "inverse" ---- ----Inverse distance attenuation. Gain is clamped. In version 0.9.2 and older this is named '''inverse clamped'''. ---- ----| "inverseclamped" ---- ----Linear attenuation. ---- ----| "linear" ---- ----Linear attenuation. Gain is clamped. In version 0.9.2 and older this is named '''linear clamped'''. ---- ----| "linearclamped" ---- ----Exponential attenuation. ---- ----| "exponent" ---- ----Exponential attenuation. Gain is clamped. In version 0.9.2 and older this is named '''exponent clamped'''. ---- ----| "exponentclamped" - ---- ----The different types of effects supported by love.audio.setEffect. ---- ---- ----[Open in Browser](https://love2d.org/wiki/EffectType) ---- ----@alias love.EffectType ---- ----Plays multiple copies of the sound with slight pitch and time variation. Used to make sounds sound "fuller" or "thicker". ---- ----| "chorus" ---- ----Decreases the dynamic range of the sound, making the loud and quiet parts closer in volume, producing a more uniform amplitude throughout time. ---- ----| "compressor" ---- ----Alters the sound by amplifying it until it clips, shearing off parts of the signal, leading to a compressed and distorted sound. ---- ----| "distortion" ---- ----Decaying feedback based effect, on the order of seconds. Also known as delay; causes the sound to repeat at regular intervals at a decreasing volume. ---- ----| "echo" ---- ----Adjust the frequency components of the sound using a 4-band (low-shelf, two band-pass and a high-shelf) equalizer. ---- ----| "equalizer" ---- ----Plays two copies of the sound; while varying the phase, or equivalently delaying one of them, by amounts on the order of milliseconds, resulting in phasing sounds. ---- ----| "flanger" ---- ----Decaying feedback based effect, on the order of milliseconds. Used to simulate the reflection off of the surroundings. ---- ----| "reverb" ---- ----An implementation of amplitude modulation; multiplies the source signal with a simple waveform, to produce either volume changes, or inharmonic overtones. ---- ----| "ringmodulator" - ---- ----The different types of waveforms that can be used with the '''ringmodulator''' EffectType. ---- ---- ----[Open in Browser](https://love2d.org/wiki/EffectWaveform) ---- ----@alias love.EffectWaveform ---- ----A sawtooth wave, also known as a ramp wave. Named for its linear rise, and (near-)instantaneous fall along time. ---- ----| "sawtooth" ---- ----A sine wave. Follows a trigonometric sine function. ---- ----| "sine" ---- ----A square wave. Switches between high and low states (near-)instantaneously. ---- ----| "square" ---- ----A triangle wave. Follows a linear rise and fall that repeats periodically. ---- ----| "triangle" - ---- ----Types of filters for Sources. ---- ---- ----[Open in Browser](https://love2d.org/wiki/FilterType) ---- ----@alias love.FilterType ---- ----Low-pass filter. High frequency sounds are attenuated. ---- ----| "lowpass" ---- ----High-pass filter. Low frequency sounds are attenuated. ---- ----| "highpass" ---- ----Band-pass filter. Both high and low frequency sounds are attenuated based on the given parameters. ---- ----| "bandpass" - ---- ----Types of audio sources. ---- ----A good rule of thumb is to use stream for music files and static for all short sound effects. Basically, you want to avoid loading large files into memory at once. ---- ---- ----[Open in Browser](https://love2d.org/wiki/SourceType) ---- ----@alias love.SourceType ---- ----The whole audio is decoded. ---- ----| "static" ---- ----The audio is decoded in chunks when needed. ---- ----| "stream" ---- ----The audio must be manually queued by the user. ---- ----| "queue" - ---- ----Units that represent time. ---- ---- ----[Open in Browser](https://love2d.org/wiki/TimeUnit) ---- ----@alias love.TimeUnit ---- ----Regular seconds. ---- ----| "seconds" ---- ----Audio samples. ---- ----| "samples" diff --git a/meta/3rd/love2d/library/love/data.lua b/meta/3rd/love2d/library/love/data.lua deleted file mode 100644 index 55116570..00000000 --- a/meta/3rd/love2d/library/love/data.lua +++ /dev/null @@ -1,264 +0,0 @@ ----@meta - ---- ----Provides functionality for creating and transforming data. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.data) ---- ----@class love.data -love.data = {} - ---- ----Compresses a string or data using a specific compression algorithm. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.data.compress) ---- ----@overload fun(container: love.ContainerType, format: love.CompressedDataFormat, data: love.Data, level?: number):love.CompressedData|string ----@param container love.ContainerType # What type to return the compressed data as. ----@param format love.CompressedDataFormat # The format to use when compressing the string. ----@param rawstring string # The raw (un-compressed) string to compress. ----@param level? number # The level of compression to use, between 0 and 9. -1 indicates the default level. The meaning of this argument depends on the compression format being used. ----@return love.CompressedData|string compressedData # CompressedData/string which contains the compressed version of rawstring. -function love.data.compress(container, format, rawstring, level) end - ---- ----Decode Data or a string from any of the EncodeFormats to Data or string. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.data.decode) ---- ----@overload fun(container: love.ContainerType, format: love.EncodeFormat, sourceData: love.Data):love.ByteData|string ----@param container love.ContainerType # What type to return the decoded data as. ----@param format love.EncodeFormat # The format of the input data. ----@param sourceString string # The raw (encoded) data to decode. ----@return love.ByteData|string decoded # ByteData/string which contains the decoded version of source. -function love.data.decode(container, format, sourceString) end - ---- ----Decompresses a CompressedData or previously compressed string or Data object. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.data.decompress) ---- ----@overload fun(container: love.ContainerType, format: love.CompressedDataFormat, compressedString: string):love.Data|string ----@overload fun(container: love.ContainerType, format: love.CompressedDataFormat, data: love.Data):love.Data|string ----@param container love.ContainerType # What type to return the decompressed data as. ----@param compressedData love.CompressedData # The compressed data to decompress. ----@return love.Data|string decompressedData # Data/string containing the raw decompressed data. -function love.data.decompress(container, compressedData) end - ---- ----Encode Data or a string to a Data or string in one of the EncodeFormats. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.data.encode) ---- ----@overload fun(container: love.ContainerType, format: love.EncodeFormat, sourceData: love.Data, linelength?: number):love.ByteData|string ----@param container love.ContainerType # What type to return the encoded data as. ----@param format love.EncodeFormat # The format of the output data. ----@param sourceString string # The raw data to encode. ----@param linelength? number # The maximum line length of the output. Only supported for base64, ignored if 0. ----@return love.ByteData|string encoded # ByteData/string which contains the encoded version of source. -function love.data.encode(container, format, sourceString, linelength) end - ---- ----Gets the size in bytes that a given format used with love.data.pack will use. ---- ----This function behaves the same as Lua 5.3's string.packsize. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.data.getPackedSize) ---- ----@param format string # A string determining how the values are packed. Follows the rules of Lua 5.3's string.pack format strings. ----@return number size # The size in bytes that the packed data will use. -function love.data.getPackedSize(format) end - ---- ----Compute the message digest of a string using a specified hash algorithm. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.data.hash) ---- ----@overload fun(hashFunction: love.HashFunction, data: love.Data):string ----@param hashFunction love.HashFunction # Hash algorithm to use. ----@param string string # String to hash. ----@return string rawdigest # Raw message digest string. -function love.data.hash(hashFunction, string) end - ---- ----Creates a new Data object containing arbitrary bytes. ---- ----Data:getPointer along with LuaJIT's FFI can be used to manipulate the contents of the ByteData object after it has been created. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.data.newByteData) ---- ----@overload fun(Data: love.Data, offset?: number, size?: number):love.ByteData ----@overload fun(size: number):love.ByteData ----@param datastring string # The byte string to copy. ----@return love.ByteData bytedata # The new Data object. -function love.data.newByteData(datastring) end - ---- ----Creates a new Data referencing a subsection of an existing Data object. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.data.newDataView) ---- ----@param data love.Data # The Data object to reference. ----@param offset number # The offset of the subsection to reference, in bytes. ----@param size number # The size in bytes of the subsection to reference. ----@return love.Data view # The new Data view. -function love.data.newDataView(data, offset, size) end - ---- ----Packs (serializes) simple Lua values. ---- ----This function behaves the same as Lua 5.3's string.pack. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.data.pack) ---- ----@param container love.ContainerType # What type to return the encoded data as. ----@param format string # A string determining how the values are packed. Follows the rules of Lua 5.3's string.pack format strings. ----@param v1 number|boolean|string # The first value (number, boolean, or string) to serialize. ----@vararg number|boolean|string # Additional values to serialize. ----@return love.Data|string data # Data/string which contains the serialized data. -function love.data.pack(container, format, v1, ...) end - ---- ----Unpacks (deserializes) a byte-string or Data into simple Lua values. ---- ----This function behaves the same as Lua 5.3's string.unpack. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.data.unpack) ---- ----@overload fun(format: string, data: love.Data, pos?: number):number|boolean|string, number|boolean|string, number ----@param format string # A string determining how the values were packed. Follows the rules of Lua 5.3's string.pack format strings. ----@param datastring string # A string containing the packed (serialized) data. ----@param pos? number # Where to start reading in the string. Negative values can be used to read relative from the end of the string. ----@return number|boolean|string v1 # The first value (number, boolean, or string) that was unpacked. ----@return number index # The index of the first unread byte in the data string. -function love.data.unpack(format, datastring, pos) end - ---- ----Data object containing arbitrary bytes in an contiguous memory. ---- ----There are currently no LÖVE functions provided for manipulating the contents of a ByteData, but Data:getPointer can be used with LuaJIT's FFI to access and write to the contents directly. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.data) ---- ----@class love.ByteData: love.Object, love.Data -local ByteData = {} - ---- ----Represents byte data compressed using a specific algorithm. ---- ----love.data.decompress can be used to de-compress the data (or love.math.decompress in 0.10.2 or earlier). ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.data) ---- ----@class love.CompressedData: love.Data, love.Object -local CompressedData = {} - ---- ----Gets the compression format of the CompressedData. ---- ---- ----[Open in Browser](https://love2d.org/wiki/CompressedData:getFormat) ---- ----@return love.CompressedDataFormat format # The format of the CompressedData. -function CompressedData:getFormat() end - ---- ----Compressed data formats. ---- ---- ----[Open in Browser](https://love2d.org/wiki/CompressedDataFormat) ---- ----@alias love.CompressedDataFormat ---- ----The LZ4 compression format. Compresses and decompresses very quickly, but the compression ratio is not the best. LZ4-HC is used when compression level 9 is specified. Some benchmarks are available here. ---- ----| "lz4" ---- ----The zlib format is DEFLATE-compressed data with a small bit of header data. Compresses relatively slowly and decompresses moderately quickly, and has a decent compression ratio. ---- ----| "zlib" ---- ----The gzip format is DEFLATE-compressed data with a slightly larger header than zlib. Since it uses DEFLATE it has the same compression characteristics as the zlib format. ---- ----| "gzip" ---- ----Raw DEFLATE-compressed data (no header). ---- ----| "deflate" - ---- ----Return type of various data-returning functions. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ContainerType) ---- ----@alias love.ContainerType ---- ----Return type is ByteData. ---- ----| "data" ---- ----Return type is string. ---- ----| "string" - ---- ----Encoding format used to encode or decode data. ---- ---- ----[Open in Browser](https://love2d.org/wiki/EncodeFormat) ---- ----@alias love.EncodeFormat ---- ----Encode/decode data as base64 binary-to-text encoding. ---- ----| "base64" ---- ----Encode/decode data as hexadecimal string. ---- ----| "hex" - ---- ----Hash algorithm of love.data.hash. ---- ---- ----[Open in Browser](https://love2d.org/wiki/HashFunction) ---- ----@alias love.HashFunction ---- ----MD5 hash algorithm (16 bytes). ---- ----| "md5" ---- ----SHA1 hash algorithm (20 bytes). ---- ----| "sha1" ---- ----SHA2 hash algorithm with message digest size of 224 bits (28 bytes). ---- ----| "sha224" ---- ----SHA2 hash algorithm with message digest size of 256 bits (32 bytes). ---- ----| "sha256" ---- ----SHA2 hash algorithm with message digest size of 384 bits (48 bytes). ---- ----| "sha384" ---- ----SHA2 hash algorithm with message digest size of 512 bits (64 bytes). ---- ----| "sha512" diff --git a/meta/3rd/love2d/library/love/event.lua b/meta/3rd/love2d/library/love/event.lua deleted file mode 100644 index 0b61f250..00000000 --- a/meta/3rd/love2d/library/love/event.lua +++ /dev/null @@ -1,244 +0,0 @@ ----@meta - ---- ----Manages events, like keypresses. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.event) ---- ----@class love.event -love.event = {} - ---- ----Clears the event queue. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.event.clear) ---- -function love.event.clear() end - ---- ----Returns an iterator for messages in the event queue. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.event.poll) ---- ----@return function i # Iterator function usable in a for loop. -function love.event.poll() end - ---- ----Pump events into the event queue. ---- ----This is a low-level function, and is usually not called by the user, but by love.run. ---- ----Note that this does need to be called for any OS to think you're still running, ---- ----and if you want to handle OS-generated events at all (think callbacks). ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.event.pump) ---- -function love.event.pump() end - ---- ----Adds an event to the event queue. ---- ----From 0.10.0 onwards, you may pass an arbitrary amount of arguments with this function, though the default callbacks don't ever use more than six. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.event.push) ---- ----@param n love.Event # The name of the event. ----@param a? any # First event argument. ----@param b? any # Second event argument. ----@param c? any # Third event argument. ----@param d? any # Fourth event argument. ----@param e? any # Fifth event argument. ----@param f? any # Sixth event argument. ----@vararg any # Further event arguments may follow. -function love.event.push(n, a, b, c, d, e, f, ...) end - ---- ----Adds the quit event to the queue. ---- ----The quit event is a signal for the event handler to close LÖVE. It's possible to abort the exit process with the love.quit callback. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.event.quit) ---- ----@overload fun(restart: string|'restart') ----@param exitstatus? number # The program exit status to use when closing the application. -function love.event.quit(exitstatus) end - ---- ----Like love.event.poll(), but blocks until there is an event in the queue. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.event.wait) ---- ----@return love.Event n # The name of event. ----@return any a # First event argument. ----@return any b # Second event argument. ----@return any c # Third event argument. ----@return any d # Fourth event argument. ----@return any e # Fifth event argument. ----@return any f # Sixth event argument. -function love.event.wait() end - ---- ----Arguments to love.event.push() and the like. ---- ----Since 0.8.0, event names are no longer abbreviated. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Event) ---- ----@alias love.Event ---- ----Window focus gained or lost ---- ----| "focus" ---- ----Joystick pressed ---- ----| "joystickpressed" ---- ----Joystick released ---- ----| "joystickreleased" ---- ----Key pressed ---- ----| "keypressed" ---- ----Key released ---- ----| "keyreleased" ---- ----Mouse pressed ---- ----| "mousepressed" ---- ----Mouse released ---- ----| "mousereleased" ---- ----Quit ---- ----| "quit" ---- ----Window size changed by the user ---- ----| "resize" ---- ----Window is minimized or un-minimized by the user ---- ----| "visible" ---- ----Window mouse focus gained or lost ---- ----| "mousefocus" ---- ----A Lua error has occurred in a thread ---- ----| "threaderror" ---- ----Joystick connected ---- ----| "joystickadded" ---- ----Joystick disconnected ---- ----| "joystickremoved" ---- ----Joystick axis motion ---- ----| "joystickaxis" ---- ----Joystick hat pressed ---- ----| "joystickhat" ---- ----Joystick's virtual gamepad button pressed ---- ----| "gamepadpressed" ---- ----Joystick's virtual gamepad button released ---- ----| "gamepadreleased" ---- ----Joystick's virtual gamepad axis moved ---- ----| "gamepadaxis" ---- ----User entered text ---- ----| "textinput" ---- ----Mouse position changed ---- ----| "mousemoved" ---- ----Running out of memory on mobile devices system ---- ----| "lowmemory" ---- ----Candidate text for an IME changed ---- ----| "textedited" ---- ----Mouse wheel moved ---- ----| "wheelmoved" ---- ----Touch screen touched ---- ----| "touchpressed" ---- ----Touch screen stop touching ---- ----| "touchreleased" ---- ----Touch press moved inside touch screen ---- ----| "touchmoved" ---- ----Directory is dragged and dropped onto the window ---- ----| "directorydropped" ---- ----File is dragged and dropped onto the window. ---- ----| "filedropped" ---- ----Joystick pressed ---- ----| "jp" ---- ----Joystick released ---- ----| "jr" ---- ----Key pressed ---- ----| "kp" ---- ----Key released ---- ----| "kr" ---- ----Mouse pressed ---- ----| "mp" ---- ----Mouse released ---- ----| "mr" ---- ----Quit ---- ----| "q" ---- ----Window focus gained or lost ---- ----| "f" diff --git a/meta/3rd/love2d/library/love/filesystem.lua b/meta/3rd/love2d/library/love/filesystem.lua deleted file mode 100644 index 093f3322..00000000 --- a/meta/3rd/love2d/library/love/filesystem.lua +++ /dev/null @@ -1,653 +0,0 @@ ----@meta - ---- ----Provides an interface to the user's filesystem. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.filesystem) ---- ----@class love.filesystem -love.filesystem = {} - ---- ----Append data to an existing file. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.filesystem.append) ---- ----@overload fun(name: string, data: love.Data, size?: number):boolean, string ----@param name string # The name (and path) of the file. ----@param data string # The string data to append to the file. ----@param size? number # How many bytes to write. ----@return boolean success # True if the operation was successful, or nil if there was an error. ----@return string errormsg # The error message on failure. -function love.filesystem.append(name, data, size) end - ---- ----Gets whether love.filesystem follows symbolic links. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.filesystem.areSymlinksEnabled) ---- ----@return boolean enable # Whether love.filesystem follows symbolic links. -function love.filesystem.areSymlinksEnabled() end - ---- ----Recursively creates a directory. ---- ----When called with 'a/b' it creates both 'a' and 'a/b', if they don't exist already. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.filesystem.createDirectory) ---- ----@param name string # The directory to create. ----@return boolean success # True if the directory was created, false if not. -function love.filesystem.createDirectory(name) end - ---- ----Returns the application data directory (could be the same as getUserDirectory) ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.filesystem.getAppdataDirectory) ---- ----@return string path # The path of the application data directory -function love.filesystem.getAppdataDirectory() end - ---- ----Gets the filesystem paths that will be searched for c libraries when require is called. ---- ----The paths string returned by this function is a sequence of path templates separated by semicolons. The argument passed to ''require'' will be inserted in place of any question mark ('?') character in each template (after the dot characters in the argument passed to ''require'' are replaced by directory separators.) Additionally, any occurrence of a double question mark ('??') will be replaced by the name passed to require and the default library extension for the platform. ---- ----The paths are relative to the game's source and save directories, as well as any paths mounted with love.filesystem.mount. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.filesystem.getCRequirePath) ---- ----@return string paths # The paths that the ''require'' function will check for c libraries in love's filesystem. -function love.filesystem.getCRequirePath() end - ---- ----Returns a table with the names of files and subdirectories in the specified path. The table is not sorted in any way; the order is undefined. ---- ----If the path passed to the function exists in the game and the save directory, it will list the files and directories from both places. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.filesystem.getDirectoryItems) ---- ----@overload fun(dir: string, callback: function):table ----@param dir string # The directory. ----@return table files # A sequence with the names of all files and subdirectories as strings. -function love.filesystem.getDirectoryItems(dir) end - ---- ----Gets the write directory name for your game. ---- ----Note that this only returns the name of the folder to store your files in, not the full path. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.filesystem.getIdentity) ---- ----@return string name # The identity that is used as write directory. -function love.filesystem.getIdentity() end - ---- ----Gets information about the specified file or directory. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.filesystem.getInfo) ---- ----@overload fun(path: string, info: table):table ----@overload fun(path: string, filtertype: love.FileType, info: table):table ----@param path string # The file or directory path to check. ----@param filtertype? love.FileType # If supplied, this parameter causes getInfo to only return the info table if the item at the given path matches the specified file type. ----@return {type: love.FileType, size: number, modtime: number} info # A table containing information about the specified path, or nil if nothing exists at the path. The table contains the following fields: -function love.filesystem.getInfo(path, filtertype) end - ---- ----Gets the platform-specific absolute path of the directory containing a filepath. ---- ----This can be used to determine whether a file is inside the save directory or the game's source .love. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.filesystem.getRealDirectory) ---- ----@param filepath string # The filepath to get the directory of. ----@return string realdir # The platform-specific full path of the directory containing the filepath. -function love.filesystem.getRealDirectory(filepath) end - ---- ----Gets the filesystem paths that will be searched when require is called. ---- ----The paths string returned by this function is a sequence of path templates separated by semicolons. The argument passed to ''require'' will be inserted in place of any question mark ('?') character in each template (after the dot characters in the argument passed to ''require'' are replaced by directory separators.) ---- ----The paths are relative to the game's source and save directories, as well as any paths mounted with love.filesystem.mount. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.filesystem.getRequirePath) ---- ----@return string paths # The paths that the ''require'' function will check in love's filesystem. -function love.filesystem.getRequirePath() end - ---- ----Gets the full path to the designated save directory. ---- ----This can be useful if you want to use the standard io library (or something else) to ---- ----read or write in the save directory. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.filesystem.getSaveDirectory) ---- ----@return string dir # The absolute path to the save directory. -function love.filesystem.getSaveDirectory() end - ---- ----Returns the full path to the the .love file or directory. If the game is fused to the LÖVE executable, then the executable is returned. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.filesystem.getSource) ---- ----@return string path # The full platform-dependent path of the .love file or directory. -function love.filesystem.getSource() end - ---- ----Returns the full path to the directory containing the .love file. If the game is fused to the LÖVE executable, then the directory containing the executable is returned. ---- ----If love.filesystem.isFused is true, the path returned by this function can be passed to love.filesystem.mount, which will make the directory containing the main game (e.g. C:\Program Files\coolgame\) readable by love.filesystem. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.filesystem.getSourceBaseDirectory) ---- ----@return string path # The full platform-dependent path of the directory containing the .love file. -function love.filesystem.getSourceBaseDirectory() end - ---- ----Returns the path of the user's directory ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.filesystem.getUserDirectory) ---- ----@return string path # The path of the user's directory -function love.filesystem.getUserDirectory() end - ---- ----Gets the current working directory. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.filesystem.getWorkingDirectory) ---- ----@return string cwd # The current working directory. -function love.filesystem.getWorkingDirectory() end - ---- ----Initializes love.filesystem, will be called internally, so should not be used explicitly. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.filesystem.init) ---- ----@param appname string # The name of the application binary, typically love. -function love.filesystem.init(appname) end - ---- ----Gets whether the game is in fused mode or not. ---- ----If a game is in fused mode, its save directory will be directly in the Appdata directory instead of Appdata/LOVE/. The game will also be able to load C Lua dynamic libraries which are located in the save directory. ---- ----A game is in fused mode if the source .love has been fused to the executable (see Game Distribution), or if '--fused' has been given as a command-line argument when starting the game. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.filesystem.isFused) ---- ----@return boolean fused # True if the game is in fused mode, false otherwise. -function love.filesystem.isFused() end - ---- ----Iterate over the lines in a file. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.filesystem.lines) ---- ----@param name string # The name (and path) of the file ----@return function iterator # A function that iterates over all the lines in the file -function love.filesystem.lines(name) end - ---- ----Loads a Lua file (but does not run it). ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.filesystem.load) ---- ----@param name string # The name (and path) of the file. ----@return function chunk # The loaded chunk. ----@return string errormsg # The error message if file could not be opened. -function love.filesystem.load(name) end - ---- ----Mounts a zip file or folder in the game's save directory for reading. ---- ----It is also possible to mount love.filesystem.getSourceBaseDirectory if the game is in fused mode. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.filesystem.mount) ---- ----@overload fun(filedata: love.FileData, mountpoint: string, appendToPath?: boolean):boolean ----@overload fun(data: love.Data, archivename: string, mountpoint: string, appendToPath?: boolean):boolean ----@param archive string # The folder or zip file in the game's save directory to mount. ----@param mountpoint string # The new path the archive will be mounted to. ----@param appendToPath? boolean # Whether the archive will be searched when reading a filepath before or after already-mounted archives. This includes the game's source and save directories. ----@return boolean success # True if the archive was successfully mounted, false otherwise. -function love.filesystem.mount(archive, mountpoint, appendToPath) end - ---- ----Creates a new File object. ---- ----It needs to be opened before it can be accessed. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.filesystem.newFile) ---- ----@overload fun(filename: string, mode: love.FileMode):love.File, string ----@param filename string # The filename of the file. ----@return love.File file # The new File object. -function love.filesystem.newFile(filename) end - ---- ----Creates a new FileData object from a file on disk, or from a string in memory. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.filesystem.newFileData) ---- ----@overload fun(originaldata: love.Data, name: string):love.FileData ----@overload fun(filepath: string):love.FileData, string ----@param contents string # The contents of the file in memory represented as a string. ----@param name string # The name of the file. The extension may be parsed and used by LÖVE when passing the FileData object into love.audio.newSource. ----@return love.FileData data # The new FileData. -function love.filesystem.newFileData(contents, name) end - ---- ----Read the contents of a file. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.filesystem.read) ---- ----@overload fun(container: love.ContainerType, name: string, size?: number):love.FileData|string, number, nil, string ----@param name string # The name (and path) of the file. ----@param size? number # How many bytes to read. ----@return string contents # The file contents. ----@return number size # How many bytes have been read. ----@return nil contents # returns nil as content. ----@return string error # returns an error message. -function love.filesystem.read(name, size) end - ---- ----Removes a file or empty directory. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.filesystem.remove) ---- ----@param name string # The file or directory to remove. ----@return boolean success # True if the file/directory was removed, false otherwise. -function love.filesystem.remove(name) end - ---- ----Sets the filesystem paths that will be searched for c libraries when require is called. ---- ----The paths string returned by this function is a sequence of path templates separated by semicolons. The argument passed to ''require'' will be inserted in place of any question mark ('?') character in each template (after the dot characters in the argument passed to ''require'' are replaced by directory separators.) Additionally, any occurrence of a double question mark ('??') will be replaced by the name passed to require and the default library extension for the platform. ---- ----The paths are relative to the game's source and save directories, as well as any paths mounted with love.filesystem.mount. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.filesystem.setCRequirePath) ---- ----@param paths string # The paths that the ''require'' function will check in love's filesystem. -function love.filesystem.setCRequirePath(paths) end - ---- ----Sets the write directory for your game. ---- ----Note that you can only set the name of the folder to store your files in, not the location. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.filesystem.setIdentity) ---- ----@overload fun(name: string) ----@param name string # The new identity that will be used as write directory. -function love.filesystem.setIdentity(name) end - ---- ----Sets the filesystem paths that will be searched when require is called. ---- ----The paths string given to this function is a sequence of path templates separated by semicolons. The argument passed to ''require'' will be inserted in place of any question mark ('?') character in each template (after the dot characters in the argument passed to ''require'' are replaced by directory separators.) ---- ----The paths are relative to the game's source and save directories, as well as any paths mounted with love.filesystem.mount. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.filesystem.setRequirePath) ---- ----@param paths string # The paths that the ''require'' function will check in love's filesystem. -function love.filesystem.setRequirePath(paths) end - ---- ----Sets the source of the game, where the code is present. This function can only be called once, and is normally automatically done by LÖVE. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.filesystem.setSource) ---- ----@param path string # Absolute path to the game's source folder. -function love.filesystem.setSource(path) end - ---- ----Sets whether love.filesystem follows symbolic links. It is enabled by default in version 0.10.0 and newer, and disabled by default in 0.9.2. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.filesystem.setSymlinksEnabled) ---- ----@param enable boolean # Whether love.filesystem should follow symbolic links. -function love.filesystem.setSymlinksEnabled(enable) end - ---- ----Unmounts a zip file or folder previously mounted for reading with love.filesystem.mount. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.filesystem.unmount) ---- ----@param archive string # The folder or zip file in the game's save directory which is currently mounted. ----@return boolean success # True if the archive was successfully unmounted, false otherwise. -function love.filesystem.unmount(archive) end - ---- ----Write data to a file in the save directory. If the file existed already, it will be completely replaced by the new contents. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.filesystem.write) ---- ----@overload fun(name: string, data: love.Data, size?: number):boolean, string ----@param name string # The name (and path) of the file. ----@param data string # The string data to write to the file. ----@param size? number # How many bytes to write. ----@return boolean success # If the operation was successful. ----@return string message # Error message if operation was unsuccessful. -function love.filesystem.write(name, data, size) end - ---- ----Represents a file dropped onto the window. ---- ----Note that the DroppedFile type can only be obtained from love.filedropped callback, and can't be constructed manually by the user. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.filesystem) ---- ----@class love.DroppedFile: love.File, love.Object -local DroppedFile = {} - ---- ----Represents a file on the filesystem. A function that takes a file path can also take a File. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.filesystem) ---- ----@class love.File: love.Object -local File = {} - ---- ----Closes a File. ---- ---- ----[Open in Browser](https://love2d.org/wiki/File:close) ---- ----@return boolean success # Whether closing was successful. -function File:close() end - ---- ----Flushes any buffered written data in the file to the disk. ---- ---- ----[Open in Browser](https://love2d.org/wiki/File:flush) ---- ----@return boolean success # Whether the file successfully flushed any buffered data to the disk. ----@return string err # The error string, if an error occurred and the file could not be flushed. -function File:flush() end - ---- ----Gets the buffer mode of a file. ---- ---- ----[Open in Browser](https://love2d.org/wiki/File:getBuffer) ---- ----@return love.BufferMode mode # The current buffer mode of the file. ----@return number size # The maximum size in bytes of the file's buffer. -function File:getBuffer() end - ---- ----Gets the filename that the File object was created with. If the file object originated from the love.filedropped callback, the filename will be the full platform-dependent file path. ---- ---- ----[Open in Browser](https://love2d.org/wiki/File:getFilename) ---- ----@return string filename # The filename of the File. -function File:getFilename() end - ---- ----Gets the FileMode the file has been opened with. ---- ---- ----[Open in Browser](https://love2d.org/wiki/File:getMode) ---- ----@return love.FileMode mode # The mode this file has been opened with. -function File:getMode() end - ---- ----Returns the file size. ---- ---- ----[Open in Browser](https://love2d.org/wiki/File:getSize) ---- ----@return number size # The file size in bytes. -function File:getSize() end - ---- ----Gets whether end-of-file has been reached. ---- ---- ----[Open in Browser](https://love2d.org/wiki/File:isEOF) ---- ----@return boolean eof # Whether EOF has been reached. -function File:isEOF() end - ---- ----Gets whether the file is open. ---- ---- ----[Open in Browser](https://love2d.org/wiki/File:isOpen) ---- ----@return boolean open # True if the file is currently open, false otherwise. -function File:isOpen() end - ---- ----Iterate over all the lines in a file. ---- ---- ----[Open in Browser](https://love2d.org/wiki/File:lines) ---- ----@return function iterator # The iterator (can be used in for loops). -function File:lines() end - ---- ----Open the file for write, read or append. ---- ---- ----[Open in Browser](https://love2d.org/wiki/File:open) ---- ----@param mode love.FileMode # The mode to open the file in. ----@return boolean ok # True on success, false otherwise. ----@return string err # The error string if an error occurred. -function File:open(mode) end - ---- ----Read a number of bytes from a file. ---- ---- ----[Open in Browser](https://love2d.org/wiki/File:read) ---- ----@overload fun(self: love.File, container: love.ContainerType, bytes?: number):love.FileData|string, number ----@param bytes? number # The number of bytes to read. ----@return string contents # The contents of the read bytes. ----@return number size # How many bytes have been read. -function File:read(bytes) end - ---- ----Seek to a position in a file ---- ---- ----[Open in Browser](https://love2d.org/wiki/File:seek) ---- ----@param pos number # The position to seek to ----@return boolean success # Whether the operation was successful -function File:seek(pos) end - ---- ----Sets the buffer mode for a file opened for writing or appending. Files with buffering enabled will not write data to the disk until the buffer size limit is reached, depending on the buffer mode. ---- ----File:flush will force any buffered data to be written to the disk. ---- ---- ----[Open in Browser](https://love2d.org/wiki/File:setBuffer) ---- ----@param mode love.BufferMode # The buffer mode to use. ----@param size? number # The maximum size in bytes of the file's buffer. ----@return boolean success # Whether the buffer mode was successfully set. ----@return string errorstr # The error string, if the buffer mode could not be set and an error occurred. -function File:setBuffer(mode, size) end - ---- ----Returns the position in the file. ---- ---- ----[Open in Browser](https://love2d.org/wiki/File:tell) ---- ----@return number pos # The current position. -function File:tell() end - ---- ----Write data to a file. ---- ---- ----[Open in Browser](https://love2d.org/wiki/File:write) ---- ----@overload fun(self: love.File, data: love.Data, size?: number):boolean, string ----@param data string # The string data to write. ----@param size? number # How many bytes to write. ----@return boolean success # Whether the operation was successful. ----@return string err # The error string if an error occurred. -function File:write(data, size) end - ---- ----Data representing the contents of a file. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.filesystem) ---- ----@class love.FileData: love.Data, love.Object -local FileData = {} - ---- ----Gets the extension of the FileData. ---- ---- ----[Open in Browser](https://love2d.org/wiki/FileData:getExtension) ---- ----@return string ext # The extension of the file the FileData represents. -function FileData:getExtension() end - ---- ----Gets the filename of the FileData. ---- ---- ----[Open in Browser](https://love2d.org/wiki/FileData:getFilename) ---- ----@return string name # The name of the file the FileData represents. -function FileData:getFilename() end - ---- ----Buffer modes for File objects. ---- ---- ----[Open in Browser](https://love2d.org/wiki/BufferMode) ---- ----@alias love.BufferMode ---- ----No buffering. The result of write and append operations appears immediately. ---- ----| "none" ---- ----Line buffering. Write and append operations are buffered until a newline is output or the buffer size limit is reached. ---- ----| "line" ---- ----Full buffering. Write and append operations are always buffered until the buffer size limit is reached. ---- ----| "full" - ---- ----How to decode a given FileData. ---- ---- ----[Open in Browser](https://love2d.org/wiki/FileDecoder) ---- ----@alias love.FileDecoder ---- ----The data is unencoded. ---- ----| "file" ---- ----The data is base64-encoded. ---- ----| "base64" - ---- ----The different modes you can open a File in. ---- ---- ----[Open in Browser](https://love2d.org/wiki/FileMode) ---- ----@alias love.FileMode ---- ----Open a file for read. ---- ----| "r" ---- ----Open a file for write. ---- ----| "w" ---- ----Open a file for append. ---- ----| "a" ---- ----Do not open a file (represents a closed file.) ---- ----| "c" - ---- ----The type of a file. ---- ---- ----[Open in Browser](https://love2d.org/wiki/FileType) ---- ----@alias love.FileType ---- ----Regular file. ---- ----| "file" ---- ----Directory. ---- ----| "directory" ---- ----Symbolic link. ---- ----| "symlink" ---- ----Something completely different like a device. ---- ----| "other" diff --git a/meta/3rd/love2d/library/love/font.lua b/meta/3rd/love2d/library/love/font.lua deleted file mode 100644 index 53c36fb7..00000000 --- a/meta/3rd/love2d/library/love/font.lua +++ /dev/null @@ -1,281 +0,0 @@ ----@meta - ---- ----Allows you to work with fonts. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.font) ---- ----@class love.font -love.font = {} - ---- ----Creates a new BMFont Rasterizer. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.font.newBMFontRasterizer) ---- ----@overload fun(fileName: string, glyphs: string, dpiscale?: number):love.Rasterizer ----@param imageData love.ImageData # The image data containing the drawable pictures of font glyphs. ----@param glyphs string # The sequence of glyphs in the ImageData. ----@param dpiscale? number # DPI scale. ----@return love.Rasterizer rasterizer # The rasterizer. -function love.font.newBMFontRasterizer(imageData, glyphs, dpiscale) end - ---- ----Creates a new GlyphData. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.font.newGlyphData) ---- ----@param rasterizer love.Rasterizer # The Rasterizer containing the font. ----@param glyph number # The character code of the glyph. -function love.font.newGlyphData(rasterizer, glyph) end - ---- ----Creates a new Image Rasterizer. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.font.newImageRasterizer) ---- ----@param imageData love.ImageData # Font image data. ----@param glyphs string # String containing font glyphs. ----@param extraSpacing? number # Font extra spacing. ----@param dpiscale? number # Font DPI scale. ----@return love.Rasterizer rasterizer # The rasterizer. -function love.font.newImageRasterizer(imageData, glyphs, extraSpacing, dpiscale) end - ---- ----Creates a new Rasterizer. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.font.newRasterizer) ---- ----@overload fun(data: love.FileData):love.Rasterizer ----@overload fun(size?: number, hinting?: love.HintingMode, dpiscale?: number):love.Rasterizer ----@overload fun(fileName: string, size?: number, hinting?: love.HintingMode, dpiscale?: number):love.Rasterizer ----@overload fun(fileData: love.FileData, size?: number, hinting?: love.HintingMode, dpiscale?: number):love.Rasterizer ----@overload fun(imageData: love.ImageData, glyphs: string, dpiscale?: number):love.Rasterizer ----@overload fun(fileName: string, glyphs: string, dpiscale?: number):love.Rasterizer ----@param filename string # The font file. ----@return love.Rasterizer rasterizer # The rasterizer. -function love.font.newRasterizer(filename) end - ---- ----Creates a new TrueType Rasterizer. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.font.newTrueTypeRasterizer) ---- ----@overload fun(fileName: string, size?: number, hinting?: love.HintingMode, dpiscale?: number):love.Rasterizer ----@overload fun(fileData: love.FileData, size?: number, hinting?: love.HintingMode, dpiscale?: number):love.Rasterizer ----@param size? number # The font size. ----@param hinting? love.HintingMode # True Type hinting mode. ----@param dpiscale? number # The font DPI scale. ----@return love.Rasterizer rasterizer # The rasterizer. -function love.font.newTrueTypeRasterizer(size, hinting, dpiscale) end - ---- ----A GlyphData represents a drawable symbol of a font Rasterizer. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.font) ---- ----@class love.GlyphData: love.Data, love.Object -local GlyphData = {} - ---- ----Gets glyph advance. ---- ---- ----[Open in Browser](https://love2d.org/wiki/GlyphData:getAdvance) ---- ----@return number advance # Glyph advance. -function GlyphData:getAdvance() end - ---- ----Gets glyph bearing. ---- ---- ----[Open in Browser](https://love2d.org/wiki/GlyphData:getBearing) ---- ----@return number bx # Glyph bearing X. ----@return number by # Glyph bearing Y. -function GlyphData:getBearing() end - ---- ----Gets glyph bounding box. ---- ---- ----[Open in Browser](https://love2d.org/wiki/GlyphData:getBoundingBox) ---- ----@return number x # Glyph position x. ----@return number y # Glyph position y. ----@return number width # Glyph width. ----@return number height # Glyph height. -function GlyphData:getBoundingBox() end - ---- ----Gets glyph dimensions. ---- ---- ----[Open in Browser](https://love2d.org/wiki/GlyphData:getDimensions) ---- ----@return number width # Glyph width. ----@return number height # Glyph height. -function GlyphData:getDimensions() end - ---- ----Gets glyph pixel format. ---- ---- ----[Open in Browser](https://love2d.org/wiki/GlyphData:getFormat) ---- ----@return love.PixelFormat format # Glyph pixel format. -function GlyphData:getFormat() end - ---- ----Gets glyph number. ---- ---- ----[Open in Browser](https://love2d.org/wiki/GlyphData:getGlyph) ---- ----@return number glyph # Glyph number. -function GlyphData:getGlyph() end - ---- ----Gets glyph string. ---- ---- ----[Open in Browser](https://love2d.org/wiki/GlyphData:getGlyphString) ---- ----@return string glyph # Glyph string. -function GlyphData:getGlyphString() end - ---- ----Gets glyph height. ---- ---- ----[Open in Browser](https://love2d.org/wiki/GlyphData:getHeight) ---- ----@return number height # Glyph height. -function GlyphData:getHeight() end - ---- ----Gets glyph width. ---- ---- ----[Open in Browser](https://love2d.org/wiki/GlyphData:getWidth) ---- ----@return number width # Glyph width. -function GlyphData:getWidth() end - ---- ----A Rasterizer handles font rendering, containing the font data (image or TrueType font) and drawable glyphs. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.font) ---- ----@class love.Rasterizer: love.Object -local Rasterizer = {} - ---- ----Gets font advance. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Rasterizer:getAdvance) ---- ----@return number advance # Font advance. -function Rasterizer:getAdvance() end - ---- ----Gets ascent height. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Rasterizer:getAscent) ---- ----@return number height # Ascent height. -function Rasterizer:getAscent() end - ---- ----Gets descent height. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Rasterizer:getDescent) ---- ----@return number height # Descent height. -function Rasterizer:getDescent() end - ---- ----Gets number of glyphs in font. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Rasterizer:getGlyphCount) ---- ----@return number count # Glyphs count. -function Rasterizer:getGlyphCount() end - ---- ----Gets glyph data of a specified glyph. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Rasterizer:getGlyphData) ---- ----@overload fun(self: love.Rasterizer, glyphNumber: number):love.GlyphData ----@param glyph string # Glyph ----@return love.GlyphData glyphData # Glyph data -function Rasterizer:getGlyphData(glyph) end - ---- ----Gets font height. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Rasterizer:getHeight) ---- ----@return number height # Font height -function Rasterizer:getHeight() end - ---- ----Gets line height of a font. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Rasterizer:getLineHeight) ---- ----@return number height # Line height of a font. -function Rasterizer:getLineHeight() end - ---- ----Checks if font contains specified glyphs. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Rasterizer:hasGlyphs) ---- ----@param glyph1 string|number # Glyph ----@param glyph2 string|number # Glyph ----@vararg string|number # Additional glyphs ----@return boolean hasGlyphs # Whatever font contains specified glyphs. -function Rasterizer:hasGlyphs(glyph1, glyph2, ...) end - ---- ----True Type hinting mode. ---- ---- ----[Open in Browser](https://love2d.org/wiki/HintingMode) ---- ----@alias love.HintingMode ---- ----Default hinting. Should be preferred for typical antialiased fonts. ---- ----| "normal" ---- ----Results in fuzzier text but can sometimes preserve the original glyph shapes of the text better than normal hinting. ---- ----| "light" ---- ----Results in aliased / unsmoothed text with either full opacity or completely transparent pixels. Should be used when antialiasing is not desired for the font. ---- ----| "mono" ---- ----Disables hinting for the font. Results in fuzzier text. ---- ----| "none" diff --git a/meta/3rd/love2d/library/love/graphics.lua b/meta/3rd/love2d/library/love/graphics.lua deleted file mode 100644 index 02647e0b..00000000 --- a/meta/3rd/love2d/library/love/graphics.lua +++ /dev/null @@ -1,3956 +0,0 @@ ----@meta - ---- ----The primary responsibility for the love.graphics module is the drawing of lines, shapes, text, Images and other Drawable objects onto the screen. Its secondary responsibilities include loading external files (including Images and Fonts) into memory, creating specialized objects (such as ParticleSystems or Canvases) and managing screen geometry. ---- ----LÖVE's coordinate system is rooted in the upper-left corner of the screen, which is at location (0, 0). The x axis is horizontal: larger values are further to the right. The y axis is vertical: larger values are further towards the bottom. ---- ----In many cases, you draw images or shapes in terms of their upper-left corner. ---- ----Many of the functions are used to manipulate the graphics coordinate system, which is essentially the way coordinates are mapped to the display. You can change the position, scale, and even rotation in this way. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics) ---- ----@class love.graphics -love.graphics = {} - ---- ----Applies the given Transform object to the current coordinate transformation. ---- ----This effectively multiplies the existing coordinate transformation's matrix with the Transform object's internal matrix to produce the new coordinate transformation. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.applyTransform) ---- ----@param transform love.Transform # The Transform object to apply to the current graphics coordinate transform. -function love.graphics.applyTransform(transform) end - ---- ----Draws a filled or unfilled arc at position (x, y). The arc is drawn from angle1 to angle2 in radians. The segments parameter determines how many segments are used to draw the arc. The more segments, the smoother the edge. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.arc) ---- ----@overload fun(drawmode: love.DrawMode, arctype: love.ArcType, x: number, y: number, radius: number, angle1: number, angle2: number, segments?: number) ----@param drawmode love.DrawMode # How to draw the arc. ----@param x number # The position of the center along x-axis. ----@param y number # The position of the center along y-axis. ----@param radius number # Radius of the arc. ----@param angle1 number # The angle at which the arc begins. ----@param angle2 number # The angle at which the arc terminates. ----@param segments? number # The number of segments used for drawing the arc. -function love.graphics.arc(drawmode, x, y, radius, angle1, angle2, segments) end - ---- ----Creates a screenshot once the current frame is done (after love.draw has finished). ---- ----Since this function enqueues a screenshot capture rather than executing it immediately, it can be called from an input callback or love.update and it will still capture all of what's drawn to the screen in that frame. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.captureScreenshot) ---- ----@overload fun(callback: function) ----@overload fun(channel: love.Channel) ----@param filename string # The filename to save the screenshot to. The encoded image type is determined based on the extension of the filename, and must be one of the ImageFormats. -function love.graphics.captureScreenshot(filename) end - ---- ----Draws a circle. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.circle) ---- ----@overload fun(mode: love.DrawMode, x: number, y: number, radius: number, segments: number) ----@param mode love.DrawMode # How to draw the circle. ----@param x number # The position of the center along x-axis. ----@param y number # The position of the center along y-axis. ----@param radius number # The radius of the circle. -function love.graphics.circle(mode, x, y, radius) end - ---- ----Clears the screen or active Canvas to the specified color. ---- ----This function is called automatically before love.draw in the default love.run function. See the example in love.run for a typical use of this function. ---- ----Note that the scissor area bounds the cleared region. ---- ----In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1. ---- ----In versions prior to background color instead. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.clear) ---- ----@overload fun(r: number, g: number, b: number, a?: number, clearstencil?: boolean, cleardepth?: boolean) ----@overload fun(color: table, ..., clearstencil?: boolean, cleardepth?: boolean) ----@overload fun(clearcolor: boolean, clearstencil: boolean, cleardepth: boolean) -function love.graphics.clear() end - ---- ----Discards (trashes) the contents of the screen or active Canvas. This is a performance optimization function with niche use cases. ---- ----If the active Canvas has just been changed and the 'replace' BlendMode is about to be used to draw something which covers the entire screen, calling love.graphics.discard rather than calling love.graphics.clear or doing nothing may improve performance on mobile devices. ---- ----On some desktop systems this function may do nothing. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.discard) ---- ----@overload fun(discardcolors: table, discardstencil?: boolean) ----@param discardcolor? boolean # Whether to discard the texture(s) of the active Canvas(es) (the contents of the screen if no Canvas is active.) ----@param discardstencil? boolean # Whether to discard the contents of the stencil buffer of the screen / active Canvas. -function love.graphics.discard(discardcolor, discardstencil) end - ---- ----Draws a Drawable object (an Image, Canvas, SpriteBatch, ParticleSystem, Mesh, Text object, or Video) on the screen with optional rotation, scaling and shearing. ---- ----Objects are drawn relative to their local coordinate system. The origin is by default located at the top left corner of Image and Canvas. All scaling, shearing, and rotation arguments transform the object relative to that point. Also, the position of the origin can be specified on the screen coordinate system. ---- ----It's possible to rotate an object about its center by offsetting the origin to the center. Angles must be given in radians for rotation. One can also use a negative scaling factor to flip about its centerline. ---- ----Note that the offsets are applied before rotation, scaling, or shearing; scaling and shearing are applied before rotation. ---- ----The right and bottom edges of the object are shifted at an angle defined by the shearing factors. ---- ----When using the default shader anything drawn with this function will be tinted according to the currently selected color. ---- ----Set it to pure white to preserve the object's original colors. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.draw) ---- ----@overload fun(texture: love.Texture, quad: love.Quad, x: number, y: number, r?: number, sx?: number, sy?: number, ox?: number, oy?: number, kx?: number, ky?: number) ----@overload fun(drawable: love.Drawable, transform: love.Transform) ----@overload fun(texture: love.Texture, quad: love.Quad, transform: love.Transform) ----@param drawable love.Drawable # A drawable object. ----@param x? number # The position to draw the object (x-axis). ----@param y? number # The position to draw the object (y-axis). ----@param r? number # Orientation (radians). ----@param sx? number # Scale factor (x-axis). ----@param sy? number # Scale factor (y-axis). ----@param ox? number # Origin offset (x-axis). ----@param oy? number # Origin offset (y-axis). ----@param kx? number # Shearing factor (x-axis). ----@param ky? number # Shearing factor (y-axis). -function love.graphics.draw(drawable, x, y, r, sx, sy, ox, oy, kx, ky) end - ---- ----Draws many instances of a Mesh with a single draw call, using hardware geometry instancing. ---- ----Each instance can have unique properties (positions, colors, etc.) but will not by default unless a custom per-instance vertex attributes or the love_InstanceID GLSL 3 vertex shader variable is used, otherwise they will all render at the same position on top of each other. ---- ----Instancing is not supported by some older GPUs that are only capable of using OpenGL ES 2 or OpenGL 2. Use love.graphics.getSupported to check. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.drawInstanced) ---- ----@overload fun(mesh: love.Mesh, instancecount: number, transform: love.Transform) ----@param mesh love.Mesh # The mesh to render. ----@param instancecount number # The number of instances to render. ----@param x? number # The position to draw the instances (x-axis). ----@param y? number # The position to draw the instances (y-axis). ----@param r? number # Orientation (radians). ----@param sx? number # Scale factor (x-axis). ----@param sy? number # Scale factor (y-axis). ----@param ox? number # Origin offset (x-axis). ----@param oy? number # Origin offset (y-axis). ----@param kx? number # Shearing factor (x-axis). ----@param ky? number # Shearing factor (y-axis). -function love.graphics.drawInstanced(mesh, instancecount, x, y, r, sx, sy, ox, oy, kx, ky) end - ---- ----Draws a layer of an Array Texture. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.drawLayer) ---- ----@overload fun(texture: love.Texture, layerindex: number, quad: love.Quad, x?: number, y?: number, r?: number, sx?: number, sy?: number, ox?: number, oy?: number, kx?: number, ky?: number) ----@overload fun(texture: love.Texture, layerindex: number, transform: love.Transform) ----@overload fun(texture: love.Texture, layerindex: number, quad: love.Quad, transform: love.Transform) ----@param texture love.Texture # The Array Texture to draw. ----@param layerindex number # The index of the layer to use when drawing. ----@param x? number # The position to draw the texture (x-axis). ----@param y? number # The position to draw the texture (y-axis). ----@param r? number # Orientation (radians). ----@param sx? number # Scale factor (x-axis). ----@param sy? number # Scale factor (y-axis). ----@param ox? number # Origin offset (x-axis). ----@param oy? number # Origin offset (y-axis). ----@param kx? number # Shearing factor (x-axis). ----@param ky? number # Shearing factor (y-axis). -function love.graphics.drawLayer(texture, layerindex, x, y, r, sx, sy, ox, oy, kx, ky) end - ---- ----Draws an ellipse. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.ellipse) ---- ----@overload fun(mode: love.DrawMode, x: number, y: number, radiusx: number, radiusy: number, segments: number) ----@param mode love.DrawMode # How to draw the ellipse. ----@param x number # The position of the center along x-axis. ----@param y number # The position of the center along y-axis. ----@param radiusx number # The radius of the ellipse along the x-axis (half the ellipse's width). ----@param radiusy number # The radius of the ellipse along the y-axis (half the ellipse's height). -function love.graphics.ellipse(mode, x, y, radiusx, radiusy) end - ---- ----Immediately renders any pending automatically batched draws. ---- ----LÖVE will call this function internally as needed when most state is changed, so it is not necessary to manually call it. ---- ----The current batch will be automatically flushed by love.graphics state changes (except for the transform stack and the current color), as well as Shader:send and methods on Textures which change their state. Using a different Image in consecutive love.graphics.draw calls will also flush the current batch. ---- ----SpriteBatches, ParticleSystems, Meshes, and Text objects do their own batching and do not affect automatic batching of other draws, aside from flushing the current batch when they're drawn. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.flushBatch) ---- -function love.graphics.flushBatch() end - ---- ----Gets the current background color. ---- ----In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.getBackgroundColor) ---- ----@return number r # The red component (0-1). ----@return number g # The green component (0-1). ----@return number b # The blue component (0-1). ----@return number a # The alpha component (0-1). -function love.graphics.getBackgroundColor() end - ---- ----Gets the blending mode. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.getBlendMode) ---- ----@return love.BlendMode mode # The current blend mode. ----@return love.BlendAlphaMode alphamode # The current blend alpha mode – it determines how the alpha of drawn objects affects blending. -function love.graphics.getBlendMode() end - ---- ----Gets the current target Canvas. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.getCanvas) ---- ----@return love.Canvas canvas # The Canvas set by setCanvas. Returns nil if drawing to the real screen. -function love.graphics.getCanvas() end - ---- ----Gets the available Canvas formats, and whether each is supported. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.getCanvasFormats) ---- ----@overload fun(readable: boolean):table ----@return table formats # A table containing CanvasFormats as keys, and a boolean indicating whether the format is supported as values. Not all systems support all formats. -function love.graphics.getCanvasFormats() end - ---- ----Gets the current color. ---- ----In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.getColor) ---- ----@return number r # The red component (0-1). ----@return number g # The green component (0-1). ----@return number b # The blue component (0-1). ----@return number a # The alpha component (0-1). -function love.graphics.getColor() end - ---- ----Gets the active color components used when drawing. Normally all 4 components are active unless love.graphics.setColorMask has been used. ---- ----The color mask determines whether individual components of the colors of drawn objects will affect the color of the screen. They affect love.graphics.clear and Canvas:clear as well. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.getColorMask) ---- ----@return boolean r # Whether the red color component is active when rendering. ----@return boolean g # Whether the green color component is active when rendering. ----@return boolean b # Whether the blue color component is active when rendering. ----@return boolean a # Whether the alpha color component is active when rendering. -function love.graphics.getColorMask() end - ---- ----Gets the DPI scale factor of the window. ---- ----The DPI scale factor represents relative pixel density. The pixel density inside the window might be greater (or smaller) than the 'size' of the window. For example on a retina screen in Mac OS X with the highdpi window flag enabled, the window may take up the same physical size as an 800x600 window, but the area inside the window uses 1600x1200 pixels. love.graphics.getDPIScale() would return 2 in that case. ---- ----The love.window.fromPixels and love.window.toPixels functions can also be used to convert between units. ---- ----The highdpi window flag must be enabled to use the full pixel density of a Retina screen on Mac OS X and iOS. The flag currently does nothing on Windows and Linux, and on Android it is effectively always enabled. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.getDPIScale) ---- ----@return number scale # The pixel scale factor associated with the window. -function love.graphics.getDPIScale() end - ---- ----Returns the default scaling filters used with Images, Canvases, and Fonts. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.getDefaultFilter) ---- ----@return love.FilterMode min # Filter mode used when scaling the image down. ----@return love.FilterMode mag # Filter mode used when scaling the image up. ----@return number anisotropy # Maximum amount of Anisotropic Filtering used. -function love.graphics.getDefaultFilter() end - ---- ----Gets the current depth test mode and whether writing to the depth buffer is enabled. ---- ----This is low-level functionality designed for use with custom vertex shaders and Meshes with custom vertex attributes. No higher level APIs are provided to set the depth of 2D graphics such as shapes, lines, and Images. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.getDepthMode) ---- ----@return love.CompareMode comparemode # Depth comparison mode used for depth testing. ----@return boolean write # Whether to write update / write values to the depth buffer when rendering. -function love.graphics.getDepthMode() end - ---- ----Gets the width and height in pixels of the window. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.getDimensions) ---- ----@return number width # The width of the window. ----@return number height # The height of the window. -function love.graphics.getDimensions() end - ---- ----Gets the current Font object. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.getFont) ---- ----@return love.Font font # The current Font. Automatically creates and sets the default font, if none is set yet. -function love.graphics.getFont() end - ---- ----Gets whether triangles with clockwise- or counterclockwise-ordered vertices are considered front-facing. ---- ----This is designed for use in combination with Mesh face culling. Other love.graphics shapes, lines, and sprites are not guaranteed to have a specific winding order to their internal vertices. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.getFrontFaceWinding) ---- ----@return love.VertexWinding winding # The winding mode being used. The default winding is counterclockwise ('ccw'). -function love.graphics.getFrontFaceWinding() end - ---- ----Gets the height in pixels of the window. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.getHeight) ---- ----@return number height # The height of the window. -function love.graphics.getHeight() end - ---- ----Gets the raw and compressed pixel formats usable for Images, and whether each is supported. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.getImageFormats) ---- ----@return table formats # A table containing PixelFormats as keys, and a boolean indicating whether the format is supported as values. Not all systems support all formats. -function love.graphics.getImageFormats() end - ---- ----Gets the line join style. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.getLineJoin) ---- ----@return love.LineJoin join # The LineJoin style. -function love.graphics.getLineJoin() end - ---- ----Gets the line style. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.getLineStyle) ---- ----@return love.LineStyle style # The current line style. -function love.graphics.getLineStyle() end - ---- ----Gets the current line width. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.getLineWidth) ---- ----@return number width # The current line width. -function love.graphics.getLineWidth() end - ---- ----Gets whether back-facing triangles in a Mesh are culled. ---- ----Mesh face culling is designed for use with low level custom hardware-accelerated 3D rendering via custom vertex attributes on Meshes, custom vertex shaders, and depth testing with a depth buffer. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.getMeshCullMode) ---- ----@return love.CullMode mode # The Mesh face culling mode in use (whether to render everything, cull back-facing triangles, or cull front-facing triangles). -function love.graphics.getMeshCullMode() end - ---- ----Gets the width and height in pixels of the window. ---- ----love.graphics.getDimensions gets the dimensions of the window in units scaled by the screen's DPI scale factor, rather than pixels. Use getDimensions for calculations related to drawing to the screen and using the graphics coordinate system (calculating the center of the screen, for example), and getPixelDimensions only when dealing specifically with underlying pixels (pixel-related calculations in a pixel Shader, for example). ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.getPixelDimensions) ---- ----@return number pixelwidth # The width of the window in pixels. ----@return number pixelheight # The height of the window in pixels. -function love.graphics.getPixelDimensions() end - ---- ----Gets the height in pixels of the window. ---- ----The graphics coordinate system and DPI scale factor, rather than raw pixels. Use getHeight for calculations related to drawing to the screen and using the coordinate system (calculating the center of the screen, for example), and getPixelHeight only when dealing specifically with underlying pixels (pixel-related calculations in a pixel Shader, for example). ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.getPixelHeight) ---- ----@return number pixelheight # The height of the window in pixels. -function love.graphics.getPixelHeight() end - ---- ----Gets the width in pixels of the window. ---- ----The graphics coordinate system and DPI scale factor, rather than raw pixels. Use getWidth for calculations related to drawing to the screen and using the coordinate system (calculating the center of the screen, for example), and getPixelWidth only when dealing specifically with underlying pixels (pixel-related calculations in a pixel Shader, for example). ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.getPixelWidth) ---- ----@return number pixelwidth # The width of the window in pixels. -function love.graphics.getPixelWidth() end - ---- ----Gets the point size. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.getPointSize) ---- ----@return number size # The current point size. -function love.graphics.getPointSize() end - ---- ----Gets information about the system's video card and drivers. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.getRendererInfo) ---- ----@return string name # The name of the renderer, e.g. 'OpenGL' or 'OpenGL ES'. ----@return string version # The version of the renderer with some extra driver-dependent version info, e.g. '2.1 INTEL-8.10.44'. ----@return string vendor # The name of the graphics card vendor, e.g. 'Intel Inc'. ----@return string device # The name of the graphics card, e.g. 'Intel HD Graphics 3000 OpenGL Engine'. -function love.graphics.getRendererInfo() end - ---- ----Gets the current scissor box. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.getScissor) ---- ----@return number x # The x-component of the top-left point of the box. ----@return number y # The y-component of the top-left point of the box. ----@return number width # The width of the box. ----@return number height # The height of the box. -function love.graphics.getScissor() end - ---- ----Gets the current Shader. Returns nil if none is set. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.getShader) ---- ----@return love.Shader shader # The currently active Shader, or nil if none is set. -function love.graphics.getShader() end - ---- ----Gets the current depth of the transform / state stack (the number of pushes without corresponding pops). ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.getStackDepth) ---- ----@return number depth # The current depth of the transform and state love.graphics stack. -function love.graphics.getStackDepth() end - ---- ----Gets performance-related rendering statistics. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.getStats) ---- ----@overload fun(stats: table):table ----@return {drawcalls: number, canvasswitches: number, texturememory: number, images: number, canvases: number, fonts: number, shaderswitches: number, drawcallsbatched: number} stats # A table with the following fields: -function love.graphics.getStats() end - ---- ----Gets the current stencil test configuration. ---- ----When stencil testing is enabled, the geometry of everything that is drawn afterward will be clipped / stencilled out based on a comparison between the arguments of this function and the stencil value of each pixel that the geometry touches. The stencil values of pixels are affected via love.graphics.stencil. ---- ----Each Canvas has its own per-pixel stencil values. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.getStencilTest) ---- ----@return love.CompareMode comparemode # The type of comparison that is made for each pixel. Will be 'always' if stencil testing is disabled. ----@return number comparevalue # The value used when comparing with the stencil value of each pixel. -function love.graphics.getStencilTest() end - ---- ----Gets the optional graphics features and whether they're supported on the system. ---- ----Some older or low-end systems don't always support all graphics features. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.getSupported) ---- ----@return table features # A table containing GraphicsFeature keys, and boolean values indicating whether each feature is supported. -function love.graphics.getSupported() end - ---- ----Gets the system-dependent maximum values for love.graphics features. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.getSystemLimits) ---- ----@return table limits # A table containing GraphicsLimit keys, and number values. -function love.graphics.getSystemLimits() end - ---- ----Gets the available texture types, and whether each is supported. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.getTextureTypes) ---- ----@return table texturetypes # A table containing TextureTypes as keys, and a boolean indicating whether the type is supported as values. Not all systems support all types. -function love.graphics.getTextureTypes() end - ---- ----Gets the width in pixels of the window. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.getWidth) ---- ----@return number width # The width of the window. -function love.graphics.getWidth() end - ---- ----Sets the scissor to the rectangle created by the intersection of the specified rectangle with the existing scissor. ---- ----If no scissor is active yet, it behaves like love.graphics.setScissor. ---- ----The scissor limits the drawing area to a specified rectangle. This affects all graphics calls, including love.graphics.clear. ---- ----The dimensions of the scissor is unaffected by graphical transformations (translate, scale, ...). ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.intersectScissor) ---- ----@param x number # The x-coordinate of the upper left corner of the rectangle to intersect with the existing scissor rectangle. ----@param y number # The y-coordinate of the upper left corner of the rectangle to intersect with the existing scissor rectangle. ----@param width number # The width of the rectangle to intersect with the existing scissor rectangle. ----@param height number # The height of the rectangle to intersect with the existing scissor rectangle. -function love.graphics.intersectScissor(x, y, width, height) end - ---- ----Converts the given 2D position from screen-space into global coordinates. ---- ----This effectively applies the reverse of the current graphics transformations to the given position. A similar Transform:inverseTransformPoint method exists for Transform objects. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.inverseTransformPoint) ---- ----@param screenX number # The x component of the screen-space position. ----@param screenY number # The y component of the screen-space position. ----@return number globalX # The x component of the position in global coordinates. ----@return number globalY # The y component of the position in global coordinates. -function love.graphics.inverseTransformPoint(screenX, screenY) end - ---- ----Gets whether the graphics module is able to be used. If it is not active, love.graphics function and method calls will not work correctly and may cause the program to crash. ----The graphics module is inactive if a window is not open, or if the app is in the background on iOS. Typically the app's execution will be automatically paused by the system, in the latter case. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.isActive) ---- ----@return boolean active # Whether the graphics module is active and able to be used. -function love.graphics.isActive() end - ---- ----Gets whether gamma-correct rendering is supported and enabled. It can be enabled by setting t.gammacorrect = true in love.conf. ---- ----Not all devices support gamma-correct rendering, in which case it will be automatically disabled and this function will return false. It is supported on desktop systems which have graphics cards that are capable of using OpenGL 3 / DirectX 10, and iOS devices that can use OpenGL ES 3. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.isGammaCorrect) ---- ----@return boolean gammacorrect # True if gamma-correct rendering is supported and was enabled in love.conf, false otherwise. -function love.graphics.isGammaCorrect() end - ---- ----Gets whether wireframe mode is used when drawing. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.isWireframe) ---- ----@return boolean wireframe # True if wireframe lines are used when drawing, false if it's not. -function love.graphics.isWireframe() end - ---- ----Draws lines between points. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.line) ---- ----@overload fun(points: table) ----@param x1 number # The position of first point on the x-axis. ----@param y1 number # The position of first point on the y-axis. ----@param x2 number # The position of second point on the x-axis. ----@param y2 number # The position of second point on the y-axis. ----@vararg number # You can continue passing point positions to draw a polyline. -function love.graphics.line(x1, y1, x2, y2, ...) end - ---- ----Creates a new array Image. ---- ----An array image / array texture is a single object which contains multiple 'layers' or 'slices' of 2D sub-images. It can be thought of similarly to a texture atlas or sprite sheet, but it doesn't suffer from the same tile / quad bleeding artifacts that texture atlases do – although every sub-image must have the same dimensions. ---- ----A specific layer of an array image can be drawn with love.graphics.drawLayer / SpriteBatch:addLayer, or with the Quad variant of love.graphics.draw and Quad:setLayer, or via a custom Shader. ---- ----To use an array image in a Shader, it must be declared as a ArrayImage or sampler2DArray type (instead of Image or sampler2D). The Texel(ArrayImage image, vec3 texturecoord) shader function must be used to get pixel colors from a slice of the array image. The vec3 argument contains the texture coordinate in the first two components, and the 0-based slice index in the third component. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.newArrayImage) ---- ----@param slices table # A table containing filepaths to images (or File, FileData, ImageData, or CompressedImageData objects), in an array. Each sub-image must have the same dimensions. A table of tables can also be given, where each sub-table contains all mipmap levels for the slice index of that sub-table. ----@param settings? {mipmaps: boolean, linear: boolean, dpiscale: number} # Optional table of settings to configure the array image, containing the following fields: ----@return love.Image image # An Array Image object. -function love.graphics.newArrayImage(slices, settings) end - ---- ----Creates a new Canvas object for offscreen rendering. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.newCanvas) ---- ----@overload fun(width: number, height: number):love.Canvas ----@overload fun(width: number, height: number, settings: table):love.Canvas ----@overload fun(width: number, height: number, layers: number, settings: table):love.Canvas ----@return love.Canvas canvas # A new Canvas with dimensions equal to the window's size in pixels. -function love.graphics.newCanvas() end - ---- ----Creates a new cubemap Image. ---- ----Cubemap images have 6 faces (sides) which represent a cube. They can't be rendered directly, they can only be used in Shader code (and sent to the shader via Shader:send). ---- ----To use a cubemap image in a Shader, it must be declared as a CubeImage or samplerCube type (instead of Image or sampler2D). The Texel(CubeImage image, vec3 direction) shader function must be used to get pixel colors from the cubemap. The vec3 argument is a normalized direction from the center of the cube, rather than explicit texture coordinates. ---- ----Each face in a cubemap image must have square dimensions. ---- ----For variants of this function which accept a single image containing multiple cubemap faces, they must be laid out in one of the following forms in the image: ---- ---- +y ---- ----+z +x -z ---- ---- -y ---- ---- -x ---- ----or: ---- ---- +y ---- -----x +z +x -z ---- ---- -y ---- ----or: ---- ----+x ---- -----x ---- ----+y ---- -----y ---- ----+z ---- -----z ---- ----or: ---- ----+x -x +y -y +z -z ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.newCubeImage) ---- ----@overload fun(faces: table, settings?: table):love.Image ----@param filename string # The filepath to a cubemap image file (or a File, FileData, or ImageData). ----@param settings? {mipmaps: boolean, linear: boolean} # Optional table of settings to configure the cubemap image, containing the following fields: ----@return love.Image image # An cubemap Image object. -function love.graphics.newCubeImage(filename, settings) end - ---- ----Creates a new Font from a TrueType Font or BMFont file. Created fonts are not cached, in that calling this function with the same arguments will always create a new Font object. ---- ----All variants which accept a filename can also accept a Data object instead. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.newFont) ---- ----@overload fun(filename: string, size: number, hinting?: love.HintingMode, dpiscale?: number):love.Font ----@overload fun(filename: string, imagefilename: string):love.Font ----@overload fun(size?: number, hinting?: love.HintingMode, dpiscale?: number):love.Font ----@param filename string # The filepath to the BMFont or TrueType font file. ----@return love.Font font # A Font object which can be used to draw text on screen. -function love.graphics.newFont(filename) end - ---- ----Creates a new Image from a filepath, FileData, an ImageData, or a CompressedImageData, and optionally generates or specifies mipmaps for the image. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.newImage) ---- ----@overload fun(fileData: love.FileData, settings?: table):love.Image ----@overload fun(imageData: love.ImageData, settings?: table):love.Image ----@overload fun(compressedImageData: love.CompressedImageData, settings?: table):love.Image ----@param filename string # The filepath to the image file. ----@param settings? {dpiscale: number, linear: boolean, mipmaps: boolean} # A table containing the following fields: ----@return love.Image image # A new Image object which can be drawn on screen. -function love.graphics.newImage(filename, settings) end - ---- ----Creates a new specifically formatted image. ---- ----In versions prior to 0.9.0, LÖVE expects ISO 8859-1 encoding for the glyphs string. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.newImageFont) ---- ----@overload fun(imageData: love.ImageData, glyphs: string):love.Font ----@overload fun(filename: string, glyphs: string, extraspacing: number):love.Font ----@param filename string # The filepath to the image file. ----@param glyphs string # A string of the characters in the image in order from left to right. ----@return love.Font font # A Font object which can be used to draw text on screen. -function love.graphics.newImageFont(filename, glyphs) end - ---- ----Creates a new Mesh. ---- ----Use Mesh:setTexture if the Mesh should be textured with an Image or Canvas when it's drawn. ---- ----In versions prior to 11.0, color and byte component values were within the range of 0 to 255 instead of 0 to 1. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.newMesh) ---- ----@overload fun(vertexcount: number, mode?: love.MeshDrawMode, usage?: love.SpriteBatchUsage):love.Mesh ----@overload fun(vertexformat: table, vertices: table, mode?: love.MeshDrawMode, usage?: love.SpriteBatchUsage):love.Mesh ----@overload fun(vertexformat: table, vertexcount: number, mode?: love.MeshDrawMode, usage?: love.SpriteBatchUsage):love.Mesh ----@overload fun(vertexcount: number, texture?: love.Texture, mode?: love.MeshDrawMode):love.Mesh ----@param vertices {["1"]: number, ["2"]: number, ["3"]: number, ["4"]: number, ["5"]: number, ["6"]: number, ["7"]: number, ["8"]: number} # The table filled with vertex information tables for each vertex as follows: ----@param mode? love.MeshDrawMode # How the vertices are used when drawing. The default mode 'fan' is sufficient for simple convex polygons. ----@param usage? love.SpriteBatchUsage # The expected usage of the Mesh. The specified usage mode affects the Mesh's memory usage and performance. ----@return love.Mesh mesh # The new mesh. -function love.graphics.newMesh(vertices, mode, usage) end - ---- ----Creates a new ParticleSystem. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.newParticleSystem) ---- ----@overload fun(texture: love.Texture, buffer?: number):love.ParticleSystem ----@param image love.Image # The image to use. ----@param buffer? number # The max number of particles at the same time. ----@return love.ParticleSystem system # A new ParticleSystem. -function love.graphics.newParticleSystem(image, buffer) end - ---- ----Creates a new Quad. ---- ----The purpose of a Quad is to use a fraction of an image to draw objects, as opposed to drawing entire image. It is most useful for sprite sheets and atlases: in a sprite atlas, multiple sprites reside in same image, quad is used to draw a specific sprite from that image; in animated sprites with all frames residing in the same image, quad is used to draw specific frame from the animation. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.newQuad) ---- ----@overload fun(x: number, y: number, width: number, height: number, texture: love.Texture):love.Quad ----@param x number # The top-left position in the Image along the x-axis. ----@param y number # The top-left position in the Image along the y-axis. ----@param width number # The width of the Quad in the Image. (Must be greater than 0.) ----@param height number # The height of the Quad in the Image. (Must be greater than 0.) ----@param sw number # The reference width, the width of the Image. (Must be greater than 0.) ----@param sh number # The reference height, the height of the Image. (Must be greater than 0.) ----@return love.Quad quad # The new Quad. -function love.graphics.newQuad(x, y, width, height, sw, sh) end - ---- ----Creates a new Shader object for hardware-accelerated vertex and pixel effects. A Shader contains either vertex shader code, pixel shader code, or both. ---- ----Shaders are small programs which are run on the graphics card when drawing. Vertex shaders are run once for each vertex (for example, an image has 4 vertices - one at each corner. A Mesh might have many more.) Pixel shaders are run once for each pixel on the screen which the drawn object touches. Pixel shader code is executed after all the object's vertices have been processed by the vertex shader. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.newShader) ---- ----@overload fun(pixelcode: string, vertexcode: string):love.Shader ----@param code string # The pixel shader or vertex shader code, or a filename pointing to a file with the code. ----@return love.Shader shader # A Shader object for use in drawing operations. -function love.graphics.newShader(code) end - ---- ----Creates a new SpriteBatch object. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.newSpriteBatch) ---- ----@overload fun(image: love.Image, maxsprites?: number, usage?: love.SpriteBatchUsage):love.SpriteBatch ----@overload fun(texture: love.Texture, maxsprites?: number, usage?: love.SpriteBatchUsage):love.SpriteBatch ----@param image love.Image # The Image to use for the sprites. ----@param maxsprites? number # The maximum number of sprites that the SpriteBatch can contain at any given time. Since version 11.0, additional sprites added past this number will automatically grow the spritebatch. ----@return love.SpriteBatch spriteBatch # The new SpriteBatch. -function love.graphics.newSpriteBatch(image, maxsprites) end - ---- ----Creates a new drawable Text object. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.newText) ---- ----@param font love.Font # The font to use for the text. ----@param textstring? string # The initial string of text that the new Text object will contain. May be nil. ----@return love.Text text # The new drawable Text object. -function love.graphics.newText(font, textstring) end - ---- ----Creates a new drawable Video. Currently only Ogg Theora video files are supported. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.newVideo) ---- ----@overload fun(videostream: love.VideoStream):love.Video ----@overload fun(filename: string, settings?: table):love.Video ----@overload fun(filename: string, loadaudio?: boolean):love.Video ----@overload fun(videostream: love.VideoStream, loadaudio?: boolean):love.Video ----@param filename string # The file path to the Ogg Theora video file. ----@return love.Video video # A new Video. -function love.graphics.newVideo(filename) end - ---- ----Creates a new volume (3D) Image. ---- ----Volume images are 3D textures with width, height, and depth. They can't be rendered directly, they can only be used in Shader code (and sent to the shader via Shader:send). ---- ----To use a volume image in a Shader, it must be declared as a VolumeImage or sampler3D type (instead of Image or sampler2D). The Texel(VolumeImage image, vec3 texcoords) shader function must be used to get pixel colors from the volume image. The vec3 argument is a normalized texture coordinate with the z component representing the depth to sample at (ranging from 1). ---- ----Volume images are typically used as lookup tables in shaders for color grading, for example, because sampling using a texture coordinate that is partway in between two pixels can interpolate across all 3 dimensions in the volume image, resulting in a smooth gradient even when a small-sized volume image is used as the lookup table. ---- ----Array images are a much better choice than volume images for storing multiple different sprites in a single array image for directly drawing them. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.newVolumeImage) ---- ----@param layers table # A table containing filepaths to images (or File, FileData, ImageData, or CompressedImageData objects), in an array. A table of tables can also be given, where each sub-table represents a single mipmap level and contains all layers for that mipmap. ----@param settings? {mipmaps: boolean, linear: boolean} # Optional table of settings to configure the volume image, containing the following fields: ----@return love.Image image # A volume Image object. -function love.graphics.newVolumeImage(layers, settings) end - ---- ----Resets the current coordinate transformation. ---- ----This function is always used to reverse any previous calls to love.graphics.rotate, love.graphics.scale, love.graphics.shear or love.graphics.translate. It returns the current transformation state to its defaults. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.origin) ---- -function love.graphics.origin() end - ---- ----Draws one or more points. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.points) ---- ----@overload fun(points: table) ----@overload fun(points: table) ----@param x number # The position of the first point on the x-axis. ----@param y number # The position of the first point on the y-axis. ----@vararg number # The x and y coordinates of additional points. -function love.graphics.points(x, y, ...) end - ---- ----Draw a polygon. ---- ----Following the mode argument, this function can accept multiple numeric arguments or a single table of numeric arguments. In either case the arguments are interpreted as alternating x and y coordinates of the polygon's vertices. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.polygon) ---- ----@overload fun(mode: love.DrawMode, vertices: table) ----@param mode love.DrawMode # How to draw the polygon. ----@vararg number # The vertices of the polygon. -function love.graphics.polygon(mode, ...) end - ---- ----Pops the current coordinate transformation from the transformation stack. ---- ----This function is always used to reverse a previous push operation. It returns the current transformation state to what it was before the last preceding push. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.pop) ---- -function love.graphics.pop() end - ---- ----Displays the results of drawing operations on the screen. ---- ----This function is used when writing your own love.run function. It presents all the results of your drawing operations on the screen. See the example in love.run for a typical use of this function. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.present) ---- -function love.graphics.present() end - ---- ----Draws text on screen. If no Font is set, one will be created and set (once) if needed. ---- ----As of LOVE 0.7.1, when using translation and scaling functions while drawing text, this function assumes the scale occurs first. ---- ----If you don't script with this in mind, the text won't be in the right position, or possibly even on screen. ---- ----love.graphics.print and love.graphics.printf both support UTF-8 encoding. You'll also need a proper Font for special characters. ---- ----In versions prior to 11.0, color and byte component values were within the range of 0 to 255 instead of 0 to 1. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.print) ---- ----@overload fun(coloredtext: table, x?: number, y?: number, angle?: number, sx?: number, sy?: number, ox?: number, oy?: number, kx?: number, ky?: number) ----@overload fun(text: string, transform: love.Transform) ----@overload fun(coloredtext: table, transform: love.Transform) ----@overload fun(text: string, font: love.Font, transform: love.Transform) ----@overload fun(coloredtext: table, font: love.Font, transform: love.Transform) ----@param text string # The text to draw. ----@param x? number # The position to draw the object (x-axis). ----@param y? number # The position to draw the object (y-axis). ----@param r? number # Orientation (radians). ----@param sx? number # Scale factor (x-axis). ----@param sy? number # Scale factor (y-axis). ----@param ox? number # Origin offset (x-axis). ----@param oy? number # Origin offset (y-axis). ----@param kx? number # Shearing factor (x-axis). ----@param ky? number # Shearing factor (y-axis). -function love.graphics.print(text, x, y, r, sx, sy, ox, oy, kx, ky) end - ---- ----Draws formatted text, with word wrap and alignment. ---- ----See additional notes in love.graphics.print. ---- ----The word wrap limit is applied before any scaling, rotation, and other coordinate transformations. Therefore the amount of text per line stays constant given the same wrap limit, even if the scale arguments change. ---- ----In version 0.9.2 and earlier, wrapping was implemented by breaking up words by spaces and putting them back together to make sure things fit nicely within the limit provided. However, due to the way this is done, extra spaces between words would end up missing when printed on the screen, and some lines could overflow past the provided wrap limit. In version 0.10.0 and newer this is no longer the case. ---- ----In versions prior to 11.0, color and byte component values were within the range of 0 to 255 instead of 0 to 1. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.printf) ---- ----@overload fun(text: string, font: love.Font, x: number, y: number, limit: number, align?: love.AlignMode, r?: number, sx?: number, sy?: number, ox?: number, oy?: number, kx?: number, ky?: number) ----@overload fun(text: string, transform: love.Transform, limit: number, align?: love.AlignMode) ----@overload fun(text: string, font: love.Font, transform: love.Transform, limit: number, align?: love.AlignMode) ----@overload fun(coloredtext: table, x: number, y: number, limit: number, align: love.AlignMode, angle?: number, sx?: number, sy?: number, ox?: number, oy?: number, kx?: number, ky?: number) ----@overload fun(coloredtext: table, font: love.Font, x: number, y: number, limit: number, align?: love.AlignMode, angle?: number, sx?: number, sy?: number, ox?: number, oy?: number, kx?: number, ky?: number) ----@overload fun(coloredtext: table, transform: love.Transform, limit: number, align?: love.AlignMode) ----@overload fun(coloredtext: table, font: love.Font, transform: love.Transform, limit: number, align?: love.AlignMode) ----@param text string # A text string. ----@param x number # The position on the x-axis. ----@param y number # The position on the y-axis. ----@param limit number # Wrap the line after this many horizontal pixels. ----@param align? love.AlignMode # The alignment. ----@param r? number # Orientation (radians). ----@param sx? number # Scale factor (x-axis). ----@param sy? number # Scale factor (y-axis). ----@param ox? number # Origin offset (x-axis). ----@param oy? number # Origin offset (y-axis). ----@param kx? number # Shearing factor (x-axis). ----@param ky? number # Shearing factor (y-axis). -function love.graphics.printf(text, x, y, limit, align, r, sx, sy, ox, oy, kx, ky) end - ---- ----Copies and pushes the current coordinate transformation to the transformation stack. ---- ----This function is always used to prepare for a corresponding pop operation later. It stores the current coordinate transformation state into the transformation stack and keeps it active. Later changes to the transformation can be undone by using the pop operation, which returns the coordinate transform to the state it was in before calling push. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.push) ---- ----@overload fun(stack: love.StackType) -function love.graphics.push() end - ---- ----Draws a rectangle. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.rectangle) ---- ----@overload fun(mode: love.DrawMode, x: number, y: number, width: number, height: number, rx: number, ry?: number, segments?: number) ----@param mode love.DrawMode # How to draw the rectangle. ----@param x number # The position of top-left corner along the x-axis. ----@param y number # The position of top-left corner along the y-axis. ----@param width number # Width of the rectangle. ----@param height number # Height of the rectangle. -function love.graphics.rectangle(mode, x, y, width, height) end - ---- ----Replaces the current coordinate transformation with the given Transform object. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.replaceTransform) ---- ----@param transform love.Transform # The Transform object to replace the current graphics coordinate transform with. -function love.graphics.replaceTransform(transform) end - ---- ----Resets the current graphics settings. ---- ----Calling reset makes the current drawing color white, the current background color black, disables any active color component masks, disables wireframe mode and resets the current graphics transformation to the origin. It also sets both the point and line drawing modes to smooth and their sizes to 1.0. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.reset) ---- -function love.graphics.reset() end - ---- ----Rotates the coordinate system in two dimensions. ---- ----Calling this function affects all future drawing operations by rotating the coordinate system around the origin by the given amount of radians. This change lasts until love.draw() exits. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.rotate) ---- ----@param angle number # The amount to rotate the coordinate system in radians. -function love.graphics.rotate(angle) end - ---- ----Scales the coordinate system in two dimensions. ---- ----By default the coordinate system in LÖVE corresponds to the display pixels in horizontal and vertical directions one-to-one, and the x-axis increases towards the right while the y-axis increases downwards. Scaling the coordinate system changes this relation. ---- ----After scaling by sx and sy, all coordinates are treated as if they were multiplied by sx and sy. Every result of a drawing operation is also correspondingly scaled, so scaling by (2, 2) for example would mean making everything twice as large in both x- and y-directions. Scaling by a negative value flips the coordinate system in the corresponding direction, which also means everything will be drawn flipped or upside down, or both. Scaling by zero is not a useful operation. ---- ----Scale and translate are not commutative operations, therefore, calling them in different orders will change the outcome. ---- ----Scaling lasts until love.draw() exits. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.scale) ---- ----@param sx number # The scaling in the direction of the x-axis. ----@param sy? number # The scaling in the direction of the y-axis. If omitted, it defaults to same as parameter sx. -function love.graphics.scale(sx, sy) end - ---- ----Sets the background color. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.setBackgroundColor) ---- ----@overload fun(rgba: table) ----@param red number # The red component (0-1). ----@param green number # The green component (0-1). ----@param blue number # The blue component (0-1). ----@param alpha? number # The alpha component (0-1). -function love.graphics.setBackgroundColor(red, green, blue, alpha) end - ---- ----Sets the blending mode. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.setBlendMode) ---- ----@overload fun(mode: love.BlendMode, alphamode?: love.BlendAlphaMode) ----@param mode love.BlendMode # The blend mode to use. -function love.graphics.setBlendMode(mode) end - ---- ----Captures drawing operations to a Canvas. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.setCanvas) ---- ----@overload fun() ----@overload fun(canvas1: love.Canvas, canvas2: love.Canvas, ...) ----@overload fun(canvas: love.Canvas, slice: number, mipmap?: number) ----@overload fun(setup: table) ----@param canvas love.Canvas # The new target. ----@param mipmap? number # The mipmap level to render to, for Canvases with mipmaps. -function love.graphics.setCanvas(canvas, mipmap) end - ---- ----Sets the color used for drawing. ---- ----In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.setColor) ---- ----@overload fun(rgba: table) ----@param red number # The amount of red. ----@param green number # The amount of green. ----@param blue number # The amount of blue. ----@param alpha? number # The amount of alpha. The alpha value will be applied to all subsequent draw operations, even the drawing of an image. -function love.graphics.setColor(red, green, blue, alpha) end - ---- ----Sets the color mask. Enables or disables specific color components when rendering and clearing the screen. For example, if '''red''' is set to '''false''', no further changes will be made to the red component of any pixels. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.setColorMask) ---- ----@overload fun() ----@param red boolean # Render red component. ----@param green boolean # Render green component. ----@param blue boolean # Render blue component. ----@param alpha boolean # Render alpha component. -function love.graphics.setColorMask(red, green, blue, alpha) end - ---- ----Sets the default scaling filters used with Images, Canvases, and Fonts. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.setDefaultFilter) ---- ----@param min love.FilterMode # Filter mode used when scaling the image down. ----@param mag love.FilterMode # Filter mode used when scaling the image up. ----@param anisotropy? number # Maximum amount of Anisotropic Filtering used. -function love.graphics.setDefaultFilter(min, mag, anisotropy) end - ---- ----Configures depth testing and writing to the depth buffer. ---- ----This is low-level functionality designed for use with custom vertex shaders and Meshes with custom vertex attributes. No higher level APIs are provided to set the depth of 2D graphics such as shapes, lines, and Images. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.setDepthMode) ---- ----@overload fun() ----@param comparemode love.CompareMode # Depth comparison mode used for depth testing. ----@param write boolean # Whether to write update / write values to the depth buffer when rendering. -function love.graphics.setDepthMode(comparemode, write) end - ---- ----Set an already-loaded Font as the current font or create and load a new one from the file and size. ---- ----It's recommended that Font objects are created with love.graphics.newFont in the loading stage and then passed to this function in the drawing stage. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.setFont) ---- ----@param font love.Font # The Font object to use. -function love.graphics.setFont(font) end - ---- ----Sets whether triangles with clockwise- or counterclockwise-ordered vertices are considered front-facing. ---- ----This is designed for use in combination with Mesh face culling. Other love.graphics shapes, lines, and sprites are not guaranteed to have a specific winding order to their internal vertices. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.setFrontFaceWinding) ---- ----@param winding love.VertexWinding # The winding mode to use. The default winding is counterclockwise ('ccw'). -function love.graphics.setFrontFaceWinding(winding) end - ---- ----Sets the line join style. See LineJoin for the possible options. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.setLineJoin) ---- ----@param join love.LineJoin # The LineJoin to use. -function love.graphics.setLineJoin(join) end - ---- ----Sets the line style. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.setLineStyle) ---- ----@param style love.LineStyle # The LineStyle to use. Line styles include smooth and rough. -function love.graphics.setLineStyle(style) end - ---- ----Sets the line width. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.setLineWidth) ---- ----@param width number # The width of the line. -function love.graphics.setLineWidth(width) end - ---- ----Sets whether back-facing triangles in a Mesh are culled. ---- ----This is designed for use with low level custom hardware-accelerated 3D rendering via custom vertex attributes on Meshes, custom vertex shaders, and depth testing with a depth buffer. ---- ----By default, both front- and back-facing triangles in Meshes are rendered. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.setMeshCullMode) ---- ----@param mode love.CullMode # The Mesh face culling mode to use (whether to render everything, cull back-facing triangles, or cull front-facing triangles). -function love.graphics.setMeshCullMode(mode) end - ---- ----Creates and sets a new Font. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.setNewFont) ---- ----@overload fun(filename: string, size?: number):love.Font ----@overload fun(file: love.File, size?: number):love.Font ----@overload fun(data: love.Data, size?: number):love.Font ----@overload fun(rasterizer: love.Rasterizer):love.Font ----@param size? number # The size of the font. ----@return love.Font font # The new font. -function love.graphics.setNewFont(size) end - ---- ----Sets the point size. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.setPointSize) ---- ----@param size number # The new point size. -function love.graphics.setPointSize(size) end - ---- ----Sets or disables scissor. ---- ----The scissor limits the drawing area to a specified rectangle. This affects all graphics calls, including love.graphics.clear. ---- ----The dimensions of the scissor is unaffected by graphical transformations (translate, scale, ...). ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.setScissor) ---- ----@overload fun() ----@param x number # x coordinate of upper left corner. ----@param y number # y coordinate of upper left corner. ----@param width number # width of clipping rectangle. ----@param height number # height of clipping rectangle. -function love.graphics.setScissor(x, y, width, height) end - ---- ----Sets or resets a Shader as the current pixel effect or vertex shaders. All drawing operations until the next ''love.graphics.setShader'' will be drawn using the Shader object specified. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.setShader) ---- ----@overload fun() ----@param shader love.Shader # The new shader. -function love.graphics.setShader(shader) end - ---- ----Configures or disables stencil testing. ---- ----When stencil testing is enabled, the geometry of everything that is drawn afterward will be clipped / stencilled out based on a comparison between the arguments of this function and the stencil value of each pixel that the geometry touches. The stencil values of pixels are affected via love.graphics.stencil. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.setStencilTest) ---- ----@overload fun() ----@param comparemode love.CompareMode # The type of comparison to make for each pixel. ----@param comparevalue number # The value to use when comparing with the stencil value of each pixel. Must be between 0 and 255. -function love.graphics.setStencilTest(comparemode, comparevalue) end - ---- ----Sets whether wireframe lines will be used when drawing. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.setWireframe) ---- ----@param enable boolean # True to enable wireframe mode when drawing, false to disable it. -function love.graphics.setWireframe(enable) end - ---- ----Shears the coordinate system. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.shear) ---- ----@param kx number # The shear factor on the x-axis. ----@param ky number # The shear factor on the y-axis. -function love.graphics.shear(kx, ky) end - ---- ----Draws geometry as a stencil. ---- ----The geometry drawn by the supplied function sets invisible stencil values of pixels, instead of setting pixel colors. The stencil buffer (which contains those stencil values) can act like a mask / stencil - love.graphics.setStencilTest can be used afterward to determine how further rendering is affected by the stencil values in each pixel. ---- ----Stencil values are integers within the range of 255. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.stencil) ---- ----@param stencilfunction function # Function which draws geometry. The stencil values of pixels, rather than the color of each pixel, will be affected by the geometry. ----@param action? love.StencilAction # How to modify any stencil values of pixels that are touched by what's drawn in the stencil function. ----@param value? number # The new stencil value to use for pixels if the 'replace' stencil action is used. Has no effect with other stencil actions. Must be between 0 and 255. ----@param keepvalues? boolean # True to preserve old stencil values of pixels, false to re-set every pixel's stencil value to 0 before executing the stencil function. love.graphics.clear will also re-set all stencil values. -function love.graphics.stencil(stencilfunction, action, value, keepvalues) end - ---- ----Converts the given 2D position from global coordinates into screen-space. ---- ----This effectively applies the current graphics transformations to the given position. A similar Transform:transformPoint method exists for Transform objects. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.transformPoint) ---- ----@param globalX number # The x component of the position in global coordinates. ----@param globalY number # The y component of the position in global coordinates. ----@return number screenX # The x component of the position with graphics transformations applied. ----@return number screenY # The y component of the position with graphics transformations applied. -function love.graphics.transformPoint(globalX, globalY) end - ---- ----Translates the coordinate system in two dimensions. ---- ----When this function is called with two numbers, dx, and dy, all the following drawing operations take effect as if their x and y coordinates were x+dx and y+dy. ---- ----Scale and translate are not commutative operations, therefore, calling them in different orders will change the outcome. ---- ----This change lasts until love.draw() exits or else a love.graphics.pop reverts to a previous love.graphics.push. ---- ----Translating using whole numbers will prevent tearing/blurring of images and fonts draw after translating. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.translate) ---- ----@param dx number # The translation relative to the x-axis. ----@param dy number # The translation relative to the y-axis. -function love.graphics.translate(dx, dy) end - ---- ----Validates shader code. Check if specified shader code does not contain any errors. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics.validateShader) ---- ----@overload fun(gles: boolean, pixelcode: string, vertexcode: string):boolean, string ----@param gles boolean # Validate code as GLSL ES shader. ----@param code string # The pixel shader or vertex shader code, or a filename pointing to a file with the code. ----@return boolean status # true if specified shader code doesn't contain any errors. false otherwise. ----@return string message # Reason why shader code validation failed (or nil if validation succeded). -function love.graphics.validateShader(gles, code) end - ---- ----A Canvas is used for off-screen rendering. Think of it as an invisible screen that you can draw to, but that will not be visible until you draw it to the actual visible screen. It is also known as "render to texture". ---- ----By drawing things that do not change position often (such as background items) to the Canvas, and then drawing the entire Canvas instead of each item, you can reduce the number of draw operations performed each frame. ---- ----In versions prior to love.graphics.isSupported("canvas") could be used to check for support at runtime. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics) ---- ----@class love.Canvas: love.Texture, love.Drawable, love.Object -local Canvas = {} - ---- ----Generates mipmaps for the Canvas, based on the contents of the highest-resolution mipmap level. ---- ----The Canvas must be created with mipmaps set to a MipmapMode other than 'none' for this function to work. It should only be called while the Canvas is not the active render target. ---- ----If the mipmap mode is set to 'auto', this function is automatically called inside love.graphics.setCanvas when switching from this Canvas to another Canvas or to the main screen. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Canvas:generateMipmaps) ---- -function Canvas:generateMipmaps() end - ---- ----Gets the number of multisample antialiasing (MSAA) samples used when drawing to the Canvas. ---- ----This may be different than the number used as an argument to love.graphics.newCanvas if the system running LÖVE doesn't support that number. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Canvas:getMSAA) ---- ----@return number samples # The number of multisample antialiasing samples used by the canvas when drawing to it. -function Canvas:getMSAA() end - ---- ----Gets the MipmapMode this Canvas was created with. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Canvas:getMipmapMode) ---- ----@return love.MipmapMode mode # The mipmap mode this Canvas was created with. -function Canvas:getMipmapMode() end - ---- ----Generates ImageData from the contents of the Canvas. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Canvas:newImageData) ---- ----@overload fun(self: love.Canvas, slice: number, mipmap?: number, x: number, y: number, width: number, height: number):love.ImageData ----@return love.ImageData data # The new ImageData made from the Canvas' contents. -function Canvas:newImageData() end - ---- ----Render to the Canvas using a function. ---- ----This is a shortcut to love.graphics.setCanvas: ---- ----canvas:renderTo( func ) ---- ----is the same as ---- ----love.graphics.setCanvas( canvas ) ---- ----func() ---- ----love.graphics.setCanvas() ---- ---- ----[Open in Browser](https://love2d.org/wiki/Canvas:renderTo) ---- ----@param func function # A function performing drawing operations. -function Canvas:renderTo(func) end - ---- ----Superclass for all things that can be drawn on screen. This is an abstract type that can't be created directly. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics) ---- ----@class love.Drawable: love.Object -local Drawable = {} - ---- ----Defines the shape of characters that can be drawn onto the screen. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics) ---- ----@class love.Font: love.Object -local Font = {} - ---- ----Gets the ascent of the Font. ---- ----The ascent spans the distance between the baseline and the top of the glyph that reaches farthest from the baseline. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Font:getAscent) ---- ----@return number ascent # The ascent of the Font in pixels. -function Font:getAscent() end - ---- ----Gets the baseline of the Font. ---- ----Most scripts share the notion of a baseline: an imaginary horizontal line on which characters rest. In some scripts, parts of glyphs lie below the baseline. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Font:getBaseline) ---- ----@return number baseline # The baseline of the Font in pixels. -function Font:getBaseline() end - ---- ----Gets the DPI scale factor of the Font. ---- ----The DPI scale factor represents relative pixel density. A DPI scale factor of 2 means the font's glyphs have twice the pixel density in each dimension (4 times as many pixels in the same area) compared to a font with a DPI scale factor of 1. ---- ----The font size of TrueType fonts is scaled internally by the font's specified DPI scale factor. By default, LÖVE uses the screen's DPI scale factor when creating TrueType fonts. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Font:getDPIScale) ---- ----@return number dpiscale # The DPI scale factor of the Font. -function Font:getDPIScale() end - ---- ----Gets the descent of the Font. ---- ----The descent spans the distance between the baseline and the lowest descending glyph in a typeface. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Font:getDescent) ---- ----@return number descent # The descent of the Font in pixels. -function Font:getDescent() end - ---- ----Gets the filter mode for a font. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Font:getFilter) ---- ----@return love.FilterMode min # Filter mode used when minifying the font. ----@return love.FilterMode mag # Filter mode used when magnifying the font. ----@return number anisotropy # Maximum amount of anisotropic filtering used. -function Font:getFilter() end - ---- ----Gets the height of the Font. ---- ----The height of the font is the size including any spacing; the height which it will need. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Font:getHeight) ---- ----@return number height # The height of the Font in pixels. -function Font:getHeight() end - ---- ----Gets the kerning between two characters in the Font. ---- ----Kerning is normally handled automatically in love.graphics.print, Text objects, Font:getWidth, Font:getWrap, etc. This function is useful when stitching text together manually. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Font:getKerning) ---- ----@overload fun(self: love.Font, leftglyph: number, rightglyph: number):number ----@param leftchar string # The left character. ----@param rightchar string # The right character. ----@return number kerning # The kerning amount to add to the spacing between the two characters. May be negative. -function Font:getKerning(leftchar, rightchar) end - ---- ----Gets the line height. ---- ----This will be the value previously set by Font:setLineHeight, or 1.0 by default. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Font:getLineHeight) ---- ----@return number height # The current line height. -function Font:getLineHeight() end - ---- ----Determines the maximum width (accounting for newlines) taken by the given string. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Font:getWidth) ---- ----@param text string # A string. ----@return number width # The width of the text. -function Font:getWidth(text) end - ---- ----Gets formatting information for text, given a wrap limit. ---- ----This function accounts for newlines correctly (i.e. '\n'). ---- ---- ----[Open in Browser](https://love2d.org/wiki/Font:getWrap) ---- ----@param text string # The text that will be wrapped. ----@param wraplimit number # The maximum width in pixels of each line that ''text'' is allowed before wrapping. ----@return number width # The maximum width of the wrapped text. ----@return table wrappedtext # A sequence containing each line of text that was wrapped. -function Font:getWrap(text, wraplimit) end - ---- ----Gets whether the Font can render a character or string. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Font:hasGlyphs) ---- ----@overload fun(self: love.Font, character1: string, character2: string):boolean ----@overload fun(self: love.Font, codepoint1: number, codepoint2: number):boolean ----@param text string # A UTF-8 encoded unicode string. ----@return boolean hasglyph # Whether the font can render all the UTF-8 characters in the string. -function Font:hasGlyphs(text) end - ---- ----Sets the fallback fonts. When the Font doesn't contain a glyph, it will substitute the glyph from the next subsequent fallback Fonts. This is akin to setting a 'font stack' in Cascading Style Sheets (CSS). ---- ---- ----[Open in Browser](https://love2d.org/wiki/Font:setFallbacks) ---- ----@param fallbackfont1 love.Font # The first fallback Font to use. ----@vararg love.Font # Additional fallback Fonts. -function Font:setFallbacks(fallbackfont1, ...) end - ---- ----Sets the filter mode for a font. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Font:setFilter) ---- ----@param min love.FilterMode # How to scale a font down. ----@param mag love.FilterMode # How to scale a font up. ----@param anisotropy? number # Maximum amount of anisotropic filtering used. -function Font:setFilter(min, mag, anisotropy) end - ---- ----Sets the line height. ---- ----When rendering the font in lines the actual height will be determined by the line height multiplied by the height of the font. The default is 1.0. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Font:setLineHeight) ---- ----@param height number # The new line height. -function Font:setLineHeight(height) end - ---- ----Drawable image type. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics) ---- ----@class love.Image: love.Texture, love.Drawable, love.Object -local Image = {} - ---- ----Gets the flags used when the image was created. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Image:getFlags) ---- ----@return table flags # A table with ImageFlag keys. -function Image:getFlags() end - ---- ----Gets whether the Image was created from CompressedData. ---- ----Compressed images take up less space in VRAM, and drawing a compressed image will generally be more efficient than drawing one created from raw pixel data. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Image:isCompressed) ---- ----@return boolean compressed # Whether the Image is stored as a compressed texture on the GPU. -function Image:isCompressed() end - ---- ----Replace the contents of an Image. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Image:replacePixels) ---- ----@param data love.ImageData # The new ImageData to replace the contents with. ----@param slice number # Which cubemap face, array index, or volume layer to replace, if applicable. ----@param mipmap? number # The mimap level to replace, if the Image has mipmaps. ----@param x? number # The x-offset in pixels from the top-left of the image to replace. The given ImageData's width plus this value must not be greater than the pixel width of the Image's specified mipmap level. ----@param y? number # The y-offset in pixels from the top-left of the image to replace. The given ImageData's height plus this value must not be greater than the pixel height of the Image's specified mipmap level. ----@param reloadmipmaps boolean # Whether to generate new mipmaps after replacing the Image's pixels. True by default if the Image was created with automatically generated mipmaps, false by default otherwise. -function Image:replacePixels(data, slice, mipmap, x, y, reloadmipmaps) end - ---- ----A 2D polygon mesh used for drawing arbitrary textured shapes. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics) ---- ----@class love.Mesh: love.Drawable, love.Object -local Mesh = {} - ---- ----Attaches a vertex attribute from a different Mesh onto this Mesh, for use when drawing. This can be used to share vertex attribute data between several different Meshes. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Mesh:attachAttribute) ---- ----@overload fun(self: love.Mesh, name: string, mesh: love.Mesh, step?: love.VertexAttributeStep, attachname?: string) ----@param name string # The name of the vertex attribute to attach. ----@param mesh love.Mesh # The Mesh to get the vertex attribute from. -function Mesh:attachAttribute(name, mesh) end - ---- ----Removes a previously attached vertex attribute from this Mesh. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Mesh:detachAttribute) ---- ----@param name string # The name of the attached vertex attribute to detach. ----@return boolean success # Whether the attribute was successfully detached. -function Mesh:detachAttribute(name) end - ---- ----Gets the mode used when drawing the Mesh. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Mesh:getDrawMode) ---- ----@return love.MeshDrawMode mode # The mode used when drawing the Mesh. -function Mesh:getDrawMode() end - ---- ----Gets the range of vertices used when drawing the Mesh. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Mesh:getDrawRange) ---- ----@return number min # The index of the first vertex used when drawing, or the index of the first value in the vertex map used if one is set for this Mesh. ----@return number max # The index of the last vertex used when drawing, or the index of the last value in the vertex map used if one is set for this Mesh. -function Mesh:getDrawRange() end - ---- ----Gets the texture (Image or Canvas) used when drawing the Mesh. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Mesh:getTexture) ---- ----@return love.Texture texture # The Image or Canvas to texture the Mesh with when drawing, or nil if none is set. -function Mesh:getTexture() end - ---- ----Gets the properties of a vertex in the Mesh. ---- ----In versions prior to 11.0, color and byte component values were within the range of 0 to 255 instead of 0 to 1. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Mesh:getVertex) ---- ----@overload fun(self: love.Mesh, index: number):number, number, number, number, number, number, number, number ----@param index number # The one-based index of the vertex you want to retrieve the information for. ----@return number attributecomponent # The first component of the first vertex attribute in the specified vertex. -function Mesh:getVertex(index) end - ---- ----Gets the properties of a specific attribute within a vertex in the Mesh. ---- ----Meshes without a custom vertex format specified in love.graphics.newMesh have position as their first attribute, texture coordinates as their second attribute, and color as their third attribute. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Mesh:getVertexAttribute) ---- ----@param vertexindex number # The index of the the vertex you want to retrieve the attribute for (one-based). ----@param attributeindex number # The index of the attribute within the vertex to be retrieved (one-based). ----@return number value1 # The value of the first component of the attribute. ----@return number value2 # The value of the second component of the attribute. -function Mesh:getVertexAttribute(vertexindex, attributeindex) end - ---- ----Gets the total number of vertices in the Mesh. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Mesh:getVertexCount) ---- ----@return number count # The total number of vertices in the mesh. -function Mesh:getVertexCount() end - ---- ----Gets the vertex format that the Mesh was created with. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Mesh:getVertexFormat) ---- ----@return {attribute: table} format # The vertex format of the Mesh, which is a table containing tables for each vertex attribute the Mesh was created with, in the form of {attribute, ...}. -function Mesh:getVertexFormat() end - ---- ----Gets the vertex map for the Mesh. The vertex map describes the order in which the vertices are used when the Mesh is drawn. The vertices, vertex map, and mesh draw mode work together to determine what exactly is displayed on the screen. ---- ----If no vertex map has been set previously via Mesh:setVertexMap, then this function will return nil in LÖVE 0.10.0+, or an empty table in 0.9.2 and older. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Mesh:getVertexMap) ---- ----@return table map # A table containing the list of vertex indices used when drawing. -function Mesh:getVertexMap() end - ---- ----Gets whether a specific vertex attribute in the Mesh is enabled. Vertex data from disabled attributes is not used when drawing the Mesh. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Mesh:isAttributeEnabled) ---- ----@param name string # The name of the vertex attribute to be checked. ----@return boolean enabled # Whether the vertex attribute is used when drawing this Mesh. -function Mesh:isAttributeEnabled(name) end - ---- ----Enables or disables a specific vertex attribute in the Mesh. Vertex data from disabled attributes is not used when drawing the Mesh. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Mesh:setAttributeEnabled) ---- ----@param name string # The name of the vertex attribute to enable or disable. ----@param enable boolean # Whether the vertex attribute is used when drawing this Mesh. -function Mesh:setAttributeEnabled(name, enable) end - ---- ----Sets the mode used when drawing the Mesh. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Mesh:setDrawMode) ---- ----@param mode love.MeshDrawMode # The mode to use when drawing the Mesh. -function Mesh:setDrawMode(mode) end - ---- ----Restricts the drawn vertices of the Mesh to a subset of the total. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Mesh:setDrawRange) ---- ----@overload fun(self: love.Mesh) ----@param start number # The index of the first vertex to use when drawing, or the index of the first value in the vertex map to use if one is set for this Mesh. ----@param count number # The number of vertices to use when drawing, or number of values in the vertex map to use if one is set for this Mesh. -function Mesh:setDrawRange(start, count) end - ---- ----Sets the texture (Image or Canvas) used when drawing the Mesh. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Mesh:setTexture) ---- ----@overload fun(self: love.Mesh) ----@param texture love.Texture # The Image or Canvas to texture the Mesh with when drawing. -function Mesh:setTexture(texture) end - ---- ----Sets the properties of a vertex in the Mesh. ---- ----In versions prior to 11.0, color and byte component values were within the range of 0 to 255 instead of 0 to 1. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Mesh:setVertex) ---- ----@overload fun(self: love.Mesh, index: number, vertex: table) ----@overload fun(self: love.Mesh, index: number, x: number, y: number, u: number, v: number, r?: number, g?: number, b?: number, a?: number) ----@overload fun(self: love.Mesh, index: number, vertex: table) ----@param index number # The index of the the vertex you want to modify (one-based). ----@param attributecomponent number # The first component of the first vertex attribute in the specified vertex. ----@vararg number # Additional components of all vertex attributes in the specified vertex. -function Mesh:setVertex(index, attributecomponent, ...) end - ---- ----Sets the properties of a specific attribute within a vertex in the Mesh. ---- ----Meshes without a custom vertex format specified in love.graphics.newMesh have position as their first attribute, texture coordinates as their second attribute, and color as their third attribute. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Mesh:setVertexAttribute) ---- ----@param vertexindex number # The index of the the vertex to be modified (one-based). ----@param attributeindex number # The index of the attribute within the vertex to be modified (one-based). ----@param value1 number # The new value for the first component of the attribute. ----@param value2 number # The new value for the second component of the attribute. ----@vararg number # Any additional vertex attribute components. -function Mesh:setVertexAttribute(vertexindex, attributeindex, value1, value2, ...) end - ---- ----Sets the vertex map for the Mesh. The vertex map describes the order in which the vertices are used when the Mesh is drawn. The vertices, vertex map, and mesh draw mode work together to determine what exactly is displayed on the screen. ---- ----The vertex map allows you to re-order or reuse vertices when drawing without changing the actual vertex parameters or duplicating vertices. It is especially useful when combined with different Mesh Draw Modes. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Mesh:setVertexMap) ---- ----@overload fun(self: love.Mesh, vi1: number, vi2: number, vi3: number) ----@overload fun(self: love.Mesh, data: love.Data, datatype: love.IndexDataType) ----@param map table # A table containing a list of vertex indices to use when drawing. Values must be in the range of Mesh:getVertexCount(). -function Mesh:setVertexMap(map) end - ---- ----Replaces a range of vertices in the Mesh with new ones. The total number of vertices in a Mesh cannot be changed after it has been created. This is often more efficient than calling Mesh:setVertex in a loop. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Mesh:setVertices) ---- ----@overload fun(self: love.Mesh, data: love.Data, startvertex?: number) ----@overload fun(self: love.Mesh, vertices: table) ----@param vertices {attributecomponent: number} # The table filled with vertex information tables for each vertex, in the form of {vertex, ...} where each vertex is a table in the form of {attributecomponent, ...}. ----@param startvertex? number # The index of the first vertex to replace. -function Mesh:setVertices(vertices, startvertex) end - ---- ----A ParticleSystem can be used to create particle effects like fire or smoke. ---- ----The particle system has to be created using update it in the update callback to see any changes in the particles emitted. ---- ----The particle system won't create any particles unless you call setParticleLifetime and setEmissionRate. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics) ---- ----@class love.ParticleSystem: love.Drawable, love.Object -local ParticleSystem = {} - ---- ----Creates an identical copy of the ParticleSystem in the stopped state. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:clone) ---- ----@return love.ParticleSystem particlesystem # The new identical copy of this ParticleSystem. -function ParticleSystem:clone() end - ---- ----Emits a burst of particles from the particle emitter. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:emit) ---- ----@param numparticles number # The amount of particles to emit. The number of emitted particles will be truncated if the particle system's max buffer size is reached. -function ParticleSystem:emit(numparticles) end - ---- ----Gets the maximum number of particles the ParticleSystem can have at once. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:getBufferSize) ---- ----@return number size # The maximum number of particles. -function ParticleSystem:getBufferSize() end - ---- ----Gets the series of colors applied to the particle sprite. ---- ----In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:getColors) ---- ----@return number r1 # First color, red component (0-1). ----@return number g1 # First color, green component (0-1). ----@return number b1 # First color, blue component (0-1). ----@return number a1 # First color, alpha component (0-1). ----@return number r2 # Second color, red component (0-1). ----@return number g2 # Second color, green component (0-1). ----@return number b2 # Second color, blue component (0-1). ----@return number a2 # Second color, alpha component (0-1). ----@return number r8 # Eighth color, red component (0-1). ----@return number g8 # Eighth color, green component (0-1). ----@return number b8 # Eighth color, blue component (0-1). ----@return number a8 # Eighth color, alpha component (0-1). -function ParticleSystem:getColors() end - ---- ----Gets the number of particles that are currently in the system. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:getCount) ---- ----@return number count # The current number of live particles. -function ParticleSystem:getCount() end - ---- ----Gets the direction of the particle emitter (in radians). ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:getDirection) ---- ----@return number direction # The direction of the emitter (radians). -function ParticleSystem:getDirection() end - ---- ----Gets the area-based spawn parameters for the particles. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:getEmissionArea) ---- ----@return love.AreaSpreadDistribution distribution # The type of distribution for new particles. ----@return number dx # The maximum spawn distance from the emitter along the x-axis for uniform distribution, or the standard deviation along the x-axis for normal distribution. ----@return number dy # The maximum spawn distance from the emitter along the y-axis for uniform distribution, or the standard deviation along the y-axis for normal distribution. ----@return number angle # The angle in radians of the emission area. ----@return boolean directionRelativeToCenter # True if newly spawned particles will be oriented relative to the center of the emission area, false otherwise. -function ParticleSystem:getEmissionArea() end - ---- ----Gets the amount of particles emitted per second. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:getEmissionRate) ---- ----@return number rate # The amount of particles per second. -function ParticleSystem:getEmissionRate() end - ---- ----Gets how long the particle system will emit particles (if -1 then it emits particles forever). ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:getEmitterLifetime) ---- ----@return number life # The lifetime of the emitter (in seconds). -function ParticleSystem:getEmitterLifetime() end - ---- ----Gets the mode used when the ParticleSystem adds new particles. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:getInsertMode) ---- ----@return love.ParticleInsertMode mode # The mode used when the ParticleSystem adds new particles. -function ParticleSystem:getInsertMode() end - ---- ----Gets the linear acceleration (acceleration along the x and y axes) for particles. ---- ----Every particle created will accelerate along the x and y axes between xmin,ymin and xmax,ymax. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:getLinearAcceleration) ---- ----@return number xmin # The minimum acceleration along the x axis. ----@return number ymin # The minimum acceleration along the y axis. ----@return number xmax # The maximum acceleration along the x axis. ----@return number ymax # The maximum acceleration along the y axis. -function ParticleSystem:getLinearAcceleration() end - ---- ----Gets the amount of linear damping (constant deceleration) for particles. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:getLinearDamping) ---- ----@return number min # The minimum amount of linear damping applied to particles. ----@return number max # The maximum amount of linear damping applied to particles. -function ParticleSystem:getLinearDamping() end - ---- ----Gets the particle image's draw offset. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:getOffset) ---- ----@return number ox # The x coordinate of the particle image's draw offset. ----@return number oy # The y coordinate of the particle image's draw offset. -function ParticleSystem:getOffset() end - ---- ----Gets the lifetime of the particles. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:getParticleLifetime) ---- ----@return number min # The minimum life of the particles (in seconds). ----@return number max # The maximum life of the particles (in seconds). -function ParticleSystem:getParticleLifetime() end - ---- ----Gets the position of the emitter. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:getPosition) ---- ----@return number x # Position along x-axis. ----@return number y # Position along y-axis. -function ParticleSystem:getPosition() end - ---- ----Gets the series of Quads used for the particle sprites. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:getQuads) ---- ----@return table quads # A table containing the Quads used. -function ParticleSystem:getQuads() end - ---- ----Gets the radial acceleration (away from the emitter). ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:getRadialAcceleration) ---- ----@return number min # The minimum acceleration. ----@return number max # The maximum acceleration. -function ParticleSystem:getRadialAcceleration() end - ---- ----Gets the rotation of the image upon particle creation (in radians). ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:getRotation) ---- ----@return number min # The minimum initial angle (radians). ----@return number max # The maximum initial angle (radians). -function ParticleSystem:getRotation() end - ---- ----Gets the amount of size variation (0 meaning no variation and 1 meaning full variation between start and end). ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:getSizeVariation) ---- ----@return number variation # The amount of variation (0 meaning no variation and 1 meaning full variation between start and end). -function ParticleSystem:getSizeVariation() end - ---- ----Gets the series of sizes by which the sprite is scaled. 1.0 is normal size. The particle system will interpolate between each size evenly over the particle's lifetime. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:getSizes) ---- ----@return number size1 # The first size. ----@return number size2 # The second size. ----@return number size8 # The eighth size. -function ParticleSystem:getSizes() end - ---- ----Gets the speed of the particles. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:getSpeed) ---- ----@return number min # The minimum linear speed of the particles. ----@return number max # The maximum linear speed of the particles. -function ParticleSystem:getSpeed() end - ---- ----Gets the spin of the sprite. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:getSpin) ---- ----@return number min # The minimum spin (radians per second). ----@return number max # The maximum spin (radians per second). ----@return number variation # The degree of variation (0 meaning no variation and 1 meaning full variation between start and end). -function ParticleSystem:getSpin() end - ---- ----Gets the amount of spin variation (0 meaning no variation and 1 meaning full variation between start and end). ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:getSpinVariation) ---- ----@return number variation # The amount of variation (0 meaning no variation and 1 meaning full variation between start and end). -function ParticleSystem:getSpinVariation() end - ---- ----Gets the amount of directional spread of the particle emitter (in radians). ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:getSpread) ---- ----@return number spread # The spread of the emitter (radians). -function ParticleSystem:getSpread() end - ---- ----Gets the tangential acceleration (acceleration perpendicular to the particle's direction). ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:getTangentialAcceleration) ---- ----@return number min # The minimum acceleration. ----@return number max # The maximum acceleration. -function ParticleSystem:getTangentialAcceleration() end - ---- ----Gets the texture (Image or Canvas) used for the particles. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:getTexture) ---- ----@return love.Texture texture # The Image or Canvas used for the particles. -function ParticleSystem:getTexture() end - ---- ----Gets whether particle angles and rotations are relative to their velocities. If enabled, particles are aligned to the angle of their velocities and rotate relative to that angle. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:hasRelativeRotation) ---- ----@return boolean enable # True if relative particle rotation is enabled, false if it's disabled. -function ParticleSystem:hasRelativeRotation() end - ---- ----Checks whether the particle system is actively emitting particles. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:isActive) ---- ----@return boolean active # True if system is active, false otherwise. -function ParticleSystem:isActive() end - ---- ----Checks whether the particle system is paused. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:isPaused) ---- ----@return boolean paused # True if system is paused, false otherwise. -function ParticleSystem:isPaused() end - ---- ----Checks whether the particle system is stopped. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:isStopped) ---- ----@return boolean stopped # True if system is stopped, false otherwise. -function ParticleSystem:isStopped() end - ---- ----Moves the position of the emitter. This results in smoother particle spawning behaviour than if ParticleSystem:setPosition is used every frame. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:moveTo) ---- ----@param x number # Position along x-axis. ----@param y number # Position along y-axis. -function ParticleSystem:moveTo(x, y) end - ---- ----Pauses the particle emitter. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:pause) ---- -function ParticleSystem:pause() end - ---- ----Resets the particle emitter, removing any existing particles and resetting the lifetime counter. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:reset) ---- -function ParticleSystem:reset() end - ---- ----Sets the size of the buffer (the max allowed amount of particles in the system). ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:setBufferSize) ---- ----@param size number # The buffer size. -function ParticleSystem:setBufferSize(size) end - ---- ----Sets a series of colors to apply to the particle sprite. The particle system will interpolate between each color evenly over the particle's lifetime. ---- ----Arguments can be passed in groups of four, representing the components of the desired RGBA value, or as tables of RGBA component values, with a default alpha value of 1 if only three values are given. At least one color must be specified. A maximum of eight may be used. ---- ----In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:setColors) ---- ----@overload fun(self: love.ParticleSystem, rgba1: table, rgba2: table, rgba8: table) ----@param r1 number # First color, red component (0-1). ----@param g1 number # First color, green component (0-1). ----@param b1 number # First color, blue component (0-1). ----@param a1? number # First color, alpha component (0-1). ----@param r2? number # Second color, red component (0-1). ----@param g2? number # Second color, green component (0-1). ----@param b2? number # Second color, blue component (0-1). ----@param a2? number # Second color, alpha component (0-1). ----@param r8? number # Eighth color, red component (0-1). ----@param g8? number # Eighth color, green component (0-1). ----@param b8? number # Eighth color, blue component (0-1). ----@param a8? number # Eighth color, alpha component (0-1). -function ParticleSystem:setColors(r1, g1, b1, a1, r2, g2, b2, a2, r8, g8, b8, a8) end - ---- ----Sets the direction the particles will be emitted in. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:setDirection) ---- ----@param direction number # The direction of the particles (in radians). -function ParticleSystem:setDirection(direction) end - ---- ----Sets area-based spawn parameters for the particles. Newly created particles will spawn in an area around the emitter based on the parameters to this function. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:setEmissionArea) ---- ----@param distribution love.AreaSpreadDistribution # The type of distribution for new particles. ----@param dx number # The maximum spawn distance from the emitter along the x-axis for uniform distribution, or the standard deviation along the x-axis for normal distribution. ----@param dy number # The maximum spawn distance from the emitter along the y-axis for uniform distribution, or the standard deviation along the y-axis for normal distribution. ----@param angle? number # The angle in radians of the emission area. ----@param directionRelativeToCenter? boolean # True if newly spawned particles will be oriented relative to the center of the emission area, false otherwise. -function ParticleSystem:setEmissionArea(distribution, dx, dy, angle, directionRelativeToCenter) end - ---- ----Sets the amount of particles emitted per second. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:setEmissionRate) ---- ----@param rate number # The amount of particles per second. -function ParticleSystem:setEmissionRate(rate) end - ---- ----Sets how long the particle system should emit particles (if -1 then it emits particles forever). ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:setEmitterLifetime) ---- ----@param life number # The lifetime of the emitter (in seconds). -function ParticleSystem:setEmitterLifetime(life) end - ---- ----Sets the mode to use when the ParticleSystem adds new particles. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:setInsertMode) ---- ----@param mode love.ParticleInsertMode # The mode to use when the ParticleSystem adds new particles. -function ParticleSystem:setInsertMode(mode) end - ---- ----Sets the linear acceleration (acceleration along the x and y axes) for particles. ---- ----Every particle created will accelerate along the x and y axes between xmin,ymin and xmax,ymax. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:setLinearAcceleration) ---- ----@param xmin number # The minimum acceleration along the x axis. ----@param ymin number # The minimum acceleration along the y axis. ----@param xmax? number # The maximum acceleration along the x axis. ----@param ymax? number # The maximum acceleration along the y axis. -function ParticleSystem:setLinearAcceleration(xmin, ymin, xmax, ymax) end - ---- ----Sets the amount of linear damping (constant deceleration) for particles. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:setLinearDamping) ---- ----@param min number # The minimum amount of linear damping applied to particles. ----@param max? number # The maximum amount of linear damping applied to particles. -function ParticleSystem:setLinearDamping(min, max) end - ---- ----Set the offset position which the particle sprite is rotated around. ---- ----If this function is not used, the particles rotate around their center. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:setOffset) ---- ----@param x number # The x coordinate of the rotation offset. ----@param y number # The y coordinate of the rotation offset. -function ParticleSystem:setOffset(x, y) end - ---- ----Sets the lifetime of the particles. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:setParticleLifetime) ---- ----@param min number # The minimum life of the particles (in seconds). ----@param max? number # The maximum life of the particles (in seconds). -function ParticleSystem:setParticleLifetime(min, max) end - ---- ----Sets the position of the emitter. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:setPosition) ---- ----@param x number # Position along x-axis. ----@param y number # Position along y-axis. -function ParticleSystem:setPosition(x, y) end - ---- ----Sets a series of Quads to use for the particle sprites. Particles will choose a Quad from the list based on the particle's current lifetime, allowing for the use of animated sprite sheets with ParticleSystems. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:setQuads) ---- ----@overload fun(self: love.ParticleSystem, quads: table) ----@param quad1 love.Quad # The first Quad to use. ----@param quad2 love.Quad # The second Quad to use. -function ParticleSystem:setQuads(quad1, quad2) end - ---- ----Set the radial acceleration (away from the emitter). ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:setRadialAcceleration) ---- ----@param min number # The minimum acceleration. ----@param max? number # The maximum acceleration. -function ParticleSystem:setRadialAcceleration(min, max) end - ---- ----Sets whether particle angles and rotations are relative to their velocities. If enabled, particles are aligned to the angle of their velocities and rotate relative to that angle. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:setRelativeRotation) ---- ----@param enable boolean # True to enable relative particle rotation, false to disable it. -function ParticleSystem:setRelativeRotation(enable) end - ---- ----Sets the rotation of the image upon particle creation (in radians). ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:setRotation) ---- ----@param min number # The minimum initial angle (radians). ----@param max? number # The maximum initial angle (radians). -function ParticleSystem:setRotation(min, max) end - ---- ----Sets the amount of size variation (0 meaning no variation and 1 meaning full variation between start and end). ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:setSizeVariation) ---- ----@param variation number # The amount of variation (0 meaning no variation and 1 meaning full variation between start and end). -function ParticleSystem:setSizeVariation(variation) end - ---- ----Sets a series of sizes by which to scale a particle sprite. 1.0 is normal size. The particle system will interpolate between each size evenly over the particle's lifetime. ---- ----At least one size must be specified. A maximum of eight may be used. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:setSizes) ---- ----@param size1 number # The first size. ----@param size2? number # The second size. ----@param size8? number # The eighth size. -function ParticleSystem:setSizes(size1, size2, size8) end - ---- ----Sets the speed of the particles. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:setSpeed) ---- ----@param min number # The minimum linear speed of the particles. ----@param max? number # The maximum linear speed of the particles. -function ParticleSystem:setSpeed(min, max) end - ---- ----Sets the spin of the sprite. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:setSpin) ---- ----@param min number # The minimum spin (radians per second). ----@param max? number # The maximum spin (radians per second). -function ParticleSystem:setSpin(min, max) end - ---- ----Sets the amount of spin variation (0 meaning no variation and 1 meaning full variation between start and end). ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:setSpinVariation) ---- ----@param variation number # The amount of variation (0 meaning no variation and 1 meaning full variation between start and end). -function ParticleSystem:setSpinVariation(variation) end - ---- ----Sets the amount of spread for the system. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:setSpread) ---- ----@param spread number # The amount of spread (radians). -function ParticleSystem:setSpread(spread) end - ---- ----Sets the tangential acceleration (acceleration perpendicular to the particle's direction). ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:setTangentialAcceleration) ---- ----@param min number # The minimum acceleration. ----@param max? number # The maximum acceleration. -function ParticleSystem:setTangentialAcceleration(min, max) end - ---- ----Sets the texture (Image or Canvas) to be used for the particles. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:setTexture) ---- ----@param texture love.Texture # An Image or Canvas to use for the particles. -function ParticleSystem:setTexture(texture) end - ---- ----Starts the particle emitter. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:start) ---- -function ParticleSystem:start() end - ---- ----Stops the particle emitter, resetting the lifetime counter. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:stop) ---- -function ParticleSystem:stop() end - ---- ----Updates the particle system; moving, creating and killing particles. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleSystem:update) ---- ----@param dt number # The time (seconds) since last frame. -function ParticleSystem:update(dt) end - ---- ----A quadrilateral (a polygon with four sides and four corners) with texture coordinate information. ---- ----Quads can be used to select part of a texture to draw. In this way, one large texture atlas can be loaded, and then split up into sub-images. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics) ---- ----@class love.Quad: love.Object -local Quad = {} - ---- ----Gets reference texture dimensions initially specified in love.graphics.newQuad. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Quad:getTextureDimensions) ---- ----@return number sw # The Texture width used by the Quad. ----@return number sh # The Texture height used by the Quad. -function Quad:getTextureDimensions() end - ---- ----Gets the current viewport of this Quad. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Quad:getViewport) ---- ----@return number x # The top-left corner along the x-axis. ----@return number y # The top-left corner along the y-axis. ----@return number w # The width of the viewport. ----@return number h # The height of the viewport. -function Quad:getViewport() end - ---- ----Sets the texture coordinates according to a viewport. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Quad:setViewport) ---- ----@param x number # The top-left corner along the x-axis. ----@param y number # The top-left corner along the y-axis. ----@param w number # The width of the viewport. ----@param h number # The height of the viewport. ----@param sw number # The reference width, the width of the Image. (Must be greater than 0.) ----@param sh number # The reference height, the height of the Image. (Must be greater than 0.) -function Quad:setViewport(x, y, w, h, sw, sh) end - ---- ----A Shader is used for advanced hardware-accelerated pixel or vertex manipulation. These effects are written in a language based on GLSL (OpenGL Shading Language) with a few things simplified for easier coding. ---- ----Potential uses for shaders include HDR/bloom, motion blur, grayscale/invert/sepia/any kind of color effect, reflection/refraction, distortions, bump mapping, and much more! Here is a collection of basic shaders and good starting point to learn: https://github.com/vrld/moonshine ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics) ---- ----@class love.Shader: love.Object -local Shader = {} - ---- ----Returns any warning and error messages from compiling the shader code. This can be used for debugging your shaders if there's anything the graphics hardware doesn't like. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Shader:getWarnings) ---- ----@return string warnings # Warning and error messages (if any). -function Shader:getWarnings() end - ---- ----Gets whether a uniform / extern variable exists in the Shader. ---- ----If a graphics driver's shader compiler determines that a uniform / extern variable doesn't affect the final output of the shader, it may optimize the variable out. This function will return false in that case. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Shader:hasUniform) ---- ----@param name string # The name of the uniform variable. ----@return boolean hasuniform # Whether the uniform exists in the shader and affects its final output. -function Shader:hasUniform(name) end - ---- ----Sends one or more values to a special (''uniform'') variable inside the shader. Uniform variables have to be marked using the ''uniform'' or ''extern'' keyword, e.g. ---- ----uniform float time; // 'float' is the typical number type used in GLSL shaders. ---- ----uniform float varsvec2 light_pos; ---- ----uniform vec4 colors[4; ---- ----The corresponding send calls would be ---- ----shader:send('time', t) ---- ----shader:send('vars',a,b) ---- ----shader:send('light_pos', {light_x, light_y}) ---- ----shader:send('colors', {r1, g1, b1, a1}, {r2, g2, b2, a2}, {r3, g3, b3, a3}, {r4, g4, b4, a4}) ---- ----Uniform / extern variables are read-only in the shader code and remain constant until modified by a Shader:send call. Uniform variables can be accessed in both the Vertex and Pixel components of a shader, as long as the variable is declared in each. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Shader:send) ---- ----@overload fun(self: love.Shader, name: string, vector: table, ...) ----@overload fun(self: love.Shader, name: string, matrix: table, ...) ----@overload fun(self: love.Shader, name: string, texture: love.Texture) ----@overload fun(self: love.Shader, name: string, boolean: boolean, ...) ----@overload fun(self: love.Shader, name: string, matrixlayout: love.MatrixLayout, matrix: table, ...) ----@overload fun(self: love.Shader, name: string, data: love.Data, offset?: number, size?: number) ----@overload fun(self: love.Shader, name: string, data: love.Data, matrixlayout: love.MatrixLayout, offset?: number, size?: number) ----@overload fun(self: love.Shader, name: string, matrixlayout: love.MatrixLayout, data: love.Data, offset?: number, size?: number) ----@param name string # Name of the number to send to the shader. ----@param number number # Number to send to store in the uniform variable. ----@vararg number # Additional numbers to send if the uniform variable is an array. -function Shader:send(name, number, ...) end - ---- ----Sends one or more colors to a special (''extern'' / ''uniform'') vec3 or vec4 variable inside the shader. The color components must be in the range of 1. The colors are gamma-corrected if global gamma-correction is enabled. ---- ----Extern variables must be marked using the ''extern'' keyword, e.g. ---- ----extern vec4 Color; ---- ----The corresponding sendColor call would be ---- ----shader:sendColor('Color', {r, g, b, a}) ---- ----Extern variables can be accessed in both the Vertex and Pixel stages of a shader, as long as the variable is declared in each. ---- ----In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Shader:sendColor) ---- ----@param name string # The name of the color extern variable to send to in the shader. ----@param color table # A table with red, green, blue, and optional alpha color components in the range of 1 to send to the extern as a vector. ----@vararg table # Additional colors to send in case the extern is an array. All colors need to be of the same size (e.g. only vec3's). -function Shader:sendColor(name, color, ...) end - ---- ----Using a single image, draw any number of identical copies of the image using a single call to love.graphics.draw(). This can be used, for example, to draw repeating copies of a single background image with high performance. ---- ----A SpriteBatch can be even more useful when the underlying image is a texture atlas (a single image file containing many independent images); by adding Quads to the batch, different sub-images from within the atlas can be drawn. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics) ---- ----@class love.SpriteBatch: love.Drawable, love.Object -local SpriteBatch = {} - ---- ----Adds a sprite to the batch. Sprites are drawn in the order they are added. ---- ---- ----[Open in Browser](https://love2d.org/wiki/SpriteBatch:add) ---- ----@overload fun(self: love.SpriteBatch, quad: love.Quad, x: number, y: number, r?: number, sx?: number, sy?: number, ox?: number, oy?: number, kx?: number, ky?: number):number ----@param x number # The position to draw the object (x-axis). ----@param y number # The position to draw the object (y-axis). ----@param r? number # Orientation (radians). ----@param sx? number # Scale factor (x-axis). ----@param sy? number # Scale factor (y-axis). ----@param ox? number # Origin offset (x-axis). ----@param oy? number # Origin offset (y-axis). ----@param kx? number # Shear factor (x-axis). ----@param ky? number # Shear factor (y-axis). ----@return number id # An identifier for the added sprite. -function SpriteBatch:add(x, y, r, sx, sy, ox, oy, kx, ky) end - ---- ----Adds a sprite to a batch created with an Array Texture. ---- ---- ----[Open in Browser](https://love2d.org/wiki/SpriteBatch:addLayer) ---- ----@overload fun(self: love.SpriteBatch, layerindex: number, quad: love.Quad, x?: number, y?: number, r?: number, sx?: number, sy?: number, ox?: number, oy?: number, kx?: number, ky?: number):number ----@overload fun(self: love.SpriteBatch, layerindex: number, transform: love.Transform):number ----@overload fun(self: love.SpriteBatch, layerindex: number, quad: love.Quad, transform: love.Transform):number ----@param layerindex number # The index of the layer to use for this sprite. ----@param x? number # The position to draw the sprite (x-axis). ----@param y? number # The position to draw the sprite (y-axis). ----@param r? number # Orientation (radians). ----@param sx? number # Scale factor (x-axis). ----@param sy? number # Scale factor (y-axis). ----@param ox? number # Origin offset (x-axis). ----@param oy? number # Origin offset (y-axis). ----@param kx? number # Shearing factor (x-axis). ----@param ky? number # Shearing factor (y-axis). ----@return number spriteindex # The index of the added sprite, for use with SpriteBatch:set or SpriteBatch:setLayer. -function SpriteBatch:addLayer(layerindex, x, y, r, sx, sy, ox, oy, kx, ky) end - ---- ----Attaches a per-vertex attribute from a Mesh onto this SpriteBatch, for use when drawing. This can be combined with a Shader to augment a SpriteBatch with per-vertex or additional per-sprite information instead of just having per-sprite colors. ---- ----Each sprite in a SpriteBatch has 4 vertices in the following order: top-left, bottom-left, top-right, bottom-right. The index returned by SpriteBatch:add (and used by SpriteBatch:set) can used to determine the first vertex of a specific sprite with the formula 1 + 4 * ( id - 1 ). ---- ---- ----[Open in Browser](https://love2d.org/wiki/SpriteBatch:attachAttribute) ---- ----@param name string # The name of the vertex attribute to attach. ----@param mesh love.Mesh # The Mesh to get the vertex attribute from. -function SpriteBatch:attachAttribute(name, mesh) end - ---- ----Removes all sprites from the buffer. ---- ---- ----[Open in Browser](https://love2d.org/wiki/SpriteBatch:clear) ---- -function SpriteBatch:clear() end - ---- ----Immediately sends all new and modified sprite data in the batch to the graphics card. ---- ----Normally it isn't necessary to call this method as love.graphics.draw(spritebatch, ...) will do it automatically if needed, but explicitly using SpriteBatch:flush gives more control over when the work happens. ---- ----If this method is used, it generally shouldn't be called more than once (at most) between love.graphics.draw(spritebatch, ...) calls. ---- ---- ----[Open in Browser](https://love2d.org/wiki/SpriteBatch:flush) ---- -function SpriteBatch:flush() end - ---- ----Gets the maximum number of sprites the SpriteBatch can hold. ---- ---- ----[Open in Browser](https://love2d.org/wiki/SpriteBatch:getBufferSize) ---- ----@return number size # The maximum number of sprites the batch can hold. -function SpriteBatch:getBufferSize() end - ---- ----Gets the color that will be used for the next add and set operations. ---- ----If no color has been set with SpriteBatch:setColor or the current SpriteBatch color has been cleared, this method will return nil. ---- ----In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1. ---- ---- ----[Open in Browser](https://love2d.org/wiki/SpriteBatch:getColor) ---- ----@return number r # The red component (0-1). ----@return number g # The green component (0-1). ----@return number b # The blue component (0-1). ----@return number a # The alpha component (0-1). -function SpriteBatch:getColor() end - ---- ----Gets the number of sprites currently in the SpriteBatch. ---- ---- ----[Open in Browser](https://love2d.org/wiki/SpriteBatch:getCount) ---- ----@return number count # The number of sprites currently in the batch. -function SpriteBatch:getCount() end - ---- ----Gets the texture (Image or Canvas) used by the SpriteBatch. ---- ---- ----[Open in Browser](https://love2d.org/wiki/SpriteBatch:getTexture) ---- ----@return love.Texture texture # The Image or Canvas used by the SpriteBatch. -function SpriteBatch:getTexture() end - ---- ----Changes a sprite in the batch. This requires the sprite index returned by SpriteBatch:add or SpriteBatch:addLayer. ---- ---- ----[Open in Browser](https://love2d.org/wiki/SpriteBatch:set) ---- ----@overload fun(self: love.SpriteBatch, spriteindex: number, quad: love.Quad, x: number, y: number, r?: number, sx?: number, sy?: number, ox?: number, oy?: number, kx?: number, ky?: number) ----@param spriteindex number # The index of the sprite that will be changed. ----@param x number # The position to draw the object (x-axis). ----@param y number # The position to draw the object (y-axis). ----@param r? number # Orientation (radians). ----@param sx? number # Scale factor (x-axis). ----@param sy? number # Scale factor (y-axis). ----@param ox? number # Origin offset (x-axis). ----@param oy? number # Origin offset (y-axis). ----@param kx? number # Shear factor (x-axis). ----@param ky? number # Shear factor (y-axis). -function SpriteBatch:set(spriteindex, x, y, r, sx, sy, ox, oy, kx, ky) end - ---- ----Sets the color that will be used for the next add and set operations. Calling the function without arguments will disable all per-sprite colors for the SpriteBatch. ---- ----In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1. ---- ----In version 0.9.2 and older, the global color set with love.graphics.setColor will not work on the SpriteBatch if any of the sprites has its own color. ---- ---- ----[Open in Browser](https://love2d.org/wiki/SpriteBatch:setColor) ---- ----@overload fun(self: love.SpriteBatch) ----@param r number # The amount of red. ----@param g number # The amount of green. ----@param b number # The amount of blue. ----@param a? number # The amount of alpha. -function SpriteBatch:setColor(r, g, b, a) end - ---- ----Restricts the drawn sprites in the SpriteBatch to a subset of the total. ---- ---- ----[Open in Browser](https://love2d.org/wiki/SpriteBatch:setDrawRange) ---- ----@overload fun(self: love.SpriteBatch) ----@param start number # The index of the first sprite to draw. Index 1 corresponds to the first sprite added with SpriteBatch:add. ----@param count number # The number of sprites to draw. -function SpriteBatch:setDrawRange(start, count) end - ---- ----Changes a sprite previously added with add or addLayer, in a batch created with an Array Texture. ---- ---- ----[Open in Browser](https://love2d.org/wiki/SpriteBatch:setLayer) ---- ----@overload fun(self: love.SpriteBatch, spriteindex: number, layerindex: number, quad: love.Quad, x?: number, y?: number, r?: number, sx?: number, sy?: number, ox?: number, oy?: number, kx?: number, ky?: number) ----@overload fun(self: love.SpriteBatch, spriteindex: number, layerindex: number, transform: love.Transform) ----@overload fun(self: love.SpriteBatch, spriteindex: number, layerindex: number, quad: love.Quad, transform: love.Transform) ----@param spriteindex number # The index of the existing sprite to replace. ----@param layerindex number # The index of the layer in the Array Texture to use for this sprite. ----@param x? number # The position to draw the sprite (x-axis). ----@param y? number # The position to draw the sprite (y-axis). ----@param r? number # Orientation (radians). ----@param sx? number # Scale factor (x-axis). ----@param sy? number # Scale factor (y-axis). ----@param ox? number # Origin offset (x-axis). ----@param oy? number # Origin offset (y-axis). ----@param kx? number # Shearing factor (x-axis). ----@param ky? number # Shearing factor (y-axis). -function SpriteBatch:setLayer(spriteindex, layerindex, x, y, r, sx, sy, ox, oy, kx, ky) end - ---- ----Sets the texture (Image or Canvas) used for the sprites in the batch, when drawing. ---- ---- ----[Open in Browser](https://love2d.org/wiki/SpriteBatch:setTexture) ---- ----@param texture love.Texture # The new Image or Canvas to use for the sprites in the batch. -function SpriteBatch:setTexture(texture) end - ---- ----Drawable text. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics) ---- ----@class love.Text: love.Drawable, love.Object -local Text = {} - ---- ----Adds additional colored text to the Text object at the specified position. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Text:add) ---- ----@overload fun(self: love.Text, coloredtext: table, x?: number, y?: number, angle?: number, sx?: number, sy?: number, ox?: number, oy?: number, kx?: number, ky?: number):number ----@param textstring string # The text to add to the object. ----@param x? number # The position of the new text on the x-axis. ----@param y? number # The position of the new text on the y-axis. ----@param angle? number # The orientation of the new text in radians. ----@param sx? number # Scale factor on the x-axis. ----@param sy? number # Scale factor on the y-axis. ----@param ox? number # Origin offset on the x-axis. ----@param oy? number # Origin offset on the y-axis. ----@param kx? number # Shearing / skew factor on the x-axis. ----@param ky? number # Shearing / skew factor on the y-axis. ----@return number index # An index number that can be used with Text:getWidth or Text:getHeight. -function Text:add(textstring, x, y, angle, sx, sy, ox, oy, kx, ky) end - ---- ----Adds additional formatted / colored text to the Text object at the specified position. ---- ----The word wrap limit is applied before any scaling, rotation, and other coordinate transformations. Therefore the amount of text per line stays constant given the same wrap limit, even if the scale arguments change. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Text:addf) ---- ----@overload fun(self: love.Text, coloredtext: table, wraplimit: number, align: love.AlignMode, x: number, y: number, angle?: number, sx?: number, sy?: number, ox?: number, oy?: number, kx?: number, ky?: number):number ----@param textstring string # The text to add to the object. ----@param wraplimit number # The maximum width in pixels of the text before it gets automatically wrapped to a new line. ----@param align love.AlignMode # The alignment of the text. ----@param x number # The position of the new text (x-axis). ----@param y number # The position of the new text (y-axis). ----@param angle? number # Orientation (radians). ----@param sx? number # Scale factor (x-axis). ----@param sy? number # Scale factor (y-axis). ----@param ox? number # Origin offset (x-axis). ----@param oy? number # Origin offset (y-axis). ----@param kx? number # Shearing / skew factor (x-axis). ----@param ky? number # Shearing / skew factor (y-axis). ----@return number index # An index number that can be used with Text:getWidth or Text:getHeight. -function Text:addf(textstring, wraplimit, align, x, y, angle, sx, sy, ox, oy, kx, ky) end - ---- ----Clears the contents of the Text object. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Text:clear) ---- -function Text:clear() end - ---- ----Gets the width and height of the text in pixels. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Text:getDimensions) ---- ----@overload fun(self: love.Text, index: number):number, number ----@return number width # The width of the text. If multiple sub-strings have been added with Text:add, the width of the last sub-string is returned. ----@return number height # The height of the text. If multiple sub-strings have been added with Text:add, the height of the last sub-string is returned. -function Text:getDimensions() end - ---- ----Gets the Font used with the Text object. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Text:getFont) ---- ----@return love.Font font # The font used with this Text object. -function Text:getFont() end - ---- ----Gets the height of the text in pixels. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Text:getHeight) ---- ----@overload fun(self: love.Text, index: number):number ----@return number height # The height of the text. If multiple sub-strings have been added with Text:add, the height of the last sub-string is returned. -function Text:getHeight() end - ---- ----Gets the width of the text in pixels. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Text:getWidth) ---- ----@overload fun(self: love.Text, index: number):number ----@return number width # The width of the text. If multiple sub-strings have been added with Text:add, the width of the last sub-string is returned. -function Text:getWidth() end - ---- ----Replaces the contents of the Text object with a new unformatted string. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Text:set) ---- ----@overload fun(self: love.Text, coloredtext: table) ----@param textstring string # The new string of text to use. -function Text:set(textstring) end - ---- ----Replaces the Font used with the text. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Text:setFont) ---- ----@param font love.Font # The new font to use with this Text object. -function Text:setFont(font) end - ---- ----Replaces the contents of the Text object with a new formatted string. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Text:setf) ---- ----@overload fun(self: love.Text, coloredtext: table, wraplimit: number, align: love.AlignMode) ----@param textstring string # The new string of text to use. ----@param wraplimit number # The maximum width in pixels of the text before it gets automatically wrapped to a new line. ----@param align love.AlignMode # The alignment of the text. -function Text:setf(textstring, wraplimit, align) end - ---- ----Superclass for drawable objects which represent a texture. All Textures can be drawn with Quads. This is an abstract type that can't be created directly. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics) ---- ----@class love.Texture: love.Drawable, love.Object -local Texture = {} - ---- ----Gets the DPI scale factor of the Texture. ---- ----The DPI scale factor represents relative pixel density. A DPI scale factor of 2 means the texture has twice the pixel density in each dimension (4 times as many pixels in the same area) compared to a texture with a DPI scale factor of 1. ---- ----For example, a texture with pixel dimensions of 100x100 with a DPI scale factor of 2 will be drawn as if it was 50x50. This is useful with high-dpi / retina displays to easily allow swapping out higher or lower pixel density Images and Canvases without needing any extra manual scaling logic. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Texture:getDPIScale) ---- ----@return number dpiscale # The DPI scale factor of the Texture. -function Texture:getDPIScale() end - ---- ----Gets the depth of a Volume Texture. Returns 1 for 2D, Cubemap, and Array textures. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Texture:getDepth) ---- ----@return number depth # The depth of the volume Texture. -function Texture:getDepth() end - ---- ----Gets the comparison mode used when sampling from a depth texture in a shader. ---- ----Depth texture comparison modes are advanced low-level functionality typically used with shadow mapping in 3D. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Texture:getDepthSampleMode) ---- ----@return love.CompareMode compare # The comparison mode used when sampling from this texture in a shader, or nil if setDepthSampleMode has not been called on this Texture. -function Texture:getDepthSampleMode() end - ---- ----Gets the width and height of the Texture. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Texture:getDimensions) ---- ----@return number width # The width of the Texture. ----@return number height # The height of the Texture. -function Texture:getDimensions() end - ---- ----Gets the filter mode of the Texture. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Texture:getFilter) ---- ----@return love.FilterMode min # Filter mode to use when minifying the texture (rendering it at a smaller size on-screen than its size in pixels). ----@return love.FilterMode mag # Filter mode to use when magnifying the texture (rendering it at a smaller size on-screen than its size in pixels). ----@return number anisotropy # Maximum amount of anisotropic filtering used. -function Texture:getFilter() end - ---- ----Gets the pixel format of the Texture. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Texture:getFormat) ---- ----@return love.PixelFormat format # The pixel format the Texture was created with. -function Texture:getFormat() end - ---- ----Gets the height of the Texture. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Texture:getHeight) ---- ----@return number height # The height of the Texture. -function Texture:getHeight() end - ---- ----Gets the number of layers / slices in an Array Texture. Returns 1 for 2D, Cubemap, and Volume textures. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Texture:getLayerCount) ---- ----@return number layers # The number of layers in the Array Texture. -function Texture:getLayerCount() end - ---- ----Gets the number of mipmaps contained in the Texture. If the texture was not created with mipmaps, it will return 1. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Texture:getMipmapCount) ---- ----@return number mipmaps # The number of mipmaps in the Texture. -function Texture:getMipmapCount() end - ---- ----Gets the mipmap filter mode for a Texture. Prior to 11.0 this method only worked on Images. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Texture:getMipmapFilter) ---- ----@return love.FilterMode mode # The filter mode used in between mipmap levels. nil if mipmap filtering is not enabled. ----@return number sharpness # Value used to determine whether the image should use more or less detailed mipmap levels than normal when drawing. -function Texture:getMipmapFilter() end - ---- ----Gets the width and height in pixels of the Texture. ---- ----Texture:getDimensions gets the dimensions of the texture in units scaled by the texture's DPI scale factor, rather than pixels. Use getDimensions for calculations related to drawing the texture (calculating an origin offset, for example), and getPixelDimensions only when dealing specifically with pixels, for example when using Canvas:newImageData. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Texture:getPixelDimensions) ---- ----@return number pixelwidth # The width of the Texture, in pixels. ----@return number pixelheight # The height of the Texture, in pixels. -function Texture:getPixelDimensions() end - ---- ----Gets the height in pixels of the Texture. ---- ----DPI scale factor, rather than pixels. Use getHeight for calculations related to drawing the texture (calculating an origin offset, for example), and getPixelHeight only when dealing specifically with pixels, for example when using Canvas:newImageData. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Texture:getPixelHeight) ---- ----@return number pixelheight # The height of the Texture, in pixels. -function Texture:getPixelHeight() end - ---- ----Gets the width in pixels of the Texture. ---- ----DPI scale factor, rather than pixels. Use getWidth for calculations related to drawing the texture (calculating an origin offset, for example), and getPixelWidth only when dealing specifically with pixels, for example when using Canvas:newImageData. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Texture:getPixelWidth) ---- ----@return number pixelwidth # The width of the Texture, in pixels. -function Texture:getPixelWidth() end - ---- ----Gets the type of the Texture. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Texture:getTextureType) ---- ----@return love.TextureType texturetype # The type of the Texture. -function Texture:getTextureType() end - ---- ----Gets the width of the Texture. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Texture:getWidth) ---- ----@return number width # The width of the Texture. -function Texture:getWidth() end - ---- ----Gets the wrapping properties of a Texture. ---- ----This function returns the currently set horizontal and vertical wrapping modes for the texture. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Texture:getWrap) ---- ----@return love.WrapMode horiz # Horizontal wrapping mode of the texture. ----@return love.WrapMode vert # Vertical wrapping mode of the texture. ----@return love.WrapMode depth # Wrapping mode for the z-axis of a Volume texture. -function Texture:getWrap() end - ---- ----Gets whether the Texture can be drawn and sent to a Shader. ---- ----Canvases created with stencil and/or depth PixelFormats are not readable by default, unless readable=true is specified in the settings table passed into love.graphics.newCanvas. ---- ----Non-readable Canvases can still be rendered to. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Texture:isReadable) ---- ----@return boolean readable # Whether the Texture is readable. -function Texture:isReadable() end - ---- ----Sets the comparison mode used when sampling from a depth texture in a shader. Depth texture comparison modes are advanced low-level functionality typically used with shadow mapping in 3D. ---- ----When using a depth texture with a comparison mode set in a shader, it must be declared as a sampler2DShadow and used in a GLSL 3 Shader. The result of accessing the texture in the shader will return a float between 0 and 1, proportional to the number of samples (up to 4 samples will be used if bilinear filtering is enabled) that passed the test set by the comparison operation. ---- ----Depth texture comparison can only be used with readable depth-formatted Canvases. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Texture:setDepthSampleMode) ---- ----@param compare love.CompareMode # The comparison mode used when sampling from this texture in a shader. -function Texture:setDepthSampleMode(compare) end - ---- ----Sets the filter mode of the Texture. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Texture:setFilter) ---- ----@param min love.FilterMode # Filter mode to use when minifying the texture (rendering it at a smaller size on-screen than its size in pixels). ----@param mag love.FilterMode # Filter mode to use when magnifying the texture (rendering it at a larger size on-screen than its size in pixels). ----@param anisotropy? number # Maximum amount of anisotropic filtering to use. -function Texture:setFilter(min, mag, anisotropy) end - ---- ----Sets the mipmap filter mode for a Texture. Prior to 11.0 this method only worked on Images. ---- ----Mipmapping is useful when drawing a texture at a reduced scale. It can improve performance and reduce aliasing issues. ---- ----In created with the mipmaps flag enabled for the mipmap filter to have any effect. In versions prior to 0.10.0 it's best to call this method directly after creating the image with love.graphics.newImage, to avoid bugs in certain graphics drivers. ---- ----Due to hardware restrictions and driver bugs, in versions prior to 0.10.0 images that weren't loaded from a CompressedData must have power-of-two dimensions (64x64, 512x256, etc.) to use mipmaps. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Texture:setMipmapFilter) ---- ----@overload fun(self: love.Texture) ----@param filtermode love.FilterMode # The filter mode to use in between mipmap levels. 'nearest' will often give better performance. ----@param sharpness? number # A positive sharpness value makes the texture use a more detailed mipmap level when drawing, at the expense of performance. A negative value does the reverse. -function Texture:setMipmapFilter(filtermode, sharpness) end - ---- ----Sets the wrapping properties of a Texture. ---- ----This function sets the way a Texture is repeated when it is drawn with a Quad that is larger than the texture's extent, or when a custom Shader is used which uses texture coordinates outside of [0, 1]. A texture may be clamped or set to repeat in both horizontal and vertical directions. ---- ----Clamped textures appear only once (with the edges of the texture stretching to fill the extent of the Quad), whereas repeated ones repeat as many times as there is room in the Quad. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Texture:setWrap) ---- ----@param horiz love.WrapMode # Horizontal wrapping mode of the texture. ----@param vert? love.WrapMode # Vertical wrapping mode of the texture. ----@param depth? love.WrapMode # Wrapping mode for the z-axis of a Volume texture. -function Texture:setWrap(horiz, vert, depth) end - ---- ----A drawable video. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.graphics) ---- ----@class love.Video: love.Drawable, love.Object -local Video = {} - ---- ----Gets the width and height of the Video in pixels. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Video:getDimensions) ---- ----@return number width # The width of the Video. ----@return number height # The height of the Video. -function Video:getDimensions() end - ---- ----Gets the scaling filters used when drawing the Video. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Video:getFilter) ---- ----@return love.FilterMode min # The filter mode used when scaling the Video down. ----@return love.FilterMode mag # The filter mode used when scaling the Video up. ----@return number anisotropy # Maximum amount of anisotropic filtering used. -function Video:getFilter() end - ---- ----Gets the height of the Video in pixels. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Video:getHeight) ---- ----@return number height # The height of the Video. -function Video:getHeight() end - ---- ----Gets the audio Source used for playing back the video's audio. May return nil if the video has no audio, or if Video:setSource is called with a nil argument. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Video:getSource) ---- ----@return love.Source source # The audio Source used for audio playback, or nil if the video has no audio. -function Video:getSource() end - ---- ----Gets the VideoStream object used for decoding and controlling the video. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Video:getStream) ---- ----@return love.VideoStream stream # The VideoStream used for decoding and controlling the video. -function Video:getStream() end - ---- ----Gets the width of the Video in pixels. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Video:getWidth) ---- ----@return number width # The width of the Video. -function Video:getWidth() end - ---- ----Gets whether the Video is currently playing. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Video:isPlaying) ---- ----@return boolean playing # Whether the video is playing. -function Video:isPlaying() end - ---- ----Pauses the Video. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Video:pause) ---- -function Video:pause() end - ---- ----Starts playing the Video. In order for the video to appear onscreen it must be drawn with love.graphics.draw. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Video:play) ---- -function Video:play() end - ---- ----Rewinds the Video to the beginning. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Video:rewind) ---- -function Video:rewind() end - ---- ----Sets the current playback position of the Video. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Video:seek) ---- ----@param offset number # The time in seconds since the beginning of the Video. -function Video:seek(offset) end - ---- ----Sets the scaling filters used when drawing the Video. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Video:setFilter) ---- ----@param min love.FilterMode # The filter mode used when scaling the Video down. ----@param mag love.FilterMode # The filter mode used when scaling the Video up. ----@param anisotropy? number # Maximum amount of anisotropic filtering used. -function Video:setFilter(min, mag, anisotropy) end - ---- ----Sets the audio Source used for playing back the video's audio. The audio Source also controls playback speed and synchronization. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Video:setSource) ---- ----@param source? love.Source # The audio Source used for audio playback, or nil to disable audio synchronization. -function Video:setSource(source) end - ---- ----Gets the current playback position of the Video. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Video:tell) ---- ----@return number seconds # The time in seconds since the beginning of the Video. -function Video:tell() end - ---- ----Text alignment. ---- ---- ----[Open in Browser](https://love2d.org/wiki/AlignMode) ---- ----@alias love.AlignMode ---- ----Align text center. ---- ----| "center" ---- ----Align text left. ---- ----| "left" ---- ----Align text right. ---- ----| "right" ---- ----Align text both left and right. ---- ----| "justify" - ---- ----Different types of arcs that can be drawn. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ArcType) ---- ----@alias love.ArcType ---- ----The arc is drawn like a slice of pie, with the arc circle connected to the center at its end-points. ---- ----| "pie" ---- ----The arc circle's two end-points are unconnected when the arc is drawn as a line. Behaves like the "closed" arc type when the arc is drawn in filled mode. ---- ----| "open" ---- ----The arc circle's two end-points are connected to each other. ---- ----| "closed" - ---- ----Types of particle area spread distribution. ---- ---- ----[Open in Browser](https://love2d.org/wiki/AreaSpreadDistribution) ---- ----@alias love.AreaSpreadDistribution ---- ----Uniform distribution. ---- ----| "uniform" ---- ----Normal (gaussian) distribution. ---- ----| "normal" ---- ----Uniform distribution in an ellipse. ---- ----| "ellipse" ---- ----Distribution in an ellipse with particles spawning at the edges of the ellipse. ---- ----| "borderellipse" ---- ----Distribution in a rectangle with particles spawning at the edges of the rectangle. ---- ----| "borderrectangle" ---- ----No distribution - area spread is disabled. ---- ----| "none" - ---- ----Different ways alpha affects color blending. See BlendMode and the BlendMode Formulas for additional notes. ---- ---- ----[Open in Browser](https://love2d.org/wiki/BlendAlphaMode) ---- ----@alias love.BlendAlphaMode ---- ----The RGB values of what's drawn are multiplied by the alpha values of those colors during blending. This is the default alpha mode. ---- ----| "alphamultiply" ---- ----The RGB values of what's drawn are '''not''' multiplied by the alpha values of those colors during blending. For most blend modes to work correctly with this alpha mode, the colors of a drawn object need to have had their RGB values multiplied by their alpha values at some point previously ("premultiplied alpha"). ---- ----| "premultiplied" - ---- ----Different ways to do color blending. See BlendAlphaMode and the BlendMode Formulas for additional notes. ---- ---- ----[Open in Browser](https://love2d.org/wiki/BlendMode) ---- ----@alias love.BlendMode ---- ----Alpha blending (normal). The alpha of what's drawn determines its opacity. ---- ----| "alpha" ---- ----The colors of what's drawn completely replace what was on the screen, with no additional blending. The BlendAlphaMode specified in love.graphics.setBlendMode still affects what happens. ---- ----| "replace" ---- ----'Screen' blending. ---- ----| "screen" ---- ----The pixel colors of what's drawn are added to the pixel colors already on the screen. The alpha of the screen is not modified. ---- ----| "add" ---- ----The pixel colors of what's drawn are subtracted from the pixel colors already on the screen. The alpha of the screen is not modified. ---- ----| "subtract" ---- ----The pixel colors of what's drawn are multiplied with the pixel colors already on the screen (darkening them). The alpha of drawn objects is multiplied with the alpha of the screen rather than determining how much the colors on the screen are affected, even when the "alphamultiply" BlendAlphaMode is used. ---- ----| "multiply" ---- ----The pixel colors of what's drawn are compared to the existing pixel colors, and the larger of the two values for each color component is used. Only works when the "premultiplied" BlendAlphaMode is used in love.graphics.setBlendMode. ---- ----| "lighten" ---- ----The pixel colors of what's drawn are compared to the existing pixel colors, and the smaller of the two values for each color component is used. Only works when the "premultiplied" BlendAlphaMode is used in love.graphics.setBlendMode. ---- ----| "darken" ---- ----Additive blend mode. ---- ----| "additive" ---- ----Subtractive blend mode. ---- ----| "subtractive" ---- ----Multiply blend mode. ---- ----| "multiplicative" ---- ----Premultiplied alpha blend mode. ---- ----| "premultiplied" - ---- ----Different types of per-pixel stencil test and depth test comparisons. The pixels of an object will be drawn if the comparison succeeds, for each pixel that the object touches. ---- ---- ----[Open in Browser](https://love2d.org/wiki/CompareMode) ---- ----@alias love.CompareMode ---- ----* stencil tests: the stencil value of the pixel must be equal to the supplied value. ----* depth tests: the depth value of the drawn object at that pixel must be equal to the existing depth value of that pixel. ---- ----| "equal" ---- ----* stencil tests: the stencil value of the pixel must not be equal to the supplied value. ----* depth tests: the depth value of the drawn object at that pixel must not be equal to the existing depth value of that pixel. ---- ----| "notequal" ---- ----* stencil tests: the stencil value of the pixel must be less than the supplied value. ----* depth tests: the depth value of the drawn object at that pixel must be less than the existing depth value of that pixel. ---- ----| "less" ---- ----* stencil tests: the stencil value of the pixel must be less than or equal to the supplied value. ----* depth tests: the depth value of the drawn object at that pixel must be less than or equal to the existing depth value of that pixel. ---- ----| "lequal" ---- ----* stencil tests: the stencil value of the pixel must be greater than or equal to the supplied value. ----* depth tests: the depth value of the drawn object at that pixel must be greater than or equal to the existing depth value of that pixel. ---- ----| "gequal" ---- ----* stencil tests: the stencil value of the pixel must be greater than the supplied value. ----* depth tests: the depth value of the drawn object at that pixel must be greater than the existing depth value of that pixel. ---- ----| "greater" ---- ----Objects will never be drawn. ---- ----| "never" ---- ----Objects will always be drawn. Effectively disables the depth or stencil test. ---- ----| "always" - ---- ----How Mesh geometry is culled when rendering. ---- ---- ----[Open in Browser](https://love2d.org/wiki/CullMode) ---- ----@alias love.CullMode ---- ----Back-facing triangles in Meshes are culled (not rendered). The vertex order of a triangle determines whether it is back- or front-facing. ---- ----| "back" ---- ----Front-facing triangles in Meshes are culled. ---- ----| "front" ---- ----Both back- and front-facing triangles in Meshes are rendered. ---- ----| "none" - ---- ----Controls whether shapes are drawn as an outline, or filled. ---- ---- ----[Open in Browser](https://love2d.org/wiki/DrawMode) ---- ----@alias love.DrawMode ---- ----Draw filled shape. ---- ----| "fill" ---- ----Draw outlined shape. ---- ----| "line" - ---- ----How the image is filtered when scaling. ---- ---- ----[Open in Browser](https://love2d.org/wiki/FilterMode) ---- ----@alias love.FilterMode ---- ----Scale image with linear interpolation. ---- ----| "linear" ---- ----Scale image with nearest neighbor interpolation. ---- ----| "nearest" - ---- ----Graphics features that can be checked for with love.graphics.getSupported. ---- ---- ----[Open in Browser](https://love2d.org/wiki/GraphicsFeature) ---- ----@alias love.GraphicsFeature ---- ----Whether the "clampzero" WrapMode is supported. ---- ----| "clampzero" ---- ----Whether the "lighten" and "darken" BlendModes are supported. ---- ----| "lighten" ---- ----Whether multiple formats can be used in the same love.graphics.setCanvas call. ---- ----| "multicanvasformats" ---- ----Whether GLSL 3 Shaders can be used. ---- ----| "glsl3" ---- ----Whether mesh instancing is supported. ---- ----| "instancing" ---- ----Whether textures with non-power-of-two dimensions can use mipmapping and the 'repeat' WrapMode. ---- ----| "fullnpot" ---- ----Whether pixel shaders can use "highp" 32 bit floating point numbers (as opposed to just 16 bit or lower precision). ---- ----| "pixelshaderhighp" ---- ----Whether shaders can use the dFdx, dFdy, and fwidth functions for computing derivatives. ---- ----| "shaderderivatives" - ---- ----Types of system-dependent graphics limits checked for using love.graphics.getSystemLimits. ---- ---- ----[Open in Browser](https://love2d.org/wiki/GraphicsLimit) ---- ----@alias love.GraphicsLimit ---- ----The maximum size of points. ---- ----| "pointsize" ---- ----The maximum width or height of Images and Canvases. ---- ----| "texturesize" ---- ----The maximum number of simultaneously active canvases (via love.graphics.setCanvas.) ---- ----| "multicanvas" ---- ----The maximum number of antialiasing samples for a Canvas. ---- ----| "canvasmsaa" ---- ----The maximum number of layers in an Array texture. ---- ----| "texturelayers" ---- ----The maximum width, height, or depth of a Volume texture. ---- ----| "volumetexturesize" ---- ----The maximum width or height of a Cubemap texture. ---- ----| "cubetexturesize" ---- ----The maximum amount of anisotropic filtering. Texture:setMipmapFilter internally clamps the given anisotropy value to the system's limit. ---- ----| "anisotropy" - ---- ----Vertex map datatype for Data variant of Mesh:setVertexMap. ---- ---- ----[Open in Browser](https://love2d.org/wiki/IndexDataType) ---- ----@alias love.IndexDataType ---- ----The vertex map is array of unsigned word (16-bit). ---- ----| "uint16" ---- ----The vertex map is array of unsigned dword (32-bit). ---- ----| "uint32" - ---- ----Line join style. ---- ---- ----[Open in Browser](https://love2d.org/wiki/LineJoin) ---- ----@alias love.LineJoin ---- ----The ends of the line segments beveled in an angle so that they join seamlessly. ---- ----| "miter" ---- ----No cap applied to the ends of the line segments. ---- ----| "none" ---- ----Flattens the point where line segments join together. ---- ----| "bevel" - ---- ----The styles in which lines are drawn. ---- ---- ----[Open in Browser](https://love2d.org/wiki/LineStyle) ---- ----@alias love.LineStyle ---- ----Draw rough lines. ---- ----| "rough" ---- ----Draw smooth lines. ---- ----| "smooth" - ---- ----How a Mesh's vertices are used when drawing. ---- ---- ----[Open in Browser](https://love2d.org/wiki/MeshDrawMode) ---- ----@alias love.MeshDrawMode ---- ----The vertices create a "fan" shape with the first vertex acting as the hub point. Can be easily used to draw simple convex polygons. ---- ----| "fan" ---- ----The vertices create a series of connected triangles using vertices 1, 2, 3, then 3, 2, 4 (note the order), then 3, 4, 5, and so on. ---- ----| "strip" ---- ----The vertices create unconnected triangles. ---- ----| "triangles" ---- ----The vertices are drawn as unconnected points (see love.graphics.setPointSize.) ---- ----| "points" - ---- ----Controls whether a Canvas has mipmaps, and its behaviour when it does. ---- ---- ----[Open in Browser](https://love2d.org/wiki/MipmapMode) ---- ----@alias love.MipmapMode ---- ----The Canvas has no mipmaps. ---- ----| "none" ---- ----The Canvas has mipmaps. love.graphics.setCanvas can be used to render to a specific mipmap level, or Canvas:generateMipmaps can (re-)compute all mipmap levels based on the base level. ---- ----| "auto" ---- ----The Canvas has mipmaps, and all mipmap levels will automatically be recomputed when switching away from the Canvas with love.graphics.setCanvas. ---- ----| "manual" - ---- ----How newly created particles are added to the ParticleSystem. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ParticleInsertMode) ---- ----@alias love.ParticleInsertMode ---- ----Particles are inserted at the top of the ParticleSystem's list of particles. ---- ----| "top" ---- ----Particles are inserted at the bottom of the ParticleSystem's list of particles. ---- ----| "bottom" ---- ----Particles are inserted at random positions in the ParticleSystem's list of particles. ---- ----| "random" - ---- ----Usage hints for SpriteBatches and Meshes to optimize data storage and access. ---- ---- ----[Open in Browser](https://love2d.org/wiki/SpriteBatchUsage) ---- ----@alias love.SpriteBatchUsage ---- ----The object's data will change occasionally during its lifetime. ---- ----| "dynamic" ---- ----The object will not be modified after initial sprites or vertices are added. ---- ----| "static" ---- ----The object data will always change between draws. ---- ----| "stream" - ---- ----Graphics state stack types used with love.graphics.push. ---- ---- ----[Open in Browser](https://love2d.org/wiki/StackType) ---- ----@alias love.StackType ---- ----The transformation stack (love.graphics.translate, love.graphics.rotate, etc.) ---- ----| "transform" ---- ----All love.graphics state, including transform state. ---- ----| "all" - ---- ----How a stencil function modifies the stencil values of pixels it touches. ---- ---- ----[Open in Browser](https://love2d.org/wiki/StencilAction) ---- ----@alias love.StencilAction ---- ----The stencil value of a pixel will be replaced by the value specified in love.graphics.stencil, if any object touches the pixel. ---- ----| "replace" ---- ----The stencil value of a pixel will be incremented by 1 for each object that touches the pixel. If the stencil value reaches 255 it will stay at 255. ---- ----| "increment" ---- ----The stencil value of a pixel will be decremented by 1 for each object that touches the pixel. If the stencil value reaches 0 it will stay at 0. ---- ----| "decrement" ---- ----The stencil value of a pixel will be incremented by 1 for each object that touches the pixel. If a stencil value of 255 is incremented it will be set to 0. ---- ----| "incrementwrap" ---- ----The stencil value of a pixel will be decremented by 1 for each object that touches the pixel. If the stencil value of 0 is decremented it will be set to 255. ---- ----| "decrementwrap" ---- ----The stencil value of a pixel will be bitwise-inverted for each object that touches the pixel. If a stencil value of 0 is inverted it will become 255. ---- ----| "invert" - ---- ----Types of textures (2D, cubemap, etc.) ---- ---- ----[Open in Browser](https://love2d.org/wiki/TextureType) ---- ----@alias love.TextureType ---- ----Regular 2D texture with width and height. ---- ----| "2d" ---- ----Several same-size 2D textures organized into a single object. Similar to a texture atlas / sprite sheet, but avoids sprite bleeding and other issues. ---- ----| "array" ---- ----Cubemap texture with 6 faces. Requires a custom shader (and Shader:send) to use. Sampling from a cube texture in a shader takes a 3D direction vector instead of a texture coordinate. ---- ----| "cube" ---- ----3D texture with width, height, and depth. Requires a custom shader to use. Volume textures can have texture filtering applied along the 3rd axis. ---- ----| "volume" - ---- ----The frequency at which a vertex shader fetches the vertex attribute's data from the Mesh when it's drawn. ---- ----Per-instance attributes can be used to render a Mesh many times with different positions, colors, or other attributes via a single love.graphics.drawInstanced call, without using the love_InstanceID vertex shader variable. ---- ---- ----[Open in Browser](https://love2d.org/wiki/VertexAttributeStep) ---- ----@alias love.VertexAttributeStep ---- ----The vertex attribute will have a unique value for each vertex in the Mesh. ---- ----| "pervertex" ---- ----The vertex attribute will have a unique value for each instance of the Mesh. ---- ----| "perinstance" - ---- ----How Mesh geometry vertices are ordered. ---- ---- ----[Open in Browser](https://love2d.org/wiki/VertexWinding) ---- ----@alias love.VertexWinding ---- ----Clockwise. ---- ----| "cw" ---- ----Counter-clockwise. ---- ----| "ccw" - ---- ----How the image wraps inside a Quad with a larger quad size than image size. This also affects how Meshes with texture coordinates which are outside the range of 1 are drawn, and the color returned by the Texel Shader function when using it to sample from texture coordinates outside of the range of 1. ---- ---- ----[Open in Browser](https://love2d.org/wiki/WrapMode) ---- ----@alias love.WrapMode ---- ----Clamp the texture. Appears only once. The area outside the texture's normal range is colored based on the edge pixels of the texture. ---- ----| "clamp" ---- ----Repeat the texture. Fills the whole available extent. ---- ----| "repeat" ---- ----Repeat the texture, flipping it each time it repeats. May produce better visual results than the repeat mode when the texture doesn't seamlessly tile. ---- ----| "mirroredrepeat" ---- ----Clamp the texture. Fills the area outside the texture's normal range with transparent black (or opaque black for textures with no alpha channel.) ---- ----| "clampzero" diff --git a/meta/3rd/love2d/library/love/image.lua b/meta/3rd/love2d/library/love/image.lua deleted file mode 100644 index 0d051514..00000000 --- a/meta/3rd/love2d/library/love/image.lua +++ /dev/null @@ -1,694 +0,0 @@ ----@meta - ---- ----Provides an interface to decode encoded image data. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.image) ---- ----@class love.image -love.image = {} - ---- ----Determines whether a file can be loaded as CompressedImageData. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.image.isCompressed) ---- ----@overload fun(fileData: love.FileData):boolean ----@param filename string # The filename of the potentially compressed image file. ----@return boolean compressed # Whether the file can be loaded as CompressedImageData or not. -function love.image.isCompressed(filename) end - ---- ----Create a new CompressedImageData object from a compressed image file. LÖVE supports several compressed texture formats, enumerated in the CompressedImageFormat page. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.image.newCompressedData) ---- ----@overload fun(fileData: love.FileData):love.CompressedImageData ----@param filename string # The filename of the compressed image file. ----@return love.CompressedImageData compressedImageData # The new CompressedImageData object. -function love.image.newCompressedData(filename) end - ---- ----Creates a new ImageData object. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.image.newImageData) ---- ----@overload fun(width: number, height: number, format?: love.PixelFormat, data?: string):love.ImageData ----@overload fun(width: number, height: number, data: string):love.ImageData ----@overload fun(filename: string):love.ImageData ----@overload fun(filedata: love.FileData):love.ImageData ----@param width number # The width of the ImageData. ----@param height number # The height of the ImageData. ----@return love.ImageData imageData # The new blank ImageData object. Each pixel's color values, (including the alpha values!) will be set to zero. -function love.image.newImageData(width, height) end - ---- ----Represents compressed image data designed to stay compressed in RAM. ---- ----CompressedImageData encompasses standard compressed texture formats such as DXT1, DXT5, and BC5 / 3Dc. ---- ----You can't draw CompressedImageData directly to the screen. See Image for that. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.image) ---- ----@class love.CompressedImageData: love.Data, love.Object -local CompressedImageData = {} - ---- ----Gets the width and height of the CompressedImageData. ---- ---- ----[Open in Browser](https://love2d.org/wiki/CompressedImageData:getDimensions) ---- ----@overload fun(self: love.CompressedImageData, level: number):number, number ----@return number width # The width of the CompressedImageData. ----@return number height # The height of the CompressedImageData. -function CompressedImageData:getDimensions() end - ---- ----Gets the format of the CompressedImageData. ---- ---- ----[Open in Browser](https://love2d.org/wiki/CompressedImageData:getFormat) ---- ----@return love.CompressedImageFormat format # The format of the CompressedImageData. -function CompressedImageData:getFormat() end - ---- ----Gets the height of the CompressedImageData. ---- ---- ----[Open in Browser](https://love2d.org/wiki/CompressedImageData:getHeight) ---- ----@overload fun(self: love.CompressedImageData, level: number):number ----@return number height # The height of the CompressedImageData. -function CompressedImageData:getHeight() end - ---- ----Gets the number of mipmap levels in the CompressedImageData. The base mipmap level (original image) is included in the count. ---- ---- ----[Open in Browser](https://love2d.org/wiki/CompressedImageData:getMipmapCount) ---- ----@return number mipmaps # The number of mipmap levels stored in the CompressedImageData. -function CompressedImageData:getMipmapCount() end - ---- ----Gets the width of the CompressedImageData. ---- ---- ----[Open in Browser](https://love2d.org/wiki/CompressedImageData:getWidth) ---- ----@overload fun(self: love.CompressedImageData, level: number):number ----@return number width # The width of the CompressedImageData. -function CompressedImageData:getWidth() end - ---- ----Raw (decoded) image data. ---- ----You can't draw ImageData directly to screen. See Image for that. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.image) ---- ----@class love.ImageData: love.Data, love.Object -local ImageData = {} - ---- ----Encodes the ImageData and optionally writes it to the save directory. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ImageData:encode) ---- ----@overload fun(self: love.ImageData, outFile: string) ----@overload fun(self: love.ImageData, outFile: string, format: love.ImageFormat) ----@param format love.ImageFormat # The format to encode the image as. ----@param filename? string # The filename to write the file to. If nil, no file will be written but the FileData will still be returned. ----@return love.FileData filedata # The encoded image as a new FileData object. -function ImageData:encode(format, filename) end - ---- ----Gets the width and height of the ImageData in pixels. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ImageData:getDimensions) ---- ----@return number width # The width of the ImageData in pixels. ----@return number height # The height of the ImageData in pixels. -function ImageData:getDimensions() end - ---- ----Gets the height of the ImageData in pixels. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ImageData:getHeight) ---- ----@return number height # The height of the ImageData in pixels. -function ImageData:getHeight() end - ---- ----Gets the color of a pixel at a specific position in the image. ---- ----Valid x and y values start at 0 and go up to image width and height minus 1. Non-integer values are floored. ---- ----In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ImageData:getPixel) ---- ----@param x number # The position of the pixel on the x-axis. ----@param y number # The position of the pixel on the y-axis. ----@return number r # The red component (0-1). ----@return number g # The green component (0-1). ----@return number b # The blue component (0-1). ----@return number a # The alpha component (0-1). -function ImageData:getPixel(x, y) end - ---- ----Gets the width of the ImageData in pixels. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ImageData:getWidth) ---- ----@return number width # The width of the ImageData in pixels. -function ImageData:getWidth() end - ---- ----Transform an image by applying a function to every pixel. ---- ----This function is a higher-order function. It takes another function as a parameter, and calls it once for each pixel in the ImageData. ---- ----The passed function is called with six parameters for each pixel in turn. The parameters are numbers that represent the x and y coordinates of the pixel and its red, green, blue and alpha values. The function should return the new red, green, blue, and alpha values for that pixel. ---- ----function pixelFunction(x, y, r, g, b, a) ---- ---- -- template for defining your own pixel mapping function ---- ---- -- perform computations giving the new values for r, g, b and a ---- ---- -- ... ---- ---- return r, g, b, a ---- ----end ---- ----In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ImageData:mapPixel) ---- ----@param pixelFunction function # Function to apply to every pixel. ----@param x? number # The x-axis of the top-left corner of the area within the ImageData to apply the function to. ----@param y? number # The y-axis of the top-left corner of the area within the ImageData to apply the function to. ----@param width? number # The width of the area within the ImageData to apply the function to. ----@param height? number # The height of the area within the ImageData to apply the function to. -function ImageData:mapPixel(pixelFunction, x, y, width, height) end - ---- ----Paste into ImageData from another source ImageData. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ImageData:paste) ---- ----@param source love.ImageData # Source ImageData from which to copy. ----@param dx number # Destination top-left position on x-axis. ----@param dy number # Destination top-left position on y-axis. ----@param sx number # Source top-left position on x-axis. ----@param sy number # Source top-left position on y-axis. ----@param sw number # Source width. ----@param sh number # Source height. -function ImageData:paste(source, dx, dy, sx, sy, sw, sh) end - ---- ----Sets the color of a pixel at a specific position in the image. ---- ----Valid x and y values start at 0 and go up to image width and height minus 1. ---- ----In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ImageData:setPixel) ---- ----@param x number # The position of the pixel on the x-axis. ----@param y number # The position of the pixel on the y-axis. ----@param r number # The red component (0-1). ----@param g number # The green component (0-1). ----@param b number # The blue component (0-1). ----@param a number # The alpha component (0-1). -function ImageData:setPixel(x, y, r, g, b, a) end - ---- ----Gets the pixel format of the ImageData. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ImageData:getFormat) ---- ----@return love.PixelFormat format # The pixel format the ImageData was created with. -function ImageData:getFormat() end - ---- ----Compressed image data formats. Here and here are a couple overviews of many of the formats. ---- ----Unlike traditional PNG or jpeg, these formats stay compressed in RAM and in the graphics card's VRAM. This is good for saving memory space as well as improving performance, since the graphics card will be able to keep more of the image's pixels in its fast-access cache when drawing it. ---- ---- ----[Open in Browser](https://love2d.org/wiki/CompressedImageFormat) ---- ----@alias love.CompressedImageFormat ---- ----The DXT1 format. RGB data at 4 bits per pixel (compared to 32 bits for ImageData and regular Images.) Suitable for fully opaque images on desktop systems. ---- ----| "DXT1" ---- ----The DXT3 format. RGBA data at 8 bits per pixel. Smooth variations in opacity do not mix well with this format. ---- ----| "DXT3" ---- ----The DXT5 format. RGBA data at 8 bits per pixel. Recommended for images with varying opacity on desktop systems. ---- ----| "DXT5" ---- ----The BC4 format (also known as 3Dc+ or ATI1.) Stores just the red channel, at 4 bits per pixel. ---- ----| "BC4" ---- ----The signed variant of the BC4 format. Same as above but pixel values in the texture are in the range of 1 instead of 1 in shaders. ---- ----| "BC4s" ---- ----The BC5 format (also known as 3Dc or ATI2.) Stores red and green channels at 8 bits per pixel. ---- ----| "BC5" ---- ----The signed variant of the BC5 format. ---- ----| "BC5s" ---- ----The BC6H format. Stores half-precision floating-point RGB data in the range of 65504 at 8 bits per pixel. Suitable for HDR images on desktop systems. ---- ----| "BC6h" ---- ----The signed variant of the BC6H format. Stores RGB data in the range of +65504. ---- ----| "BC6hs" ---- ----The BC7 format (also known as BPTC.) Stores RGB or RGBA data at 8 bits per pixel. ---- ----| "BC7" ---- ----The ETC1 format. RGB data at 4 bits per pixel. Suitable for fully opaque images on older Android devices. ---- ----| "ETC1" ---- ----The RGB variant of the ETC2 format. RGB data at 4 bits per pixel. Suitable for fully opaque images on newer mobile devices. ---- ----| "ETC2rgb" ---- ----The RGBA variant of the ETC2 format. RGBA data at 8 bits per pixel. Recommended for images with varying opacity on newer mobile devices. ---- ----| "ETC2rgba" ---- ----The RGBA variant of the ETC2 format where pixels are either fully transparent or fully opaque. RGBA data at 4 bits per pixel. ---- ----| "ETC2rgba1" ---- ----The single-channel variant of the EAC format. Stores just the red channel, at 4 bits per pixel. ---- ----| "EACr" ---- ----The signed single-channel variant of the EAC format. Same as above but pixel values in the texture are in the range of 1 instead of 1 in shaders. ---- ----| "EACrs" ---- ----The two-channel variant of the EAC format. Stores red and green channels at 8 bits per pixel. ---- ----| "EACrg" ---- ----The signed two-channel variant of the EAC format. ---- ----| "EACrgs" ---- ----The 2 bit per pixel RGB variant of the PVRTC1 format. Stores RGB data at 2 bits per pixel. Textures compressed with PVRTC1 formats must be square and power-of-two sized. ---- ----| "PVR1rgb2" ---- ----The 4 bit per pixel RGB variant of the PVRTC1 format. Stores RGB data at 4 bits per pixel. ---- ----| "PVR1rgb4" ---- ----The 2 bit per pixel RGBA variant of the PVRTC1 format. ---- ----| "PVR1rgba2" ---- ----The 4 bit per pixel RGBA variant of the PVRTC1 format. ---- ----| "PVR1rgba4" ---- ----The 4x4 pixels per block variant of the ASTC format. RGBA data at 8 bits per pixel. ---- ----| "ASTC4x4" ---- ----The 5x4 pixels per block variant of the ASTC format. RGBA data at 6.4 bits per pixel. ---- ----| "ASTC5x4" ---- ----The 5x5 pixels per block variant of the ASTC format. RGBA data at 5.12 bits per pixel. ---- ----| "ASTC5x5" ---- ----The 6x5 pixels per block variant of the ASTC format. RGBA data at 4.27 bits per pixel. ---- ----| "ASTC6x5" ---- ----The 6x6 pixels per block variant of the ASTC format. RGBA data at 3.56 bits per pixel. ---- ----| "ASTC6x6" ---- ----The 8x5 pixels per block variant of the ASTC format. RGBA data at 3.2 bits per pixel. ---- ----| "ASTC8x5" ---- ----The 8x6 pixels per block variant of the ASTC format. RGBA data at 2.67 bits per pixel. ---- ----| "ASTC8x6" ---- ----The 8x8 pixels per block variant of the ASTC format. RGBA data at 2 bits per pixel. ---- ----| "ASTC8x8" ---- ----The 10x5 pixels per block variant of the ASTC format. RGBA data at 2.56 bits per pixel. ---- ----| "ASTC10x5" ---- ----The 10x6 pixels per block variant of the ASTC format. RGBA data at 2.13 bits per pixel. ---- ----| "ASTC10x6" ---- ----The 10x8 pixels per block variant of the ASTC format. RGBA data at 1.6 bits per pixel. ---- ----| "ASTC10x8" ---- ----The 10x10 pixels per block variant of the ASTC format. RGBA data at 1.28 bits per pixel. ---- ----| "ASTC10x10" ---- ----The 12x10 pixels per block variant of the ASTC format. RGBA data at 1.07 bits per pixel. ---- ----| "ASTC12x10" ---- ----The 12x12 pixels per block variant of the ASTC format. RGBA data at 0.89 bits per pixel. ---- ----| "ASTC12x12" - ---- ----Encoded image formats. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ImageFormat) ---- ----@alias love.ImageFormat ---- ----Targa image format. ---- ----| "tga" ---- ----PNG image format. ---- ----| "png" ---- ----JPG image format. ---- ----| "jpg" ---- ----BMP image format. ---- ----| "bmp" - ---- ----Pixel formats for Textures, ImageData, and CompressedImageData. ---- ---- ----[Open in Browser](https://love2d.org/wiki/PixelFormat) ---- ----@alias love.PixelFormat ---- ----Indicates unknown pixel format, used internally. ---- ----| "unknown" ---- ----Alias for rgba8, or srgba8 if gamma-correct rendering is enabled. ---- ----| "normal" ---- ----A format suitable for high dynamic range content - an alias for the rgba16f format, normally. ---- ----| "hdr" ---- ----Single-channel (red component) format (8 bpp). ---- ----| "r8" ---- ----Two channels (red and green components) with 8 bits per channel (16 bpp). ---- ----| "rg8" ---- ----8 bits per channel (32 bpp) RGBA. Color channel values range from 0-255 (0-1 in shaders). ---- ----| "rgba8" ---- ----gamma-correct version of rgba8. ---- ----| "srgba8" ---- ----Single-channel (red component) format (16 bpp). ---- ----| "r16" ---- ----Two channels (red and green components) with 16 bits per channel (32 bpp). ---- ----| "rg16" ---- ----16 bits per channel (64 bpp) RGBA. Color channel values range from 0-65535 (0-1 in shaders). ---- ----| "rgba16" ---- ----Floating point single-channel format (16 bpp). Color values can range from [-65504, +65504]. ---- ----| "r16f" ---- ----Floating point two-channel format with 16 bits per channel (32 bpp). Color values can range from [-65504, +65504]. ---- ----| "rg16f" ---- ----Floating point RGBA with 16 bits per channel (64 bpp). Color values can range from [-65504, +65504]. ---- ----| "rgba16f" ---- ----Floating point single-channel format (32 bpp). ---- ----| "r32f" ---- ----Floating point two-channel format with 32 bits per channel (64 bpp). ---- ----| "rg32f" ---- ----Floating point RGBA with 32 bits per channel (128 bpp). ---- ----| "rgba32f" ---- ----Same as rg8, but accessed as (L, L, L, A) ---- ----| "la8" ---- ----4 bits per channel (16 bpp) RGBA. ---- ----| "rgba4" ---- ----RGB with 5 bits each, and a 1-bit alpha channel (16 bpp). ---- ----| "rgb5a1" ---- ----RGB with 5, 6, and 5 bits each, respectively (16 bpp). There is no alpha channel in this format. ---- ----| "rgb565" ---- ----RGB with 10 bits per channel, and a 2-bit alpha channel (32 bpp). ---- ----| "rgb10a2" ---- ----Floating point RGB with 11 bits in the red and green channels, and 10 bits in the blue channel (32 bpp). There is no alpha channel. Color values can range from [0, +65024]. ---- ----| "rg11b10f" ---- ----No depth buffer and 8-bit stencil buffer. ---- ----| "stencil8" ---- ----16-bit depth buffer and no stencil buffer. ---- ----| "depth16" ---- ----24-bit depth buffer and no stencil buffer. ---- ----| "depth24" ---- ----32-bit float depth buffer and no stencil buffer. ---- ----| "depth32f" ---- ----24-bit depth buffer and 8-bit stencil buffer. ---- ----| "depth24stencil8" ---- ----32-bit float depth buffer and 8-bit stencil buffer. ---- ----| "depth32fstencil8" ---- ----The DXT1 format. RGB data at 4 bits per pixel (compared to 32 bits for ImageData and regular Images.) Suitable for fully opaque images on desktop systems. ---- ----| "DXT1" ---- ----The DXT3 format. RGBA data at 8 bits per pixel. Smooth variations in opacity do not mix well with this format. ---- ----| "DXT3" ---- ----The DXT5 format. RGBA data at 8 bits per pixel. Recommended for images with varying opacity on desktop systems. ---- ----| "DXT5" ---- ----The BC4 format (also known as 3Dc+ or ATI1.) Stores just the red channel, at 4 bits per pixel. ---- ----| "BC4" ---- ----The signed variant of the BC4 format. Same as above but pixel values in the texture are in the range of 1 instead of 1 in shaders. ---- ----| "BC4s" ---- ----The BC5 format (also known as 3Dc or ATI2.) Stores red and green channels at 8 bits per pixel. ---- ----| "BC5" ---- ----The signed variant of the BC5 format. ---- ----| "BC5s" ---- ----The BC6H format. Stores half-precision floating-point RGB data in the range of 65504 at 8 bits per pixel. Suitable for HDR images on desktop systems. ---- ----| "BC6h" ---- ----The signed variant of the BC6H format. Stores RGB data in the range of +65504. ---- ----| "BC6hs" ---- ----The BC7 format (also known as BPTC.) Stores RGB or RGBA data at 8 bits per pixel. ---- ----| "BC7" ---- ----The ETC1 format. RGB data at 4 bits per pixel. Suitable for fully opaque images on older Android devices. ---- ----| "ETC1" ---- ----The RGB variant of the ETC2 format. RGB data at 4 bits per pixel. Suitable for fully opaque images on newer mobile devices. ---- ----| "ETC2rgb" ---- ----The RGBA variant of the ETC2 format. RGBA data at 8 bits per pixel. Recommended for images with varying opacity on newer mobile devices. ---- ----| "ETC2rgba" ---- ----The RGBA variant of the ETC2 format where pixels are either fully transparent or fully opaque. RGBA data at 4 bits per pixel. ---- ----| "ETC2rgba1" ---- ----The single-channel variant of the EAC format. Stores just the red channel, at 4 bits per pixel. ---- ----| "EACr" ---- ----The signed single-channel variant of the EAC format. Same as above but pixel values in the texture are in the range of 1 instead of 1 in shaders. ---- ----| "EACrs" ---- ----The two-channel variant of the EAC format. Stores red and green channels at 8 bits per pixel. ---- ----| "EACrg" ---- ----The signed two-channel variant of the EAC format. ---- ----| "EACrgs" ---- ----The 2 bit per pixel RGB variant of the PVRTC1 format. Stores RGB data at 2 bits per pixel. Textures compressed with PVRTC1 formats must be square and power-of-two sized. ---- ----| "PVR1rgb2" ---- ----The 4 bit per pixel RGB variant of the PVRTC1 format. Stores RGB data at 4 bits per pixel. ---- ----| "PVR1rgb4" ---- ----The 2 bit per pixel RGBA variant of the PVRTC1 format. ---- ----| "PVR1rgba2" ---- ----The 4 bit per pixel RGBA variant of the PVRTC1 format. ---- ----| "PVR1rgba4" ---- ----The 4x4 pixels per block variant of the ASTC format. RGBA data at 8 bits per pixel. ---- ----| "ASTC4x4" ---- ----The 5x4 pixels per block variant of the ASTC format. RGBA data at 6.4 bits per pixel. ---- ----| "ASTC5x4" ---- ----The 5x5 pixels per block variant of the ASTC format. RGBA data at 5.12 bits per pixel. ---- ----| "ASTC5x5" ---- ----The 6x5 pixels per block variant of the ASTC format. RGBA data at 4.27 bits per pixel. ---- ----| "ASTC6x5" ---- ----The 6x6 pixels per block variant of the ASTC format. RGBA data at 3.56 bits per pixel. ---- ----| "ASTC6x6" ---- ----The 8x5 pixels per block variant of the ASTC format. RGBA data at 3.2 bits per pixel. ---- ----| "ASTC8x5" ---- ----The 8x6 pixels per block variant of the ASTC format. RGBA data at 2.67 bits per pixel. ---- ----| "ASTC8x6" ---- ----The 8x8 pixels per block variant of the ASTC format. RGBA data at 2 bits per pixel. ---- ----| "ASTC8x8" ---- ----The 10x5 pixels per block variant of the ASTC format. RGBA data at 2.56 bits per pixel. ---- ----| "ASTC10x5" ---- ----The 10x6 pixels per block variant of the ASTC format. RGBA data at 2.13 bits per pixel. ---- ----| "ASTC10x6" ---- ----The 10x8 pixels per block variant of the ASTC format. RGBA data at 1.6 bits per pixel. ---- ----| "ASTC10x8" ---- ----The 10x10 pixels per block variant of the ASTC format. RGBA data at 1.28 bits per pixel. ---- ----| "ASTC10x10" ---- ----The 12x10 pixels per block variant of the ASTC format. RGBA data at 1.07 bits per pixel. ---- ----| "ASTC12x10" ---- ----The 12x12 pixels per block variant of the ASTC format. RGBA data at 0.89 bits per pixel. ---- ----| "ASTC12x12" diff --git a/meta/3rd/love2d/library/love/joystick.lua b/meta/3rd/love2d/library/love/joystick.lua deleted file mode 100644 index 039674f1..00000000 --- a/meta/3rd/love2d/library/love/joystick.lua +++ /dev/null @@ -1,464 +0,0 @@ ----@meta - ---- ----Provides an interface to the user's joystick. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.joystick) ---- ----@class love.joystick -love.joystick = {} - ---- ----Gets the full gamepad mapping string of the Joysticks which have the given GUID, or nil if the GUID isn't recognized as a gamepad. ---- ----The mapping string contains binding information used to map the Joystick's buttons an axes to the standard gamepad layout, and can be used later with love.joystick.loadGamepadMappings. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.joystick.getGamepadMappingString) ---- ----@param guid string # The GUID value to get the mapping string for. ----@return string mappingstring # A string containing the Joystick's gamepad mappings, or nil if the GUID is not recognized as a gamepad. -function love.joystick.getGamepadMappingString(guid) end - ---- ----Gets the number of connected joysticks. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.joystick.getJoystickCount) ---- ----@return number joystickcount # The number of connected joysticks. -function love.joystick.getJoystickCount() end - ---- ----Gets a list of connected Joysticks. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.joystick.getJoysticks) ---- ----@return table joysticks # The list of currently connected Joysticks. -function love.joystick.getJoysticks() end - ---- ----Loads a gamepad mappings string or file created with love.joystick.saveGamepadMappings. ---- ----It also recognizes any SDL gamecontroller mapping string, such as those created with Steam's Big Picture controller configure interface, or this nice database. If a new mapping is loaded for an already known controller GUID, the later version will overwrite the one currently loaded. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.joystick.loadGamepadMappings) ---- ----@overload fun(mappings: string) ----@param filename string # The filename to load the mappings string from. -function love.joystick.loadGamepadMappings(filename) end - ---- ----Saves the virtual gamepad mappings of all recognized as gamepads and have either been recently used or their gamepad bindings have been modified. ---- ----The mappings are stored as a string for use with love.joystick.loadGamepadMappings. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.joystick.saveGamepadMappings) ---- ----@overload fun():string ----@param filename string # The filename to save the mappings string to. ----@return string mappings # The mappings string that was written to the file. -function love.joystick.saveGamepadMappings(filename) end - ---- ----Binds a virtual gamepad input to a button, axis or hat for all Joysticks of a certain type. For example, if this function is used with a GUID returned by a Dualshock 3 controller in OS X, the binding will affect Joystick:getGamepadAxis and Joystick:isGamepadDown for ''all'' Dualshock 3 controllers used with the game when run in OS X. ---- ----LÖVE includes built-in gamepad bindings for many common controllers. This function lets you change the bindings or add new ones for types of Joysticks which aren't recognized as gamepads by default. ---- ----The virtual gamepad buttons and axes are designed around the Xbox 360 controller layout. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.joystick.setGamepadMapping) ---- ----@overload fun(guid: string, axis: love.GamepadAxis, inputtype: love.JoystickInputType, inputindex: number, hatdir?: love.JoystickHat):boolean ----@param guid string # The OS-dependent GUID for the type of Joystick the binding will affect. ----@param button love.GamepadButton # The virtual gamepad button to bind. ----@param inputtype love.JoystickInputType # The type of input to bind the virtual gamepad button to. ----@param inputindex number # The index of the axis, button, or hat to bind the virtual gamepad button to. ----@param hatdir? love.JoystickHat # The direction of the hat, if the virtual gamepad button will be bound to a hat. nil otherwise. ----@return boolean success # Whether the virtual gamepad button was successfully bound. -function love.joystick.setGamepadMapping(guid, button, inputtype, inputindex, hatdir) end - ---- ----Represents a physical joystick. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.joystick) ---- ----@class love.Joystick: love.Object -local Joystick = {} - ---- ----Gets the direction of each axis. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Joystick:getAxes) ---- ----@return number axisDir1 # Direction of axis1. ----@return number axisDir2 # Direction of axis2. ----@return number axisDirN # Direction of axisN. -function Joystick:getAxes() end - ---- ----Gets the direction of an axis. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Joystick:getAxis) ---- ----@param axis number # The index of the axis to be checked. ----@return number direction # Current value of the axis. -function Joystick:getAxis(axis) end - ---- ----Gets the number of axes on the joystick. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Joystick:getAxisCount) ---- ----@return number axes # The number of axes available. -function Joystick:getAxisCount() end - ---- ----Gets the number of buttons on the joystick. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Joystick:getButtonCount) ---- ----@return number buttons # The number of buttons available. -function Joystick:getButtonCount() end - ---- ----Gets the USB vendor ID, product ID, and product version numbers of joystick which consistent across operating systems. ---- ----Can be used to show different icons, etc. for different gamepads. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Joystick:getDeviceInfo) ---- ----@return number vendorID # The USB vendor ID of the joystick. ----@return number productID # The USB product ID of the joystick. ----@return number productVersion # The product version of the joystick. -function Joystick:getDeviceInfo() end - ---- ----Gets a stable GUID unique to the type of the physical joystick which does not change over time. For example, all Sony Dualshock 3 controllers in OS X have the same GUID. The value is platform-dependent. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Joystick:getGUID) ---- ----@return string guid # The Joystick type's OS-dependent unique identifier. -function Joystick:getGUID() end - ---- ----Gets the direction of a virtual gamepad axis. If the Joystick isn't recognized as a gamepad or isn't connected, this function will always return 0. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Joystick:getGamepadAxis) ---- ----@param axis love.GamepadAxis # The virtual axis to be checked. ----@return number direction # Current value of the axis. -function Joystick:getGamepadAxis(axis) end - ---- ----Gets the button, axis or hat that a virtual gamepad input is bound to. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Joystick:getGamepadMapping) ---- ----@overload fun(self: love.Joystick, button: love.GamepadButton):love.JoystickInputType, number, love.JoystickHat ----@param axis love.GamepadAxis # The virtual gamepad axis to get the binding for. ----@return love.JoystickInputType inputtype # The type of input the virtual gamepad axis is bound to. ----@return number inputindex # The index of the Joystick's button, axis or hat that the virtual gamepad axis is bound to. ----@return love.JoystickHat hatdirection # The direction of the hat, if the virtual gamepad axis is bound to a hat. nil otherwise. -function Joystick:getGamepadMapping(axis) end - ---- ----Gets the full gamepad mapping string of this Joystick, or nil if it's not recognized as a gamepad. ---- ----The mapping string contains binding information used to map the Joystick's buttons an axes to the standard gamepad layout, and can be used later with love.joystick.loadGamepadMappings. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Joystick:getGamepadMappingString) ---- ----@return string mappingstring # A string containing the Joystick's gamepad mappings, or nil if the Joystick is not recognized as a gamepad. -function Joystick:getGamepadMappingString() end - ---- ----Gets the direction of the Joystick's hat. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Joystick:getHat) ---- ----@param hat number # The index of the hat to be checked. ----@return love.JoystickHat direction # The direction the hat is pushed. -function Joystick:getHat(hat) end - ---- ----Gets the number of hats on the joystick. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Joystick:getHatCount) ---- ----@return number hats # How many hats the joystick has. -function Joystick:getHatCount() end - ---- ----Gets the joystick's unique identifier. The identifier will remain the same for the life of the game, even when the Joystick is disconnected and reconnected, but it '''will''' change when the game is re-launched. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Joystick:getID) ---- ----@return number id # The Joystick's unique identifier. Remains the same as long as the game is running. ----@return number instanceid # Unique instance identifier. Changes every time the Joystick is reconnected. nil if the Joystick is not connected. -function Joystick:getID() end - ---- ----Gets the name of the joystick. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Joystick:getName) ---- ----@return string name # The name of the joystick. -function Joystick:getName() end - ---- ----Gets the current vibration motor strengths on a Joystick with rumble support. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Joystick:getVibration) ---- ----@return number left # Current strength of the left vibration motor on the Joystick. ----@return number right # Current strength of the right vibration motor on the Joystick. -function Joystick:getVibration() end - ---- ----Gets whether the Joystick is connected. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Joystick:isConnected) ---- ----@return boolean connected # True if the Joystick is currently connected, false otherwise. -function Joystick:isConnected() end - ---- ----Checks if a button on the Joystick is pressed. ---- ----LÖVE 0.9.0 had a bug which required the button indices passed to Joystick:isDown to be 0-based instead of 1-based, for example button 1 would be 0 for this function. It was fixed in 0.9.1. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Joystick:isDown) ---- ----@param buttonN number # The index of a button to check. ----@return boolean anyDown # True if any supplied button is down, false if not. -function Joystick:isDown(buttonN) end - ---- ----Gets whether the Joystick is recognized as a gamepad. If this is the case, the Joystick's buttons and axes can be used in a standardized manner across different operating systems and joystick models via Joystick:getGamepadAxis, Joystick:isGamepadDown, love.gamepadpressed, and related functions. ---- ----LÖVE automatically recognizes most popular controllers with a similar layout to the Xbox 360 controller as gamepads, but you can add more with love.joystick.setGamepadMapping. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Joystick:isGamepad) ---- ----@return boolean isgamepad # True if the Joystick is recognized as a gamepad, false otherwise. -function Joystick:isGamepad() end - ---- ----Checks if a virtual gamepad button on the Joystick is pressed. If the Joystick is not recognized as a Gamepad or isn't connected, then this function will always return false. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Joystick:isGamepadDown) ---- ----@param buttonN love.GamepadButton # The gamepad button to check. ----@return boolean anyDown # True if any supplied button is down, false if not. -function Joystick:isGamepadDown(buttonN) end - ---- ----Gets whether the Joystick supports vibration. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Joystick:isVibrationSupported) ---- ----@return boolean supported # True if rumble / force feedback vibration is supported on this Joystick, false if not. -function Joystick:isVibrationSupported() end - ---- ----Sets the vibration motor speeds on a Joystick with rumble support. Most common gamepads have this functionality, although not all drivers give proper support. Use Joystick:isVibrationSupported to check. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Joystick:setVibration) ---- ----@overload fun(self: love.Joystick):boolean ----@overload fun(self: love.Joystick, left: number, right: number, duration?: number):boolean ----@param left number # Strength of the left vibration motor on the Joystick. Must be in the range of 1. ----@param right number # Strength of the right vibration motor on the Joystick. Must be in the range of 1. ----@return boolean success # True if the vibration was successfully applied, false if not. -function Joystick:setVibration(left, right) end - ---- ----Virtual gamepad axes. ---- ---- ----[Open in Browser](https://love2d.org/wiki/GamepadAxis) ---- ----@alias love.GamepadAxis ---- ----The x-axis of the left thumbstick. ---- ----| "leftx" ---- ----The y-axis of the left thumbstick. ---- ----| "lefty" ---- ----The x-axis of the right thumbstick. ---- ----| "rightx" ---- ----The y-axis of the right thumbstick. ---- ----| "righty" ---- ----Left analog trigger. ---- ----| "triggerleft" ---- ----Right analog trigger. ---- ----| "triggerright" - ---- ----Virtual gamepad buttons. ---- ---- ----[Open in Browser](https://love2d.org/wiki/GamepadButton) ---- ----@alias love.GamepadButton ---- ----Bottom face button (A). ---- ----| "a" ---- ----Right face button (B). ---- ----| "b" ---- ----Left face button (X). ---- ----| "x" ---- ----Top face button (Y). ---- ----| "y" ---- ----Back button. ---- ----| "back" ---- ----Guide button. ---- ----| "guide" ---- ----Start button. ---- ----| "start" ---- ----Left stick click button. ---- ----| "leftstick" ---- ----Right stick click button. ---- ----| "rightstick" ---- ----Left bumper. ---- ----| "leftshoulder" ---- ----Right bumper. ---- ----| "rightshoulder" ---- ----D-pad up. ---- ----| "dpup" ---- ----D-pad down. ---- ----| "dpdown" ---- ----D-pad left. ---- ----| "dpleft" ---- ----D-pad right. ---- ----| "dpright" - ---- ----Joystick hat positions. ---- ---- ----[Open in Browser](https://love2d.org/wiki/JoystickHat) ---- ----@alias love.JoystickHat ---- ----Centered ---- ----| "c" ---- ----Down ---- ----| "d" ---- ----Left ---- ----| "l" ---- ----Left+Down ---- ----| "ld" ---- ----Left+Up ---- ----| "lu" ---- ----Right ---- ----| "r" ---- ----Right+Down ---- ----| "rd" ---- ----Right+Up ---- ----| "ru" ---- ----Up ---- ----| "u" - ---- ----Types of Joystick inputs. ---- ---- ----[Open in Browser](https://love2d.org/wiki/JoystickInputType) ---- ----@alias love.JoystickInputType ---- ----Analog axis. ---- ----| "axis" ---- ----Button. ---- ----| "button" ---- ----8-direction hat value. ---- ----| "hat" diff --git a/meta/3rd/love2d/library/love/keyboard.lua b/meta/3rd/love2d/library/love/keyboard.lua deleted file mode 100644 index a73a23cf..00000000 --- a/meta/3rd/love2d/library/love/keyboard.lua +++ /dev/null @@ -1,1484 +0,0 @@ ----@meta - ---- ----Provides an interface to the user's keyboard. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.keyboard) ---- ----@class love.keyboard -love.keyboard = {} - ---- ----Gets the key corresponding to the given hardware scancode. ---- ----Unlike key constants, Scancodes are keyboard layout-independent. For example the scancode 'w' will be generated if the key in the same place as the 'w' key on an American keyboard is pressed, no matter what the key is labelled or what the user's operating system settings are. ---- ----Scancodes are useful for creating default controls that have the same physical locations on on all systems. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.keyboard.getKeyFromScancode) ---- ----@param scancode love.Scancode # The scancode to get the key from. ----@return love.KeyConstant key # The key corresponding to the given scancode, or 'unknown' if the scancode doesn't map to a KeyConstant on the current system. -function love.keyboard.getKeyFromScancode(scancode) end - ---- ----Gets the hardware scancode corresponding to the given key. ---- ----Unlike key constants, Scancodes are keyboard layout-independent. For example the scancode 'w' will be generated if the key in the same place as the 'w' key on an American keyboard is pressed, no matter what the key is labelled or what the user's operating system settings are. ---- ----Scancodes are useful for creating default controls that have the same physical locations on on all systems. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.keyboard.getScancodeFromKey) ---- ----@param key love.KeyConstant # The key to get the scancode from. ----@return love.Scancode scancode # The scancode corresponding to the given key, or 'unknown' if the given key has no known physical representation on the current system. -function love.keyboard.getScancodeFromKey(key) end - ---- ----Gets whether key repeat is enabled. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.keyboard.hasKeyRepeat) ---- ----@return boolean enabled # Whether key repeat is enabled. -function love.keyboard.hasKeyRepeat() end - ---- ----Gets whether screen keyboard is supported. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.keyboard.hasScreenKeyboard) ---- ----@return boolean supported # Whether screen keyboard is supported. -function love.keyboard.hasScreenKeyboard() end - ---- ----Gets whether text input events are enabled. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.keyboard.hasTextInput) ---- ----@return boolean enabled # Whether text input events are enabled. -function love.keyboard.hasTextInput() end - ---- ----Checks whether a certain key is down. Not to be confused with love.keypressed or love.keyreleased. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.keyboard.isDown) ---- ----@overload fun(key: love.KeyConstant, ...):boolean ----@param key love.KeyConstant # The key to check. ----@return boolean down # True if the key is down, false if not. -function love.keyboard.isDown(key) end - ---- ----Checks whether the specified Scancodes are pressed. Not to be confused with love.keypressed or love.keyreleased. ---- ----Unlike regular KeyConstants, Scancodes are keyboard layout-independent. The scancode 'w' is used if the key in the same place as the 'w' key on an American keyboard is pressed, no matter what the key is labelled or what the user's operating system settings are. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.keyboard.isScancodeDown) ---- ----@param scancode love.Scancode # A Scancode to check. ----@vararg love.Scancode # Additional Scancodes to check. ----@return boolean down # True if any supplied Scancode is down, false if not. -function love.keyboard.isScancodeDown(scancode, ...) end - ---- ----Enables or disables key repeat for love.keypressed. It is disabled by default. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.keyboard.setKeyRepeat) ---- ----@param enable boolean # Whether repeat keypress events should be enabled when a key is held down. -function love.keyboard.setKeyRepeat(enable) end - ---- ----Enables or disables text input events. It is enabled by default on Windows, Mac, and Linux, and disabled by default on iOS and Android. ---- ----On touch devices, this shows the system's native on-screen keyboard when it's enabled. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.keyboard.setTextInput) ---- ----@overload fun(enable: boolean, x: number, y: number, w: number, h: number) ----@param enable boolean # Whether text input events should be enabled. -function love.keyboard.setTextInput(enable) end - ---- ----All the keys you can press. Note that some keys may not be available on your keyboard or system. ---- ---- ----[Open in Browser](https://love2d.org/wiki/KeyConstant) ---- ----@alias love.KeyConstant ---- ----The A key ---- ----| "a" ---- ----The B key ---- ----| "b" ---- ----The C key ---- ----| "c" ---- ----The D key ---- ----| "d" ---- ----The E key ---- ----| "e" ---- ----The F key ---- ----| "f" ---- ----The G key ---- ----| "g" ---- ----The H key ---- ----| "h" ---- ----The I key ---- ----| "i" ---- ----The J key ---- ----| "j" ---- ----The K key ---- ----| "k" ---- ----The L key ---- ----| "l" ---- ----The M key ---- ----| "m" ---- ----The N key ---- ----| "n" ---- ----The O key ---- ----| "o" ---- ----The P key ---- ----| "p" ---- ----The Q key ---- ----| "q" ---- ----The R key ---- ----| "r" ---- ----The S key ---- ----| "s" ---- ----The T key ---- ----| "t" ---- ----The U key ---- ----| "u" ---- ----The V key ---- ----| "v" ---- ----The W key ---- ----| "w" ---- ----The X key ---- ----| "x" ---- ----The Y key ---- ----| "y" ---- ----The Z key ---- ----| "z" ---- ----The zero key ---- ----| "0" ---- ----The one key ---- ----| "1" ---- ----The two key ---- ----| "2" ---- ----The three key ---- ----| "3" ---- ----The four key ---- ----| "4" ---- ----The five key ---- ----| "5" ---- ----The six key ---- ----| "6" ---- ----The seven key ---- ----| "7" ---- ----The eight key ---- ----| "8" ---- ----The nine key ---- ----| "9" ---- ----Space key ---- ----| "space" ---- ----Exclamation mark key ---- ----| "!" ---- ----Double quote key ---- ----| "\"" ---- ----Hash key ---- ----| "#" ---- ----Dollar key ---- ----| "$" ---- ----Ampersand key ---- ----| "&" ---- ----Single quote key ---- ----| "'" ---- ----Left parenthesis key ---- ----| "(" ---- ----Right parenthesis key ---- ----| ")" ---- ----Asterisk key ---- ----| "*" ---- ----Plus key ---- ----| "+" ---- ----Comma key ---- ----| "," ---- ----Hyphen-minus key ---- ----| "-" ---- ----Full stop key ---- ----| "." ---- ----Slash key ---- ----| "/" ---- ----Colon key ---- ----| ":" ---- ----Semicolon key ---- ----| ";" ---- ----Less-than key ---- ----| "<" ---- ----Equal key ---- ----| "=" ---- ----Greater-than key ---- ----| ">" ---- ----Question mark key ---- ----| "?" ---- ----At sign key ---- ----| "@" ---- ----Left square bracket key ---- ----| "[" ---- ----Backslash key ---- ----| "\\" ---- ----Right square bracket key ---- ----| "]" ---- ----Caret key ---- ----| "^" ---- ----Underscore key ---- ----| "_" ---- ----Grave accent key ---- ----| "`" ---- ----The numpad zero key ---- ----| "kp0" ---- ----The numpad one key ---- ----| "kp1" ---- ----The numpad two key ---- ----| "kp2" ---- ----The numpad three key ---- ----| "kp3" ---- ----The numpad four key ---- ----| "kp4" ---- ----The numpad five key ---- ----| "kp5" ---- ----The numpad six key ---- ----| "kp6" ---- ----The numpad seven key ---- ----| "kp7" ---- ----The numpad eight key ---- ----| "kp8" ---- ----The numpad nine key ---- ----| "kp9" ---- ----The numpad decimal point key ---- ----| "kp." ---- ----The numpad division key ---- ----| "kp/" ---- ----The numpad multiplication key ---- ----| "kp*" ---- ----The numpad substraction key ---- ----| "kp-" ---- ----The numpad addition key ---- ----| "kp+" ---- ----The numpad enter key ---- ----| "kpenter" ---- ----The numpad equals key ---- ----| "kp=" ---- ----Up cursor key ---- ----| "up" ---- ----Down cursor key ---- ----| "down" ---- ----Right cursor key ---- ----| "right" ---- ----Left cursor key ---- ----| "left" ---- ----Home key ---- ----| "home" ---- ----End key ---- ----| "end" ---- ----Page up key ---- ----| "pageup" ---- ----Page down key ---- ----| "pagedown" ---- ----Insert key ---- ----| "insert" ---- ----Backspace key ---- ----| "backspace" ---- ----Tab key ---- ----| "tab" ---- ----Clear key ---- ----| "clear" ---- ----Return key ---- ----| "return" ---- ----Delete key ---- ----| "delete" ---- ----The 1st function key ---- ----| "f1" ---- ----The 2nd function key ---- ----| "f2" ---- ----The 3rd function key ---- ----| "f3" ---- ----The 4th function key ---- ----| "f4" ---- ----The 5th function key ---- ----| "f5" ---- ----The 6th function key ---- ----| "f6" ---- ----The 7th function key ---- ----| "f7" ---- ----The 8th function key ---- ----| "f8" ---- ----The 9th function key ---- ----| "f9" ---- ----The 10th function key ---- ----| "f10" ---- ----The 11th function key ---- ----| "f11" ---- ----The 12th function key ---- ----| "f12" ---- ----The 13th function key ---- ----| "f13" ---- ----The 14th function key ---- ----| "f14" ---- ----The 15th function key ---- ----| "f15" ---- ----Num-lock key ---- ----| "numlock" ---- ----Caps-lock key ---- ----| "capslock" ---- ----Scroll-lock key ---- ----| "scrollock" ---- ----Right shift key ---- ----| "rshift" ---- ----Left shift key ---- ----| "lshift" ---- ----Right control key ---- ----| "rctrl" ---- ----Left control key ---- ----| "lctrl" ---- ----Right alt key ---- ----| "ralt" ---- ----Left alt key ---- ----| "lalt" ---- ----Right meta key ---- ----| "rmeta" ---- ----Left meta key ---- ----| "lmeta" ---- ----Left super key ---- ----| "lsuper" ---- ----Right super key ---- ----| "rsuper" ---- ----Mode key ---- ----| "mode" ---- ----Compose key ---- ----| "compose" ---- ----Pause key ---- ----| "pause" ---- ----Escape key ---- ----| "escape" ---- ----Help key ---- ----| "help" ---- ----Print key ---- ----| "print" ---- ----System request key ---- ----| "sysreq" ---- ----Break key ---- ----| "break" ---- ----Menu key ---- ----| "menu" ---- ----Power key ---- ----| "power" ---- ----Euro (€) key ---- ----| "euro" ---- ----Undo key ---- ----| "undo" ---- ----WWW key ---- ----| "www" ---- ----Mail key ---- ----| "mail" ---- ----Calculator key ---- ----| "calculator" ---- ----Application search key ---- ----| "appsearch" ---- ----Application home key ---- ----| "apphome" ---- ----Application back key ---- ----| "appback" ---- ----Application forward key ---- ----| "appforward" ---- ----Application refresh key ---- ----| "apprefresh" ---- ----Application bookmarks key ---- ----| "appbookmarks" - ---- ----Keyboard scancodes. ---- ----Scancodes are keyboard layout-independent, so the scancode "w" will be generated if the key in the same place as the "w" key on an American QWERTY keyboard is pressed, no matter what the key is labelled or what the user's operating system settings are. ---- ----Using scancodes, rather than keycodes, is useful because keyboards with layouts differing from the US/UK layout(s) might have keys that generate 'unknown' keycodes, but the scancodes will still be detected. This however would necessitate having a list for each keyboard layout one would choose to support. ---- ----One could use textinput or textedited instead, but those only give back the end result of keys used, i.e. you can't get modifiers on their own from it, only the final symbols that were generated. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Scancode) ---- ----@alias love.Scancode ---- ----The 'A' key on an American layout. ---- ----| "a" ---- ----The 'B' key on an American layout. ---- ----| "b" ---- ----The 'C' key on an American layout. ---- ----| "c" ---- ----The 'D' key on an American layout. ---- ----| "d" ---- ----The 'E' key on an American layout. ---- ----| "e" ---- ----The 'F' key on an American layout. ---- ----| "f" ---- ----The 'G' key on an American layout. ---- ----| "g" ---- ----The 'H' key on an American layout. ---- ----| "h" ---- ----The 'I' key on an American layout. ---- ----| "i" ---- ----The 'J' key on an American layout. ---- ----| "j" ---- ----The 'K' key on an American layout. ---- ----| "k" ---- ----The 'L' key on an American layout. ---- ----| "l" ---- ----The 'M' key on an American layout. ---- ----| "m" ---- ----The 'N' key on an American layout. ---- ----| "n" ---- ----The 'O' key on an American layout. ---- ----| "o" ---- ----The 'P' key on an American layout. ---- ----| "p" ---- ----The 'Q' key on an American layout. ---- ----| "q" ---- ----The 'R' key on an American layout. ---- ----| "r" ---- ----The 'S' key on an American layout. ---- ----| "s" ---- ----The 'T' key on an American layout. ---- ----| "t" ---- ----The 'U' key on an American layout. ---- ----| "u" ---- ----The 'V' key on an American layout. ---- ----| "v" ---- ----The 'W' key on an American layout. ---- ----| "w" ---- ----The 'X' key on an American layout. ---- ----| "x" ---- ----The 'Y' key on an American layout. ---- ----| "y" ---- ----The 'Z' key on an American layout. ---- ----| "z" ---- ----The '1' key on an American layout. ---- ----| "1" ---- ----The '2' key on an American layout. ---- ----| "2" ---- ----The '3' key on an American layout. ---- ----| "3" ---- ----The '4' key on an American layout. ---- ----| "4" ---- ----The '5' key on an American layout. ---- ----| "5" ---- ----The '6' key on an American layout. ---- ----| "6" ---- ----The '7' key on an American layout. ---- ----| "7" ---- ----The '8' key on an American layout. ---- ----| "8" ---- ----The '9' key on an American layout. ---- ----| "9" ---- ----The '0' key on an American layout. ---- ----| "0" ---- ----The 'return' / 'enter' key on an American layout. ---- ----| "return" ---- ----The 'escape' key on an American layout. ---- ----| "escape" ---- ----The 'backspace' key on an American layout. ---- ----| "backspace" ---- ----The 'tab' key on an American layout. ---- ----| "tab" ---- ----The spacebar on an American layout. ---- ----| "space" ---- ----The minus key on an American layout. ---- ----| "-" ---- ----The equals key on an American layout. ---- ----| "=" ---- ----The left-bracket key on an American layout. ---- ----| "[" ---- ----The right-bracket key on an American layout. ---- ----| "]" ---- ----The backslash key on an American layout. ---- ----| "\\" ---- ----The non-U.S. hash scancode. ---- ----| "nonus#" ---- ----The semicolon key on an American layout. ---- ----| ";" ---- ----The apostrophe key on an American layout. ---- ----| "'" ---- ----The back-tick / grave key on an American layout. ---- ----| "`" ---- ----The comma key on an American layout. ---- ----| "," ---- ----The period key on an American layout. ---- ----| "." ---- ----The forward-slash key on an American layout. ---- ----| "/" ---- ----The capslock key on an American layout. ---- ----| "capslock" ---- ----The F1 key on an American layout. ---- ----| "f1" ---- ----The F2 key on an American layout. ---- ----| "f2" ---- ----The F3 key on an American layout. ---- ----| "f3" ---- ----The F4 key on an American layout. ---- ----| "f4" ---- ----The F5 key on an American layout. ---- ----| "f5" ---- ----The F6 key on an American layout. ---- ----| "f6" ---- ----The F7 key on an American layout. ---- ----| "f7" ---- ----The F8 key on an American layout. ---- ----| "f8" ---- ----The F9 key on an American layout. ---- ----| "f9" ---- ----The F10 key on an American layout. ---- ----| "f10" ---- ----The F11 key on an American layout. ---- ----| "f11" ---- ----The F12 key on an American layout. ---- ----| "f12" ---- ----The F13 key on an American layout. ---- ----| "f13" ---- ----The F14 key on an American layout. ---- ----| "f14" ---- ----The F15 key on an American layout. ---- ----| "f15" ---- ----The F16 key on an American layout. ---- ----| "f16" ---- ----The F17 key on an American layout. ---- ----| "f17" ---- ----The F18 key on an American layout. ---- ----| "f18" ---- ----The F19 key on an American layout. ---- ----| "f19" ---- ----The F20 key on an American layout. ---- ----| "f20" ---- ----The F21 key on an American layout. ---- ----| "f21" ---- ----The F22 key on an American layout. ---- ----| "f22" ---- ----The F23 key on an American layout. ---- ----| "f23" ---- ----The F24 key on an American layout. ---- ----| "f24" ---- ----The left control key on an American layout. ---- ----| "lctrl" ---- ----The left shift key on an American layout. ---- ----| "lshift" ---- ----The left alt / option key on an American layout. ---- ----| "lalt" ---- ----The left GUI (command / windows / super) key on an American layout. ---- ----| "lgui" ---- ----The right control key on an American layout. ---- ----| "rctrl" ---- ----The right shift key on an American layout. ---- ----| "rshift" ---- ----The right alt / option key on an American layout. ---- ----| "ralt" ---- ----The right GUI (command / windows / super) key on an American layout. ---- ----| "rgui" ---- ----The printscreen key on an American layout. ---- ----| "printscreen" ---- ----The scroll-lock key on an American layout. ---- ----| "scrolllock" ---- ----The pause key on an American layout. ---- ----| "pause" ---- ----The insert key on an American layout. ---- ----| "insert" ---- ----The home key on an American layout. ---- ----| "home" ---- ----The numlock / clear key on an American layout. ---- ----| "numlock" ---- ----The page-up key on an American layout. ---- ----| "pageup" ---- ----The forward-delete key on an American layout. ---- ----| "delete" ---- ----The end key on an American layout. ---- ----| "end" ---- ----The page-down key on an American layout. ---- ----| "pagedown" ---- ----The right-arrow key on an American layout. ---- ----| "right" ---- ----The left-arrow key on an American layout. ---- ----| "left" ---- ----The down-arrow key on an American layout. ---- ----| "down" ---- ----The up-arrow key on an American layout. ---- ----| "up" ---- ----The non-U.S. backslash scancode. ---- ----| "nonusbackslash" ---- ----The application key on an American layout. Windows contextual menu, compose key. ---- ----| "application" ---- ----The 'execute' key on an American layout. ---- ----| "execute" ---- ----The 'help' key on an American layout. ---- ----| "help" ---- ----The 'menu' key on an American layout. ---- ----| "menu" ---- ----The 'select' key on an American layout. ---- ----| "select" ---- ----The 'stop' key on an American layout. ---- ----| "stop" ---- ----The 'again' key on an American layout. ---- ----| "again" ---- ----The 'undo' key on an American layout. ---- ----| "undo" ---- ----The 'cut' key on an American layout. ---- ----| "cut" ---- ----The 'copy' key on an American layout. ---- ----| "copy" ---- ----The 'paste' key on an American layout. ---- ----| "paste" ---- ----The 'find' key on an American layout. ---- ----| "find" ---- ----The keypad forward-slash key on an American layout. ---- ----| "kp/" ---- ----The keypad '*' key on an American layout. ---- ----| "kp*" ---- ----The keypad minus key on an American layout. ---- ----| "kp-" ---- ----The keypad plus key on an American layout. ---- ----| "kp+" ---- ----The keypad equals key on an American layout. ---- ----| "kp=" ---- ----The keypad enter key on an American layout. ---- ----| "kpenter" ---- ----The keypad '1' key on an American layout. ---- ----| "kp1" ---- ----The keypad '2' key on an American layout. ---- ----| "kp2" ---- ----The keypad '3' key on an American layout. ---- ----| "kp3" ---- ----The keypad '4' key on an American layout. ---- ----| "kp4" ---- ----The keypad '5' key on an American layout. ---- ----| "kp5" ---- ----The keypad '6' key on an American layout. ---- ----| "kp6" ---- ----The keypad '7' key on an American layout. ---- ----| "kp7" ---- ----The keypad '8' key on an American layout. ---- ----| "kp8" ---- ----The keypad '9' key on an American layout. ---- ----| "kp9" ---- ----The keypad '0' key on an American layout. ---- ----| "kp0" ---- ----The keypad period key on an American layout. ---- ----| "kp." ---- ----The 1st international key on an American layout. Used on Asian keyboards. ---- ----| "international1" ---- ----The 2nd international key on an American layout. ---- ----| "international2" ---- ----The 3rd international key on an American layout. Yen. ---- ----| "international3" ---- ----The 4th international key on an American layout. ---- ----| "international4" ---- ----The 5th international key on an American layout. ---- ----| "international5" ---- ----The 6th international key on an American layout. ---- ----| "international6" ---- ----The 7th international key on an American layout. ---- ----| "international7" ---- ----The 8th international key on an American layout. ---- ----| "international8" ---- ----The 9th international key on an American layout. ---- ----| "international9" ---- ----Hangul/English toggle scancode. ---- ----| "lang1" ---- ----Hanja conversion scancode. ---- ----| "lang2" ---- ----Katakana scancode. ---- ----| "lang3" ---- ----Hiragana scancode. ---- ----| "lang4" ---- ----Zenkaku/Hankaku scancode. ---- ----| "lang5" ---- ----The mute key on an American layout. ---- ----| "mute" ---- ----The volume up key on an American layout. ---- ----| "volumeup" ---- ----The volume down key on an American layout. ---- ----| "volumedown" ---- ----The audio next track key on an American layout. ---- ----| "audionext" ---- ----The audio previous track key on an American layout. ---- ----| "audioprev" ---- ----The audio stop key on an American layout. ---- ----| "audiostop" ---- ----The audio play key on an American layout. ---- ----| "audioplay" ---- ----The audio mute key on an American layout. ---- ----| "audiomute" ---- ----The media select key on an American layout. ---- ----| "mediaselect" ---- ----The 'WWW' key on an American layout. ---- ----| "www" ---- ----The Mail key on an American layout. ---- ----| "mail" ---- ----The calculator key on an American layout. ---- ----| "calculator" ---- ----The 'computer' key on an American layout. ---- ----| "computer" ---- ----The AC Search key on an American layout. ---- ----| "acsearch" ---- ----The AC Home key on an American layout. ---- ----| "achome" ---- ----The AC Back key on an American layout. ---- ----| "acback" ---- ----The AC Forward key on an American layout. ---- ----| "acforward" ---- ----Th AC Stop key on an American layout. ---- ----| "acstop" ---- ----The AC Refresh key on an American layout. ---- ----| "acrefresh" ---- ----The AC Bookmarks key on an American layout. ---- ----| "acbookmarks" ---- ----The system power scancode. ---- ----| "power" ---- ----The brightness-down scancode. ---- ----| "brightnessdown" ---- ----The brightness-up scancode. ---- ----| "brightnessup" ---- ----The display switch scancode. ---- ----| "displayswitch" ---- ----The keyboard illumination toggle scancode. ---- ----| "kbdillumtoggle" ---- ----The keyboard illumination down scancode. ---- ----| "kbdillumdown" ---- ----The keyboard illumination up scancode. ---- ----| "kbdillumup" ---- ----The eject scancode. ---- ----| "eject" ---- ----The system sleep scancode. ---- ----| "sleep" ---- ----The alt-erase key on an American layout. ---- ----| "alterase" ---- ----The sysreq key on an American layout. ---- ----| "sysreq" ---- ----The 'cancel' key on an American layout. ---- ----| "cancel" ---- ----The 'clear' key on an American layout. ---- ----| "clear" ---- ----The 'prior' key on an American layout. ---- ----| "prior" ---- ----The 'return2' key on an American layout. ---- ----| "return2" ---- ----The 'separator' key on an American layout. ---- ----| "separator" ---- ----The 'out' key on an American layout. ---- ----| "out" ---- ----The 'oper' key on an American layout. ---- ----| "oper" ---- ----The 'clearagain' key on an American layout. ---- ----| "clearagain" ---- ----The 'crsel' key on an American layout. ---- ----| "crsel" ---- ----The 'exsel' key on an American layout. ---- ----| "exsel" ---- ----The keypad 00 key on an American layout. ---- ----| "kp00" ---- ----The keypad 000 key on an American layout. ---- ----| "kp000" ---- ----The thousands-separator key on an American layout. ---- ----| "thsousandsseparator" ---- ----The decimal separator key on an American layout. ---- ----| "decimalseparator" ---- ----The currency unit key on an American layout. ---- ----| "currencyunit" ---- ----The currency sub-unit key on an American layout. ---- ----| "currencysubunit" ---- ----The 'app1' scancode. ---- ----| "app1" ---- ----The 'app2' scancode. ---- ----| "app2" ---- ----An unknown key. ---- ----| "unknown" diff --git a/meta/3rd/love2d/library/love/math.lua b/meta/3rd/love2d/library/love/math.lua deleted file mode 100644 index e8397cb5..00000000 --- a/meta/3rd/love2d/library/love/math.lua +++ /dev/null @@ -1,711 +0,0 @@ ----@meta - ---- ----Provides system-independent mathematical functions. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.math) ---- ----@class love.math -love.math = {} - ---- ----Converts a color from 0..255 to 0..1 range. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.math.colorFromBytes) ---- ----@param rb number # Red color component in 0..255 range. ----@param gb number # Green color component in 0..255 range. ----@param bb number # Blue color component in 0..255 range. ----@param ab? number # Alpha color component in 0..255 range. ----@return number r # Red color component in 0..1 range. ----@return number g # Green color component in 0..1 range. ----@return number b # Blue color component in 0..1 range. ----@return number a # Alpha color component in 0..1 range or nil if alpha is not specified. -function love.math.colorFromBytes(rb, gb, bb, ab) end - ---- ----Converts a color from 0..1 to 0..255 range. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.math.colorToBytes) ---- ----@param r number # Red color component. ----@param g number # Green color component. ----@param b number # Blue color component. ----@param a? number # Alpha color component. ----@return number rb # Red color component in 0..255 range. ----@return number gb # Green color component in 0..255 range. ----@return number bb # Blue color component in 0..255 range. ----@return number ab # Alpha color component in 0..255 range or nil if alpha is not specified. -function love.math.colorToBytes(r, g, b, a) end - ---- ----Compresses a string or data using a specific compression algorithm. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.math.compress) ---- ----@overload fun(data: love.Data, format?: love.CompressedDataFormat, level?: number):love.CompressedData ----@param rawstring string # The raw (un-compressed) string to compress. ----@param format? love.CompressedDataFormat # The format to use when compressing the string. ----@param level? number # The level of compression to use, between 0 and 9. -1 indicates the default level. The meaning of this argument depends on the compression format being used. ----@return love.CompressedData compressedData # A new Data object containing the compressed version of the string. -function love.math.compress(rawstring, format, level) end - ---- ----Decompresses a CompressedData or previously compressed string or Data object. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.math.decompress) ---- ----@overload fun(compressedstring: string, format: love.CompressedDataFormat):string ----@overload fun(data: love.Data, format: love.CompressedDataFormat):string ----@param compressedData love.CompressedData # The compressed data to decompress. ----@return string rawstring # A string containing the raw decompressed data. -function love.math.decompress(compressedData) end - ---- ----Converts a color from gamma-space (sRGB) to linear-space (RGB). This is useful when doing gamma-correct rendering and you need to do math in linear RGB in the few cases where LÖVE doesn't handle conversions automatically. ---- ----Read more about gamma-correct rendering here, here, and here. ---- ----In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.math.gammaToLinear) ---- ----@overload fun(color: table):number, number, number ----@overload fun(c: number):number ----@param r number # The red channel of the sRGB color to convert. ----@param g number # The green channel of the sRGB color to convert. ----@param b number # The blue channel of the sRGB color to convert. ----@return number lr # The red channel of the converted color in linear RGB space. ----@return number lg # The green channel of the converted color in linear RGB space. ----@return number lb # The blue channel of the converted color in linear RGB space. -function love.math.gammaToLinear(r, g, b) end - ---- ----Gets the seed of the random number generator. ---- ----The seed is split into two numbers due to Lua's use of doubles for all number values - doubles can't accurately represent integer values above 2^53, but the seed can be an integer value up to 2^64. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.math.getRandomSeed) ---- ----@return number low # Integer number representing the lower 32 bits of the random number generator's 64 bit seed value. ----@return number high # Integer number representing the higher 32 bits of the random number generator's 64 bit seed value. -function love.math.getRandomSeed() end - ---- ----Gets the current state of the random number generator. This returns an opaque implementation-dependent string which is only useful for later use with love.math.setRandomState or RandomGenerator:setState. ---- ----This is different from love.math.getRandomSeed in that getRandomState gets the random number generator's current state, whereas getRandomSeed gets the previously set seed number. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.math.getRandomState) ---- ----@return string state # The current state of the random number generator, represented as a string. -function love.math.getRandomState() end - ---- ----Checks whether a polygon is convex. ---- ----PolygonShapes in love.physics, some forms of Meshes, and polygons drawn with love.graphics.polygon must be simple convex polygons. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.math.isConvex) ---- ----@overload fun(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number):boolean ----@param vertices table # The vertices of the polygon as a table in the form of {x1, y1, x2, y2, x3, y3, ...}. ----@return boolean convex # Whether the given polygon is convex. -function love.math.isConvex(vertices) end - ---- ----Converts a color from linear-space (RGB) to gamma-space (sRGB). This is useful when storing linear RGB color values in an image, because the linear RGB color space has less precision than sRGB for dark colors, which can result in noticeable color banding when drawing. ---- ----In general, colors chosen based on what they look like on-screen are already in gamma-space and should not be double-converted. Colors calculated using math are often in the linear RGB space. ---- ----Read more about gamma-correct rendering here, here, and here. ---- ----In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.math.linearToGamma) ---- ----@overload fun(color: table):number, number, number ----@overload fun(lc: number):number ----@param lr number # The red channel of the linear RGB color to convert. ----@param lg number # The green channel of the linear RGB color to convert. ----@param lb number # The blue channel of the linear RGB color to convert. ----@return number cr # The red channel of the converted color in gamma sRGB space. ----@return number cg # The green channel of the converted color in gamma sRGB space. ----@return number cb # The blue channel of the converted color in gamma sRGB space. -function love.math.linearToGamma(lr, lg, lb) end - ---- ----Creates a new BezierCurve object. ---- ----The number of vertices in the control polygon determines the degree of the curve, e.g. three vertices define a quadratic (degree 2) Bézier curve, four vertices define a cubic (degree 3) Bézier curve, etc. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.math.newBezierCurve) ---- ----@overload fun(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number):love.BezierCurve ----@param vertices table # The vertices of the control polygon as a table in the form of {x1, y1, x2, y2, x3, y3, ...}. ----@return love.BezierCurve curve # A Bézier curve object. -function love.math.newBezierCurve(vertices) end - ---- ----Creates a new RandomGenerator object which is completely independent of other RandomGenerator objects and random functions. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.math.newRandomGenerator) ---- ----@overload fun(seed: number):love.RandomGenerator ----@overload fun(low: number, high: number):love.RandomGenerator ----@return love.RandomGenerator rng # The new Random Number Generator object. -function love.math.newRandomGenerator() end - ---- ----Creates a new Transform object. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.math.newTransform) ---- ----@overload fun(x: number, y: number, angle?: number, sx?: number, sy?: number, ox?: number, oy?: number, kx?: number, ky?: number):love.Transform ----@return love.Transform transform # The new Transform object. -function love.math.newTransform() end - ---- ----Generates a Simplex or Perlin noise value in 1-4 dimensions. The return value will always be the same, given the same arguments. ---- ----Simplex noise is closely related to Perlin noise. It is widely used for procedural content generation. ---- ----There are many webpages which discuss Perlin and Simplex noise in detail. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.math.noise) ---- ----@overload fun(x: number, y: number):number ----@overload fun(x: number, y: number, z: number):number ----@overload fun(x: number, y: number, z: number, w: number):number ----@param x number # The number used to generate the noise value. ----@return number value # The noise value in the range of 1. -function love.math.noise(x) end - ---- ----Generates a pseudo-random number in a platform independent manner. The default love.run seeds this function at startup, so you generally don't need to seed it yourself. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.math.random) ---- ----@overload fun(max: number):number ----@overload fun(min: number, max: number):number ----@return number number # The pseudo-random number. -function love.math.random() end - ---- ----Get a normally distributed pseudo random number. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.math.randomNormal) ---- ----@param stddev? number # Standard deviation of the distribution. ----@param mean? number # The mean of the distribution. ----@return number number # Normally distributed random number with variance (stddev)² and the specified mean. -function love.math.randomNormal(stddev, mean) end - ---- ----Sets the seed of the random number generator using the specified integer number. This is called internally at startup, so you generally don't need to call it yourself. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.math.setRandomSeed) ---- ----@overload fun(low: number, high: number) ----@param seed number # The integer number with which you want to seed the randomization. Must be within the range of 2^53 - 1. -function love.math.setRandomSeed(seed) end - ---- ----Sets the current state of the random number generator. The value used as an argument for this function is an opaque implementation-dependent string and should only originate from a previous call to love.math.getRandomState. ---- ----This is different from love.math.setRandomSeed in that setRandomState directly sets the random number generator's current implementation-dependent state, whereas setRandomSeed gives it a new seed value. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.math.setRandomState) ---- ----@param state string # The new state of the random number generator, represented as a string. This should originate from a previous call to love.math.getRandomState. -function love.math.setRandomState(state) end - ---- ----Decomposes a simple convex or concave polygon into triangles. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.math.triangulate) ---- ----@overload fun(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number):table ----@param polygon table # Polygon to triangulate. Must not intersect itself. ----@return table triangles # List of triangles the polygon is composed of, in the form of {{x1, y1, x2, y2, x3, y3}, {x1, y1, x2, y2, x3, y3}, ...}. -function love.math.triangulate(polygon) end - ---- ----A Bézier curve object that can evaluate and render Bézier curves of arbitrary degree. ---- ----For more information on Bézier curves check this great article on Wikipedia. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.math) ---- ----@class love.BezierCurve: love.Object -local BezierCurve = {} - ---- ----Evaluate Bézier curve at parameter t. The parameter must be between 0 and 1 (inclusive). ---- ----This function can be used to move objects along paths or tween parameters. However it should not be used to render the curve, see BezierCurve:render for that purpose. ---- ---- ----[Open in Browser](https://love2d.org/wiki/BezierCurve:evaluate) ---- ----@param t number # Where to evaluate the curve. ----@return number x # x coordinate of the curve at parameter t. ----@return number y # y coordinate of the curve at parameter t. -function BezierCurve:evaluate(t) end - ---- ----Get coordinates of the i-th control point. Indices start with 1. ---- ---- ----[Open in Browser](https://love2d.org/wiki/BezierCurve:getControlPoint) ---- ----@param i number # Index of the control point. ----@return number x # Position of the control point along the x axis. ----@return number y # Position of the control point along the y axis. -function BezierCurve:getControlPoint(i) end - ---- ----Get the number of control points in the Bézier curve. ---- ---- ----[Open in Browser](https://love2d.org/wiki/BezierCurve:getControlPointCount) ---- ----@return number count # The number of control points. -function BezierCurve:getControlPointCount() end - ---- ----Get degree of the Bézier curve. The degree is equal to number-of-control-points - 1. ---- ---- ----[Open in Browser](https://love2d.org/wiki/BezierCurve:getDegree) ---- ----@return number degree # Degree of the Bézier curve. -function BezierCurve:getDegree() end - ---- ----Get the derivative of the Bézier curve. ---- ----This function can be used to rotate sprites moving along a curve in the direction of the movement and compute the direction perpendicular to the curve at some parameter t. ---- ---- ----[Open in Browser](https://love2d.org/wiki/BezierCurve:getDerivative) ---- ----@return love.BezierCurve derivative # The derivative curve. -function BezierCurve:getDerivative() end - ---- ----Gets a BezierCurve that corresponds to the specified segment of this BezierCurve. ---- ---- ----[Open in Browser](https://love2d.org/wiki/BezierCurve:getSegment) ---- ----@param startpoint number # The starting point along the curve. Must be between 0 and 1. ----@param endpoint number # The end of the segment. Must be between 0 and 1. ----@return love.BezierCurve curve # A BezierCurve that corresponds to the specified segment. -function BezierCurve:getSegment(startpoint, endpoint) end - ---- ----Insert control point as the new i-th control point. Existing control points from i onwards are pushed back by 1. Indices start with 1. Negative indices wrap around: -1 is the last control point, -2 the one before the last, etc. ---- ---- ----[Open in Browser](https://love2d.org/wiki/BezierCurve:insertControlPoint) ---- ----@param x number # Position of the control point along the x axis. ----@param y number # Position of the control point along the y axis. ----@param i? number # Index of the control point. -function BezierCurve:insertControlPoint(x, y, i) end - ---- ----Removes the specified control point. ---- ---- ----[Open in Browser](https://love2d.org/wiki/BezierCurve:removeControlPoint) ---- ----@param index number # The index of the control point to remove. -function BezierCurve:removeControlPoint(index) end - ---- ----Get a list of coordinates to be used with love.graphics.line. ---- ----This function samples the Bézier curve using recursive subdivision. You can control the recursion depth using the depth parameter. ---- ----If you are just interested to know the position on the curve given a parameter, use BezierCurve:evaluate. ---- ---- ----[Open in Browser](https://love2d.org/wiki/BezierCurve:render) ---- ----@param depth? number # Number of recursive subdivision steps. ----@return table coordinates # List of x,y-coordinate pairs of points on the curve. -function BezierCurve:render(depth) end - ---- ----Get a list of coordinates on a specific part of the curve, to be used with love.graphics.line. ---- ----This function samples the Bézier curve using recursive subdivision. You can control the recursion depth using the depth parameter. ---- ----If you are just need to know the position on the curve given a parameter, use BezierCurve:evaluate. ---- ---- ----[Open in Browser](https://love2d.org/wiki/BezierCurve:renderSegment) ---- ----@param startpoint number # The starting point along the curve. Must be between 0 and 1. ----@param endpoint number # The end of the segment to render. Must be between 0 and 1. ----@param depth? number # Number of recursive subdivision steps. ----@return table coordinates # List of x,y-coordinate pairs of points on the specified part of the curve. -function BezierCurve:renderSegment(startpoint, endpoint, depth) end - ---- ----Rotate the Bézier curve by an angle. ---- ---- ----[Open in Browser](https://love2d.org/wiki/BezierCurve:rotate) ---- ----@param angle number # Rotation angle in radians. ----@param ox? number # X coordinate of the rotation center. ----@param oy? number # Y coordinate of the rotation center. -function BezierCurve:rotate(angle, ox, oy) end - ---- ----Scale the Bézier curve by a factor. ---- ---- ----[Open in Browser](https://love2d.org/wiki/BezierCurve:scale) ---- ----@param s number # Scale factor. ----@param ox? number # X coordinate of the scaling center. ----@param oy? number # Y coordinate of the scaling center. -function BezierCurve:scale(s, ox, oy) end - ---- ----Set coordinates of the i-th control point. Indices start with 1. ---- ---- ----[Open in Browser](https://love2d.org/wiki/BezierCurve:setControlPoint) ---- ----@param i number # Index of the control point. ----@param x number # Position of the control point along the x axis. ----@param y number # Position of the control point along the y axis. -function BezierCurve:setControlPoint(i, x, y) end - ---- ----Move the Bézier curve by an offset. ---- ---- ----[Open in Browser](https://love2d.org/wiki/BezierCurve:translate) ---- ----@param dx number # Offset along the x axis. ----@param dy number # Offset along the y axis. -function BezierCurve:translate(dx, dy) end - ---- ----A random number generation object which has its own random state. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.math) ---- ----@class love.RandomGenerator: love.Object -local RandomGenerator = {} - ---- ----Gets the seed of the random number generator object. ---- ----The seed is split into two numbers due to Lua's use of doubles for all number values - doubles can't accurately represent integer values above 2^53, but the seed value is an integer number in the range of 2^64 - 1. ---- ---- ----[Open in Browser](https://love2d.org/wiki/RandomGenerator:getSeed) ---- ----@return number low # Integer number representing the lower 32 bits of the RandomGenerator's 64 bit seed value. ----@return number high # Integer number representing the higher 32 bits of the RandomGenerator's 64 bit seed value. -function RandomGenerator:getSeed() end - ---- ----Gets the current state of the random number generator. This returns an opaque string which is only useful for later use with RandomGenerator:setState in the same major version of LÖVE. ---- ----This is different from RandomGenerator:getSeed in that getState gets the RandomGenerator's current state, whereas getSeed gets the previously set seed number. ---- ---- ----[Open in Browser](https://love2d.org/wiki/RandomGenerator:getState) ---- ----@return string state # The current state of the RandomGenerator object, represented as a string. -function RandomGenerator:getState() end - ---- ----Generates a pseudo-random number in a platform independent manner. ---- ---- ----[Open in Browser](https://love2d.org/wiki/RandomGenerator:random) ---- ----@overload fun(self: love.RandomGenerator, max: number):number ----@overload fun(self: love.RandomGenerator, min: number, max: number):number ----@return number number # The pseudo-random number. -function RandomGenerator:random() end - ---- ----Get a normally distributed pseudo random number. ---- ---- ----[Open in Browser](https://love2d.org/wiki/RandomGenerator:randomNormal) ---- ----@param stddev? number # Standard deviation of the distribution. ----@param mean? number # The mean of the distribution. ----@return number number # Normally distributed random number with variance (stddev)² and the specified mean. -function RandomGenerator:randomNormal(stddev, mean) end - ---- ----Sets the seed of the random number generator using the specified integer number. ---- ---- ----[Open in Browser](https://love2d.org/wiki/RandomGenerator:setSeed) ---- ----@overload fun(self: love.RandomGenerator, low: number, high: number) ----@param seed number # The integer number with which you want to seed the randomization. Must be within the range of 2^53. -function RandomGenerator:setSeed(seed) end - ---- ----Sets the current state of the random number generator. The value used as an argument for this function is an opaque string and should only originate from a previous call to RandomGenerator:getState in the same major version of LÖVE. ---- ----This is different from RandomGenerator:setSeed in that setState directly sets the RandomGenerator's current implementation-dependent state, whereas setSeed gives it a new seed value. ---- ---- ----[Open in Browser](https://love2d.org/wiki/RandomGenerator:setState) ---- ----@param state string # The new state of the RandomGenerator object, represented as a string. This should originate from a previous call to RandomGenerator:getState. -function RandomGenerator:setState(state) end - ---- ----Object containing a coordinate system transformation. ---- ----The love.graphics module has several functions and function variants which accept Transform objects. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.math) ---- ----@class love.Transform: love.Object -local Transform = {} - ---- ----Applies the given other Transform object to this one. ---- ----This effectively multiplies this Transform's internal transformation matrix with the other Transform's (i.e. self * other), and stores the result in this object. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Transform:apply) ---- ----@param other love.Transform # The other Transform object to apply to this Transform. ----@return love.Transform transform # The Transform object the method was called on. Allows easily chaining Transform methods. -function Transform:apply(other) end - ---- ----Creates a new copy of this Transform. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Transform:clone) ---- ----@return love.Transform clone # The copy of this Transform. -function Transform:clone() end - ---- ----Gets the internal 4x4 transformation matrix stored by this Transform. The matrix is returned in row-major order. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Transform:getMatrix) ---- ----@return number e1_1 # The first column of the first row of the matrix. ----@return number e1_2 # The second column of the first row of the matrix. ----@return number e1_3 # The third column of the first row of the matrix. ----@return number e1_4 # The fourth column of the first row of the matrix. ----@return number e2_1 # The first column of the second row of the matrix. ----@return number e2_2 # The second column of the second row of the matrix. ----@return number e2_3 # The third column of the second row of the matrix. ----@return number e2_4 # The fourth column of the second row of the matrix. ----@return number e3_1 # The first column of the third row of the matrix. ----@return number e3_2 # The second column of the third row of the matrix. ----@return number e3_3 # The third column of the third row of the matrix. ----@return number e3_4 # The fourth column of the third row of the matrix. ----@return number e4_1 # The first column of the fourth row of the matrix. ----@return number e4_2 # The second column of the fourth row of the matrix. ----@return number e4_3 # The third column of the fourth row of the matrix. ----@return number e4_4 # The fourth column of the fourth row of the matrix. -function Transform:getMatrix() end - ---- ----Creates a new Transform containing the inverse of this Transform. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Transform:inverse) ---- ----@return love.Transform inverse # A new Transform object representing the inverse of this Transform's matrix. -function Transform:inverse() end - ---- ----Applies the reverse of the Transform object's transformation to the given 2D position. ---- ----This effectively converts the given position from the local coordinate space of the Transform into global coordinates. ---- ----One use of this method can be to convert a screen-space mouse position into global world coordinates, if the given Transform has transformations applied that are used for a camera system in-game. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Transform:inverseTransformPoint) ---- ----@param localX number # The x component of the position with the transform applied. ----@param localY number # The y component of the position with the transform applied. ----@return number globalX # The x component of the position in global coordinates. ----@return number globalY # The y component of the position in global coordinates. -function Transform:inverseTransformPoint(localX, localY) end - ---- ----Checks whether the Transform is an affine transformation. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Transform:isAffine2DTransform) ---- ----@return boolean affine # true if the transform object is an affine transformation, false otherwise. -function Transform:isAffine2DTransform() end - ---- ----Resets the Transform to an identity state. All previously applied transformations are erased. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Transform:reset) ---- ----@return love.Transform transform # The Transform object the method was called on. Allows easily chaining Transform methods. -function Transform:reset() end - ---- ----Applies a rotation to the Transform's coordinate system. This method does not reset any previously applied transformations. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Transform:rotate) ---- ----@param angle number # The relative angle in radians to rotate this Transform by. ----@return love.Transform transform # The Transform object the method was called on. Allows easily chaining Transform methods. -function Transform:rotate(angle) end - ---- ----Scales the Transform's coordinate system. This method does not reset any previously applied transformations. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Transform:scale) ---- ----@param sx number # The relative scale factor along the x-axis. ----@param sy? number # The relative scale factor along the y-axis. ----@return love.Transform transform # The Transform object the method was called on. Allows easily chaining Transform methods. -function Transform:scale(sx, sy) end - ---- ----Directly sets the Transform's internal 4x4 transformation matrix. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Transform:setMatrix) ---- ----@overload fun(self: love.Transform, layout: love.MatrixLayout, e1_1: number, e1_2: number, e1_3: number, e1_4: number, e2_1: number, e2_2: number, e2_3: number, e2_4: number, e3_1: number, e3_2: number, e3_3: number, e3_4: number, e4_1: number, e4_2: number, e4_3: number, e4_4: number):love.Transform ----@overload fun(self: love.Transform, layout: love.MatrixLayout, matrix: table):love.Transform ----@overload fun(self: love.Transform, layout: love.MatrixLayout, matrix: table):love.Transform ----@param e1_1 number # The first column of the first row of the matrix. ----@param e1_2 number # The second column of the first row of the matrix. ----@param e1_3 number # The third column of the first row of the matrix. ----@param e1_4 number # The fourth column of the first row of the matrix. ----@param e2_1 number # The first column of the second row of the matrix. ----@param e2_2 number # The second column of the second row of the matrix. ----@param e2_3 number # The third column of the second row of the matrix. ----@param e2_4 number # The fourth column of the second row of the matrix. ----@param e3_1 number # The first column of the third row of the matrix. ----@param e3_2 number # The second column of the third row of the matrix. ----@param e3_3 number # The third column of the third row of the matrix. ----@param e3_4 number # The fourth column of the third row of the matrix. ----@param e4_1 number # The first column of the fourth row of the matrix. ----@param e4_2 number # The second column of the fourth row of the matrix. ----@param e4_3 number # The third column of the fourth row of the matrix. ----@param e4_4 number # The fourth column of the fourth row of the matrix. ----@return love.Transform transform # The Transform object the method was called on. Allows easily chaining Transform methods. -function Transform:setMatrix(e1_1, e1_2, e1_3, e1_4, e2_1, e2_2, e2_3, e2_4, e3_1, e3_2, e3_3, e3_4, e4_1, e4_2, e4_3, e4_4) end - ---- ----Resets the Transform to the specified transformation parameters. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Transform:setTransformation) ---- ----@param x number # The position of the Transform on the x-axis. ----@param y number # The position of the Transform on the y-axis. ----@param angle? number # The orientation of the Transform in radians. ----@param sx? number # Scale factor on the x-axis. ----@param sy? number # Scale factor on the y-axis. ----@param ox? number # Origin offset on the x-axis. ----@param oy? number # Origin offset on the y-axis. ----@param kx? number # Shearing / skew factor on the x-axis. ----@param ky? number # Shearing / skew factor on the y-axis. ----@return love.Transform transform # The Transform object the method was called on. Allows easily chaining Transform methods. -function Transform:setTransformation(x, y, angle, sx, sy, ox, oy, kx, ky) end - ---- ----Applies a shear factor (skew) to the Transform's coordinate system. This method does not reset any previously applied transformations. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Transform:shear) ---- ----@param kx number # The shear factor along the x-axis. ----@param ky number # The shear factor along the y-axis. ----@return love.Transform transform # The Transform object the method was called on. Allows easily chaining Transform methods. -function Transform:shear(kx, ky) end - ---- ----Applies the Transform object's transformation to the given 2D position. ---- ----This effectively converts the given position from global coordinates into the local coordinate space of the Transform. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Transform:transformPoint) ---- ----@param globalX number # The x component of the position in global coordinates. ----@param globalY number # The y component of the position in global coordinates. ----@return number localX # The x component of the position with the transform applied. ----@return number localY # The y component of the position with the transform applied. -function Transform:transformPoint(globalX, globalY) end - ---- ----Applies a translation to the Transform's coordinate system. This method does not reset any previously applied transformations. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Transform:translate) ---- ----@param dx number # The relative translation along the x-axis. ----@param dy number # The relative translation along the y-axis. ----@return love.Transform transform # The Transform object the method was called on. Allows easily chaining Transform methods. -function Transform:translate(dx, dy) end - ---- ----The layout of matrix elements (row-major or column-major). ---- ---- ----[Open in Browser](https://love2d.org/wiki/MatrixLayout) ---- ----@alias love.MatrixLayout ---- ----The matrix is row-major: ---- ----| "row" ---- ----The matrix is column-major: ---- ----| "column" diff --git a/meta/3rd/love2d/library/love/mouse.lua b/meta/3rd/love2d/library/love/mouse.lua deleted file mode 100644 index 5e5ff60b..00000000 --- a/meta/3rd/love2d/library/love/mouse.lua +++ /dev/null @@ -1,283 +0,0 @@ ----@meta - ---- ----Provides an interface to the user's mouse. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.mouse) ---- ----@class love.mouse -love.mouse = {} - ---- ----Gets the current Cursor. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.mouse.getCursor) ---- ----@return love.Cursor cursor # The current cursor, or nil if no cursor is set. -function love.mouse.getCursor() end - ---- ----Returns the current position of the mouse. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.mouse.getPosition) ---- ----@return number x # The position of the mouse along the x-axis. ----@return number y # The position of the mouse along the y-axis. -function love.mouse.getPosition() end - ---- ----Gets whether relative mode is enabled for the mouse. ---- ----If relative mode is enabled, the cursor is hidden and doesn't move when the mouse does, but relative mouse motion events are still generated via love.mousemoved. This lets the mouse move in any direction indefinitely without the cursor getting stuck at the edges of the screen. ---- ----The reported position of the mouse is not updated while relative mode is enabled, even when relative mouse motion events are generated. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.mouse.getRelativeMode) ---- ----@return boolean enabled # True if relative mode is enabled, false if it's disabled. -function love.mouse.getRelativeMode() end - ---- ----Gets a Cursor object representing a system-native hardware cursor. ---- ----Hardware cursors are framerate-independent and work the same way as normal operating system cursors. Unlike drawing an image at the mouse's current coordinates, hardware cursors never have visible lag between when the mouse is moved and when the cursor position updates, even at low framerates. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.mouse.getSystemCursor) ---- ----@param ctype love.CursorType # The type of system cursor to get. ----@return love.Cursor cursor # The Cursor object representing the system cursor type. -function love.mouse.getSystemCursor(ctype) end - ---- ----Returns the current x-position of the mouse. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.mouse.getX) ---- ----@return number x # The position of the mouse along the x-axis. -function love.mouse.getX() end - ---- ----Returns the current y-position of the mouse. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.mouse.getY) ---- ----@return number y # The position of the mouse along the y-axis. -function love.mouse.getY() end - ---- ----Gets whether cursor functionality is supported. ---- ----If it isn't supported, calling love.mouse.newCursor and love.mouse.getSystemCursor will cause an error. Mobile devices do not support cursors. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.mouse.isCursorSupported) ---- ----@return boolean supported # Whether the system has cursor functionality. -function love.mouse.isCursorSupported() end - ---- ----Checks whether a certain mouse button is down. ---- ----This function does not detect mouse wheel scrolling; you must use the love.wheelmoved (or love.mousepressed in version 0.9.2 and older) callback for that. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.mouse.isDown) ---- ----@param button number # The index of a button to check. 1 is the primary mouse button, 2 is the secondary mouse button and 3 is the middle button. Further buttons are mouse dependant. ----@vararg number # Additional button numbers to check. ----@return boolean down # True if any specified button is down. -function love.mouse.isDown(button, ...) end - ---- ----Checks if the mouse is grabbed. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.mouse.isGrabbed) ---- ----@return boolean grabbed # True if the cursor is grabbed, false if it is not. -function love.mouse.isGrabbed() end - ---- ----Checks if the cursor is visible. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.mouse.isVisible) ---- ----@return boolean visible # True if the cursor to visible, false if the cursor is hidden. -function love.mouse.isVisible() end - ---- ----Creates a new hardware Cursor object from an image file or ImageData. ---- ----Hardware cursors are framerate-independent and work the same way as normal operating system cursors. Unlike drawing an image at the mouse's current coordinates, hardware cursors never have visible lag between when the mouse is moved and when the cursor position updates, even at low framerates. ---- ----The hot spot is the point the operating system uses to determine what was clicked and at what position the mouse cursor is. For example, the normal arrow pointer normally has its hot spot at the top left of the image, but a crosshair cursor might have it in the middle. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.mouse.newCursor) ---- ----@overload fun(filename: string, hotx?: number, hoty?: number):love.Cursor ----@overload fun(fileData: love.FileData, hotx?: number, hoty?: number):love.Cursor ----@param imageData love.ImageData # The ImageData to use for the new Cursor. ----@param hotx? number # The x-coordinate in the ImageData of the cursor's hot spot. ----@param hoty? number # The y-coordinate in the ImageData of the cursor's hot spot. ----@return love.Cursor cursor # The new Cursor object. -function love.mouse.newCursor(imageData, hotx, hoty) end - ---- ----Sets the current mouse cursor. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.mouse.setCursor) ---- ----@overload fun() ----@param cursor love.Cursor # The Cursor object to use as the current mouse cursor. -function love.mouse.setCursor(cursor) end - ---- ----Grabs the mouse and confines it to the window. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.mouse.setGrabbed) ---- ----@param grab boolean # True to confine the mouse, false to let it leave the window. -function love.mouse.setGrabbed(grab) end - ---- ----Sets the current position of the mouse. Non-integer values are floored. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.mouse.setPosition) ---- ----@param x number # The new position of the mouse along the x-axis. ----@param y number # The new position of the mouse along the y-axis. -function love.mouse.setPosition(x, y) end - ---- ----Sets whether relative mode is enabled for the mouse. ---- ----When relative mode is enabled, the cursor is hidden and doesn't move when the mouse does, but relative mouse motion events are still generated via love.mousemoved. This lets the mouse move in any direction indefinitely without the cursor getting stuck at the edges of the screen. ---- ----The reported position of the mouse may not be updated while relative mode is enabled, even when relative mouse motion events are generated. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.mouse.setRelativeMode) ---- ----@param enable boolean # True to enable relative mode, false to disable it. -function love.mouse.setRelativeMode(enable) end - ---- ----Sets the current visibility of the cursor. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.mouse.setVisible) ---- ----@param visible boolean # True to set the cursor to visible, false to hide the cursor. -function love.mouse.setVisible(visible) end - ---- ----Sets the current X position of the mouse. ---- ----Non-integer values are floored. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.mouse.setX) ---- ----@param x number # The new position of the mouse along the x-axis. -function love.mouse.setX(x) end - ---- ----Sets the current Y position of the mouse. ---- ----Non-integer values are floored. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.mouse.setY) ---- ----@param y number # The new position of the mouse along the y-axis. -function love.mouse.setY(y) end - ---- ----Represents a hardware cursor. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.mouse) ---- ----@class love.Cursor: love.Object -local Cursor = {} - ---- ----Gets the type of the Cursor. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Cursor:getType) ---- ----@return love.CursorType ctype # The type of the Cursor. -function Cursor:getType() end - ---- ----Types of hardware cursors. ---- ---- ----[Open in Browser](https://love2d.org/wiki/CursorType) ---- ----@alias love.CursorType ---- ----The cursor is using a custom image. ---- ----| "image" ---- ----An arrow pointer. ---- ----| "arrow" ---- ----An I-beam, normally used when mousing over editable or selectable text. ---- ----| "ibeam" ---- ----Wait graphic. ---- ----| "wait" ---- ----Small wait cursor with an arrow pointer. ---- ----| "waitarrow" ---- ----Crosshair symbol. ---- ----| "crosshair" ---- ----Double arrow pointing to the top-left and bottom-right. ---- ----| "sizenwse" ---- ----Double arrow pointing to the top-right and bottom-left. ---- ----| "sizenesw" ---- ----Double arrow pointing left and right. ---- ----| "sizewe" ---- ----Double arrow pointing up and down. ---- ----| "sizens" ---- ----Four-pointed arrow pointing up, down, left, and right. ---- ----| "sizeall" ---- ----Slashed circle or crossbones. ---- ----| "no" ---- ----Hand symbol. ---- ----| "hand" diff --git a/meta/3rd/love2d/library/love/physics.lua b/meta/3rd/love2d/library/love/physics.lua deleted file mode 100644 index 82ea008a..00000000 --- a/meta/3rd/love2d/library/love/physics.lua +++ /dev/null @@ -1,3287 +0,0 @@ ----@meta - ---- ----Can simulate 2D rigid body physics in a realistic manner. This module is based on Box2D, and this API corresponds to the Box2D API as closely as possible. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics) ---- ----@class love.physics -love.physics = {} - ---- ----Returns the two closest points between two fixtures and their distance. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics.getDistance) ---- ----@param fixture1 love.Fixture # The first fixture. ----@param fixture2 love.Fixture # The second fixture. ----@return number distance # The distance of the two points. ----@return number x1 # The x-coordinate of the first point. ----@return number y1 # The y-coordinate of the first point. ----@return number x2 # The x-coordinate of the second point. ----@return number y2 # The y-coordinate of the second point. -function love.physics.getDistance(fixture1, fixture2) end - ---- ----Returns the meter scale factor. ---- ----All coordinates in the physics module are divided by this number, creating a convenient way to draw the objects directly to the screen without the need for graphics transformations. ---- ----It is recommended to create shapes no larger than 10 times the scale. This is important because Box2D is tuned to work well with shape sizes from 0.1 to 10 meters. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics.getMeter) ---- ----@return number scale # The scale factor as an integer. -function love.physics.getMeter() end - ---- ----Creates a new body. ---- ----There are three types of bodies. ---- ----* Static bodies do not move, have a infinite mass, and can be used for level boundaries. ---- ----* Dynamic bodies are the main actors in the simulation, they collide with everything. ---- ----* Kinematic bodies do not react to forces and only collide with dynamic bodies. ---- ----The mass of the body gets calculated when a Fixture is attached or removed, but can be changed at any time with Body:setMass or Body:resetMassData. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics.newBody) ---- ----@param world love.World # The world to create the body in. ----@param x? number # The x position of the body. ----@param y? number # The y position of the body. ----@param type? love.BodyType # The type of the body. ----@return love.Body body # A new body. -function love.physics.newBody(world, x, y, type) end - ---- ----Creates a new ChainShape. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics.newChainShape) ---- ----@overload fun(loop: boolean, points: table):love.ChainShape ----@param loop boolean # If the chain should loop back to the first point. ----@param x1 number # The x position of the first point. ----@param y1 number # The y position of the first point. ----@param x2 number # The x position of the second point. ----@param y2 number # The y position of the second point. ----@vararg number # Additional point positions. ----@return love.ChainShape shape # The new shape. -function love.physics.newChainShape(loop, x1, y1, x2, y2, ...) end - ---- ----Creates a new CircleShape. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics.newCircleShape) ---- ----@overload fun(x: number, y: number, radius: number):love.CircleShape ----@param radius number # The radius of the circle. ----@return love.CircleShape shape # The new shape. -function love.physics.newCircleShape(radius) end - ---- ----Creates a DistanceJoint between two bodies. ---- ----This joint constrains the distance between two points on two bodies to be constant. These two points are specified in world coordinates and the two bodies are assumed to be in place when this joint is created. The first anchor point is connected to the first body and the second to the second body, and the points define the length of the distance joint. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics.newDistanceJoint) ---- ----@param body1 love.Body # The first body to attach to the joint. ----@param body2 love.Body # The second body to attach to the joint. ----@param x1 number # The x position of the first anchor point (world space). ----@param y1 number # The y position of the first anchor point (world space). ----@param x2 number # The x position of the second anchor point (world space). ----@param y2 number # The y position of the second anchor point (world space). ----@param collideConnected? boolean # Specifies whether the two bodies should collide with each other. ----@return love.DistanceJoint joint # The new distance joint. -function love.physics.newDistanceJoint(body1, body2, x1, y1, x2, y2, collideConnected) end - ---- ----Creates a new EdgeShape. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics.newEdgeShape) ---- ----@param x1 number # The x position of the first point. ----@param y1 number # The y position of the first point. ----@param x2 number # The x position of the second point. ----@param y2 number # The y position of the second point. ----@return love.EdgeShape shape # The new shape. -function love.physics.newEdgeShape(x1, y1, x2, y2) end - ---- ----Creates and attaches a Fixture to a body. ---- ----Note that the Shape object is copied rather than kept as a reference when the Fixture is created. To get the Shape object that the Fixture owns, use Fixture:getShape. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics.newFixture) ---- ----@param body love.Body # The body which gets the fixture attached. ----@param shape love.Shape # The shape to be copied to the fixture. ----@param density? number # The density of the fixture. ----@return love.Fixture fixture # The new fixture. -function love.physics.newFixture(body, shape, density) end - ---- ----Create a friction joint between two bodies. A FrictionJoint applies friction to a body. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics.newFrictionJoint) ---- ----@overload fun(body1: love.Body, body2: love.Body, x1: number, y1: number, x2: number, y2: number, collideConnected?: boolean):love.FrictionJoint ----@param body1 love.Body # The first body to attach to the joint. ----@param body2 love.Body # The second body to attach to the joint. ----@param x number # The x position of the anchor point. ----@param y number # The y position of the anchor point. ----@param collideConnected? boolean # Specifies whether the two bodies should collide with each other. ----@return love.FrictionJoint joint # The new FrictionJoint. -function love.physics.newFrictionJoint(body1, body2, x, y, collideConnected) end - ---- ----Create a GearJoint connecting two Joints. ---- ----The gear joint connects two joints that must be either prismatic or revolute joints. Using this joint requires that the joints it uses connect their respective bodies to the ground and have the ground as the first body. When destroying the bodies and joints you must make sure you destroy the gear joint before the other joints. ---- ----The gear joint has a ratio the determines how the angular or distance values of the connected joints relate to each other. The formula coordinate1 + ratio * coordinate2 always has a constant value that is set when the gear joint is created. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics.newGearJoint) ---- ----@param joint1 love.Joint # The first joint to connect with a gear joint. ----@param joint2 love.Joint # The second joint to connect with a gear joint. ----@param ratio? number # The gear ratio. ----@param collideConnected? boolean # Specifies whether the two bodies should collide with each other. ----@return love.GearJoint joint # The new gear joint. -function love.physics.newGearJoint(joint1, joint2, ratio, collideConnected) end - ---- ----Creates a joint between two bodies which controls the relative motion between them. ---- ----Position and rotation offsets can be specified once the MotorJoint has been created, as well as the maximum motor force and torque that will be be applied to reach the target offsets. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics.newMotorJoint) ---- ----@overload fun(body1: love.Body, body2: love.Body, correctionFactor?: number, collideConnected?: boolean):love.MotorJoint ----@param body1 love.Body # The first body to attach to the joint. ----@param body2 love.Body # The second body to attach to the joint. ----@param correctionFactor? number # The joint's initial position correction factor, in the range of 1. ----@return love.MotorJoint joint # The new MotorJoint. -function love.physics.newMotorJoint(body1, body2, correctionFactor) end - ---- ----Create a joint between a body and the mouse. ---- ----This joint actually connects the body to a fixed point in the world. To make it follow the mouse, the fixed point must be updated every timestep (example below). ---- ----The advantage of using a MouseJoint instead of just changing a body position directly is that collisions and reactions to other joints are handled by the physics engine. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics.newMouseJoint) ---- ----@param body love.Body # The body to attach to the mouse. ----@param x number # The x position of the connecting point. ----@param y number # The y position of the connecting point. ----@return love.MouseJoint joint # The new mouse joint. -function love.physics.newMouseJoint(body, x, y) end - ---- ----Creates a new PolygonShape. ---- ----This shape can have 8 vertices at most, and must form a convex shape. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics.newPolygonShape) ---- ----@overload fun(vertices: table):love.PolygonShape ----@param x1 number # The x position of the first point. ----@param y1 number # The y position of the first point. ----@param x2 number # The x position of the second point. ----@param y2 number # The y position of the second point. ----@param x3 number # The x position of the third point. ----@param y3 number # The y position of the third point. ----@vararg number # You can continue passing more point positions to create the PolygonShape. ----@return love.PolygonShape shape # A new PolygonShape. -function love.physics.newPolygonShape(x1, y1, x2, y2, x3, y3, ...) end - ---- ----Creates a PrismaticJoint between two bodies. ---- ----A prismatic joint constrains two bodies to move relatively to each other on a specified axis. It does not allow for relative rotation. Its definition and operation are similar to a revolute joint, but with translation and force substituted for angle and torque. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics.newPrismaticJoint) ---- ----@overload fun(body1: love.Body, body2: love.Body, x1: number, y1: number, x2: number, y2: number, ax: number, ay: number, collideConnected?: boolean):love.PrismaticJoint ----@overload fun(body1: love.Body, body2: love.Body, x1: number, y1: number, x2: number, y2: number, ax: number, ay: number, collideConnected?: boolean, referenceAngle?: number):love.PrismaticJoint ----@param body1 love.Body # The first body to connect with a prismatic joint. ----@param body2 love.Body # The second body to connect with a prismatic joint. ----@param x number # The x coordinate of the anchor point. ----@param y number # The y coordinate of the anchor point. ----@param ax number # The x coordinate of the axis vector. ----@param ay number # The y coordinate of the axis vector. ----@param collideConnected? boolean # Specifies whether the two bodies should collide with each other. ----@return love.PrismaticJoint joint # The new prismatic joint. -function love.physics.newPrismaticJoint(body1, body2, x, y, ax, ay, collideConnected) end - ---- ----Creates a PulleyJoint to join two bodies to each other and the ground. ---- ----The pulley joint simulates a pulley with an optional block and tackle. If the ratio parameter has a value different from one, then the simulated rope extends faster on one side than the other. In a pulley joint the total length of the simulated rope is the constant length1 + ratio * length2, which is set when the pulley joint is created. ---- ----Pulley joints can behave unpredictably if one side is fully extended. It is recommended that the method setMaxLengths  be used to constrain the maximum lengths each side can attain. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics.newPulleyJoint) ---- ----@param body1 love.Body # The first body to connect with a pulley joint. ----@param body2 love.Body # The second body to connect with a pulley joint. ----@param gx1 number # The x coordinate of the first body's ground anchor. ----@param gy1 number # The y coordinate of the first body's ground anchor. ----@param gx2 number # The x coordinate of the second body's ground anchor. ----@param gy2 number # The y coordinate of the second body's ground anchor. ----@param x1 number # The x coordinate of the pulley joint anchor in the first body. ----@param y1 number # The y coordinate of the pulley joint anchor in the first body. ----@param x2 number # The x coordinate of the pulley joint anchor in the second body. ----@param y2 number # The y coordinate of the pulley joint anchor in the second body. ----@param ratio? number # The joint ratio. ----@param collideConnected? boolean # Specifies whether the two bodies should collide with each other. ----@return love.PulleyJoint joint # The new pulley joint. -function love.physics.newPulleyJoint(body1, body2, gx1, gy1, gx2, gy2, x1, y1, x2, y2, ratio, collideConnected) end - ---- ----Shorthand for creating rectangular PolygonShapes. ---- ----By default, the local origin is located at the '''center''' of the rectangle as opposed to the top left for graphics. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics.newRectangleShape) ---- ----@overload fun(x: number, y: number, width: number, height: number, angle?: number):love.PolygonShape ----@param width number # The width of the rectangle. ----@param height number # The height of the rectangle. ----@return love.PolygonShape shape # A new PolygonShape. -function love.physics.newRectangleShape(width, height) end - ---- ----Creates a pivot joint between two bodies. ---- ----This joint connects two bodies to a point around which they can pivot. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics.newRevoluteJoint) ---- ----@overload fun(body1: love.Body, body2: love.Body, x1: number, y1: number, x2: number, y2: number, collideConnected?: boolean, referenceAngle?: number):love.RevoluteJoint ----@param body1 love.Body # The first body. ----@param body2 love.Body # The second body. ----@param x number # The x position of the connecting point. ----@param y number # The y position of the connecting point. ----@param collideConnected? boolean # Specifies whether the two bodies should collide with each other. ----@return love.RevoluteJoint joint # The new revolute joint. -function love.physics.newRevoluteJoint(body1, body2, x, y, collideConnected) end - ---- ----Creates a joint between two bodies. Its only function is enforcing a max distance between these bodies. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics.newRopeJoint) ---- ----@param body1 love.Body # The first body to attach to the joint. ----@param body2 love.Body # The second body to attach to the joint. ----@param x1 number # The x position of the first anchor point. ----@param y1 number # The y position of the first anchor point. ----@param x2 number # The x position of the second anchor point. ----@param y2 number # The y position of the second anchor point. ----@param maxLength number # The maximum distance for the bodies. ----@param collideConnected? boolean # Specifies whether the two bodies should collide with each other. ----@return love.RopeJoint joint # The new RopeJoint. -function love.physics.newRopeJoint(body1, body2, x1, y1, x2, y2, maxLength, collideConnected) end - ---- ----Creates a constraint joint between two bodies. A WeldJoint essentially glues two bodies together. The constraint is a bit soft, however, due to Box2D's iterative solver. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics.newWeldJoint) ---- ----@overload fun(body1: love.Body, body2: love.Body, x1: number, y1: number, x2: number, y2: number, collideConnected?: boolean):love.WeldJoint ----@overload fun(body1: love.Body, body2: love.Body, x1: number, y1: number, x2: number, y2: number, collideConnected?: boolean, referenceAngle?: number):love.WeldJoint ----@param body1 love.Body # The first body to attach to the joint. ----@param body2 love.Body # The second body to attach to the joint. ----@param x number # The x position of the anchor point (world space). ----@param y number # The y position of the anchor point (world space). ----@param collideConnected? boolean # Specifies whether the two bodies should collide with each other. ----@return love.WeldJoint joint # The new WeldJoint. -function love.physics.newWeldJoint(body1, body2, x, y, collideConnected) end - ---- ----Creates a wheel joint. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics.newWheelJoint) ---- ----@overload fun(body1: love.Body, body2: love.Body, x1: number, y1: number, x2: number, y2: number, ax: number, ay: number, collideConnected?: boolean):love.WheelJoint ----@param body1 love.Body # The first body. ----@param body2 love.Body # The second body. ----@param x number # The x position of the anchor point. ----@param y number # The y position of the anchor point. ----@param ax number # The x position of the axis unit vector. ----@param ay number # The y position of the axis unit vector. ----@param collideConnected? boolean # Specifies whether the two bodies should collide with each other. ----@return love.WheelJoint joint # The new WheelJoint. -function love.physics.newWheelJoint(body1, body2, x, y, ax, ay, collideConnected) end - ---- ----Creates a new World. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics.newWorld) ---- ----@param xg? number # The x component of gravity. ----@param yg? number # The y component of gravity. ----@param sleep? boolean # Whether the bodies in this world are allowed to sleep. ----@return love.World world # A brave new World. -function love.physics.newWorld(xg, yg, sleep) end - ---- ----Sets the pixels to meter scale factor. ---- ----All coordinates in the physics module are divided by this number and converted to meters, and it creates a convenient way to draw the objects directly to the screen without the need for graphics transformations. ---- ----It is recommended to create shapes no larger than 10 times the scale. This is important because Box2D is tuned to work well with shape sizes from 0.1 to 10 meters. The default meter scale is 30. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics.setMeter) ---- ----@param scale number # The scale factor as an integer. -function love.physics.setMeter(scale) end - ---- ----Bodies are objects with velocity and position. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics) ---- ----@class love.Body: love.Object -local Body = {} - ---- ----Applies an angular impulse to a body. This makes a single, instantaneous addition to the body momentum. ---- ----A body with with a larger mass will react less. The reaction does '''not''' depend on the timestep, and is equivalent to applying a force continuously for 1 second. Impulses are best used to give a single push to a body. For a continuous push to a body it is better to use Body:applyForce. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:applyAngularImpulse) ---- ----@param impulse number # The impulse in kilogram-square meter per second. -function Body:applyAngularImpulse(impulse) end - ---- ----Apply force to a Body. ---- ----A force pushes a body in a direction. A body with with a larger mass will react less. The reaction also depends on how long a force is applied: since the force acts continuously over the entire timestep, a short timestep will only push the body for a short time. Thus forces are best used for many timesteps to give a continuous push to a body (like gravity). For a single push that is independent of timestep, it is better to use Body:applyLinearImpulse. ---- ----If the position to apply the force is not given, it will act on the center of mass of the body. The part of the force not directed towards the center of mass will cause the body to spin (and depends on the rotational inertia). ---- ----Note that the force components and position must be given in world coordinates. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:applyForce) ---- ----@overload fun(self: love.Body, fx: number, fy: number, x: number, y: number) ----@param fx number # The x component of force to apply to the center of mass. ----@param fy number # The y component of force to apply to the center of mass. -function Body:applyForce(fx, fy) end - ---- ----Applies an impulse to a body. ---- ----This makes a single, instantaneous addition to the body momentum. ---- ----An impulse pushes a body in a direction. A body with with a larger mass will react less. The reaction does '''not''' depend on the timestep, and is equivalent to applying a force continuously for 1 second. Impulses are best used to give a single push to a body. For a continuous push to a body it is better to use Body:applyForce. ---- ----If the position to apply the impulse is not given, it will act on the center of mass of the body. The part of the impulse not directed towards the center of mass will cause the body to spin (and depends on the rotational inertia). ---- ----Note that the impulse components and position must be given in world coordinates. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:applyLinearImpulse) ---- ----@overload fun(self: love.Body, ix: number, iy: number, x: number, y: number) ----@param ix number # The x component of the impulse applied to the center of mass. ----@param iy number # The y component of the impulse applied to the center of mass. -function Body:applyLinearImpulse(ix, iy) end - ---- ----Apply torque to a body. ---- ----Torque is like a force that will change the angular velocity (spin) of a body. The effect will depend on the rotational inertia a body has. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:applyTorque) ---- ----@param torque number # The torque to apply. -function Body:applyTorque(torque) end - ---- ----Explicitly destroys the Body and all fixtures and joints attached to it. ---- ----An error will occur if you attempt to use the object after calling this function. In 0.7.2, when you don't have time to wait for garbage collection, this function may be used to free the object immediately. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:destroy) ---- -function Body:destroy() end - ---- ----Get the angle of the body. ---- ----The angle is measured in radians. If you need to transform it to degrees, use math.deg. ---- ----A value of 0 radians will mean 'looking to the right'. Although radians increase counter-clockwise, the y axis points down so it becomes ''clockwise'' from our point of view. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:getAngle) ---- ----@return number angle # The angle in radians. -function Body:getAngle() end - ---- ----Gets the Angular damping of the Body ---- ----The angular damping is the ''rate of decrease of the angular velocity over time'': A spinning body with no damping and no external forces will continue spinning indefinitely. A spinning body with damping will gradually stop spinning. ---- ----Damping is not the same as friction - they can be modelled together. However, only damping is provided by Box2D (and LOVE). ---- ----Damping parameters should be between 0 and infinity, with 0 meaning no damping, and infinity meaning full damping. Normally you will use a damping value between 0 and 0.1. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:getAngularDamping) ---- ----@return number damping # The value of the angular damping. -function Body:getAngularDamping() end - ---- ----Get the angular velocity of the Body. ---- ----The angular velocity is the ''rate of change of angle over time''. ---- ----It is changed in World:update by applying torques, off centre forces/impulses, and angular damping. It can be set directly with Body:setAngularVelocity. ---- ----If you need the ''rate of change of position over time'', use Body:getLinearVelocity. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:getAngularVelocity) ---- ----@return number w # The angular velocity in radians/second. -function Body:getAngularVelocity() end - ---- ----Gets a list of all Contacts attached to the Body. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:getContacts) ---- ----@return table contacts # A list with all contacts associated with the Body. -function Body:getContacts() end - ---- ----Returns a table with all fixtures. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:getFixtures) ---- ----@return table fixtures # A sequence with all fixtures. -function Body:getFixtures() end - ---- ----Returns the gravity scale factor. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:getGravityScale) ---- ----@return number scale # The gravity scale factor. -function Body:getGravityScale() end - ---- ----Gets the rotational inertia of the body. ---- ----The rotational inertia is how hard is it to make the body spin. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:getInertia) ---- ----@return number inertia # The rotational inertial of the body. -function Body:getInertia() end - ---- ----Returns a table containing the Joints attached to this Body. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:getJoints) ---- ----@return table joints # A sequence with the Joints attached to the Body. -function Body:getJoints() end - ---- ----Gets the linear damping of the Body. ---- ----The linear damping is the ''rate of decrease of the linear velocity over time''. A moving body with no damping and no external forces will continue moving indefinitely, as is the case in space. A moving body with damping will gradually stop moving. ---- ----Damping is not the same as friction - they can be modelled together. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:getLinearDamping) ---- ----@return number damping # The value of the linear damping. -function Body:getLinearDamping() end - ---- ----Gets the linear velocity of the Body from its center of mass. ---- ----The linear velocity is the ''rate of change of position over time''. ---- ----If you need the ''rate of change of angle over time'', use Body:getAngularVelocity. ---- ----If you need to get the linear velocity of a point different from the center of mass: ---- ----* Body:getLinearVelocityFromLocalPoint allows you to specify the point in local coordinates. ---- ----* Body:getLinearVelocityFromWorldPoint allows you to specify the point in world coordinates. ---- ----See page 136 of 'Essential Mathematics for Games and Interactive Applications' for definitions of local and world coordinates. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:getLinearVelocity) ---- ----@return number x # The x-component of the velocity vector ----@return number y # The y-component of the velocity vector -function Body:getLinearVelocity() end - ---- ----Get the linear velocity of a point on the body. ---- ----The linear velocity for a point on the body is the velocity of the body center of mass plus the velocity at that point from the body spinning. ---- ----The point on the body must given in local coordinates. Use Body:getLinearVelocityFromWorldPoint to specify this with world coordinates. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:getLinearVelocityFromLocalPoint) ---- ----@param x number # The x position to measure velocity. ----@param y number # The y position to measure velocity. ----@return number vx # The x component of velocity at point (x,y). ----@return number vy # The y component of velocity at point (x,y). -function Body:getLinearVelocityFromLocalPoint(x, y) end - ---- ----Get the linear velocity of a point on the body. ---- ----The linear velocity for a point on the body is the velocity of the body center of mass plus the velocity at that point from the body spinning. ---- ----The point on the body must given in world coordinates. Use Body:getLinearVelocityFromLocalPoint to specify this with local coordinates. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:getLinearVelocityFromWorldPoint) ---- ----@param x number # The x position to measure velocity. ----@param y number # The y position to measure velocity. ----@return number vx # The x component of velocity at point (x,y). ----@return number vy # The y component of velocity at point (x,y). -function Body:getLinearVelocityFromWorldPoint(x, y) end - ---- ----Get the center of mass position in local coordinates. ---- ----Use Body:getWorldCenter to get the center of mass in world coordinates. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:getLocalCenter) ---- ----@return number x # The x coordinate of the center of mass. ----@return number y # The y coordinate of the center of mass. -function Body:getLocalCenter() end - ---- ----Transform a point from world coordinates to local coordinates. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:getLocalPoint) ---- ----@param worldX number # The x position in world coordinates. ----@param worldY number # The y position in world coordinates. ----@return number localX # The x position in local coordinates. ----@return number localY # The y position in local coordinates. -function Body:getLocalPoint(worldX, worldY) end - ---- ----Transforms multiple points from world coordinates to local coordinates. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:getLocalPoints) ---- ----@param x1 number # (Argument) The x position of the first point. ----@param y1 number # (Argument) The y position of the first point. ----@param x2 number # (Argument) The x position of the second point. ----@param y2 number # (Argument) The y position of the second point. ----@vararg number # (Argument) You can continue passing x and y position of the points. ----@return number x1 # (Result) The transformed x position of the first point. ----@return number y1 # (Result) The transformed y position of the first point. ----@return number x2 # (Result) The transformed x position of the second point. ----@return number y2 # (Result) The transformed y position of the second point. -function Body:getLocalPoints(x1, y1, x2, y2, ...) end - ---- ----Transform a vector from world coordinates to local coordinates. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:getLocalVector) ---- ----@param worldX number # The vector x component in world coordinates. ----@param worldY number # The vector y component in world coordinates. ----@return number localX # The vector x component in local coordinates. ----@return number localY # The vector y component in local coordinates. -function Body:getLocalVector(worldX, worldY) end - ---- ----Get the mass of the body. ---- ----Static bodies always have a mass of 0. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:getMass) ---- ----@return number mass # The mass of the body (in kilograms). -function Body:getMass() end - ---- ----Returns the mass, its center, and the rotational inertia. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:getMassData) ---- ----@return number x # The x position of the center of mass. ----@return number y # The y position of the center of mass. ----@return number mass # The mass of the body. ----@return number inertia # The rotational inertia. -function Body:getMassData() end - ---- ----Get the position of the body. ---- ----Note that this may not be the center of mass of the body. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:getPosition) ---- ----@return number x # The x position. ----@return number y # The y position. -function Body:getPosition() end - ---- ----Get the position and angle of the body. ---- ----Note that the position may not be the center of mass of the body. An angle of 0 radians will mean 'looking to the right'. Although radians increase counter-clockwise, the y axis points down so it becomes clockwise from our point of view. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:getTransform) ---- ----@return number x # The x component of the position. ----@return number y # The y component of the position. ----@return number angle # The angle in radians. -function Body:getTransform() end - ---- ----Returns the type of the body. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:getType) ---- ----@return love.BodyType type # The body type. -function Body:getType() end - ---- ----Returns the Lua value associated with this Body. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:getUserData) ---- ----@return any value # The Lua value associated with the Body. -function Body:getUserData() end - ---- ----Gets the World the body lives in. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:getWorld) ---- ----@return love.World world # The world the body lives in. -function Body:getWorld() end - ---- ----Get the center of mass position in world coordinates. ---- ----Use Body:getLocalCenter to get the center of mass in local coordinates. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:getWorldCenter) ---- ----@return number x # The x coordinate of the center of mass. ----@return number y # The y coordinate of the center of mass. -function Body:getWorldCenter() end - ---- ----Transform a point from local coordinates to world coordinates. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:getWorldPoint) ---- ----@param localX number # The x position in local coordinates. ----@param localY number # The y position in local coordinates. ----@return number worldX # The x position in world coordinates. ----@return number worldY # The y position in world coordinates. -function Body:getWorldPoint(localX, localY) end - ---- ----Transforms multiple points from local coordinates to world coordinates. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:getWorldPoints) ---- ----@param x1 number # The x position of the first point. ----@param y1 number # The y position of the first point. ----@param x2 number # The x position of the second point. ----@param y2 number # The y position of the second point. ----@return number x1 # The transformed x position of the first point. ----@return number y1 # The transformed y position of the first point. ----@return number x2 # The transformed x position of the second point. ----@return number y2 # The transformed y position of the second point. -function Body:getWorldPoints(x1, y1, x2, y2) end - ---- ----Transform a vector from local coordinates to world coordinates. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:getWorldVector) ---- ----@param localX number # The vector x component in local coordinates. ----@param localY number # The vector y component in local coordinates. ----@return number worldX # The vector x component in world coordinates. ----@return number worldY # The vector y component in world coordinates. -function Body:getWorldVector(localX, localY) end - ---- ----Get the x position of the body in world coordinates. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:getX) ---- ----@return number x # The x position in world coordinates. -function Body:getX() end - ---- ----Get the y position of the body in world coordinates. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:getY) ---- ----@return number y # The y position in world coordinates. -function Body:getY() end - ---- ----Returns whether the body is actively used in the simulation. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:isActive) ---- ----@return boolean status # True if the body is active or false if not. -function Body:isActive() end - ---- ----Returns the sleep status of the body. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:isAwake) ---- ----@return boolean status # True if the body is awake or false if not. -function Body:isAwake() end - ---- ----Get the bullet status of a body. ---- ----There are two methods to check for body collisions: ---- ----* at their location when the world is updated (default) ---- ----* using continuous collision detection (CCD) ---- ----The default method is efficient, but a body moving very quickly may sometimes jump over another body without producing a collision. A body that is set as a bullet will use CCD. This is less efficient, but is guaranteed not to jump when moving quickly. ---- ----Note that static bodies (with zero mass) always use CCD, so your walls will not let a fast moving body pass through even if it is not a bullet. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:isBullet) ---- ----@return boolean status # The bullet status of the body. -function Body:isBullet() end - ---- ----Gets whether the Body is destroyed. Destroyed bodies cannot be used. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:isDestroyed) ---- ----@return boolean destroyed # Whether the Body is destroyed. -function Body:isDestroyed() end - ---- ----Returns whether the body rotation is locked. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:isFixedRotation) ---- ----@return boolean fixed # True if the body's rotation is locked or false if not. -function Body:isFixedRotation() end - ---- ----Returns the sleeping behaviour of the body. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:isSleepingAllowed) ---- ----@return boolean allowed # True if the body is allowed to sleep or false if not. -function Body:isSleepingAllowed() end - ---- ----Gets whether the Body is touching the given other Body. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:isTouching) ---- ----@param otherbody love.Body # The other body to check. ----@return boolean touching # True if this body is touching the other body, false otherwise. -function Body:isTouching(otherbody) end - ---- ----Resets the mass of the body by recalculating it from the mass properties of the fixtures. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:resetMassData) ---- -function Body:resetMassData() end - ---- ----Sets whether the body is active in the world. ---- ----An inactive body does not take part in the simulation. It will not move or cause any collisions. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:setActive) ---- ----@param active boolean # If the body is active or not. -function Body:setActive(active) end - ---- ----Set the angle of the body. ---- ----The angle is measured in radians. If you need to transform it from degrees, use math.rad. ---- ----A value of 0 radians will mean 'looking to the right'. Although radians increase counter-clockwise, the y axis points down so it becomes ''clockwise'' from our point of view. ---- ----It is possible to cause a collision with another body by changing its angle. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:setAngle) ---- ----@param angle number # The angle in radians. -function Body:setAngle(angle) end - ---- ----Sets the angular damping of a Body ---- ----See Body:getAngularDamping for a definition of angular damping. ---- ----Angular damping can take any value from 0 to infinity. It is recommended to stay between 0 and 0.1, though. Other values will look unrealistic. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:setAngularDamping) ---- ----@param damping number # The new angular damping. -function Body:setAngularDamping(damping) end - ---- ----Sets the angular velocity of a Body. ---- ----The angular velocity is the ''rate of change of angle over time''. ---- ----This function will not accumulate anything; any impulses previously applied since the last call to World:update will be lost. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:setAngularVelocity) ---- ----@param w number # The new angular velocity, in radians per second -function Body:setAngularVelocity(w) end - ---- ----Wakes the body up or puts it to sleep. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:setAwake) ---- ----@param awake boolean # The body sleep status. -function Body:setAwake(awake) end - ---- ----Set the bullet status of a body. ---- ----There are two methods to check for body collisions: ---- ----* at their location when the world is updated (default) ---- ----* using continuous collision detection (CCD) ---- ----The default method is efficient, but a body moving very quickly may sometimes jump over another body without producing a collision. A body that is set as a bullet will use CCD. This is less efficient, but is guaranteed not to jump when moving quickly. ---- ----Note that static bodies (with zero mass) always use CCD, so your walls will not let a fast moving body pass through even if it is not a bullet. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:setBullet) ---- ----@param status boolean # The bullet status of the body. -function Body:setBullet(status) end - ---- ----Set whether a body has fixed rotation. ---- ----Bodies with fixed rotation don't vary the speed at which they rotate. Calling this function causes the mass to be reset. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:setFixedRotation) ---- ----@param isFixed boolean # Whether the body should have fixed rotation. -function Body:setFixedRotation(isFixed) end - ---- ----Sets a new gravity scale factor for the body. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:setGravityScale) ---- ----@param scale number # The new gravity scale factor. -function Body:setGravityScale(scale) end - ---- ----Set the inertia of a body. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:setInertia) ---- ----@param inertia number # The new moment of inertia, in kilograms * pixel squared. -function Body:setInertia(inertia) end - ---- ----Sets the linear damping of a Body ---- ----See Body:getLinearDamping for a definition of linear damping. ---- ----Linear damping can take any value from 0 to infinity. It is recommended to stay between 0 and 0.1, though. Other values will make the objects look 'floaty'(if gravity is enabled). ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:setLinearDamping) ---- ----@param ld number # The new linear damping -function Body:setLinearDamping(ld) end - ---- ----Sets a new linear velocity for the Body. ---- ----This function will not accumulate anything; any impulses previously applied since the last call to World:update will be lost. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:setLinearVelocity) ---- ----@param x number # The x-component of the velocity vector. ----@param y number # The y-component of the velocity vector. -function Body:setLinearVelocity(x, y) end - ---- ----Sets a new body mass. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:setMass) ---- ----@param mass number # The mass, in kilograms. -function Body:setMass(mass) end - ---- ----Overrides the calculated mass data. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:setMassData) ---- ----@param x number # The x position of the center of mass. ----@param y number # The y position of the center of mass. ----@param mass number # The mass of the body. ----@param inertia number # The rotational inertia. -function Body:setMassData(x, y, mass, inertia) end - ---- ----Set the position of the body. ---- ----Note that this may not be the center of mass of the body. ---- ----This function cannot wake up the body. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:setPosition) ---- ----@param x number # The x position. ----@param y number # The y position. -function Body:setPosition(x, y) end - ---- ----Sets the sleeping behaviour of the body. Should sleeping be allowed, a body at rest will automatically sleep. A sleeping body is not simulated unless it collided with an awake body. Be wary that one can end up with a situation like a floating sleeping body if the floor was removed. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:setSleepingAllowed) ---- ----@param allowed boolean # True if the body is allowed to sleep or false if not. -function Body:setSleepingAllowed(allowed) end - ---- ----Set the position and angle of the body. ---- ----Note that the position may not be the center of mass of the body. An angle of 0 radians will mean 'looking to the right'. Although radians increase counter-clockwise, the y axis points down so it becomes clockwise from our point of view. ---- ----This function cannot wake up the body. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:setTransform) ---- ----@param x number # The x component of the position. ----@param y number # The y component of the position. ----@param angle number # The angle in radians. -function Body:setTransform(x, y, angle) end - ---- ----Sets a new body type. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:setType) ---- ----@param type love.BodyType # The new type. -function Body:setType(type) end - ---- ----Associates a Lua value with the Body. ---- ----To delete the reference, explicitly pass nil. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:setUserData) ---- ----@param value any # The Lua value to associate with the Body. -function Body:setUserData(value) end - ---- ----Set the x position of the body. ---- ----This function cannot wake up the body. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:setX) ---- ----@param x number # The x position. -function Body:setX(x) end - ---- ----Set the y position of the body. ---- ----This function cannot wake up the body. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Body:setY) ---- ----@param y number # The y position. -function Body:setY(y) end - ---- ----A ChainShape consists of multiple line segments. It can be used to create the boundaries of your terrain. The shape does not have volume and can only collide with PolygonShape and CircleShape. ---- ----Unlike the PolygonShape, the ChainShape does not have a vertices limit or has to form a convex shape, but self intersections are not supported. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics) ---- ----@class love.ChainShape: love.Shape, love.Object -local ChainShape = {} - ---- ----Returns a child of the shape as an EdgeShape. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ChainShape:getChildEdge) ---- ----@param index number # The index of the child. ----@return love.EdgeShape shape # The child as an EdgeShape. -function ChainShape:getChildEdge(index) end - ---- ----Gets the vertex that establishes a connection to the next shape. ---- ----Setting next and previous ChainShape vertices can help prevent unwanted collisions when a flat shape slides along the edge and moves over to the new shape. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ChainShape:getNextVertex) ---- ----@return number x # The x-component of the vertex, or nil if ChainShape:setNextVertex hasn't been called. ----@return number y # The y-component of the vertex, or nil if ChainShape:setNextVertex hasn't been called. -function ChainShape:getNextVertex() end - ---- ----Returns a point of the shape. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ChainShape:getPoint) ---- ----@param index number # The index of the point to return. ----@return number x # The x-coordinate of the point. ----@return number y # The y-coordinate of the point. -function ChainShape:getPoint(index) end - ---- ----Returns all points of the shape. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ChainShape:getPoints) ---- ----@return number x1 # The x-coordinate of the first point. ----@return number y1 # The y-coordinate of the first point. ----@return number x2 # The x-coordinate of the second point. ----@return number y2 # The y-coordinate of the second point. -function ChainShape:getPoints() end - ---- ----Gets the vertex that establishes a connection to the previous shape. ---- ----Setting next and previous ChainShape vertices can help prevent unwanted collisions when a flat shape slides along the edge and moves over to the new shape. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ChainShape:getPreviousVertex) ---- ----@return number x # The x-component of the vertex, or nil if ChainShape:setPreviousVertex hasn't been called. ----@return number y # The y-component of the vertex, or nil if ChainShape:setPreviousVertex hasn't been called. -function ChainShape:getPreviousVertex() end - ---- ----Returns the number of vertices the shape has. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ChainShape:getVertexCount) ---- ----@return number count # The number of vertices. -function ChainShape:getVertexCount() end - ---- ----Sets a vertex that establishes a connection to the next shape. ---- ----This can help prevent unwanted collisions when a flat shape slides along the edge and moves over to the new shape. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ChainShape:setNextVertex) ---- ----@param x number # The x-component of the vertex. ----@param y number # The y-component of the vertex. -function ChainShape:setNextVertex(x, y) end - ---- ----Sets a vertex that establishes a connection to the previous shape. ---- ----This can help prevent unwanted collisions when a flat shape slides along the edge and moves over to the new shape. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ChainShape:setPreviousVertex) ---- ----@param x number # The x-component of the vertex. ----@param y number # The y-component of the vertex. -function ChainShape:setPreviousVertex(x, y) end - ---- ----Circle extends Shape and adds a radius and a local position. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics) ---- ----@class love.CircleShape: love.Shape, love.Object -local CircleShape = {} - ---- ----Gets the center point of the circle shape. ---- ---- ----[Open in Browser](https://love2d.org/wiki/CircleShape:getPoint) ---- ----@return number x # The x-component of the center point of the circle. ----@return number y # The y-component of the center point of the circle. -function CircleShape:getPoint() end - ---- ----Gets the radius of the circle shape. ---- ---- ----[Open in Browser](https://love2d.org/wiki/CircleShape:getRadius) ---- ----@return number radius # The radius of the circle -function CircleShape:getRadius() end - ---- ----Sets the location of the center of the circle shape. ---- ---- ----[Open in Browser](https://love2d.org/wiki/CircleShape:setPoint) ---- ----@param x number # The x-component of the new center point of the circle. ----@param y number # The y-component of the new center point of the circle. -function CircleShape:setPoint(x, y) end - ---- ----Sets the radius of the circle. ---- ---- ----[Open in Browser](https://love2d.org/wiki/CircleShape:setRadius) ---- ----@param radius number # The radius of the circle -function CircleShape:setRadius(radius) end - ---- ----Contacts are objects created to manage collisions in worlds. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics) ---- ----@class love.Contact: love.Object -local Contact = {} - ---- ----Gets the child indices of the shapes of the two colliding fixtures. For ChainShapes, an index of 1 is the first edge in the chain. ----Used together with Fixture:rayCast or ChainShape:getChildEdge. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Contact:getChildren) ---- ----@return number indexA # The child index of the first fixture's shape. ----@return number indexB # The child index of the second fixture's shape. -function Contact:getChildren() end - ---- ----Gets the two Fixtures that hold the shapes that are in contact. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Contact:getFixtures) ---- ----@return love.Fixture fixtureA # The first Fixture. ----@return love.Fixture fixtureB # The second Fixture. -function Contact:getFixtures() end - ---- ----Get the friction between two shapes that are in contact. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Contact:getFriction) ---- ----@return number friction # The friction of the contact. -function Contact:getFriction() end - ---- ----Get the normal vector between two shapes that are in contact. ---- ----This function returns the coordinates of a unit vector that points from the first shape to the second. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Contact:getNormal) ---- ----@return number nx # The x component of the normal vector. ----@return number ny # The y component of the normal vector. -function Contact:getNormal() end - ---- ----Returns the contact points of the two colliding fixtures. There can be one or two points. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Contact:getPositions) ---- ----@return number x1 # The x coordinate of the first contact point. ----@return number y1 # The y coordinate of the first contact point. ----@return number x2 # The x coordinate of the second contact point. ----@return number y2 # The y coordinate of the second contact point. -function Contact:getPositions() end - ---- ----Get the restitution between two shapes that are in contact. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Contact:getRestitution) ---- ----@return number restitution # The restitution between the two shapes. -function Contact:getRestitution() end - ---- ----Returns whether the contact is enabled. The collision will be ignored if a contact gets disabled in the preSolve callback. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Contact:isEnabled) ---- ----@return boolean enabled # True if enabled, false otherwise. -function Contact:isEnabled() end - ---- ----Returns whether the two colliding fixtures are touching each other. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Contact:isTouching) ---- ----@return boolean touching # True if they touch or false if not. -function Contact:isTouching() end - ---- ----Resets the contact friction to the mixture value of both fixtures. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Contact:resetFriction) ---- -function Contact:resetFriction() end - ---- ----Resets the contact restitution to the mixture value of both fixtures. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Contact:resetRestitution) ---- -function Contact:resetRestitution() end - ---- ----Enables or disables the contact. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Contact:setEnabled) ---- ----@param enabled boolean # True to enable or false to disable. -function Contact:setEnabled(enabled) end - ---- ----Sets the contact friction. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Contact:setFriction) ---- ----@param friction number # The contact friction. -function Contact:setFriction(friction) end - ---- ----Sets the contact restitution. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Contact:setRestitution) ---- ----@param restitution number # The contact restitution. -function Contact:setRestitution(restitution) end - ---- ----Keeps two bodies at the same distance. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics) ---- ----@class love.DistanceJoint: love.Joint, love.Object -local DistanceJoint = {} - ---- ----Gets the damping ratio. ---- ---- ----[Open in Browser](https://love2d.org/wiki/DistanceJoint:getDampingRatio) ---- ----@return number ratio # The damping ratio. -function DistanceJoint:getDampingRatio() end - ---- ----Gets the response speed. ---- ---- ----[Open in Browser](https://love2d.org/wiki/DistanceJoint:getFrequency) ---- ----@return number Hz # The response speed. -function DistanceJoint:getFrequency() end - ---- ----Gets the equilibrium distance between the two Bodies. ---- ---- ----[Open in Browser](https://love2d.org/wiki/DistanceJoint:getLength) ---- ----@return number l # The length between the two Bodies. -function DistanceJoint:getLength() end - ---- ----Sets the damping ratio. ---- ---- ----[Open in Browser](https://love2d.org/wiki/DistanceJoint:setDampingRatio) ---- ----@param ratio number # The damping ratio. -function DistanceJoint:setDampingRatio(ratio) end - ---- ----Sets the response speed. ---- ---- ----[Open in Browser](https://love2d.org/wiki/DistanceJoint:setFrequency) ---- ----@param Hz number # The response speed. -function DistanceJoint:setFrequency(Hz) end - ---- ----Sets the equilibrium distance between the two Bodies. ---- ---- ----[Open in Browser](https://love2d.org/wiki/DistanceJoint:setLength) ---- ----@param l number # The length between the two Bodies. -function DistanceJoint:setLength(l) end - ---- ----A EdgeShape is a line segment. They can be used to create the boundaries of your terrain. The shape does not have volume and can only collide with PolygonShape and CircleShape. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics) ---- ----@class love.EdgeShape: love.Shape, love.Object -local EdgeShape = {} - ---- ----Gets the vertex that establishes a connection to the next shape. ---- ----Setting next and previous EdgeShape vertices can help prevent unwanted collisions when a flat shape slides along the edge and moves over to the new shape. ---- ---- ----[Open in Browser](https://love2d.org/wiki/EdgeShape:getNextVertex) ---- ----@return number x # The x-component of the vertex, or nil if EdgeShape:setNextVertex hasn't been called. ----@return number y # The y-component of the vertex, or nil if EdgeShape:setNextVertex hasn't been called. -function EdgeShape:getNextVertex() end - ---- ----Returns the local coordinates of the edge points. ---- ---- ----[Open in Browser](https://love2d.org/wiki/EdgeShape:getPoints) ---- ----@return number x1 # The x-component of the first vertex. ----@return number y1 # The y-component of the first vertex. ----@return number x2 # The x-component of the second vertex. ----@return number y2 # The y-component of the second vertex. -function EdgeShape:getPoints() end - ---- ----Gets the vertex that establishes a connection to the previous shape. ---- ----Setting next and previous EdgeShape vertices can help prevent unwanted collisions when a flat shape slides along the edge and moves over to the new shape. ---- ---- ----[Open in Browser](https://love2d.org/wiki/EdgeShape:getPreviousVertex) ---- ----@return number x # The x-component of the vertex, or nil if EdgeShape:setPreviousVertex hasn't been called. ----@return number y # The y-component of the vertex, or nil if EdgeShape:setPreviousVertex hasn't been called. -function EdgeShape:getPreviousVertex() end - ---- ----Sets a vertex that establishes a connection to the next shape. ---- ----This can help prevent unwanted collisions when a flat shape slides along the edge and moves over to the new shape. ---- ---- ----[Open in Browser](https://love2d.org/wiki/EdgeShape:setNextVertex) ---- ----@param x number # The x-component of the vertex. ----@param y number # The y-component of the vertex. -function EdgeShape:setNextVertex(x, y) end - ---- ----Sets a vertex that establishes a connection to the previous shape. ---- ----This can help prevent unwanted collisions when a flat shape slides along the edge and moves over to the new shape. ---- ---- ----[Open in Browser](https://love2d.org/wiki/EdgeShape:setPreviousVertex) ---- ----@param x number # The x-component of the vertex. ----@param y number # The y-component of the vertex. -function EdgeShape:setPreviousVertex(x, y) end - ---- ----Fixtures attach shapes to bodies. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics) ---- ----@class love.Fixture: love.Object -local Fixture = {} - ---- ----Destroys the fixture. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Fixture:destroy) ---- -function Fixture:destroy() end - ---- ----Returns the body to which the fixture is attached. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Fixture:getBody) ---- ----@return love.Body body # The parent body. -function Fixture:getBody() end - ---- ----Returns the points of the fixture bounding box. In case the fixture has multiple children a 1-based index can be specified. For example, a fixture will have multiple children with a chain shape. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Fixture:getBoundingBox) ---- ----@param index? number # A bounding box of the fixture. ----@return number topLeftX # The x position of the top-left point. ----@return number topLeftY # The y position of the top-left point. ----@return number bottomRightX # The x position of the bottom-right point. ----@return number bottomRightY # The y position of the bottom-right point. -function Fixture:getBoundingBox(index) end - ---- ----Returns the categories the fixture belongs to. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Fixture:getCategory) ---- ----@return number category1 # The first category. ----@return number category2 # The second category. -function Fixture:getCategory() end - ---- ----Returns the density of the fixture. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Fixture:getDensity) ---- ----@return number density # The fixture density in kilograms per square meter. -function Fixture:getDensity() end - ---- ----Returns the filter data of the fixture. ---- ----Categories and masks are encoded as the bits of a 16-bit integer. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Fixture:getFilterData) ---- ----@return number categories # The categories as an integer from 0 to 65535. ----@return number mask # The mask as an integer from 0 to 65535. ----@return number group # The group as an integer from -32768 to 32767. -function Fixture:getFilterData() end - ---- ----Returns the friction of the fixture. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Fixture:getFriction) ---- ----@return number friction # The fixture friction. -function Fixture:getFriction() end - ---- ----Returns the group the fixture belongs to. Fixtures with the same group will always collide if the group is positive or never collide if it's negative. The group zero means no group. ---- ----The groups range from -32768 to 32767. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Fixture:getGroupIndex) ---- ----@return number group # The group of the fixture. -function Fixture:getGroupIndex() end - ---- ----Returns which categories this fixture should '''NOT''' collide with. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Fixture:getMask) ---- ----@return number mask1 # The first category selected by the mask. ----@return number mask2 # The second category selected by the mask. -function Fixture:getMask() end - ---- ----Returns the mass, its center and the rotational inertia. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Fixture:getMassData) ---- ----@return number x # The x position of the center of mass. ----@return number y # The y position of the center of mass. ----@return number mass # The mass of the fixture. ----@return number inertia # The rotational inertia. -function Fixture:getMassData() end - ---- ----Returns the restitution of the fixture. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Fixture:getRestitution) ---- ----@return number restitution # The fixture restitution. -function Fixture:getRestitution() end - ---- ----Returns the shape of the fixture. This shape is a reference to the actual data used in the simulation. It's possible to change its values between timesteps. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Fixture:getShape) ---- ----@return love.Shape shape # The fixture's shape. -function Fixture:getShape() end - ---- ----Returns the Lua value associated with this fixture. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Fixture:getUserData) ---- ----@return any value # The Lua value associated with the fixture. -function Fixture:getUserData() end - ---- ----Gets whether the Fixture is destroyed. Destroyed fixtures cannot be used. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Fixture:isDestroyed) ---- ----@return boolean destroyed # Whether the Fixture is destroyed. -function Fixture:isDestroyed() end - ---- ----Returns whether the fixture is a sensor. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Fixture:isSensor) ---- ----@return boolean sensor # If the fixture is a sensor. -function Fixture:isSensor() end - ---- ----Casts a ray against the shape of the fixture and returns the surface normal vector and the line position where the ray hit. If the ray missed the shape, nil will be returned. ---- ----The ray starts on the first point of the input line and goes towards the second point of the line. The fifth argument is the maximum distance the ray is going to travel as a scale factor of the input line length. ---- ----The childIndex parameter is used to specify which child of a parent shape, such as a ChainShape, will be ray casted. For ChainShapes, the index of 1 is the first edge on the chain. Ray casting a parent shape will only test the child specified so if you want to test every shape of the parent, you must loop through all of its children. ---- ----The world position of the impact can be calculated by multiplying the line vector with the third return value and adding it to the line starting point. ---- ----hitx, hity = x1 + (x2 - x1) * fraction, y1 + (y2 - y1) * fraction ---- ---- ----[Open in Browser](https://love2d.org/wiki/Fixture:rayCast) ---- ----@param x1 number # The x position of the input line starting point. ----@param y1 number # The y position of the input line starting point. ----@param x2 number # The x position of the input line end point. ----@param y2 number # The y position of the input line end point. ----@param maxFraction number # Ray length parameter. ----@param childIndex? number # The index of the child the ray gets cast against. ----@return number xn # The x component of the normal vector of the edge where the ray hit the shape. ----@return number yn # The y component of the normal vector of the edge where the ray hit the shape. ----@return number fraction # The position on the input line where the intersection happened as a factor of the line length. -function Fixture:rayCast(x1, y1, x2, y2, maxFraction, childIndex) end - ---- ----Sets the categories the fixture belongs to. There can be up to 16 categories represented as a number from 1 to 16. ---- ----All fixture's default category is 1. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Fixture:setCategory) ---- ----@param category1 number # The first category. ----@param category2 number # The second category. -function Fixture:setCategory(category1, category2) end - ---- ----Sets the density of the fixture. Call Body:resetMassData if this needs to take effect immediately. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Fixture:setDensity) ---- ----@param density number # The fixture density in kilograms per square meter. -function Fixture:setDensity(density) end - ---- ----Sets the filter data of the fixture. ---- ----Groups, categories, and mask can be used to define the collision behaviour of the fixture. ---- ----If two fixtures are in the same group they either always collide if the group is positive, or never collide if it's negative. If the group is zero or they do not match, then the contact filter checks if the fixtures select a category of the other fixture with their masks. The fixtures do not collide if that's not the case. If they do have each other's categories selected, the return value of the custom contact filter will be used. They always collide if none was set. ---- ----There can be up to 16 categories. Categories and masks are encoded as the bits of a 16-bit integer. ---- ----When created, prior to calling this function, all fixtures have category set to 1, mask set to 65535 (all categories) and group set to 0. ---- ----This function allows setting all filter data for a fixture at once. To set only the categories, the mask or the group, you can use Fixture:setCategory, Fixture:setMask or Fixture:setGroupIndex respectively. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Fixture:setFilterData) ---- ----@param categories number # The categories as an integer from 0 to 65535. ----@param mask number # The mask as an integer from 0 to 65535. ----@param group number # The group as an integer from -32768 to 32767. -function Fixture:setFilterData(categories, mask, group) end - ---- ----Sets the friction of the fixture. ---- ----Friction determines how shapes react when they 'slide' along other shapes. Low friction indicates a slippery surface, like ice, while high friction indicates a rough surface, like concrete. Range: 0.0 - 1.0. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Fixture:setFriction) ---- ----@param friction number # The fixture friction. -function Fixture:setFriction(friction) end - ---- ----Sets the group the fixture belongs to. Fixtures with the same group will always collide if the group is positive or never collide if it's negative. The group zero means no group. ---- ----The groups range from -32768 to 32767. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Fixture:setGroupIndex) ---- ----@param group number # The group as an integer from -32768 to 32767. -function Fixture:setGroupIndex(group) end - ---- ----Sets the category mask of the fixture. There can be up to 16 categories represented as a number from 1 to 16. ---- ----This fixture will '''NOT''' collide with the fixtures that are in the selected categories if the other fixture also has a category of this fixture selected. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Fixture:setMask) ---- ----@param mask1 number # The first category. ----@param mask2 number # The second category. -function Fixture:setMask(mask1, mask2) end - ---- ----Sets the restitution of the fixture. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Fixture:setRestitution) ---- ----@param restitution number # The fixture restitution. -function Fixture:setRestitution(restitution) end - ---- ----Sets whether the fixture should act as a sensor. ---- ----Sensors do not cause collision responses, but the begin-contact and end-contact World callbacks will still be called for this fixture. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Fixture:setSensor) ---- ----@param sensor boolean # The sensor status. -function Fixture:setSensor(sensor) end - ---- ----Associates a Lua value with the fixture. ---- ----To delete the reference, explicitly pass nil. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Fixture:setUserData) ---- ----@param value any # The Lua value to associate with the fixture. -function Fixture:setUserData(value) end - ---- ----Checks if a point is inside the shape of the fixture. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Fixture:testPoint) ---- ----@param x number # The x position of the point. ----@param y number # The y position of the point. ----@return boolean isInside # True if the point is inside or false if it is outside. -function Fixture:testPoint(x, y) end - ---- ----A FrictionJoint applies friction to a body. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics) ---- ----@class love.FrictionJoint: love.Joint, love.Object -local FrictionJoint = {} - ---- ----Gets the maximum friction force in Newtons. ---- ---- ----[Open in Browser](https://love2d.org/wiki/FrictionJoint:getMaxForce) ---- ----@return number force # Maximum force in Newtons. -function FrictionJoint:getMaxForce() end - ---- ----Gets the maximum friction torque in Newton-meters. ---- ---- ----[Open in Browser](https://love2d.org/wiki/FrictionJoint:getMaxTorque) ---- ----@return number torque # Maximum torque in Newton-meters. -function FrictionJoint:getMaxTorque() end - ---- ----Sets the maximum friction force in Newtons. ---- ---- ----[Open in Browser](https://love2d.org/wiki/FrictionJoint:setMaxForce) ---- ----@param maxForce number # Max force in Newtons. -function FrictionJoint:setMaxForce(maxForce) end - ---- ----Sets the maximum friction torque in Newton-meters. ---- ---- ----[Open in Browser](https://love2d.org/wiki/FrictionJoint:setMaxTorque) ---- ----@param torque number # Maximum torque in Newton-meters. -function FrictionJoint:setMaxTorque(torque) end - ---- ----Keeps bodies together in such a way that they act like gears. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics) ---- ----@class love.GearJoint: love.Joint, love.Object -local GearJoint = {} - ---- ----Get the Joints connected by this GearJoint. ---- ---- ----[Open in Browser](https://love2d.org/wiki/GearJoint:getJoints) ---- ----@return love.Joint joint1 # The first connected Joint. ----@return love.Joint joint2 # The second connected Joint. -function GearJoint:getJoints() end - ---- ----Get the ratio of a gear joint. ---- ---- ----[Open in Browser](https://love2d.org/wiki/GearJoint:getRatio) ---- ----@return number ratio # The ratio of the joint. -function GearJoint:getRatio() end - ---- ----Set the ratio of a gear joint. ---- ---- ----[Open in Browser](https://love2d.org/wiki/GearJoint:setRatio) ---- ----@param ratio number # The new ratio of the joint. -function GearJoint:setRatio(ratio) end - ---- ----Attach multiple bodies together to interact in unique ways. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics) ---- ----@class love.Joint: love.Object -local Joint = {} - ---- ----Explicitly destroys the Joint. An error will occur if you attempt to use the object after calling this function. ---- ----In 0.7.2, when you don't have time to wait for garbage collection, this function ---- ----may be used to free the object immediately. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Joint:destroy) ---- -function Joint:destroy() end - ---- ----Get the anchor points of the joint. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Joint:getAnchors) ---- ----@return number x1 # The x-component of the anchor on Body 1. ----@return number y1 # The y-component of the anchor on Body 1. ----@return number x2 # The x-component of the anchor on Body 2. ----@return number y2 # The y-component of the anchor on Body 2. -function Joint:getAnchors() end - ---- ----Gets the bodies that the Joint is attached to. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Joint:getBodies) ---- ----@return love.Body bodyA # The first Body. ----@return love.Body bodyB # The second Body. -function Joint:getBodies() end - ---- ----Gets whether the connected Bodies collide. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Joint:getCollideConnected) ---- ----@return boolean c # True if they collide, false otherwise. -function Joint:getCollideConnected() end - ---- ----Returns the reaction force in newtons on the second body ---- ---- ----[Open in Browser](https://love2d.org/wiki/Joint:getReactionForce) ---- ----@param x number # How long the force applies. Usually the inverse time step or 1/dt. ----@return number x # The x-component of the force. ----@return number y # The y-component of the force. -function Joint:getReactionForce(x) end - ---- ----Returns the reaction torque on the second body. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Joint:getReactionTorque) ---- ----@param invdt number # How long the force applies. Usually the inverse time step or 1/dt. ----@return number torque # The reaction torque on the second body. -function Joint:getReactionTorque(invdt) end - ---- ----Gets a string representing the type. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Joint:getType) ---- ----@return love.JointType type # A string with the name of the Joint type. -function Joint:getType() end - ---- ----Returns the Lua value associated with this Joint. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Joint:getUserData) ---- ----@return any value # The Lua value associated with the Joint. -function Joint:getUserData() end - ---- ----Gets whether the Joint is destroyed. Destroyed joints cannot be used. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Joint:isDestroyed) ---- ----@return boolean destroyed # Whether the Joint is destroyed. -function Joint:isDestroyed() end - ---- ----Associates a Lua value with the Joint. ---- ----To delete the reference, explicitly pass nil. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Joint:setUserData) ---- ----@param value any # The Lua value to associate with the Joint. -function Joint:setUserData(value) end - ---- ----Controls the relative motion between two Bodies. Position and rotation offsets can be specified, as well as the maximum motor force and torque that will be applied to reach the target offsets. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics) ---- ----@class love.MotorJoint: love.Joint, love.Object -local MotorJoint = {} - ---- ----Gets the target angular offset between the two Bodies the Joint is attached to. ---- ---- ----[Open in Browser](https://love2d.org/wiki/MotorJoint:getAngularOffset) ---- ----@return number angleoffset # The target angular offset in radians: the second body's angle minus the first body's angle. -function MotorJoint:getAngularOffset() end - ---- ----Gets the target linear offset between the two Bodies the Joint is attached to. ---- ---- ----[Open in Browser](https://love2d.org/wiki/MotorJoint:getLinearOffset) ---- ----@return number x # The x component of the target linear offset, relative to the first Body. ----@return number y # The y component of the target linear offset, relative to the first Body. -function MotorJoint:getLinearOffset() end - ---- ----Sets the target angluar offset between the two Bodies the Joint is attached to. ---- ---- ----[Open in Browser](https://love2d.org/wiki/MotorJoint:setAngularOffset) ---- ----@param angleoffset number # The target angular offset in radians: the second body's angle minus the first body's angle. -function MotorJoint:setAngularOffset(angleoffset) end - ---- ----Sets the target linear offset between the two Bodies the Joint is attached to. ---- ---- ----[Open in Browser](https://love2d.org/wiki/MotorJoint:setLinearOffset) ---- ----@param x number # The x component of the target linear offset, relative to the first Body. ----@param y number # The y component of the target linear offset, relative to the first Body. -function MotorJoint:setLinearOffset(x, y) end - ---- ----For controlling objects with the mouse. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics) ---- ----@class love.MouseJoint: love.Joint, love.Object -local MouseJoint = {} - ---- ----Returns the damping ratio. ---- ---- ----[Open in Browser](https://love2d.org/wiki/MouseJoint:getDampingRatio) ---- ----@return number ratio # The new damping ratio. -function MouseJoint:getDampingRatio() end - ---- ----Returns the frequency. ---- ---- ----[Open in Browser](https://love2d.org/wiki/MouseJoint:getFrequency) ---- ----@return number freq # The frequency in hertz. -function MouseJoint:getFrequency() end - ---- ----Gets the highest allowed force. ---- ---- ----[Open in Browser](https://love2d.org/wiki/MouseJoint:getMaxForce) ---- ----@return number f # The max allowed force. -function MouseJoint:getMaxForce() end - ---- ----Gets the target point. ---- ---- ----[Open in Browser](https://love2d.org/wiki/MouseJoint:getTarget) ---- ----@return number x # The x-component of the target. ----@return number y # The x-component of the target. -function MouseJoint:getTarget() end - ---- ----Sets a new damping ratio. ---- ---- ----[Open in Browser](https://love2d.org/wiki/MouseJoint:setDampingRatio) ---- ----@param ratio number # The new damping ratio. -function MouseJoint:setDampingRatio(ratio) end - ---- ----Sets a new frequency. ---- ---- ----[Open in Browser](https://love2d.org/wiki/MouseJoint:setFrequency) ---- ----@param freq number # The new frequency in hertz. -function MouseJoint:setFrequency(freq) end - ---- ----Sets the highest allowed force. ---- ---- ----[Open in Browser](https://love2d.org/wiki/MouseJoint:setMaxForce) ---- ----@param f number # The max allowed force. -function MouseJoint:setMaxForce(f) end - ---- ----Sets the target point. ---- ---- ----[Open in Browser](https://love2d.org/wiki/MouseJoint:setTarget) ---- ----@param x number # The x-component of the target. ----@param y number # The y-component of the target. -function MouseJoint:setTarget(x, y) end - ---- ----A PolygonShape is a convex polygon with up to 8 vertices. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics) ---- ----@class love.PolygonShape: love.Shape, love.Object -local PolygonShape = {} - ---- ----Get the local coordinates of the polygon's vertices. ---- ----This function has a variable number of return values. It can be used in a nested fashion with love.graphics.polygon. ---- ---- ----[Open in Browser](https://love2d.org/wiki/PolygonShape:getPoints) ---- ----@return number x1 # The x-component of the first vertex. ----@return number y1 # The y-component of the first vertex. ----@return number x2 # The x-component of the second vertex. ----@return number y2 # The y-component of the second vertex. -function PolygonShape:getPoints() end - ---- ----Restricts relative motion between Bodies to one shared axis. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics) ---- ----@class love.PrismaticJoint: love.Joint, love.Object -local PrismaticJoint = {} - ---- ----Checks whether the limits are enabled. ---- ---- ----[Open in Browser](https://love2d.org/wiki/PrismaticJoint:areLimitsEnabled) ---- ----@return boolean enabled # True if enabled, false otherwise. -function PrismaticJoint:areLimitsEnabled() end - ---- ----Gets the world-space axis vector of the Prismatic Joint. ---- ---- ----[Open in Browser](https://love2d.org/wiki/PrismaticJoint:getAxis) ---- ----@return number x # The x-axis coordinate of the world-space axis vector. ----@return number y # The y-axis coordinate of the world-space axis vector. -function PrismaticJoint:getAxis() end - ---- ----Get the current joint angle speed. ---- ---- ----[Open in Browser](https://love2d.org/wiki/PrismaticJoint:getJointSpeed) ---- ----@return number s # Joint angle speed in meters/second. -function PrismaticJoint:getJointSpeed() end - ---- ----Get the current joint translation. ---- ---- ----[Open in Browser](https://love2d.org/wiki/PrismaticJoint:getJointTranslation) ---- ----@return number t # Joint translation, usually in meters.. -function PrismaticJoint:getJointTranslation() end - ---- ----Gets the joint limits. ---- ---- ----[Open in Browser](https://love2d.org/wiki/PrismaticJoint:getLimits) ---- ----@return number lower # The lower limit, usually in meters. ----@return number upper # The upper limit, usually in meters. -function PrismaticJoint:getLimits() end - ---- ----Gets the lower limit. ---- ---- ----[Open in Browser](https://love2d.org/wiki/PrismaticJoint:getLowerLimit) ---- ----@return number lower # The lower limit, usually in meters. -function PrismaticJoint:getLowerLimit() end - ---- ----Gets the maximum motor force. ---- ---- ----[Open in Browser](https://love2d.org/wiki/PrismaticJoint:getMaxMotorForce) ---- ----@return number f # The maximum motor force, usually in N. -function PrismaticJoint:getMaxMotorForce() end - ---- ----Returns the current motor force. ---- ---- ----[Open in Browser](https://love2d.org/wiki/PrismaticJoint:getMotorForce) ---- ----@param invdt number # How long the force applies. Usually the inverse time step or 1/dt. ----@return number force # The force on the motor in newtons. -function PrismaticJoint:getMotorForce(invdt) end - ---- ----Gets the motor speed. ---- ---- ----[Open in Browser](https://love2d.org/wiki/PrismaticJoint:getMotorSpeed) ---- ----@return number s # The motor speed, usually in meters per second. -function PrismaticJoint:getMotorSpeed() end - ---- ----Gets the reference angle. ---- ---- ----[Open in Browser](https://love2d.org/wiki/PrismaticJoint:getReferenceAngle) ---- ----@return number angle # The reference angle in radians. -function PrismaticJoint:getReferenceAngle() end - ---- ----Gets the upper limit. ---- ---- ----[Open in Browser](https://love2d.org/wiki/PrismaticJoint:getUpperLimit) ---- ----@return number upper # The upper limit, usually in meters. -function PrismaticJoint:getUpperLimit() end - ---- ----Checks whether the motor is enabled. ---- ---- ----[Open in Browser](https://love2d.org/wiki/PrismaticJoint:isMotorEnabled) ---- ----@return boolean enabled # True if enabled, false if disabled. -function PrismaticJoint:isMotorEnabled() end - ---- ----Sets the limits. ---- ---- ----[Open in Browser](https://love2d.org/wiki/PrismaticJoint:setLimits) ---- ----@param lower number # The lower limit, usually in meters. ----@param upper number # The upper limit, usually in meters. -function PrismaticJoint:setLimits(lower, upper) end - ---- ----Enables/disables the joint limit. ---- ---- ----[Open in Browser](https://love2d.org/wiki/PrismaticJoint:setLimitsEnabled) ---- ----@return boolean enable # True if enabled, false if disabled. -function PrismaticJoint:setLimitsEnabled() end - ---- ----Sets the lower limit. ---- ---- ----[Open in Browser](https://love2d.org/wiki/PrismaticJoint:setLowerLimit) ---- ----@param lower number # The lower limit, usually in meters. -function PrismaticJoint:setLowerLimit(lower) end - ---- ----Set the maximum motor force. ---- ---- ----[Open in Browser](https://love2d.org/wiki/PrismaticJoint:setMaxMotorForce) ---- ----@param f number # The maximum motor force, usually in N. -function PrismaticJoint:setMaxMotorForce(f) end - ---- ----Enables/disables the joint motor. ---- ---- ----[Open in Browser](https://love2d.org/wiki/PrismaticJoint:setMotorEnabled) ---- ----@param enable boolean # True to enable, false to disable. -function PrismaticJoint:setMotorEnabled(enable) end - ---- ----Sets the motor speed. ---- ---- ----[Open in Browser](https://love2d.org/wiki/PrismaticJoint:setMotorSpeed) ---- ----@param s number # The motor speed, usually in meters per second. -function PrismaticJoint:setMotorSpeed(s) end - ---- ----Sets the upper limit. ---- ---- ----[Open in Browser](https://love2d.org/wiki/PrismaticJoint:setUpperLimit) ---- ----@param upper number # The upper limit, usually in meters. -function PrismaticJoint:setUpperLimit(upper) end - ---- ----Allows you to simulate bodies connected through pulleys. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics) ---- ----@class love.PulleyJoint: love.Joint, love.Object -local PulleyJoint = {} - ---- ----Get the total length of the rope. ---- ---- ----[Open in Browser](https://love2d.org/wiki/PulleyJoint:getConstant) ---- ----@return number length # The length of the rope in the joint. -function PulleyJoint:getConstant() end - ---- ----Get the ground anchor positions in world coordinates. ---- ---- ----[Open in Browser](https://love2d.org/wiki/PulleyJoint:getGroundAnchors) ---- ----@return number a1x # The x coordinate of the first anchor. ----@return number a1y # The y coordinate of the first anchor. ----@return number a2x # The x coordinate of the second anchor. ----@return number a2y # The y coordinate of the second anchor. -function PulleyJoint:getGroundAnchors() end - ---- ----Get the current length of the rope segment attached to the first body. ---- ---- ----[Open in Browser](https://love2d.org/wiki/PulleyJoint:getLengthA) ---- ----@return number length # The length of the rope segment. -function PulleyJoint:getLengthA() end - ---- ----Get the current length of the rope segment attached to the second body. ---- ---- ----[Open in Browser](https://love2d.org/wiki/PulleyJoint:getLengthB) ---- ----@return number length # The length of the rope segment. -function PulleyJoint:getLengthB() end - ---- ----Get the maximum lengths of the rope segments. ---- ---- ----[Open in Browser](https://love2d.org/wiki/PulleyJoint:getMaxLengths) ---- ----@return number len1 # The maximum length of the first rope segment. ----@return number len2 # The maximum length of the second rope segment. -function PulleyJoint:getMaxLengths() end - ---- ----Get the pulley ratio. ---- ---- ----[Open in Browser](https://love2d.org/wiki/PulleyJoint:getRatio) ---- ----@return number ratio # The pulley ratio of the joint. -function PulleyJoint:getRatio() end - ---- ----Set the total length of the rope. ---- ----Setting a new length for the rope updates the maximum length values of the joint. ---- ---- ----[Open in Browser](https://love2d.org/wiki/PulleyJoint:setConstant) ---- ----@param length number # The new length of the rope in the joint. -function PulleyJoint:setConstant(length) end - ---- ----Set the maximum lengths of the rope segments. ---- ----The physics module also imposes maximum values for the rope segments. If the parameters exceed these values, the maximum values are set instead of the requested values. ---- ---- ----[Open in Browser](https://love2d.org/wiki/PulleyJoint:setMaxLengths) ---- ----@param max1 number # The new maximum length of the first segment. ----@param max2 number # The new maximum length of the second segment. -function PulleyJoint:setMaxLengths(max1, max2) end - ---- ----Set the pulley ratio. ---- ---- ----[Open in Browser](https://love2d.org/wiki/PulleyJoint:setRatio) ---- ----@param ratio number # The new pulley ratio of the joint. -function PulleyJoint:setRatio(ratio) end - ---- ----Allow two Bodies to revolve around a shared point. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics) ---- ----@class love.RevoluteJoint: love.Joint, love.Object -local RevoluteJoint = {} - ---- ----Checks whether limits are enabled. ---- ---- ----[Open in Browser](https://love2d.org/wiki/RevoluteJoint:areLimitsEnabled) ---- ----@return boolean enabled # True if enabled, false otherwise. -function RevoluteJoint:areLimitsEnabled() end - ---- ----Get the current joint angle. ---- ---- ----[Open in Browser](https://love2d.org/wiki/RevoluteJoint:getJointAngle) ---- ----@return number angle # The joint angle in radians. -function RevoluteJoint:getJointAngle() end - ---- ----Get the current joint angle speed. ---- ---- ----[Open in Browser](https://love2d.org/wiki/RevoluteJoint:getJointSpeed) ---- ----@return number s # Joint angle speed in radians/second. -function RevoluteJoint:getJointSpeed() end - ---- ----Gets the joint limits. ---- ---- ----[Open in Browser](https://love2d.org/wiki/RevoluteJoint:getLimits) ---- ----@return number lower # The lower limit, in radians. ----@return number upper # The upper limit, in radians. -function RevoluteJoint:getLimits() end - ---- ----Gets the lower limit. ---- ---- ----[Open in Browser](https://love2d.org/wiki/RevoluteJoint:getLowerLimit) ---- ----@return number lower # The lower limit, in radians. -function RevoluteJoint:getLowerLimit() end - ---- ----Gets the maximum motor force. ---- ---- ----[Open in Browser](https://love2d.org/wiki/RevoluteJoint:getMaxMotorTorque) ---- ----@return number f # The maximum motor force, in Nm. -function RevoluteJoint:getMaxMotorTorque() end - ---- ----Gets the motor speed. ---- ---- ----[Open in Browser](https://love2d.org/wiki/RevoluteJoint:getMotorSpeed) ---- ----@return number s # The motor speed, radians per second. -function RevoluteJoint:getMotorSpeed() end - ---- ----Get the current motor force. ---- ---- ----[Open in Browser](https://love2d.org/wiki/RevoluteJoint:getMotorTorque) ---- ----@return number f # The current motor force, in Nm. -function RevoluteJoint:getMotorTorque() end - ---- ----Gets the reference angle. ---- ---- ----[Open in Browser](https://love2d.org/wiki/RevoluteJoint:getReferenceAngle) ---- ----@return number angle # The reference angle in radians. -function RevoluteJoint:getReferenceAngle() end - ---- ----Gets the upper limit. ---- ---- ----[Open in Browser](https://love2d.org/wiki/RevoluteJoint:getUpperLimit) ---- ----@return number upper # The upper limit, in radians. -function RevoluteJoint:getUpperLimit() end - ---- ----Checks whether limits are enabled. ---- ---- ----[Open in Browser](https://love2d.org/wiki/RevoluteJoint:hasLimitsEnabled) ---- ----@return boolean enabled # True if enabled, false otherwise. -function RevoluteJoint:hasLimitsEnabled() end - ---- ----Checks whether the motor is enabled. ---- ---- ----[Open in Browser](https://love2d.org/wiki/RevoluteJoint:isMotorEnabled) ---- ----@return boolean enabled # True if enabled, false if disabled. -function RevoluteJoint:isMotorEnabled() end - ---- ----Sets the limits. ---- ---- ----[Open in Browser](https://love2d.org/wiki/RevoluteJoint:setLimits) ---- ----@param lower number # The lower limit, in radians. ----@param upper number # The upper limit, in radians. -function RevoluteJoint:setLimits(lower, upper) end - ---- ----Enables/disables the joint limit. ---- ---- ----[Open in Browser](https://love2d.org/wiki/RevoluteJoint:setLimitsEnabled) ---- ----@param enable boolean # True to enable, false to disable. -function RevoluteJoint:setLimitsEnabled(enable) end - ---- ----Sets the lower limit. ---- ---- ----[Open in Browser](https://love2d.org/wiki/RevoluteJoint:setLowerLimit) ---- ----@param lower number # The lower limit, in radians. -function RevoluteJoint:setLowerLimit(lower) end - ---- ----Set the maximum motor force. ---- ---- ----[Open in Browser](https://love2d.org/wiki/RevoluteJoint:setMaxMotorTorque) ---- ----@param f number # The maximum motor force, in Nm. -function RevoluteJoint:setMaxMotorTorque(f) end - ---- ----Enables/disables the joint motor. ---- ---- ----[Open in Browser](https://love2d.org/wiki/RevoluteJoint:setMotorEnabled) ---- ----@param enable boolean # True to enable, false to disable. -function RevoluteJoint:setMotorEnabled(enable) end - ---- ----Sets the motor speed. ---- ---- ----[Open in Browser](https://love2d.org/wiki/RevoluteJoint:setMotorSpeed) ---- ----@param s number # The motor speed, radians per second. -function RevoluteJoint:setMotorSpeed(s) end - ---- ----Sets the upper limit. ---- ---- ----[Open in Browser](https://love2d.org/wiki/RevoluteJoint:setUpperLimit) ---- ----@param upper number # The upper limit, in radians. -function RevoluteJoint:setUpperLimit(upper) end - ---- ----The RopeJoint enforces a maximum distance between two points on two bodies. It has no other effect. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics) ---- ----@class love.RopeJoint: love.Joint, love.Object -local RopeJoint = {} - ---- ----Gets the maximum length of a RopeJoint. ---- ---- ----[Open in Browser](https://love2d.org/wiki/RopeJoint:getMaxLength) ---- ----@return number maxLength # The maximum length of the RopeJoint. -function RopeJoint:getMaxLength() end - ---- ----Sets the maximum length of a RopeJoint. ---- ---- ----[Open in Browser](https://love2d.org/wiki/RopeJoint:setMaxLength) ---- ----@param maxLength number # The new maximum length of the RopeJoint. -function RopeJoint:setMaxLength(maxLength) end - ---- ----Shapes are solid 2d geometrical objects which handle the mass and collision of a Body in love.physics. ---- ----Shapes are attached to a Body via a Fixture. The Shape object is copied when this happens. ---- ----The Shape's position is relative to the position of the Body it has been attached to. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics) ---- ----@class love.Shape: love.Object -local Shape = {} - ---- ----Returns the points of the bounding box for the transformed shape. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Shape:computeAABB) ---- ----@param tx number # The translation of the shape on the x-axis. ----@param ty number # The translation of the shape on the y-axis. ----@param tr number # The shape rotation. ----@param childIndex? number # The index of the child to compute the bounding box of. ----@return number topLeftX # The x position of the top-left point. ----@return number topLeftY # The y position of the top-left point. ----@return number bottomRightX # The x position of the bottom-right point. ----@return number bottomRightY # The y position of the bottom-right point. -function Shape:computeAABB(tx, ty, tr, childIndex) end - ---- ----Computes the mass properties for the shape with the specified density. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Shape:computeMass) ---- ----@param density number # The shape density. ----@return number x # The x postition of the center of mass. ----@return number y # The y postition of the center of mass. ----@return number mass # The mass of the shape. ----@return number inertia # The rotational inertia. -function Shape:computeMass(density) end - ---- ----Returns the number of children the shape has. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Shape:getChildCount) ---- ----@return number count # The number of children. -function Shape:getChildCount() end - ---- ----Gets the radius of the shape. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Shape:getRadius) ---- ----@return number radius # The radius of the shape. -function Shape:getRadius() end - ---- ----Gets a string representing the Shape. ---- ----This function can be useful for conditional debug drawing. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Shape:getType) ---- ----@return love.ShapeType type # The type of the Shape. -function Shape:getType() end - ---- ----Casts a ray against the shape and returns the surface normal vector and the line position where the ray hit. If the ray missed the shape, nil will be returned. The Shape can be transformed to get it into the desired position. ---- ----The ray starts on the first point of the input line and goes towards the second point of the line. The fourth argument is the maximum distance the ray is going to travel as a scale factor of the input line length. ---- ----The childIndex parameter is used to specify which child of a parent shape, such as a ChainShape, will be ray casted. For ChainShapes, the index of 1 is the first edge on the chain. Ray casting a parent shape will only test the child specified so if you want to test every shape of the parent, you must loop through all of its children. ---- ----The world position of the impact can be calculated by multiplying the line vector with the third return value and adding it to the line starting point. ---- ----hitx, hity = x1 + (x2 - x1) * fraction, y1 + (y2 - y1) * fraction ---- ---- ----[Open in Browser](https://love2d.org/wiki/Shape:rayCast) ---- ----@param x1 number # The x position of the input line starting point. ----@param y1 number # The y position of the input line starting point. ----@param x2 number # The x position of the input line end point. ----@param y2 number # The y position of the input line end point. ----@param maxFraction number # Ray length parameter. ----@param tx number # The translation of the shape on the x-axis. ----@param ty number # The translation of the shape on the y-axis. ----@param tr number # The shape rotation. ----@param childIndex? number # The index of the child the ray gets cast against. ----@return number xn # The x component of the normal vector of the edge where the ray hit the shape. ----@return number yn # The y component of the normal vector of the edge where the ray hit the shape. ----@return number fraction # The position on the input line where the intersection happened as a factor of the line length. -function Shape:rayCast(x1, y1, x2, y2, maxFraction, tx, ty, tr, childIndex) end - ---- ----This is particularly useful for mouse interaction with the shapes. By looping through all shapes and testing the mouse position with this function, we can find which shapes the mouse touches. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Shape:testPoint) ---- ----@param tx number # Translates the shape along the x-axis. ----@param ty number # Translates the shape along the y-axis. ----@param tr number # Rotates the shape. ----@param x number # The x-component of the point. ----@param y number # The y-component of the point. ----@return boolean hit # True if inside, false if outside -function Shape:testPoint(tx, ty, tr, x, y) end - ---- ----A WeldJoint essentially glues two bodies together. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics) ---- ----@class love.WeldJoint: love.Joint, love.Object -local WeldJoint = {} - ---- ----Returns the damping ratio of the joint. ---- ---- ----[Open in Browser](https://love2d.org/wiki/WeldJoint:getDampingRatio) ---- ----@return number ratio # The damping ratio. -function WeldJoint:getDampingRatio() end - ---- ----Returns the frequency. ---- ---- ----[Open in Browser](https://love2d.org/wiki/WeldJoint:getFrequency) ---- ----@return number freq # The frequency in hertz. -function WeldJoint:getFrequency() end - ---- ----Gets the reference angle. ---- ---- ----[Open in Browser](https://love2d.org/wiki/WeldJoint:getReferenceAngle) ---- ----@return number angle # The reference angle in radians. -function WeldJoint:getReferenceAngle() end - ---- ----Sets a new damping ratio. ---- ---- ----[Open in Browser](https://love2d.org/wiki/WeldJoint:setDampingRatio) ---- ----@param ratio number # The new damping ratio. -function WeldJoint:setDampingRatio(ratio) end - ---- ----Sets a new frequency. ---- ---- ----[Open in Browser](https://love2d.org/wiki/WeldJoint:setFrequency) ---- ----@param freq number # The new frequency in hertz. -function WeldJoint:setFrequency(freq) end - ---- ----Restricts a point on the second body to a line on the first body. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics) ---- ----@class love.WheelJoint: love.Joint, love.Object -local WheelJoint = {} - ---- ----Gets the world-space axis vector of the Wheel Joint. ---- ---- ----[Open in Browser](https://love2d.org/wiki/WheelJoint:getAxis) ---- ----@return number x # The x-axis coordinate of the world-space axis vector. ----@return number y # The y-axis coordinate of the world-space axis vector. -function WheelJoint:getAxis() end - ---- ----Returns the current joint translation speed. ---- ---- ----[Open in Browser](https://love2d.org/wiki/WheelJoint:getJointSpeed) ---- ----@return number speed # The translation speed of the joint in meters per second. -function WheelJoint:getJointSpeed() end - ---- ----Returns the current joint translation. ---- ---- ----[Open in Browser](https://love2d.org/wiki/WheelJoint:getJointTranslation) ---- ----@return number position # The translation of the joint in meters. -function WheelJoint:getJointTranslation() end - ---- ----Returns the maximum motor torque. ---- ---- ----[Open in Browser](https://love2d.org/wiki/WheelJoint:getMaxMotorTorque) ---- ----@return number maxTorque # The maximum torque of the joint motor in newton meters. -function WheelJoint:getMaxMotorTorque() end - ---- ----Returns the speed of the motor. ---- ---- ----[Open in Browser](https://love2d.org/wiki/WheelJoint:getMotorSpeed) ---- ----@return number speed # The speed of the joint motor in radians per second. -function WheelJoint:getMotorSpeed() end - ---- ----Returns the current torque on the motor. ---- ---- ----[Open in Browser](https://love2d.org/wiki/WheelJoint:getMotorTorque) ---- ----@param invdt number # How long the force applies. Usually the inverse time step or 1/dt. ----@return number torque # The torque on the motor in newton meters. -function WheelJoint:getMotorTorque(invdt) end - ---- ----Returns the damping ratio. ---- ---- ----[Open in Browser](https://love2d.org/wiki/WheelJoint:getSpringDampingRatio) ---- ----@return number ratio # The damping ratio. -function WheelJoint:getSpringDampingRatio() end - ---- ----Returns the spring frequency. ---- ---- ----[Open in Browser](https://love2d.org/wiki/WheelJoint:getSpringFrequency) ---- ----@return number freq # The frequency in hertz. -function WheelJoint:getSpringFrequency() end - ---- ----Checks if the joint motor is running. ---- ---- ----[Open in Browser](https://love2d.org/wiki/WheelJoint:isMotorEnabled) ---- ----@return boolean on # The status of the joint motor. -function WheelJoint:isMotorEnabled() end - ---- ----Sets a new maximum motor torque. ---- ---- ----[Open in Browser](https://love2d.org/wiki/WheelJoint:setMaxMotorTorque) ---- ----@param maxTorque number # The new maximum torque for the joint motor in newton meters. -function WheelJoint:setMaxMotorTorque(maxTorque) end - ---- ----Starts and stops the joint motor. ---- ---- ----[Open in Browser](https://love2d.org/wiki/WheelJoint:setMotorEnabled) ---- ----@param enable boolean # True turns the motor on and false turns it off. -function WheelJoint:setMotorEnabled(enable) end - ---- ----Sets a new speed for the motor. ---- ---- ----[Open in Browser](https://love2d.org/wiki/WheelJoint:setMotorSpeed) ---- ----@param speed number # The new speed for the joint motor in radians per second. -function WheelJoint:setMotorSpeed(speed) end - ---- ----Sets a new damping ratio. ---- ---- ----[Open in Browser](https://love2d.org/wiki/WheelJoint:setSpringDampingRatio) ---- ----@param ratio number # The new damping ratio. -function WheelJoint:setSpringDampingRatio(ratio) end - ---- ----Sets a new spring frequency. ---- ---- ----[Open in Browser](https://love2d.org/wiki/WheelJoint:setSpringFrequency) ---- ----@param freq number # The new frequency in hertz. -function WheelJoint:setSpringFrequency(freq) end - ---- ----A world is an object that contains all bodies and joints. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.physics) ---- ----@class love.World: love.Object -local World = {} - ---- ----Destroys the world, taking all bodies, joints, fixtures and their shapes with it. ---- ----An error will occur if you attempt to use any of the destroyed objects after calling this function. ---- ---- ----[Open in Browser](https://love2d.org/wiki/World:destroy) ---- -function World:destroy() end - ---- ----Returns a table with all bodies. ---- ---- ----[Open in Browser](https://love2d.org/wiki/World:getBodies) ---- ----@return table bodies # A sequence with all bodies. -function World:getBodies() end - ---- ----Returns the number of bodies in the world. ---- ---- ----[Open in Browser](https://love2d.org/wiki/World:getBodyCount) ---- ----@return number n # The number of bodies in the world. -function World:getBodyCount() end - ---- ----Returns functions for the callbacks during the world update. ---- ---- ----[Open in Browser](https://love2d.org/wiki/World:getCallbacks) ---- ----@return function beginContact # Gets called when two fixtures begin to overlap. ----@return function endContact # Gets called when two fixtures cease to overlap. ----@return function preSolve # Gets called before a collision gets resolved. ----@return function postSolve # Gets called after the collision has been resolved. -function World:getCallbacks() end - ---- ----Returns the number of contacts in the world. ---- ---- ----[Open in Browser](https://love2d.org/wiki/World:getContactCount) ---- ----@return number n # The number of contacts in the world. -function World:getContactCount() end - ---- ----Returns the function for collision filtering. ---- ---- ----[Open in Browser](https://love2d.org/wiki/World:getContactFilter) ---- ----@return function contactFilter # The function that handles the contact filtering. -function World:getContactFilter() end - ---- ----Returns a table with all Contacts. ---- ---- ----[Open in Browser](https://love2d.org/wiki/World:getContacts) ---- ----@return table contacts # A sequence with all Contacts. -function World:getContacts() end - ---- ----Get the gravity of the world. ---- ---- ----[Open in Browser](https://love2d.org/wiki/World:getGravity) ---- ----@return number x # The x component of gravity. ----@return number y # The y component of gravity. -function World:getGravity() end - ---- ----Returns the number of joints in the world. ---- ---- ----[Open in Browser](https://love2d.org/wiki/World:getJointCount) ---- ----@return number n # The number of joints in the world. -function World:getJointCount() end - ---- ----Returns a table with all joints. ---- ---- ----[Open in Browser](https://love2d.org/wiki/World:getJoints) ---- ----@return table joints # A sequence with all joints. -function World:getJoints() end - ---- ----Gets whether the World is destroyed. Destroyed worlds cannot be used. ---- ---- ----[Open in Browser](https://love2d.org/wiki/World:isDestroyed) ---- ----@return boolean destroyed # Whether the World is destroyed. -function World:isDestroyed() end - ---- ----Returns if the world is updating its state. ---- ----This will return true inside the callbacks from World:setCallbacks. ---- ---- ----[Open in Browser](https://love2d.org/wiki/World:isLocked) ---- ----@return boolean locked # Will be true if the world is in the process of updating its state. -function World:isLocked() end - ---- ----Gets the sleep behaviour of the world. ---- ---- ----[Open in Browser](https://love2d.org/wiki/World:isSleepingAllowed) ---- ----@return boolean allow # True if bodies in the world are allowed to sleep, or false if not. -function World:isSleepingAllowed() end - ---- ----Calls a function for each fixture inside the specified area by searching for any overlapping bounding box (Fixture:getBoundingBox). ---- ---- ----[Open in Browser](https://love2d.org/wiki/World:queryBoundingBox) ---- ----@param topLeftX number # The x position of the top-left point. ----@param topLeftY number # The y position of the top-left point. ----@param bottomRightX number # The x position of the bottom-right point. ----@param bottomRightY number # The y position of the bottom-right point. ----@param callback function # This function gets passed one argument, the fixture, and should return a boolean. The search will continue if it is true or stop if it is false. -function World:queryBoundingBox(topLeftX, topLeftY, bottomRightX, bottomRightY, callback) end - ---- ----Casts a ray and calls a function for each fixtures it intersects. ---- ---- ----[Open in Browser](https://love2d.org/wiki/World:rayCast) ---- ----@param x1 number # The x position of the starting point of the ray. ----@param y1 number # The x position of the starting point of the ray. ----@param x2 number # The x position of the end point of the ray. ----@param y2 number # The x value of the surface normal vector of the shape edge. ----@param callback function # A function called for each fixture intersected by the ray. The function gets six arguments and should return a number as a control value. The intersection points fed into the function will be in an arbitrary order. If you wish to find the closest point of intersection, you'll need to do that yourself within the function. The easiest way to do that is by using the fraction value. -function World:rayCast(x1, y1, x2, y2, callback) end - ---- ----Sets functions for the collision callbacks during the world update. ---- ----Four Lua functions can be given as arguments. The value nil removes a function. ---- ----When called, each function will be passed three arguments. The first two arguments are the colliding fixtures and the third argument is the Contact between them. The postSolve callback additionally gets the normal and tangent impulse for each contact point. See notes. ---- ----If you are interested to know when exactly each callback is called, consult a Box2d manual ---- ---- ----[Open in Browser](https://love2d.org/wiki/World:setCallbacks) ---- ----@param beginContact function # Gets called when two fixtures begin to overlap. ----@param endContact function # Gets called when two fixtures cease to overlap. This will also be called outside of a world update, when colliding objects are destroyed. ----@param preSolve? function # Gets called before a collision gets resolved. ----@param postSolve? function # Gets called after the collision has been resolved. -function World:setCallbacks(beginContact, endContact, preSolve, postSolve) end - ---- ----Sets a function for collision filtering. ---- ----If the group and category filtering doesn't generate a collision decision, this function gets called with the two fixtures as arguments. The function should return a boolean value where true means the fixtures will collide and false means they will pass through each other. ---- ---- ----[Open in Browser](https://love2d.org/wiki/World:setContactFilter) ---- ----@param filter function # The function handling the contact filtering. -function World:setContactFilter(filter) end - ---- ----Set the gravity of the world. ---- ---- ----[Open in Browser](https://love2d.org/wiki/World:setGravity) ---- ----@param x number # The x component of gravity. ----@param y number # The y component of gravity. -function World:setGravity(x, y) end - ---- ----Sets the sleep behaviour of the world. ---- ---- ----[Open in Browser](https://love2d.org/wiki/World:setSleepingAllowed) ---- ----@param allow boolean # True if bodies in the world are allowed to sleep, or false if not. -function World:setSleepingAllowed(allow) end - ---- ----Translates the World's origin. Useful in large worlds where floating point precision issues become noticeable at far distances from the origin. ---- ---- ----[Open in Browser](https://love2d.org/wiki/World:translateOrigin) ---- ----@param x number # The x component of the new origin with respect to the old origin. ----@param y number # The y component of the new origin with respect to the old origin. -function World:translateOrigin(x, y) end - ---- ----Update the state of the world. ---- ---- ----[Open in Browser](https://love2d.org/wiki/World:update) ---- ----@param dt number # The time (in seconds) to advance the physics simulation. ----@param velocityiterations? number # The maximum number of steps used to determine the new velocities when resolving a collision. ----@param positioniterations? number # The maximum number of steps used to determine the new positions when resolving a collision. -function World:update(dt, velocityiterations, positioniterations) end - ---- ----The types of a Body. ---- ---- ----[Open in Browser](https://love2d.org/wiki/BodyType) ---- ----@alias love.BodyType ---- ----Static bodies do not move. ---- ----| "static" ---- ----Dynamic bodies collide with all bodies. ---- ----| "dynamic" ---- ----Kinematic bodies only collide with dynamic bodies. ---- ----| "kinematic" - ---- ----Different types of joints. ---- ---- ----[Open in Browser](https://love2d.org/wiki/JointType) ---- ----@alias love.JointType ---- ----A DistanceJoint. ---- ----| "distance" ---- ----A FrictionJoint. ---- ----| "friction" ---- ----A GearJoint. ---- ----| "gear" ---- ----A MouseJoint. ---- ----| "mouse" ---- ----A PrismaticJoint. ---- ----| "prismatic" ---- ----A PulleyJoint. ---- ----| "pulley" ---- ----A RevoluteJoint. ---- ----| "revolute" ---- ----A RopeJoint. ---- ----| "rope" ---- ----A WeldJoint. ---- ----| "weld" - ---- ----The different types of Shapes, as returned by Shape:getType. ---- ---- ----[Open in Browser](https://love2d.org/wiki/ShapeType) ---- ----@alias love.ShapeType ---- ----The Shape is a CircleShape. ---- ----| "circle" ---- ----The Shape is a PolygonShape. ---- ----| "polygon" ---- ----The Shape is a EdgeShape. ---- ----| "edge" ---- ----The Shape is a ChainShape. ---- ----| "chain" diff --git a/meta/3rd/love2d/library/love/sound.lua b/meta/3rd/love2d/library/love/sound.lua deleted file mode 100644 index bbe47d10..00000000 --- a/meta/3rd/love2d/library/love/sound.lua +++ /dev/null @@ -1,189 +0,0 @@ ----@meta - ---- ----This module is responsible for decoding sound files. It can't play the sounds, see love.audio for that. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.sound) ---- ----@class love.sound -love.sound = {} - ---- ----Attempts to find a decoder for the encoded sound data in the specified file. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.sound.newDecoder) ---- ----@overload fun(filename: string, buffer?: number):love.Decoder ----@param file love.File # The file with encoded sound data. ----@param buffer? number # The size of each decoded chunk, in bytes. ----@return love.Decoder decoder # A new Decoder object. -function love.sound.newDecoder(file, buffer) end - ---- ----Creates new SoundData from a filepath, File, or Decoder. It's also possible to create SoundData with a custom sample rate, channel and bit depth. ---- ----The sound data will be decoded to the memory in a raw format. It is recommended to create only short sounds like effects, as a 3 minute song uses 30 MB of memory this way. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.sound.newSoundData) ---- ----@overload fun(file: love.File):love.SoundData ----@overload fun(decoder: love.Decoder):love.SoundData ----@overload fun(samples: number, rate?: number, bits?: number, channels?: number):love.SoundData ----@param filename string # The file name of the file to load. ----@return love.SoundData soundData # A new SoundData object. -function love.sound.newSoundData(filename) end - ---- ----An object which can gradually decode a sound file. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.sound) ---- ----@class love.Decoder: love.Object -local Decoder = {} - ---- ----Creates a new copy of current decoder. ---- ----The new decoder will start decoding from the beginning of the audio stream. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Decoder:clone) ---- ----@return love.Decoder decoder # New copy of the decoder. -function Decoder:clone() end - ---- ----Decodes the audio and returns a SoundData object containing the decoded audio data. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Decoder:decode) ---- ----@return love.SoundData soundData # Decoded audio data. -function Decoder:decode() end - ---- ----Returns the number of bits per sample. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Decoder:getBitDepth) ---- ----@return number bitDepth # Either 8, or 16. -function Decoder:getBitDepth() end - ---- ----Returns the number of channels in the stream. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Decoder:getChannelCount) ---- ----@return number channels # 1 for mono, 2 for stereo. -function Decoder:getChannelCount() end - ---- ----Gets the duration of the sound file. It may not always be sample-accurate, and it may return -1 if the duration cannot be determined at all. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Decoder:getDuration) ---- ----@return number duration # The duration of the sound file in seconds, or -1 if it cannot be determined. -function Decoder:getDuration() end - ---- ----Returns the sample rate of the Decoder. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Decoder:getSampleRate) ---- ----@return number rate # Number of samples per second. -function Decoder:getSampleRate() end - ---- ----Sets the currently playing position of the Decoder. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Decoder:seek) ---- ----@param offset number # The position to seek to, in seconds. -function Decoder:seek(offset) end - ---- ----Contains raw audio samples. ---- ----You can not play SoundData back directly. You must wrap a Source object around it. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.sound) ---- ----@class love.SoundData: love.Data, love.Object -local SoundData = {} - ---- ----Returns the number of bits per sample. ---- ---- ----[Open in Browser](https://love2d.org/wiki/SoundData:getBitDepth) ---- ----@return number bitdepth # Either 8, or 16. -function SoundData:getBitDepth() end - ---- ----Returns the number of channels in the SoundData. ---- ---- ----[Open in Browser](https://love2d.org/wiki/SoundData:getChannelCount) ---- ----@return number channels # 1 for mono, 2 for stereo. -function SoundData:getChannelCount() end - ---- ----Gets the duration of the sound data. ---- ---- ----[Open in Browser](https://love2d.org/wiki/SoundData:getDuration) ---- ----@return number duration # The duration of the sound data in seconds. -function SoundData:getDuration() end - ---- ----Gets the value of the sample-point at the specified position. For stereo SoundData objects, the data from the left and right channels are interleaved in that order. ---- ---- ----[Open in Browser](https://love2d.org/wiki/SoundData:getSample) ---- ----@overload fun(self: love.SoundData, i: number, channel: number):number ----@param i number # An integer value specifying the position of the sample (starting at 0). ----@return number sample # The normalized samplepoint (range -1.0 to 1.0). -function SoundData:getSample(i) end - ---- ----Returns the number of samples per channel of the SoundData. ---- ---- ----[Open in Browser](https://love2d.org/wiki/SoundData:getSampleCount) ---- ----@return number count # Total number of samples. -function SoundData:getSampleCount() end - ---- ----Returns the sample rate of the SoundData. ---- ---- ----[Open in Browser](https://love2d.org/wiki/SoundData:getSampleRate) ---- ----@return number rate # Number of samples per second. -function SoundData:getSampleRate() end - ---- ----Sets the value of the sample-point at the specified position. For stereo SoundData objects, the data from the left and right channels are interleaved in that order. ---- ---- ----[Open in Browser](https://love2d.org/wiki/SoundData:setSample) ---- ----@overload fun(self: love.SoundData, i: number, channel: number, sample: number) ----@param i number # An integer value specifying the position of the sample (starting at 0). ----@param sample number # The normalized samplepoint (range -1.0 to 1.0). -function SoundData:setSample(i, sample) end diff --git a/meta/3rd/love2d/library/love/system.lua b/meta/3rd/love2d/library/love/system.lua deleted file mode 100644 index 945d689d..00000000 --- a/meta/3rd/love2d/library/love/system.lua +++ /dev/null @@ -1,115 +0,0 @@ ----@meta - ---- ----Provides access to information about the user's system. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.system) ---- ----@class love.system -love.system = {} - ---- ----Gets text from the clipboard. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.system.getClipboardText) ---- ----@return string text # The text currently held in the system's clipboard. -function love.system.getClipboardText() end - ---- ----Gets the current operating system. In general, LÖVE abstracts away the need to know the current operating system, but there are a few cases where it can be useful (especially in combination with os.execute.) ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.system.getOS) ---- ----@return string osString # The current operating system. 'OS X', 'Windows', 'Linux', 'Android' or 'iOS'. -function love.system.getOS() end - ---- ----Gets information about the system's power supply. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.system.getPowerInfo) ---- ----@return love.PowerState state # The basic state of the power supply. ----@return number percent # Percentage of battery life left, between 0 and 100. nil if the value can't be determined or there's no battery. ----@return number seconds # Seconds of battery life left. nil if the value can't be determined or there's no battery. -function love.system.getPowerInfo() end - ---- ----Gets the amount of logical processor in the system. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.system.getProcessorCount) ---- ----@return number processorCount # Amount of logical processors. -function love.system.getProcessorCount() end - ---- ----Gets whether another application on the system is playing music in the background. ---- ----Currently this is implemented on iOS and Android, and will always return false on other operating systems. The t.audio.mixwithsystem flag in love.conf can be used to configure whether background audio / music from other apps should play while LÖVE is open. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.system.hasBackgroundMusic) ---- ----@return boolean backgroundmusic # True if the user is playing music in the background via another app, false otherwise. -function love.system.hasBackgroundMusic() end - ---- ----Opens a URL with the user's web or file browser. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.system.openURL) ---- ----@param url string # The URL to open. Must be formatted as a proper URL. ----@return boolean success # Whether the URL was opened successfully. -function love.system.openURL(url) end - ---- ----Puts text in the clipboard. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.system.setClipboardText) ---- ----@param text string # The new text to hold in the system's clipboard. -function love.system.setClipboardText(text) end - ---- ----Causes the device to vibrate, if possible. Currently this will only work on Android and iOS devices that have a built-in vibration motor. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.system.vibrate) ---- ----@param seconds? number # The duration to vibrate for. If called on an iOS device, it will always vibrate for 0.5 seconds due to limitations in the iOS system APIs. -function love.system.vibrate(seconds) end - ---- ----The basic state of the system's power supply. ---- ---- ----[Open in Browser](https://love2d.org/wiki/PowerState) ---- ----@alias love.PowerState ---- ----Cannot determine power status. ---- ----| "unknown" ---- ----Not plugged in, running on a battery. ---- ----| "battery" ---- ----Plugged in, no battery available. ---- ----| "nobattery" ---- ----Plugged in, charging battery. ---- ----| "charging" ---- ----Plugged in, battery is fully charged. ---- ----| "charged" diff --git a/meta/3rd/love2d/library/love/thread.lua b/meta/3rd/love2d/library/love/thread.lua deleted file mode 100644 index 90cf4c5f..00000000 --- a/meta/3rd/love2d/library/love/thread.lua +++ /dev/null @@ -1,210 +0,0 @@ ----@meta - ---- ----Allows you to work with threads. ---- ----Threads are separate Lua environments, running in parallel to the main code. As their code runs separately, they can be used to compute complex operations without adversely affecting the frame rate of the main thread. However, as they are separate environments, they cannot access the variables and functions of the main thread, and communication between threads is limited. ---- ----All LOVE objects (userdata) are shared among threads so you'll only have to send their references across threads. You may run into concurrency issues if you manipulate an object on multiple threads at the same time. ---- ----When a Thread is started, it only loads the love.thread module. Every other module has to be loaded with require. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.thread) ---- ----@class love.thread -love.thread = {} - ---- ----Creates or retrieves a named thread channel. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.thread.getChannel) ---- ----@param name string # The name of the channel you want to create or retrieve. ----@return love.Channel channel # The Channel object associated with the name. -function love.thread.getChannel(name) end - ---- ----Create a new unnamed thread channel. ---- ----One use for them is to pass new unnamed channels to other threads via Channel:push on a named channel. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.thread.newChannel) ---- ----@return love.Channel channel # The new Channel object. -function love.thread.newChannel() end - ---- ----Creates a new Thread from a filename, string or FileData object containing Lua code. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.thread.newThread) ---- ----@overload fun(fileData: love.FileData):love.Thread ----@overload fun(codestring: string):love.Thread ----@param filename string # The name of the Lua file to use as the source. ----@return love.Thread thread # A new Thread that has yet to be started. -function love.thread.newThread(filename) end - ---- ----An object which can be used to send and receive data between different threads. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.thread) ---- ----@class love.Channel: love.Object -local Channel = {} - ---- ----Clears all the messages in the Channel queue. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Channel:clear) ---- -function Channel:clear() end - ---- ----Retrieves the value of a Channel message and removes it from the message queue. ---- ----It waits until a message is in the queue then returns the message value. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Channel:demand) ---- ----@overload fun(self: love.Channel, timeout: number):any ----@return any value # The contents of the message. -function Channel:demand() end - ---- ----Retrieves the number of messages in the thread Channel queue. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Channel:getCount) ---- ----@return number count # The number of messages in the queue. -function Channel:getCount() end - ---- ----Gets whether a pushed value has been popped or otherwise removed from the Channel. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Channel:hasRead) ---- ----@param id number # An id value previously returned by Channel:push. ----@return boolean hasread # Whether the value represented by the id has been removed from the Channel via Channel:pop, Channel:demand, or Channel:clear. -function Channel:hasRead(id) end - ---- ----Retrieves the value of a Channel message, but leaves it in the queue. ---- ----It returns nil if there's no message in the queue. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Channel:peek) ---- ----@return any value # The contents of the message. -function Channel:peek() end - ---- ----Executes the specified function atomically with respect to this Channel. ---- ----Calling multiple methods in a row on the same Channel is often useful. However if multiple Threads are calling this Channel's methods at the same time, the different calls on each Thread might end up interleaved (e.g. one or more of the second thread's calls may happen in between the first thread's calls.) ---- ----This method avoids that issue by making sure the Thread calling the method has exclusive access to the Channel until the specified function has returned. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Channel:performAtomic) ---- ----@param func function # The function to call, the form of function(channel, arg1, arg2, ...) end. The Channel is passed as the first argument to the function when it is called. ----@param arg1 any # Additional arguments that the given function will receive when it is called. ----@vararg any # Additional arguments that the given function will receive when it is called. ----@return any ret1 # The first return value of the given function (if any.) -function Channel:performAtomic(func, arg1, ...) end - ---- ----Retrieves the value of a Channel message and removes it from the message queue. ---- ----It returns nil if there are no messages in the queue. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Channel:pop) ---- ----@return any value # The contents of the message. -function Channel:pop() end - ---- ----Send a message to the thread Channel. ---- ----See Variant for the list of supported types. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Channel:push) ---- ----@param value any # The contents of the message. ----@return number id # Identifier which can be supplied to Channel:hasRead -function Channel:push(value) end - ---- ----Send a message to the thread Channel and wait for a thread to accept it. ---- ----See Variant for the list of supported types. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Channel:supply) ---- ----@overload fun(self: love.Channel, value: any, timeout: number):boolean ----@param value any # The contents of the message. ----@return boolean success # Whether the message was successfully supplied (always true). -function Channel:supply(value) end - ---- ----A Thread is a chunk of code that can run in parallel with other threads. Data can be sent between different threads with Channel objects. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.thread) ---- ----@class love.Thread: love.Object -local Thread = {} - ---- ----Retrieves the error string from the thread if it produced an error. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Thread:getError) ---- ----@return string err # The error message, or nil if the Thread has not caused an error. -function Thread:getError() end - ---- ----Returns whether the thread is currently running. ---- ----Threads which are not running can be (re)started with Thread:start. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Thread:isRunning) ---- ----@return boolean value # True if the thread is running, false otherwise. -function Thread:isRunning() end - ---- ----Starts the thread. ---- ----Beginning with version 0.9.0, threads can be restarted after they have completed their execution. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Thread:start) ---- ----@overload fun(self: love.Thread, arg1: any, arg2: any, ...) -function Thread:start() end - ---- ----Wait for a thread to finish. ---- ----This call will block until the thread finishes. ---- ---- ----[Open in Browser](https://love2d.org/wiki/Thread:wait) ---- -function Thread:wait() end diff --git a/meta/3rd/love2d/library/love/timer.lua b/meta/3rd/love2d/library/love/timer.lua deleted file mode 100644 index f36d4ca5..00000000 --- a/meta/3rd/love2d/library/love/timer.lua +++ /dev/null @@ -1,68 +0,0 @@ ----@meta - ---- ----Provides an interface to the user's clock. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.timer) ---- ----@class love.timer -love.timer = {} - ---- ----Returns the average delta time (seconds per frame) over the last second. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.timer.getAverageDelta) ---- ----@return number delta # The average delta time over the last second. -function love.timer.getAverageDelta() end - ---- ----Returns the time between the last two frames. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.timer.getDelta) ---- ----@return number dt # The time passed (in seconds). -function love.timer.getDelta() end - ---- ----Returns the current frames per second. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.timer.getFPS) ---- ----@return number fps # The current FPS. -function love.timer.getFPS() end - ---- ----Returns the value of a timer with an unspecified starting time. ---- ----This function should only be used to calculate differences between points in time, as the starting time of the timer is unknown. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.timer.getTime) ---- ----@return number time # The time in seconds. Given as a decimal, accurate to the microsecond. -function love.timer.getTime() end - ---- ----Pauses the current thread for the specified amount of time. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.timer.sleep) ---- ----@param s number # Seconds to sleep for. -function love.timer.sleep(s) end - ---- ----Measures the time between two frames. ---- ----Calling this changes the return value of love.timer.getDelta. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.timer.step) ---- ----@return number dt # The time passed (in seconds). -function love.timer.step() end diff --git a/meta/3rd/love2d/library/love/touch.lua b/meta/3rd/love2d/library/love/touch.lua deleted file mode 100644 index bacf8e30..00000000 --- a/meta/3rd/love2d/library/love/touch.lua +++ /dev/null @@ -1,40 +0,0 @@ ----@meta - ---- ----Provides an interface to touch-screen presses. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.touch) ---- ----@class love.touch -love.touch = {} - ---- ----Gets the current position of the specified touch-press, in pixels. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.touch.getPosition) ---- ----@param id lightuserdata # The identifier of the touch-press. Use love.touch.getTouches, love.touchpressed, or love.touchmoved to obtain touch id values. ----@return number x # The position along the x-axis of the touch-press inside the window, in pixels. ----@return number y # The position along the y-axis of the touch-press inside the window, in pixels. -function love.touch.getPosition(id) end - ---- ----Gets the current pressure of the specified touch-press. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.touch.getPressure) ---- ----@param id lightuserdata # The identifier of the touch-press. Use love.touch.getTouches, love.touchpressed, or love.touchmoved to obtain touch id values. ----@return number pressure # The pressure of the touch-press. Most touch screens aren't pressure sensitive, in which case the pressure will be 1. -function love.touch.getPressure(id) end - ---- ----Gets a list of all active touch-presses. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.touch.getTouches) ---- ----@return table touches # A list of active touch-press id values, which can be used with love.touch.getPosition. -function love.touch.getTouches() end diff --git a/meta/3rd/love2d/library/love/video.lua b/meta/3rd/love2d/library/love/video.lua deleted file mode 100644 index f53da710..00000000 --- a/meta/3rd/love2d/library/love/video.lua +++ /dev/null @@ -1,92 +0,0 @@ ----@meta - ---- ----This module is responsible for decoding, controlling, and streaming video files. ---- ----It can't draw the videos, see love.graphics.newVideo and Video objects for that. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.video) ---- ----@class love.video -love.video = {} - ---- ----Creates a new VideoStream. Currently only Ogg Theora video files are supported. VideoStreams can't draw videos, see love.graphics.newVideo for that. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.video.newVideoStream) ---- ----@overload fun(file: love.File):love.VideoStream ----@param filename string # The file path to the Ogg Theora video file. ----@return love.VideoStream videostream # A new VideoStream. -function love.video.newVideoStream(filename) end - ---- ----An object which decodes, streams, and controls Videos. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.video) ---- ----@class love.VideoStream: love.Object -local VideoStream = {} - ---- ----Gets the filename of the VideoStream. ---- ---- ----[Open in Browser](https://love2d.org/wiki/VideoStream:getFilename) ---- ----@return string filename # The filename of the VideoStream -function VideoStream:getFilename() end - ---- ----Gets whether the VideoStream is playing. ---- ---- ----[Open in Browser](https://love2d.org/wiki/VideoStream:isPlaying) ---- ----@return boolean playing # Whether the VideoStream is playing. -function VideoStream:isPlaying() end - ---- ----Pauses the VideoStream. ---- ---- ----[Open in Browser](https://love2d.org/wiki/VideoStream:pause) ---- -function VideoStream:pause() end - ---- ----Plays the VideoStream. ---- ---- ----[Open in Browser](https://love2d.org/wiki/VideoStream:play) ---- -function VideoStream:play() end - ---- ----Rewinds the VideoStream. Synonym to VideoStream:seek(0). ---- ---- ----[Open in Browser](https://love2d.org/wiki/VideoStream:rewind) ---- -function VideoStream:rewind() end - ---- ----Sets the current playback position of the VideoStream. ---- ---- ----[Open in Browser](https://love2d.org/wiki/VideoStream:seek) ---- ----@param offset number # The time in seconds since the beginning of the VideoStream. -function VideoStream:seek(offset) end - ---- ----Gets the current playback position of the VideoStream. ---- ---- ----[Open in Browser](https://love2d.org/wiki/VideoStream:tell) ---- ----@return number seconds # The number of seconds sionce the beginning of the VideoStream. -function VideoStream:tell() end diff --git a/meta/3rd/love2d/library/love/window.lua b/meta/3rd/love2d/library/love/window.lua deleted file mode 100644 index bbf87533..00000000 --- a/meta/3rd/love2d/library/love/window.lua +++ /dev/null @@ -1,473 +0,0 @@ ----@meta - ---- ----Provides an interface for modifying and retrieving information about the program's window. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.window) ---- ----@class love.window -love.window = {} - ---- ----Closes the window. It can be reopened with love.window.setMode. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.window.close) ---- -function love.window.close() end - ---- ----Converts a number from pixels to density-independent units. ---- ----The pixel density inside the window might be greater (or smaller) than the 'size' of the window. For example on a retina screen in Mac OS X with the highdpi window flag enabled, the window may take up the same physical size as an 800x600 window, but the area inside the window uses 1600x1200 pixels. love.window.fromPixels(1600) would return 800 in that case. ---- ----This function converts coordinates from pixels to the size users are expecting them to display at onscreen. love.window.toPixels does the opposite. The highdpi window flag must be enabled to use the full pixel density of a Retina screen on Mac OS X and iOS. The flag currently does nothing on Windows and Linux, and on Android it is effectively always enabled. ---- ----Most LÖVE functions return values and expect arguments in terms of pixels rather than density-independent units. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.window.fromPixels) ---- ----@overload fun(px: number, py: number):number, number ----@param pixelvalue number # A number in pixels to convert to density-independent units. ----@return number value # The converted number, in density-independent units. -function love.window.fromPixels(pixelvalue) end - ---- ----Gets the DPI scale factor associated with the window. ---- ----The pixel density inside the window might be greater (or smaller) than the 'size' of the window. For example on a retina screen in Mac OS X with the highdpi window flag enabled, the window may take up the same physical size as an 800x600 window, but the area inside the window uses 1600x1200 pixels. love.window.getDPIScale() would return 2.0 in that case. ---- ----The love.window.fromPixels and love.window.toPixels functions can also be used to convert between units. ---- ----The highdpi window flag must be enabled to use the full pixel density of a Retina screen on Mac OS X and iOS. The flag currently does nothing on Windows and Linux, and on Android it is effectively always enabled. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.window.getDPIScale) ---- ----@return number scale # The pixel scale factor associated with the window. -function love.window.getDPIScale() end - ---- ----Gets the width and height of the desktop. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.window.getDesktopDimensions) ---- ----@param displayindex? number # The index of the display, if multiple monitors are available. ----@return string width # The width of the desktop. ----@return string height # The height of the desktop. -function love.window.getDesktopDimensions(displayindex) end - ---- ----Gets the number of connected monitors. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.window.getDisplayCount) ---- ----@return number count # The number of currently connected displays. -function love.window.getDisplayCount() end - ---- ----Gets the name of a display. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.window.getDisplayName) ---- ----@param displayindex? number # The index of the display to get the name of. ----@return string name # The name of the specified display. -function love.window.getDisplayName(displayindex) end - ---- ----Gets current device display orientation. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.window.getDisplayOrientation) ---- ----@param displayindex? number # Display index to get its display orientation, or nil for default display index. ----@return love.DisplayOrientation orientation # Current device display orientation. -function love.window.getDisplayOrientation(displayindex) end - ---- ----Gets whether the window is fullscreen. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.window.getFullscreen) ---- ----@return boolean fullscreen # True if the window is fullscreen, false otherwise. ----@return love.FullscreenType fstype # The type of fullscreen mode used. -function love.window.getFullscreen() end - ---- ----Gets a list of supported fullscreen modes. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.window.getFullscreenModes) ---- ----@param displayindex? number # The index of the display, if multiple monitors are available. ----@return table modes # A table of width/height pairs. (Note that this may not be in order.) -function love.window.getFullscreenModes(displayindex) end - ---- ----Gets the window icon. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.window.getIcon) ---- ----@return love.ImageData imagedata # The window icon imagedata, or nil if no icon has been set with love.window.setIcon. -function love.window.getIcon() end - ---- ----Gets the display mode and properties of the window. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.window.getMode) ---- ----@return number width # Window width. ----@return number height # Window height. ----@return {fullscreen: boolean, fullscreentype: love.FullscreenType, vsync: boolean, msaa: number, resizable: boolean, borderless: boolean, centered: boolean, display: number, minwidth: number, minheight: number, highdpi: boolean, refreshrate: number, x: number, y: number, srgb: boolean} flags # Table with the window properties: -function love.window.getMode() end - ---- ----Gets the position of the window on the screen. ---- ----The window position is in the coordinate space of the display it is currently in. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.window.getPosition) ---- ----@return number x # The x-coordinate of the window's position. ----@return number y # The y-coordinate of the window's position. ----@return number displayindex # The index of the display that the window is in. -function love.window.getPosition() end - ---- ----Gets area inside the window which is known to be unobstructed by a system title bar, the iPhone X notch, etc. Useful for making sure UI elements can be seen by the user. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.window.getSafeArea) ---- ----@return number x # Starting position of safe area (x-axis). ----@return number y # Starting position of safe area (y-axis). ----@return number w # Width of safe area. ----@return number h # Height of safe area. -function love.window.getSafeArea() end - ---- ----Gets the window title. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.window.getTitle) ---- ----@return string title # The current window title. -function love.window.getTitle() end - ---- ----Gets current vertical synchronization (vsync). ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.window.getVSync) ---- ----@return number vsync # Current vsync status. 1 if enabled, 0 if disabled, and -1 for adaptive vsync. -function love.window.getVSync() end - ---- ----Checks if the game window has keyboard focus. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.window.hasFocus) ---- ----@return boolean focus # True if the window has the focus or false if not. -function love.window.hasFocus() end - ---- ----Checks if the game window has mouse focus. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.window.hasMouseFocus) ---- ----@return boolean focus # True if the window has mouse focus or false if not. -function love.window.hasMouseFocus() end - ---- ----Gets whether the display is allowed to sleep while the program is running. ---- ----Display sleep is disabled by default. Some types of input (e.g. joystick button presses) might not prevent the display from sleeping, if display sleep is allowed. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.window.isDisplaySleepEnabled) ---- ----@return boolean enabled # True if system display sleep is enabled / allowed, false otherwise. -function love.window.isDisplaySleepEnabled() end - ---- ----Gets whether the Window is currently maximized. ---- ----The window can be maximized if it is not fullscreen and is resizable, and either the user has pressed the window's Maximize button or love.window.maximize has been called. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.window.isMaximized) ---- ----@return boolean maximized # True if the window is currently maximized in windowed mode, false otherwise. -function love.window.isMaximized() end - ---- ----Gets whether the Window is currently minimized. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.window.isMinimized) ---- ----@return boolean minimized # True if the window is currently minimized, false otherwise. -function love.window.isMinimized() end - ---- ----Checks if the window is open. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.window.isOpen) ---- ----@return boolean open # True if the window is open, false otherwise. -function love.window.isOpen() end - ---- ----Checks if the game window is visible. ---- ----The window is considered visible if it's not minimized and the program isn't hidden. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.window.isVisible) ---- ----@return boolean visible # True if the window is visible or false if not. -function love.window.isVisible() end - ---- ----Makes the window as large as possible. ---- ----This function has no effect if the window isn't resizable, since it essentially programmatically presses the window's 'maximize' button. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.window.maximize) ---- -function love.window.maximize() end - ---- ----Minimizes the window to the system's task bar / dock. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.window.minimize) ---- -function love.window.minimize() end - ---- ----Causes the window to request the attention of the user if it is not in the foreground. ---- ----In Windows the taskbar icon will flash, and in OS X the dock icon will bounce. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.window.requestAttention) ---- ----@param continuous? boolean # Whether to continuously request attention until the window becomes active, or to do it only once. -function love.window.requestAttention(continuous) end - ---- ----Restores the size and position of the window if it was minimized or maximized. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.window.restore) ---- -function love.window.restore() end - ---- ----Sets whether the display is allowed to sleep while the program is running. ---- ----Display sleep is disabled by default. Some types of input (e.g. joystick button presses) might not prevent the display from sleeping, if display sleep is allowed. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.window.setDisplaySleepEnabled) ---- ----@param enable boolean # True to enable system display sleep, false to disable it. -function love.window.setDisplaySleepEnabled(enable) end - ---- ----Enters or exits fullscreen. The display to use when entering fullscreen is chosen based on which display the window is currently in, if multiple monitors are connected. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.window.setFullscreen) ---- ----@overload fun(fullscreen: boolean, fstype: love.FullscreenType):boolean ----@param fullscreen boolean # Whether to enter or exit fullscreen mode. ----@return boolean success # True if an attempt to enter fullscreen was successful, false otherwise. -function love.window.setFullscreen(fullscreen) end - ---- ----Sets the window icon until the game is quit. Not all operating systems support very large icon images. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.window.setIcon) ---- ----@param imagedata love.ImageData # The window icon image. ----@return boolean success # Whether the icon has been set successfully. -function love.window.setIcon(imagedata) end - ---- ----Sets the display mode and properties of the window. ---- ----If width or height is 0, setMode will use the width and height of the desktop. ---- ----Changing the display mode may have side effects: for example, canvases will be cleared and values sent to shaders with canvases beforehand or re-draw to them afterward if you need to. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.window.setMode) ---- ----@param width number # Display width. ----@param height number # Display height. ----@param flags? {fullscreen: boolean, fullscreentype: love.FullscreenType, vsync: boolean, msaa: number, stencil: boolean, depth: number, resizable: boolean, borderless: boolean, centered: boolean, display: number, minwidth: number, minheight: number, highdpi: boolean, x: number, y: number, usedpiscale: boolean, srgb: boolean} # The flags table with the options: ----@return boolean success # True if successful, false otherwise. -function love.window.setMode(width, height, flags) end - ---- ----Sets the position of the window on the screen. ---- ----The window position is in the coordinate space of the specified display. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.window.setPosition) ---- ----@param x number # The x-coordinate of the window's position. ----@param y number # The y-coordinate of the window's position. ----@param displayindex? number # The index of the display that the new window position is relative to. -function love.window.setPosition(x, y, displayindex) end - ---- ----Sets the window title. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.window.setTitle) ---- ----@param title string # The new window title. -function love.window.setTitle(title) end - ---- ----Sets vertical synchronization mode. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.window.setVSync) ---- ----@param vsync number # VSync number: 1 to enable, 0 to disable, and -1 for adaptive vsync. -function love.window.setVSync(vsync) end - ---- ----Displays a message box dialog above the love window. The message box contains a title, optional text, and buttons. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.window.showMessageBox) ---- ----@overload fun(title: string, message: string, buttonlist: table, type?: love.MessageBoxType, attachtowindow?: boolean):number ----@param title string # The title of the message box. ----@param message string # The text inside the message box. ----@param type? love.MessageBoxType # The type of the message box. ----@param attachtowindow? boolean # Whether the message box should be attached to the love window or free-floating. ----@return boolean success # Whether the message box was successfully displayed. -function love.window.showMessageBox(title, message, type, attachtowindow) end - ---- ----Converts a number from density-independent units to pixels. ---- ----The pixel density inside the window might be greater (or smaller) than the 'size' of the window. For example on a retina screen in Mac OS X with the highdpi window flag enabled, the window may take up the same physical size as an 800x600 window, but the area inside the window uses 1600x1200 pixels. love.window.toPixels(800) would return 1600 in that case. ---- ----This is used to convert coordinates from the size users are expecting them to display at onscreen to pixels. love.window.fromPixels does the opposite. The highdpi window flag must be enabled to use the full pixel density of a Retina screen on Mac OS X and iOS. The flag currently does nothing on Windows and Linux, and on Android it is effectively always enabled. ---- ----Most LÖVE functions return values and expect arguments in terms of pixels rather than density-independent units. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.window.toPixels) ---- ----@overload fun(x: number, y: number):number, number ----@param value number # A number in density-independent units to convert to pixels. ----@return number pixelvalue # The converted number, in pixels. -function love.window.toPixels(value) end - ---- ----Sets the display mode and properties of the window, without modifying unspecified properties. ---- ----If width or height is 0, updateMode will use the width and height of the desktop. ---- ----Changing the display mode may have side effects: for example, canvases will be cleared. Make sure to save the contents of canvases beforehand or re-draw to them afterward if you need to. ---- ---- ----[Open in Browser](https://love2d.org/wiki/love.window.updateMode) ---- ----@param width number # Window width. ----@param height number # Window height. ----@param settings {fullscreen: boolean, fullscreentype: love.FullscreenType, vsync: boolean, msaa: number, resizable: boolean, borderless: boolean, centered: boolean, display: number, minwidth: number, minheight: number, highdpi: boolean, x: number, y: number} # The settings table with the following optional fields. Any field not filled in will use the current value that would be returned by love.window.getMode. ----@return boolean success # True if successful, false otherwise. -function love.window.updateMode(width, height, settings) end - ---- ----Types of device display orientation. ---- ---- ----[Open in Browser](https://love2d.org/wiki/DisplayOrientation) ---- ----@alias love.DisplayOrientation ---- ----Orientation cannot be determined. ---- ----| "unknown" ---- ----Landscape orientation. ---- ----| "landscape" ---- ----Landscape orientation (flipped). ---- ----| "landscapeflipped" ---- ----Portrait orientation. ---- ----| "portrait" ---- ----Portrait orientation (flipped). ---- ----| "portraitflipped" - ---- ----Types of fullscreen modes. ---- ---- ----[Open in Browser](https://love2d.org/wiki/FullscreenType) ---- ----@alias love.FullscreenType ---- ----Sometimes known as borderless fullscreen windowed mode. A borderless screen-sized window is created which sits on top of all desktop UI elements. The window is automatically resized to match the dimensions of the desktop, and its size cannot be changed. ---- ----| "desktop" ---- ----Standard exclusive-fullscreen mode. Changes the display mode (actual resolution) of the monitor. ---- ----| "exclusive" ---- ----Standard exclusive-fullscreen mode. Changes the display mode (actual resolution) of the monitor. ---- ----| "normal" - ---- ----Types of message box dialogs. Different types may have slightly different looks. ---- ---- ----[Open in Browser](https://love2d.org/wiki/MessageBoxType) ---- ----@alias love.MessageBoxType ---- ----Informational dialog. ---- ----| "info" ---- ----Warning dialog. ---- ----| "warning" ---- ----Error dialog. ---- ----| "error" -- cgit v1.2.3 From 0bd15a68b3b864e071da647456653a27001bedfd Mon Sep 17 00:00:00 2001 From: carsakiller Date: Fri, 27 Oct 2023 20:42:08 -0400 Subject: refactor: replace lovr with LuaCATS submodule --- meta/3rd/lovr | 1 + meta/3rd/lovr/config.json | 7 - meta/3rd/lovr/library/callback.lua | 248 -- meta/3rd/lovr/library/lovr.lua | 42 - meta/3rd/lovr/library/lovr/audio.lua | 864 ------- meta/3rd/lovr/library/lovr/data.lua | 1581 ------------ meta/3rd/lovr/library/lovr/event.lua | 430 ---- meta/3rd/lovr/library/lovr/filesystem.lua | 333 --- meta/3rd/lovr/library/lovr/graphics.lua | 3815 ----------------------------- meta/3rd/lovr/library/lovr/headset.lua | 826 ------- meta/3rd/lovr/library/lovr/math.lua | 1268 ---------- meta/3rd/lovr/library/lovr/physics.lua | 1843 -------------- meta/3rd/lovr/library/lovr/system.lua | 136 - meta/3rd/lovr/library/lovr/thread.lua | 170 -- meta/3rd/lovr/library/lovr/timer.lua | 59 - 15 files changed, 1 insertion(+), 11622 deletions(-) create mode 160000 meta/3rd/lovr delete mode 100644 meta/3rd/lovr/config.json delete mode 100644 meta/3rd/lovr/library/callback.lua delete mode 100644 meta/3rd/lovr/library/lovr.lua delete mode 100644 meta/3rd/lovr/library/lovr/audio.lua delete mode 100644 meta/3rd/lovr/library/lovr/data.lua delete mode 100644 meta/3rd/lovr/library/lovr/event.lua delete mode 100644 meta/3rd/lovr/library/lovr/filesystem.lua delete mode 100644 meta/3rd/lovr/library/lovr/graphics.lua delete mode 100644 meta/3rd/lovr/library/lovr/headset.lua delete mode 100644 meta/3rd/lovr/library/lovr/math.lua delete mode 100644 meta/3rd/lovr/library/lovr/physics.lua delete mode 100644 meta/3rd/lovr/library/lovr/system.lua delete mode 100644 meta/3rd/lovr/library/lovr/thread.lua delete mode 100644 meta/3rd/lovr/library/lovr/timer.lua (limited to 'meta') diff --git a/meta/3rd/lovr b/meta/3rd/lovr new file mode 160000 index 00000000..3ba215f9 --- /dev/null +++ b/meta/3rd/lovr @@ -0,0 +1 @@ +Subproject commit 3ba215f98e1647111b50b311d45c31338fdc615f diff --git a/meta/3rd/lovr/config.json b/meta/3rd/lovr/config.json deleted file mode 100644 index 195c7661..00000000 --- a/meta/3rd/lovr/config.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name" : "LÖVR", - "words" : ["lovr%.%w+"], - "settings" : { - "Lua.runtime.version" : "LuaJIT" - } -} diff --git a/meta/3rd/lovr/library/callback.lua b/meta/3rd/lovr/library/callback.lua deleted file mode 100644 index 903a3e8e..00000000 --- a/meta/3rd/lovr/library/callback.lua +++ /dev/null @@ -1,248 +0,0 @@ ----@meta - ---- ----The `lovr.conf` callback lets you configure default settings for LÖVR. ---- ----It is called once right before the game starts. ---- ----Make sure you put `lovr.conf` in a file called `conf.lua`, a special file that's loaded before the rest of the framework initializes. ---- ---- ----### NOTE: ----Disabling unused modules can improve startup time. ---- ----`t.window` can be set to nil to avoid creating the window. ---- ----The window can later be opened manually using `lovr.system.openWindow`. ---- ----Enabling the `t.graphics.debug` flag will add additional error checks and will send messages from the GPU driver to the `lovr.log` callback. ---- ----This will decrease performance but can help provide information on performance problems or other bugs. ---- ----The `headset.offset` field is a vertical offset applied to the scene for headsets that do not center their tracking origin on the floor. ---- ----This can be thought of as a "default user height". Setting this offset makes it easier to design experiences that work in both seated and standing VR configurations. ---- ----@type fun(t: table) -lovr.conf = nil - ---- ----This callback is called every frame, and receives a `Pass` object as an argument which can be used to render graphics to the display. ---- ----If a VR headset is connected, this function renders to the headset display, otherwise it will render to the desktop window. ---- ---- ----### NOTE: ----To render to the desktop window when a VR headset is connected, use the `lovr.mirror` callback. ---- ----The display is cleared to the global background color before this callback is called, which can be changed using `lovr.graphics.setBackgroundColor`. ---- ----Since the `lovr.graphics.submit` function always returns true, the following idiom can be used to submit graphics work manually and override the default submission: ---- ---- function lovr.draw(pass) ---- local passes = {} ---- ---- -- ... record multiple passes and add to passes table ---- ---- return lovr.graphics.submit(passes) ---- end ---- ----@type fun(pass: lovr.Pass):boolean -lovr.draw = nil - ---- ----The `lovr.errhand` callback is run whenever an error occurs. ---- ----It receives a parameter containing the error message. ---- ----It should return a handler function that will run in a loop to render the error screen. ---- ----This handler function is of the same type as the one returned by `lovr.run` and has the same requirements (such as pumping events). ---- ----If an error occurs while this handler is running, the program will terminate immediately -- `lovr.errhand` will not be given a second chance. ---- ----Errors which occur in the error handler or in the handler it returns may not be cleanly reported, so be careful. ---- ----A default error handler is supplied that renders the error message as text to the headset and to the window. ---- ----@type fun(message: string):function -lovr.errhand = nil - ---- ----The `lovr.focus` callback is called whenever the application acquires or loses focus (for example, when opening or closing the Steam dashboard). ---- ----The callback receives a single argument, focused, which is a boolean indicating whether or not the application is now focused. ---- ----It may make sense to pause the game or reduce visual fidelity when the application loses focus. ---- ----@type fun(focused: boolean) -lovr.focus = nil - ---- ----This callback is called when a key is pressed. ---- ----@type fun(key: lovr.KeyCode, scancode: number, repeating: boolean) -lovr.keypressed = nil - ---- ----This callback is called when a key is released. ---- ----@type fun(key: lovr.KeyCode, scancode: number) -lovr.keyreleased = nil - ---- ----This callback is called once when the app starts. ---- ----It should be used to perform initial setup work, like loading resources and initializing classes and variables. ---- ---- ----### NOTE: ----If the project was loaded from a restart using `lovr.event.restart`, the return value from the previously-run `lovr.restart` callback will be made available to this callback as the `restart` key in the `arg` table. ---- ----The `arg` table follows the [Lua standard](https://en.wikibooks.org/wiki/Lua_Programming/command_line_parameter). ---- ----The arguments passed in from the shell are put into a global table named `arg` and passed to `lovr.load`, but with indices offset such that the "script" (the project path) is at index 0. ---- ----So all arguments (if any) intended for the project are at successive indices starting with 1, and the executable and its "internal" arguments are in normal order but stored in negative indices. ---- ----@type fun(arg: table) -lovr.load = nil - ---- ----This callback is called when a message is logged. ---- ----The default implementation of this callback prints the message to the console using `print`, but it's possible to override this callback to render messages in VR, write them to a file, filter messages, and more. ---- ----The message can have a "tag" that is a short string representing the sender, and a "level" indicating how severe the message is. ---- ----The `t.graphics.debug` flag in `lovr.conf` can be used to get log messages from the GPU driver (tagged as `GPU`). ---- ----It is also possible to emit customlog messages using `lovr.event.push`, or by calling the callback. ---- ----@type fun(message: string, level: string, tag: string) -lovr.log = nil - ---- ----This callback is called every frame after rendering to the headset and is usually used to render a mirror of the headset display onto the desktop window. ---- ----It can be overridden for custom mirroring behavior. ---- ----For example, a stereo view could be drawn instead of a single eye or a 2D HUD could be rendered. ---- ----@type fun(pass: lovr.Pass):boolean -lovr.mirror = nil - ---- ----This callback is called when the mouse is moved. ---- ----@type fun(x: number, y: number, dx: number, dy: number) -lovr.mousemoved = nil - ---- ----This callback is called when a mouse button is pressed. ---- ----@type fun(x: number, y: number, button: number) -lovr.mousepressed = nil - ---- ----This callback is called when a mouse button is released. ---- ----@type fun(x: number, y: number, button: number) -lovr.mousereleased = nil - ---- ----This callback contains a permission response previously requested with `lovr.system.requestPermission`. ---- ----The callback contains information on whether permission was granted or denied. ---- ----@type fun(permission: lovr.Permission, granted: boolean) -lovr.permission = nil - ---- ----This callback is called right before the application is about to quit. ---- ----Use it to perform any necessary cleanup work. ---- ----A truthy value can be returned from this callback to abort quitting. ---- ----@type fun():boolean -lovr.quit = nil - ---- ----This callback is called when the desktop window is resized. ---- ----@type fun(width: number, height: number) -lovr.resize = nil - ---- ----This callback is called when a restart from `lovr.event.restart` is happening. ---- ----A value can be returned to send it to the next LÖVR instance, available as the `restart` key in the argument table passed to `lovr.load`. ---- ----Object instances can not be used as the restart value, since they are destroyed as part of the cleanup process. ---- ---- ----### NOTE: ----Only nil, booleans, numbers, and strings are supported types for the return value. ---- ----@type fun():any -lovr.restart = nil - ---- ----This callback is the main entry point for a LÖVR program. ---- ----It calls `lovr.load` and returns a function that will be called every frame. ---- ---- ----### NOTE: ----The main loop function can return one of the following values: ---- ----- Returning `nil` will keep the main loop running. ----- Returning the string 'restart' plus an optional value will restart LÖVR. ---- ----The value can be ---- accessed in the `restart` key of the `arg` global. ----- Returning a number will exit LÖVR using the number as the exit code (0 means success). ---- ----Care should be taken when overriding this callback. ---- ----For example, if the main loop does not call `lovr.event.pump` then the OS will think LÖVR is unresponsive, and if the quit event is not handled then closing the window won't work. ---- ----@type fun():function -lovr.run = nil - ---- ----This callback is called when text has been entered. ---- ----For example, when `shift + 1` is pressed on an American keyboard, `lovr.textinput` will be called with `!`. ---- ---- ----### NOTE: ----Some characters in UTF-8 unicode take multiple bytes to encode. ---- ----Due to the way Lua works, the length of these strings will be bigger than 1 even though they are just a single character. `Pass:text` is compatible with UTF-8 but doing other string processing on these strings may require a library. ---- ----Lua 5.3+ has support for working with UTF-8 strings. ---- ----@type fun(text: string, code: number) -lovr.textinput = nil - ---- ----The `lovr.threaderror` callback is called whenever an error occurs in a Thread. ---- ----It receives the Thread object where the error occurred and an error message. ---- ----The default implementation of this callback will call `lovr.errhand` with the error. ---- ----@type fun(thread: lovr.Thread, message: string) -lovr.threaderror = nil - ---- ----The `lovr.update` callback should be used to update your game's logic. ---- ----It receives a single parameter, `dt`, which represents the amount of elapsed time between frames. ---- ----You can use this value to scale timers, physics, and animations in your game so they play at a smooth, consistent speed. ---- ----@type fun(dt: number) -lovr.update = nil diff --git a/meta/3rd/lovr/library/lovr.lua b/meta/3rd/lovr/library/lovr.lua deleted file mode 100644 index 7bff8ec9..00000000 --- a/meta/3rd/lovr/library/lovr.lua +++ /dev/null @@ -1,42 +0,0 @@ ----@meta - ---- ----`lovr` is the single global table that is exposed to every LÖVR app. It contains a set of **modules** and a set of **callbacks**. ---- ----@class lovr -lovr = {} - ---- ----Get the current major, minor, and patch version of LÖVR. ---- ----@return number major # The major version. ----@return number minor # The minor version. ----@return number patch # The patch number. -function lovr.getVersion() end - ---- ----The superclass of all LÖVR objects. ---- ----In addition to the methods here, all objects have a `__tostring` metamethod that returns the name of the object's type. ---- ----So `tostring(object) == 'Blob'` will check if a LÖVR object is a Blob. ---- ---- ----### NOTE: ----Note that the functions here don't apply to any vector objects, see `Vectors`. ---- ----@class lovr.Object -local Object = {} - ---- ----Immediately destroys Lua's reference to the object it's called on. ---- ----After calling this function on an object, it is an error to do anything with the object from Lua (call methods on it, pass it to other functions, etc.). ---- ----If nothing else is using the object, it will be destroyed immediately, which can be used to destroy something earlier than it would normally be garbage collected in order to reduce memory. ---- ---- ----### NOTE: ----The object may not be destroyed immediately if something else is referring to it (e.g. it is pushed to a Channel or exists in the payload of a pending event). ---- -function Object:release() end diff --git a/meta/3rd/lovr/library/lovr/audio.lua b/meta/3rd/lovr/library/lovr/audio.lua deleted file mode 100644 index ebe35714..00000000 --- a/meta/3rd/lovr/library/lovr/audio.lua +++ /dev/null @@ -1,864 +0,0 @@ ----@meta - ---- ----The `lovr.audio` module is responsible for playing sound effects and music. ---- ----To play a sound, create a `Source` object and call `Source:play` on it. ---- ----Currently ogg, wav, and mp3 audio formats are supported. ---- ----@class lovr.audio -lovr.audio = {} - ---- ----Returns the global air absorption coefficients for the medium. ---- ----This affects Sources that have the `absorption` effect enabled, causing audio volume to drop off with distance as it is absorbed by the medium it's traveling through (air, water, etc.). ---- ----The difference between absorption and the attenuation effect is that absorption is more subtle and is frequency-dependent, so higher-frequency bands can get absorbed more quickly than lower ones. This can be used to apply "underwater" effects and stuff. ---- ---- ----### NOTE: ----Absorption is currently only supported by the phonon spatializer. ---- ----The frequency bands correspond to `400Hz`, `2.5KHz`, and `15KHz`. ---- ----The default coefficients are `.0002`, `.0017`, and `.0182` for low, mid, and high. ---- ----@return number low # The absorption coefficient for the low frequency band. ----@return number mid # The absorption coefficient for the mid frequency band. ----@return number high # The absorption coefficient for the high frequency band. -function lovr.audio.getAbsorption() end - ---- ----Returns a list of playback or capture devices. ---- ----Each device has an `id`, `name`, and a `default` flag indicating whether it's the default device. ---- ----To use a specific device id for playback or capture, pass it to `lovr.audio.setDevice`. ---- ----@param type? lovr.AudioType # The type of devices to query (playback or capture). ----@return {["[].id"]: userdata, ["[].name"]: string, ["[].default"]: boolean} devices # The list of devices. -function lovr.audio.getDevices(type) end - ---- ----Returns the orientation of the virtual audio listener in angle/axis representation. ---- ----@return number angle # The number of radians the listener is rotated around its axis of rotation. ----@return number ax # The x component of the axis of rotation. ----@return number ay # The y component of the axis of rotation. ----@return number az # The z component of the axis of rotation. -function lovr.audio.getOrientation() end - ---- ----Returns the position and orientation of the virtual audio listener. ---- ----@return number x # The x position of the listener, in meters. ----@return number y # The y position of the listener, in meters. ----@return number z # The z position of the listener, in meters. ----@return number angle # The number of radians the listener is rotated around its axis of rotation. ----@return number ax # The x component of the axis of rotation. ----@return number ay # The y component of the axis of rotation. ----@return number az # The z component of the axis of rotation. -function lovr.audio.getPose() end - ---- ----Returns the position of the virtual audio listener, in meters. ---- ----@return number x # The x position of the listener. ----@return number y # The y position of the listener. ----@return number z # The z position of the listener. -function lovr.audio.getPosition() end - ---- ----Returns the sample rate used by the playback device. ---- ----This can be changed using `lovr.conf`. ---- ----@return number rate # The sample rate of the playback device, in Hz. -function lovr.audio.getSampleRate() end - ---- ----Returns the name of the active spatializer (`simple`, `oculus`, or `phonon`). ---- ----The `t.audio.spatializer` setting in `lovr.conf` can be used to express a preference for a particular spatializer. ---- ----If it's `nil`, all spatializers will be tried in the following order: `phonon`, `oculus`, `simple`. ---- ---- ----### NOTE: ----Using a feature or effect that is not supported by the current spatializer will not error, it just won't do anything. ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
Featuresimplephononoculus
Effect: Spatializationxxx
Effect: Attenuationxxx
Effect: Absorptionx
Effect: Occlusionx
Effect: Transmissionx
Effect: Reverbx
lovr.audio.setGeometryx
Source:setDirectivityxx
Source:setRadiusx
---- ----@return string spatializer # The name of the active spatializer. -function lovr.audio.getSpatializer() end - ---- ----Returns the master volume. ---- ----All audio sent to the playback device has its volume multiplied by this factor. ---- ---- ----### NOTE: ----The default volume is 1.0 (0 dB). ---- ----@param units? lovr.VolumeUnit # The units to return (linear or db). ----@return number volume # The master volume. -function lovr.audio.getVolume(units) end - ---- ----Returns whether an audio device is started. ---- ----@param type? lovr.AudioType # The type of device to check. ----@return boolean started # Whether the device is active. -function lovr.audio.isStarted(type) end - ---- ----Creates a new Source from an ogg, wav, or mp3 file. ---- ----@overload fun(blob: lovr.Blob, options?: table):lovr.Source ----@overload fun(sound: lovr.Sound, options?: table):lovr.Source ----@param filename string # The filename of the sound to load. ----@param options? {decode: boolean, pitchable: boolean, spatial: boolean, effects: table} # Optional options. ----@return lovr.Source source # The new Source. -function lovr.audio.newSource(filename, options) end - ---- ----Sets the global air absorption coefficients for the medium. ---- ----This affects Sources that have the `absorption` effect enabled, causing audio volume to drop off with distance as it is absorbed by the medium it's traveling through (air, water, etc.). ---- ----The difference between absorption and the attenuation effect is that absorption is more subtle and is frequency-dependent, so higher-frequency bands can get absorbed more quickly than lower ones. ---- ----This can be used to apply "underwater" effects and stuff. ---- ---- ----### NOTE: ----Absorption is currently only supported by the phonon spatializer. ---- ----The frequency bands correspond to `400Hz`, `2.5KHz`, and `15KHz`. ---- ----The default coefficients are `.0002`, `.0017`, and `.0182` for low, mid, and high. ---- ----@param low number # The absorption coefficient for the low frequency band. ----@param mid number # The absorption coefficient for the mid frequency band. ----@param high number # The absorption coefficient for the high frequency band. -function lovr.audio.setAbsorption(low, mid, high) end - ---- ----Switches either the playback or capture device to a new one. ---- ----If a device for the given type is already active, it will be stopped and destroyed. ---- ----The new device will not be started automatically, use `lovr.audio.start` to start it. ---- ----A device id (previously retrieved using `lovr.audio.getDevices`) can be given to use a specific audio device, or `nil` can be used for the id to use the default audio device. ---- ----A sink can be also be provided when changing the device. ---- ----A sink is an audio stream (`Sound` object with a `stream` type) that will receive all audio samples played (for playback) or all audio samples captured (for capture). ---- ----When an audio device with a sink is started, be sure to periodically call `Sound:read` on the sink to read audio samples from it, otherwise it will overflow and discard old data. ---- ----The sink can have any format, data will be converted as needed. Using a sink for the playback device will reduce performance, but this isn't the case for capture devices. ---- ----Audio devices can be started in `shared` or `exclusive` mode. ---- ----Exclusive devices may have lower latency than shared devices, but there's a higher chance that requesting exclusive access to an audio device will fail (either because it isn't supported or allowed). ---- ----One strategy is to first try the device in exclusive mode, switching to shared if it doesn't work. ---- ----@param type? lovr.AudioType # The device to switch. ----@param id? userdata # The id of the device to use, or `nil` to use the default device. ----@param sink? lovr.Sound # An optional audio stream to use as a sink for the device. ----@param mode? lovr.AudioShareMode # The sharing mode for the device. ----@return boolean success # Whether creating the audio device succeeded. -function lovr.audio.setDevice(type, id, sink, mode) end - ---- ----Sets a mesh of triangles to use for modeling audio effects, using a table of vertices or a Model. ---- ----When the appropriate effects are enabled, audio from `Source` objects will correctly be occluded by walls and bounce around to create realistic reverb. ---- ----An optional `AudioMaterial` may be provided to specify the acoustic properties of the geometry. ---- ---- ----### NOTE: ----This is currently only supported/used by the `phonon` spatializer. ---- ----The `Effect`s that use geometry are: ---- ----- `occlusion` ----- `reverb` ----- `transmission` ---- ----If an existing geometry has been set, this function will replace it. ---- ----The triangles must use counterclockwise winding. ---- ----@overload fun(model: lovr.Model, material?: lovr.AudioMaterial):boolean ----@param vertices table # A flat table of vertices. Each vertex is 3 numbers representing its x, y, and z position. The units used for audio coordinates are up to you, but meters are recommended. ----@param indices table # A list of indices, indicating how the vertices are connected into triangles. Indices are 1-indexed and are 32 bits (they can be bigger than 65535). ----@param material? lovr.AudioMaterial # The acoustic material to use. ----@return boolean success # Whether audio geometry is supported by the current spatializer and the geometry was loaded successfully. -function lovr.audio.setGeometry(vertices, indices, material) end - ---- ----Sets the orientation of the virtual audio listener in angle/axis representation. ---- ----@overload fun(orientation: lovr.Quat) ----@param angle number # The number of radians the listener should be rotated around its rotation axis. ----@param ax number # The x component of the axis of rotation. ----@param ay number # The y component of the axis of rotation. ----@param az number # The z component of the axis of rotation. -function lovr.audio.setOrientation(angle, ax, ay, az) end - ---- ----Sets the position and orientation of the virtual audio listener. ---- ---- ----### NOTE: ----The position of the listener doesn't use any specific units, but usually they can be thought of as meters to match the headset module. ---- ----@overload fun(position: lovr.Vec3, orientation: lovr.Quat) ----@param x number # The x position of the listener. ----@param y number # The y position of the listener. ----@param z number # The z position of the listener. ----@param angle number # The number of radians the listener is rotated around its axis of rotation. ----@param ax number # The x component of the axis of rotation. ----@param ay number # The y component of the axis of rotation. ----@param az number # The z component of the axis of rotation. -function lovr.audio.setPose(x, y, z, angle, ax, ay, az) end - ---- ----Sets the position of the virtual audio listener. ---- ----The position doesn't have any specific units, but usually they can be thought of as meters, to match the headset module. ---- ----@overload fun(position: lovr.Vec3) ----@param x number # The x position of the listener. ----@param y number # The y position of the listener. ----@param z number # The z position of the listener. -function lovr.audio.setPosition(x, y, z) end - ---- ----Sets the master volume. ---- ----All audio sent to the playback device has its volume multiplied by this factor. ---- ---- ----### NOTE: ----The volume will be clamped to a 0-1 range (0 dB). ---- ----@param volume number # The master volume. ----@param units? lovr.VolumeUnit # The units of the value. -function lovr.audio.setVolume(volume, units) end - ---- ----Starts the active playback or capture device. ---- ----By default the playback device is initialized and started, but this can be controlled using the `t.audio.start` flag in `lovr.conf`. ---- ---- ----### NOTE: ----Starting an audio device may fail if: ---- ----- The device is already started ----- No device was initialized with `lovr.audio.setDevice` ----- Lack of `audiocapture` permission on Android (see `lovr.system.requestPermission`) ----- Some other problem accessing the audio device ---- ----@param type? lovr.AudioType # The type of device to start. ----@return boolean started # Whether the device was successfully started. -function lovr.audio.start(type) end - ---- ----Stops the active playback or capture device. ---- ----This may fail if: ---- ----- The device is not started ----- No device was initialized with `lovr.audio.setDevice` ---- ---- ----### NOTE: ----Switching devices with `lovr.audio.setDevice` will stop the existing one. ---- ----@param type? lovr.AudioType # The type of device to stop. ----@return boolean stopped # Whether the device was successfully stopped. -function lovr.audio.stop(type) end - ---- ----A Source is an object representing a single sound. ---- ----Currently ogg, wav, and mp3 formats are supported. ---- ----When a Source is playing, it will send audio to the speakers. ---- ----Sources do not play automatically when they are created. ---- ----Instead, the `play`, `pause`, and `stop` functions can be used to control when they should play. ---- ----`Source:seek` and `Source:tell` can be used to control the playback position of the Source. ---- ----A Source can be set to loop when it reaches the end using `Source:setLooping`. ---- ----@class lovr.Source -local Source = {} - ---- ----Creates a copy of the Source, referencing the same `Sound` object and inheriting all of the settings of this Source. ---- ----However, it will be created in the stopped state and will be rewound to the beginning. ---- ---- ----### NOTE: ----This is a good way to create multiple Sources that play the same sound, since the audio data won't be loaded multiple times and can just be reused. ---- ----You can also create multiple `Source` objects and pass in the same `Sound` object for each one, which will have the same effect. ---- ----@return lovr.Source source # A genetically identical copy of the Source. -function Source:clone() end - ---- ----Returns the directivity settings for the Source. ---- ----The directivity is controlled by two parameters: the weight and the power. ---- ----The weight is a number between 0 and 1 controlling the general "shape" of the sound emitted. 0.0 results in a completely omnidirectional sound that can be heard from all directions. ---- ----1.0 results in a full dipole shape that can be heard only from the front and back. ---- ----0.5 results in a cardioid shape that can only be heard from one direction. ---- ----Numbers in between will smoothly transition between these. ---- ----The power is a number that controls how "focused" or sharp the shape is. ---- ----Lower power values can be heard from a wider set of angles. ---- ----It is an exponent, so it can get arbitrarily large. ---- ----Note that a power of zero will still result in an omnidirectional source, regardless of the weight. ---- ----@return number weight # The dipole weight. 0.0 is omnidirectional, 1.0 is a dipole, 0.5 is cardioid. ----@return number power # The dipole power, controlling how focused the directivity shape is. -function Source:getDirectivity() end - ---- ----Returns the duration of the Source. ---- ----@param unit? lovr.TimeUnit # The unit to return. ----@return number duration # The duration of the Source. -function Source:getDuration(unit) end - ---- ----Returns the orientation of the Source, in angle/axis representation. ---- ----@return number angle # The number of radians the Source is rotated around its axis of rotation. ----@return number ax # The x component of the axis of rotation. ----@return number ay # The y component of the axis of rotation. ----@return number az # The z component of the axis of rotation. -function Source:getOrientation() end - ---- ----Returns the pitch of the Source. ---- ---- ----### NOTE: ----The default pitch is 1. ---- ----Every doubling/halving of the pitch will raise/lower the pitch by one octave. ---- ----Changing the pitch also changes the playback speed. ---- ----@return number pitch # The pitch. -function Source:getPitch() end - ---- ----Returns the position and orientation of the Source. ---- ----@return number x # The x position of the Source, in meters. ----@return number y # The y position of the Source, in meters. ----@return number z # The z position of the Source, in meters. ----@return number angle # The number of radians the Source is rotated around its axis of rotation. ----@return number ax # The x component of the axis of rotation. ----@return number ay # The y component of the axis of rotation. ----@return number az # The z component of the axis of rotation. -function Source:getPose() end - ---- ----Returns the position of the Source, in meters. ---- ----Setting the position will cause the Source to be distorted and attenuated based on its position relative to the listener. ---- ----@return number x # The x coordinate. ----@return number y # The y coordinate. ----@return number z # The z coordinate. -function Source:getPosition() end - ---- ----Returns the radius of the Source, in meters. ---- ----This does not control falloff or attenuation. ---- ----It is only used for smoothing out occlusion. ---- ----If a Source doesn't have a radius, then when it becomes occluded by a wall its volume will instantly drop. ---- ----Giving the Source a radius that approximates its emitter's size will result in a smooth transition between audible and occluded, improving realism. ---- ----@return number radius # The radius of the Source, in meters. -function Source:getRadius() end - ---- ----Returns the `Sound` object backing the Source. ---- ----Multiple Sources can share one Sound, allowing its data to only be loaded once. ---- ----An easy way to do this sharing is by using `Source:clone`. ---- ----@return lovr.Sound sound # The Sound object. -function Source:getSound() end - ---- ----Returns the current volume factor for the Source. ---- ----@param units? lovr.VolumeUnit # The units to return (linear or db). ----@return number volume # The volume of the Source. -function Source:getVolume(units) end - ---- ----Returns whether a given `Effect` is enabled for the Source. ---- ---- ----### NOTE: ----The active spatializer will determine which effects are supported. ---- ----If an unsupported effect is enabled on a Source, no error will be reported. ---- ----Instead, it will be silently ignored. ---- ----See `lovr.audio.getSpatializer` for a table showing the effects supported by each spatializer. ---- ----Calling this function on a non-spatial Source will always return false. ---- ----@param effect lovr.Effect # The effect. ----@return boolean enabled # Whether the effect is enabled. -function Source:isEffectEnabled(effect) end - ---- ----Returns whether or not the Source will loop when it finishes. ---- ----@return boolean looping # Whether or not the Source is looping. -function Source:isLooping() end - ---- ----Returns whether or not the Source is playing. ---- ----@return boolean playing # Whether the Source is playing. -function Source:isPlaying() end - ---- ----Returns whether the Source was created with the `spatial` flag. ---- ----Non-spatial sources are routed directly to the speakers and can not use effects. ---- ----@return boolean spatial # Whether the source is spatial. -function Source:isSpatial() end - ---- ----Pauses the source. ---- ----It can be resumed with `Source:resume` or `Source:play`. If a paused source is rewound, it will remain paused. ---- -function Source:pause() end - ---- ----Plays the Source. ---- ----This doesn't do anything if the Source is already playing. ---- ---- ----### NOTE: ----There is a maximum of 64 Sources that can be playing at once. ---- ----If 64 Sources are already playing, this function will return `false`. ---- ----@return boolean success # Whether the Source successfully started playing. -function Source:play() end - ---- ----Seeks the Source to the specified position. ---- ---- ----### NOTE: ----Seeking a Source backed by a stream `Sound` has no meaningful effect. ---- ----@param position number # The position to seek to. ----@param unit? lovr.TimeUnit # The units for the seek position. -function Source:seek(position, unit) end - ---- ----Sets the directivity settings for the Source. ---- ----The directivity is controlled by two parameters: the weight and the power. ---- ----The weight is a number between 0 and 1 controlling the general "shape" of the sound emitted. 0.0 results in a completely omnidirectional sound that can be heard from all directions. ---- ----1.0 results in a full dipole shape that can be heard only from the front and back. ---- ----0.5 results in a cardioid shape that can only be heard from one direction. ---- ----Numbers in between will smoothly transition between these. ---- ----The power is a number that controls how "focused" or sharp the shape is. ---- ----Lower power values can be heard from a wider set of angles. ---- ----It is an exponent, so it can get arbitrarily large. ---- ----Note that a power of zero will still result in an omnidirectional source, regardless of the weight. ---- ----@param weight number # The dipole weight. 0.0 is omnidirectional, 1.0 is a dipole, 0.5 is cardioid. ----@param power number # The dipole power, controlling how focused the directivity shape is. -function Source:setDirectivity(weight, power) end - ---- ----Enables or disables an effect on the Source. ---- ---- ----### NOTE: ----The active spatializer will determine which effects are supported. ---- ----If an unsupported effect is enabled on a Source, no error will be reported. ---- ----Instead, it will be silently ignored. ---- ----See `lovr.audio.getSpatializer` for a table showing the effects supported by each spatializer. ---- ----Calling this function on a non-spatial Source will throw an error. ---- ----@param effect lovr.Effect # The effect. ----@param enable boolean # Whether the effect should be enabled. -function Source:setEffectEnabled(effect, enable) end - ---- ----Sets whether or not the Source loops. ---- ---- ----### NOTE: ----Attempting to loop a Source backed by a stream `Sound` will cause an error. ---- ----@param loop boolean # Whether or not the Source will loop. -function Source:setLooping(loop) end - ---- ----Sets the orientation of the Source in angle/axis representation. ---- ----@overload fun(self: lovr.Source, orientation: lovr.Quat) ----@param angle number # The number of radians the Source should be rotated around its rotation axis. ----@param ax number # The x component of the axis of rotation. ----@param ay number # The y component of the axis of rotation. ----@param az number # The z component of the axis of rotation. -function Source:setOrientation(angle, ax, ay, az) end - ---- ----Sets the pitch of the Source. ---- ---- ----### NOTE: ----The default pitch is 1. ---- ----Every doubling/halving of the pitch will raise/lower the pitch by one octave. ---- ----Changing the pitch also changes the playback speed. ---- ----@param pitch number # The new pitch. -function Source:setPitch(pitch) end - ---- ----Sets the position and orientation of the Source. ---- ---- ----### NOTE: ----The position doesn't have any defined units, but meters are used by convention. ---- ----@overload fun(self: lovr.Source, position: lovr.Vec3, orientation: lovr.Quat) ----@param x number # The x position of the Source. ----@param y number # The y position of the Source. ----@param z number # The z position of the Source. ----@param angle number # The number of radians the Source is rotated around its axis of rotation. ----@param ax number # The x component of the axis of rotation. ----@param ay number # The y component of the axis of rotation. ----@param az number # The z component of the axis of rotation. -function Source:setPose(x, y, z, angle, ax, ay, az) end - ---- ----Sets the position of the Source. ---- ----Setting the position will cause the Source to be distorted and attenuated based on its position relative to the listener. ---- ----Only mono sources can be positioned. ---- ----Setting the position of a stereo Source will cause an error. ---- ---- ----### NOTE: ----The position doesn't have any defined units, but meters are used by convention. ---- ----@overload fun(self: lovr.Source, position: lovr.Vec3) ----@param x number # The x coordinate of the position. ----@param y number # The y coordinate of the position. ----@param z number # The z coordinate of the position. -function Source:setPosition(x, y, z) end - ---- ----Sets the radius of the Source, in meters. ---- ----This does not control falloff or attenuation. ---- ----It is only used for smoothing out occlusion. ---- ----If a Source doesn't have a radius, then when it becomes occluded by a wall its volume will instantly drop. ---- ----Giving the Source a radius that approximates its emitter's size will result in a smooth transition between audible and occluded, improving realism. ---- ----@param radius number # The new radius of the Source, in meters. -function Source:setRadius(radius) end - ---- ----Sets the current volume factor for the Source. ---- ---- ----### NOTE: ----The volume will be clamped to a 0-1 range (0 dB). ---- ----@param volume number # The new volume. ----@param units? lovr.VolumeUnit # The units of the value. -function Source:setVolume(volume, units) end - ---- ----Stops the source, also rewinding it to the beginning. ---- -function Source:stop() end - ---- ----Returns the current playback position of the Source. ---- ---- ----### NOTE: ----The return value for Sources backed by a stream `Sound` has no meaning. ---- ----@param unit? lovr.TimeUnit # The unit to return. ----@return number position # The current playback position. -function Source:tell(unit) end - ---- ----Different types of audio material presets, for use with `lovr.audio.setGeometry`. ---- ----@alias lovr.AudioMaterial ---- ----Generic default audio material. ---- ----| "generic" ---- ----Brick. ---- ----| "brick" ---- ----Carpet. ---- ----| "carpet" ---- ----Ceramic. ---- ----| "ceramic" ---- ----Concrete. ---- ----| "concrete" ---- ----Glass. ---- ----| "glass" ---- ----Gravel. ---- ----| "gravel" ---- ----Metal. ---- ----| "metal" ---- ----Plaster. ---- ----| "plaster" ---- ----Rock. ---- ----| "rock" ---- ----Wood. ---- ----| "wood" - ---- ----Audio devices can be created in shared mode or exclusive mode. ---- ----In exclusive mode, the audio device is the only one active on the system, which gives better performance and lower latency. However, exclusive devices aren't always supported and might not be allowed, so there is a higher chance that creating one will fail. ---- ----@alias lovr.AudioShareMode ---- ----Shared mode. ---- ----| "shared" ---- ----Exclusive mode. ---- ----| "exclusive" - ---- ----When referencing audio devices, this indicates whether it's the playback or capture device. ---- ----@alias lovr.AudioType ---- ----The playback device (speakers, headphones). ---- ----| "playback" ---- ----The capture device (microphone). ---- ----| "capture" - ---- ----Different types of effects that can be applied with `Source:setEffectEnabled`. ---- ---- ----### NOTE: ----The active spatializer will determine which effects are supported. ---- ----If an unsupported effect is enabled on a Source, no error will be reported. ---- ----Instead, it will be silently ignored. ---- ----See `lovr.audio.getSpatializer` for a table of the supported effects for each spatializer. ---- ----@alias lovr.Effect ---- ----Models absorption as sound travels through the air, water, etc. ---- ----| "absorption" ---- ----Decreases audio volume with distance (1 / max(distance, 1)). ---- ----| "attenuation" ---- ----Causes audio to drop off when the Source is occluded by geometry. ---- ----| "occlusion" ---- ----Models reverb caused by audio bouncing off of geometry. ---- ----| "reverb" ---- ----Spatializes the Source using either simple panning or an HRTF. ---- ----| "spatialization" ---- ----Causes audio to be heard through walls when occluded, based on audio materials. ---- ----| "transmission" - ---- ----When figuring out how long a Source is or seeking to a specific position in the sound file, units can be expressed in terms of seconds or in terms of frames. ---- ----A frame is one set of samples for each channel (one sample for mono, two samples for stereo). ---- ----@alias lovr.TimeUnit ---- ----Seconds. ---- ----| "seconds" ---- ----Frames. ---- ----| "frames" - ---- ----When accessing the volume of Sources or the audio listener, this can be done in linear units with a 0 to 1 range, or in decibels with a range of -∞ to 0. ---- ----@alias lovr.VolumeUnit ---- ----Linear volume range. ---- ----| "linear" ---- ----Decibels. ---- ----| "db" diff --git a/meta/3rd/lovr/library/lovr/data.lua b/meta/3rd/lovr/library/lovr/data.lua deleted file mode 100644 index 8c841962..00000000 --- a/meta/3rd/lovr/library/lovr/data.lua +++ /dev/null @@ -1,1581 +0,0 @@ ----@meta - ---- ----The `lovr.data` module provides functions for accessing underlying data representations for several LÖVR objects. ---- ----@class lovr.data -lovr.data = {} - ---- ----Creates a new Blob. ---- ----@overload fun(contents: string, name?: string):lovr.Blob ----@overload fun(source: lovr.Blob, name?: string):lovr.Blob ----@param size number # The amount of data to allocate for the Blob, in bytes. All of the bytes will be filled with zeroes. ----@param name? string # A name for the Blob (used in error messages) ----@return lovr.Blob blob # The new Blob. -function lovr.data.newBlob(size, name) end - ---- ----Creates a new Image. ---- ----Image data can be loaded and decoded from an image file, or a raw block of pixels with a specified width, height, and format can be created. ---- ---- ----### NOTE: ----The supported image file formats are png, jpg, hdr, dds (DXT1, DXT3, DXT5), ktx, and astc. ---- ----Only 2D textures are supported for DXT/ASTC. ---- ----Currently textures loaded as KTX need to be in DXT/ASTC formats. ---- ----@overload fun(width: number, height: number, format?: lovr.TextureFormat, data?: lovr.Blob):lovr.Image ----@overload fun(source: lovr.Image):lovr.Image ----@overload fun(blob: lovr.Blob, flip?: boolean):lovr.Image ----@param filename string # The filename of the image to load. ----@param flip? boolean # Whether to vertically flip the image on load. This should be true for normal textures, and false for textures that are going to be used in a cubemap. ----@return lovr.Image image # The new Image. -function lovr.data.newImage(filename, flip) end - ---- ----Loads a 3D model from a file. ---- ----The supported 3D file formats are OBJ and glTF. ---- ----@overload fun(blob: lovr.Blob):lovr.ModelData ----@param filename string # The filename of the model to load. ----@return lovr.ModelData modelData # The new ModelData. -function lovr.data.newModelData(filename) end - ---- ----Creates a new Rasterizer from a TTF file. ---- ----@overload fun(filename: string, size?: number):lovr.Rasterizer ----@overload fun(blob: lovr.Blob, size?: number):lovr.Rasterizer ----@param size? number # The resolution to render the fonts at, in pixels. Higher resolutions use more memory and processing power but may provide better quality results for some fonts/situations. ----@return lovr.Rasterizer rasterizer # The new Rasterizer. -function lovr.data.newRasterizer(size) end - ---- ----Creates a new Sound. ---- ----A sound can be loaded from an audio file, or it can be created empty with capacity for a certain number of audio frames. ---- ----When loading audio from a file, use the `decode` option to control whether compressed audio should remain compressed or immediately get decoded to raw samples. ---- ----When creating an empty sound, the `contents` parameter can be set to `'stream'` to create an audio stream. ---- ----On streams, `Sound:setFrames` will always write to the end of the stream, and `Sound:getFrames` will always read the oldest samples from the beginning. ---- ----The number of frames in the sound is the total capacity of the stream's buffer. ---- ---- ----### NOTE: ----It is highly recommended to use an audio format that matches the format of the audio module: `f32` sample formats at a sample rate of 48000, with 1 channel for spatialized sources or 2 channels for unspatialized sources. ---- ----This will avoid the need to convert audio during playback, which boosts performance of the audio thread. ---- ----The WAV importer supports 16, 24, and 32 bit integer data and 32 bit floating point data. ---- ----The data must be mono, stereo, or 4-channel full-sphere ambisonic. ---- ----The `WAVE_FORMAT_EXTENSIBLE` extension is supported. ---- ----Ambisonic channel layouts are supported for import (but not yet for playback). ---- ----Ambisonic data can be loaded from WAV files. ---- ----It must be first-order full-sphere ambisonic data with 4 channels. ---- ----If the WAV has a `WAVE_FORMAT_EXTENSIBLE` chunk with an `AMBISONIC_B_FORMAT` format GUID, then the data is understood as using the AMB format with Furse-Malham channel ordering and normalization. ---- ----*All other* 4-channel files are assumed to be using the AmbiX format with ACN channel ordering and SN3D normalization. ---- ----AMB files will get automatically converted to AmbiX on import, so ambisonic Sounds will always be in a consistent format. ---- ----OGG and MP3 files will always have the `f32` format when loaded. ---- ----@overload fun(filename: string, decode: boolean):lovr.Sound ----@overload fun(blob: lovr.Blob, decode: boolean):lovr.Sound ----@param frames number # The number of frames the Sound can hold. ----@param format? lovr.SampleFormat # The sample data type. ----@param channels? lovr.ChannelLayout # The channel layout. ----@param sampleRate? number # The sample rate, in Hz. ----@param contents? any # A Blob containing raw audio samples to use as the initial contents, 'stream' to create an audio stream, or `nil` to leave the data initialized to zero. ----@return lovr.Sound sound # Sounds good. -function lovr.data.newSound(frames, format, channels, sampleRate, contents) end - ---- ----A Blob is an object that holds binary data. ---- ----It can be passed to most functions that take filename arguments, like `lovr.graphics.newModel` or `lovr.audio.newSource`. ---- ----Blobs aren't usually necessary for simple projects, but they can be really helpful if: ---- ----- You need to work with low level binary data, potentially using the LuaJIT FFI for increased ---- performance. ----- You are working with data that isn't stored as a file, such as programmatically generated data ---- or a string from a network request. ----- You want to load data from a file once and then use it to create many different objects. ---- ----A Blob's size cannot be changed once it is created. ---- ----@class lovr.Blob -local Blob = {} - ---- ----Returns the filename the Blob was loaded from, or the custom name given to it when it was created. ---- ----This label is also used in error messages. ---- ----@return string name # The name of the Blob. -function Blob:getName() end - ---- ----Returns a raw pointer to the Blob's data. ---- ----This can be used to interface with other C libraries using the LuaJIT FFI. ---- ----Use this only if you know what you're doing! ---- ----@return userdata pointer # A pointer to the data. -function Blob:getPointer() end - ---- ----Returns the size of the Blob's contents, in bytes. ---- ----@return number bytes # The size of the Blob, in bytes. -function Blob:getSize() end - ---- ----Returns a binary string containing the Blob's data. ---- ----@param offset? number # A byte offset into the Blob where the string will start. ----@param size? number # The number of bytes the string will contain. If nil, the rest of the data in the Blob will be used, based on the `offset` parameter. ----@return string data # The Blob's data. -function Blob:getString(offset, size) end - ---- ----An Image stores raw 2D pixel info for `Texture`s. ---- ----It has a width, height, and format. ---- ----The Image can be initialized with the contents of an image file or it can be created with uninitialized contents. ---- ----The supported image formats are `png`, `jpg`, `hdr`, `dds`, `ktx`, and `astc`. ---- ----Usually you can just use Textures, but Image can be useful if you want to manipulate individual pixels, load Textures in a background thread, or use the FFI to efficiently access the raw image data. ---- ----@class lovr.Image -local Image = {} - ---- ----Encodes the Image to an uncompressed png. ---- ----This intended mainly for debugging. ---- ----@return lovr.Blob blob # A new Blob containing the PNG image data. -function Image:encode() end - ---- ----Returns a Blob containing the raw bytes of the Image. ---- ----@return lovr.Blob blob # The Blob instance containing the bytes for the `Image`. -function Image:getBlob() end - ---- ----Returns the dimensions of the Image, in pixels. ---- ----@return number width # The width of the Image, in pixels. ----@return number height # The height of the Image, in pixels. -function Image:getDimensions() end - ---- ----Returns the format of the Image. ---- ----@return lovr.TextureFormat format # The format of the pixels in the Image. -function Image:getFormat() end - ---- ----Returns the height of the Image, in pixels. ---- ----@return number height # The height of the Image, in pixels. -function Image:getHeight() end - ---- ----Returns the value of a pixel of the Image. ---- ---- ----### NOTE: ----The following texture formats are supported: `r8`, `rg8`, `rgba8`, `r16`, `rg16`, `rgba16`, `r32f`, `rg32f`, `rgba32f`. ---- ----@param x number # The x coordinate of the pixel to get (0-indexed). ----@param y number # The y coordinate of the pixel to get (0-indexed). ----@return number r # The red component of the pixel, from 0.0 to 1.0. ----@return number g # The green component of the pixel, from 0.0 to 1.0. ----@return number b # The blue component of the pixel, from 0.0 to 1.0. ----@return number a # The alpha component of the pixel, from 0.0 to 1.0. -function Image:getPixel(x, y) end - ---- ----Returns the width of the Image, in pixels. ---- ----@return number width # The width of the Image, in pixels. -function Image:getWidth() end - ---- ----Copies a rectangle of pixels from one Image to this one. ---- ---- ----### NOTE: ----The two Images must have the same pixel format. ---- ----Compressed images cannot be copied. ---- ----The rectangle cannot go outside the dimensions of the source or destination textures. ---- ----@param source lovr.Image # The Image to copy pixels from. ----@param x? number # The x coordinate to paste to (0-indexed). ----@param y? number # The y coordinate to paste to (0-indexed). ----@param fromX? number # The x coordinate in the source to paste from (0-indexed). ----@param fromY? number # The y coordinate in the source to paste from (0-indexed). ----@param width? number # The width of the region to copy. ----@param height? number # The height of the region to copy. -function Image:paste(source, x, y, fromX, fromY, width, height) end - ---- ----Sets the value of a pixel of the Image. ---- ---- ----### NOTE: ----The following texture formats are supported: `r8`, `rg8`, `rgba8`, `r16`, `rg16`, `rgba16`, `r32f`, `rg32f`, `rgba32f`. ---- ----@param x number # The x coordinate of the pixel to set (0-indexed). ----@param y number # The y coordinate of the pixel to set (0-indexed). ----@param r number # The red component of the pixel, from 0.0 to 1.0. ----@param g number # The green component of the pixel, from 0.0 to 1.0. ----@param b number # The blue component of the pixel, from 0.0 to 1.0. ----@param a? number # The alpha component of the pixel, from 0.0 to 1.0. -function Image:setPixel(x, y, r, g, b, a) end - ---- ----A ModelData is a container object that loads and holds data contained in 3D model files. ---- ----This can include a variety of things like the node structure of the asset, the vertex data it contains, contains, the `Image` and `Material` properties, and any included animations. ---- ----The current supported formats are OBJ, glTF, and STL. ---- ----Usually you can just load a `Model` directly, but using a `ModelData` can be helpful if you want to load models in a thread or access more low-level information about the Model. ---- ----@class lovr.ModelData -local ModelData = {} - ---- ----Returns the number of channels in an animation. ---- ----A channel is a set of keyframes for a single property of a node. ---- ----@overload fun(self: lovr.ModelData, name: string):number ----@param index number # The index of an animation. ----@return number count # The number of channels in the animation. -function ModelData:getAnimationChannelCount(index) end - ---- ----Returns the number of animations in the model. ---- ----@return number count # The number of animations in the model. -function ModelData:getAnimationCount() end - ---- ----Returns the duration of an animation. ---- ---- ----### NOTE: ----The duration of the animation is calculated as the latest timestamp of all of its channels. ---- ----@overload fun(self: lovr.ModelData, name: string):number ----@param index number # The index of the animation. ----@return number duration # The duration of the animation, in seconds. -function ModelData:getAnimationDuration(index) end - ---- ----Returns a single keyframe in a channel of an animation. ---- ----@overload fun(self: lovr.ModelData, name: string, channel: number, keyframe: number):number, number ----@param index number # The index of an animation. ----@param channel number # The index of a channel in the animation. ----@param keyframe number # The index of a keyframe in the channel. ----@return number time # The timestamp of the keyframe. -function ModelData:getAnimationKeyframe(index, channel, keyframe) end - ---- ----Returns the number of keyframes in a channel of an animation. ---- ----@overload fun(self: lovr.ModelData, name: string, channel: number):number ----@param index number # The index of an animation. ----@param channel number # The index of a channel in the animation. ----@return number count # The number of keyframes in the channel. -function ModelData:getAnimationKeyframeCount(index, channel) end - ---- ----Returns the name of an animation. ---- ---- ----### NOTE: ----If the animation does not have a name, this function returns `nil`. ---- ----@param index number # The index of the animation. ----@return string name # The name of the animation. -function ModelData:getAnimationName(index) end - ---- ----Returns the index of a node targeted by an animation's channel. ---- ----@overload fun(self: lovr.ModelData, name: string, channel: number):number ----@param index number # The index of an animation. ----@param channel number # The index of a channel in the animation. ----@return number node # The index of the node targeted by the channel. -function ModelData:getAnimationNode(index, channel) end - ---- ----Returns the property targeted by an animation's channel. ---- ----@overload fun(self: lovr.ModelData, name: string, channel: number):lovr.AnimationProperty ----@param index number # The index of an animation. ----@param channel number # The index of a channel in the animation. ----@return lovr.AnimationProperty property # The property (translation, rotation, scale, weights) affected by the keyframes. -function ModelData:getAnimationProperty(index, channel) end - ---- ----Returns the smooth mode of a channel in an animation. ---- ----@overload fun(self: lovr.ModelData, name: string, channel: number):lovr.SmoothMode ----@param index number # The index of an animation. ----@param channel number # The index of a channel in the animation. ----@return lovr.SmoothMode smooth # The smooth mode of the keyframes. -function ModelData:getAnimationSmoothMode(index, channel) end - ---- ----Returns the number of blend shapes in the model. ---- ----@return number count # The number of blend shapes in the model. -function ModelData:getBlendShapeCount() end - ---- ----Returns the name of a blend shape in the model. ---- ---- ----### NOTE: ----This function will throw an error if the blend shape index is invalid. ---- ----@param index number # The index of a blend shape. ----@return string name # The name of the blend shape. -function ModelData:getBlendShapeName(index) end - ---- ----Returns one of the Blobs in the model, by index. ---- ----@param index number # The index of the Blob to get. ----@return lovr.Blob blob # The Blob object. -function ModelData:getBlob(index) end - ---- ----Returns the number of Blobs in the model. ---- ----@return number count # The number of Blobs in the model. -function ModelData:getBlobCount() end - ---- ----Returns the 6 values of the model's axis-aligned bounding box. ---- ----@return number minx # The minimum x coordinate of the vertices in the model. ----@return number maxx # The maximum x coordinate of the vertices in the model. ----@return number miny # The minimum y coordinate of the vertices in the model. ----@return number maxy # The maximum y coordinate of the vertices in the model. ----@return number minz # The minimum z coordinate of the vertices in the model. ----@return number maxz # The maximum z coordinate of the vertices in the model. -function ModelData:getBoundingBox() end - ---- ----Returns a sphere approximately enclosing the vertices in the model. ---- ----@return number x # The x coordinate of the position of the sphere. ----@return number y # The y coordinate of the position of the sphere. ----@return number z # The z coordinate of the position of the sphere. ----@return number radius # The radius of the bounding sphere. -function ModelData:getBoundingSphere() end - ---- ----Returns the center of the model's axis-aligned bounding box, relative to the model's origin. ---- ----@return number x # The x offset of the center of the bounding box. ----@return number y # The y offset of the center of the bounding box. ----@return number z # The z offset of the center of the bounding box. -function ModelData:getCenter() end - ---- ----Returns the depth of the model, computed from its axis-aligned bounding box. ---- ----@return number depth # The depth of the model. -function ModelData:getDepth() end - ---- ----Returns the width, height, and depth of the model, computed from its axis-aligned bounding box. ---- ----@return number width # The width of the model. ----@return number height # The height of the model. ----@return number depth # The depth of the model. -function ModelData:getDimensions() end - ---- ----Returns the height of the model, computed from its axis-aligned bounding box. ---- ----@return number height # The height of the model. -function ModelData:getHeight() end - ---- ----Returns one of the Images in the model, by index. ---- ----@param index number # The index of the Image to get. ----@return lovr.Image image # The Image object. -function ModelData:getImage(index) end - ---- ----Returns the number of Images in the model. ---- ----@return number count # The number of Images in the model. -function ModelData:getImageCount() end - ---- ----Returns a table with all of the properties of a material. ---- ---- ----### NOTE: ----All images are optional and may be `nil`. ---- ----@overload fun(self: lovr.ModelData, name: string):table ----@param index number # The index of a material. ----@return {color: table, glow: table, uvShift: table, uvScale: table, metalness: number, roughness: number, clearcoat: number, clearcoatRoughness: number, occlusionStrength: number, normalScale: number, alphaCutoff: number, texture: number, glowTexture: number, occlusionTexture: number, metalnessTexture: number, roughnessTexture: number, clearcoatTexture: number, normalTexture: number} properties # The material properties. -function ModelData:getMaterial(index) end - ---- ----Returns the number of materials in the model. ---- ----@return number count # The number of materials in the model. -function ModelData:getMaterialCount() end - ---- ----Returns the name of a material in the model. ---- ----@param index number # The index of a material. ----@return string name # The name of the material, or nil if the material does not have a name. -function ModelData:getMaterialName(index) end - ---- ----Returns the number of meshes in the model. ---- ----@return number count # The number of meshes in the model. -function ModelData:getMeshCount() end - ---- ----Returns the draw mode of a mesh. ---- ----This controls how its vertices are connected together (points, lines, or triangles). ---- ----@param mesh number # The index of a mesh. ----@return lovr.DrawMode mode # The draw mode of the mesh. -function ModelData:getMeshDrawMode(mesh) end - ---- ----Returns one of the vertex indices in a mesh. ---- ----If a mesh has vertex indices, they define the order and connectivity of the vertices in the mesh, allowing a vertex to be reused multiple times without duplicating its data. ---- ----@param mesh number # The index of a mesh to get the vertex from. ----@param index number # The index of a vertex index in the mesh to retrieve. ----@return number vertexindex # The vertex index. Like all indices in Lua, this is 1-indexed. -function ModelData:getMeshIndex(mesh, index) end - ---- ----Returns the number of vertex indices in a mesh. ---- ----Vertex indices allow for vertices to be reused when defining triangles. ---- ---- ----### NOTE: ----This may return zero if the mesh does not use indices. ---- ----@param mesh number # The index of a mesh. ----@return number count # The number of vertex indices in the mesh. -function ModelData:getMeshIndexCount(mesh) end - ---- ----Returns the data format of vertex indices in a mesh. ---- ----If a mesh doesn't use vertex indices, this function returns nil. ---- ----@param mesh number # The index of a mesh. ----@return lovr.AttributeType type # The data type of each vertex index (always u16 or u32). ----@return number blob # The index of a Blob in the mesh where the binary data is stored. ----@return number offset # A byte offset into the Blob's data where the index data starts. ----@return number stride # The number of bytes between subsequent vertex indices. Indices are always tightly packed, so this will always be 2 or 4 depending on the data type. -function ModelData:getMeshIndexFormat(mesh) end - ---- ----Returns the index of the material applied to a mesh. ---- ----@param mesh number # The index of a mesh. ----@return number material # The index of the material applied to the mesh, or nil if the mesh does not have a material. -function ModelData:getMeshMaterial(mesh) end - ---- ----Returns the data for a single vertex in a mesh. ---- ----The data returned depends on the vertex format of a mesh, which is given by `ModelData:getMeshVertexFormat`. ---- ----@param mesh number # The index of a mesh to get the vertex from. ----@param vertex number # The index of a vertex in the mesh to retrieve. -function ModelData:getMeshVertex(mesh, vertex) end - ---- ----Returns the number of vertices in a mesh. ---- ----@param mesh number # The index of a mesh. ----@return number count # The number of vertices in the mesh. -function ModelData:getMeshVertexCount(mesh) end - ---- ----Returns the vertex format of a mesh. ---- ----The vertex format defines the properties associated with each vertex (position, color, etc.), including their types and binary data layout. ---- ---- ----### NOTE: ----The format is given as a table of vertex attributes. ---- ----Each attribute is a table containing the following: ---- ---- { name, type, components, blob, offset, stride } ---- ----- The `name` will be a `DefaultAttribute`. ----- The `type` will be an `AttributeType`. ----- The `component` count will be 1-4. ----- The `blob` is an index of one of the Blobs in the model (see `ModelData:getBlob`). ----- The `offset` is a byte offset from the start of the Blob where the attribute's data starts. ----- The `stride` is the number of bytes between consecutive values. ---- ----@param mesh number # The index of a mesh. ----@return table format # The vertex format of the mesh. -function ModelData:getMeshVertexFormat(mesh) end - ---- ----Returns extra information stored in the model file. ---- ----Currently this is only implemented for glTF models and returns the JSON string from the glTF or glb file. ---- ----The metadata can be used to get application-specific data or add support for glTF extensions not supported by LÖVR. ---- ----@return string metadata # The metadata from the model file. -function ModelData:getMetadata() end - ---- ----Given a parent node, this function returns a table with the indices of its children. ---- ---- ----### NOTE: ----If the node does not have any children, this function returns an empty table. ---- ----@overload fun(self: lovr.ModelData, name: string):table ----@param index number # The index of the parent node. ----@return table children # A table containing a node index for each child of the node. -function ModelData:getNodeChildren(index) end - ---- ----Returns the number of nodes in the model. ---- ----@return number count # The number of nodes in the model. -function ModelData:getNodeCount() end - ---- ----Returns a table of mesh indices attached to a node. ---- ----Meshes define the geometry and materials of a model, as opposed to the nodes which define the transforms and hierarchy. ---- ----A node can have multiple meshes, and meshes can be reused in multiple nodes. ---- ----@overload fun(self: lovr.ModelData, name: string):table ----@param index number # The index of the node. ----@return table meshes # A table with the node's mesh indices. -function ModelData:getNodeMeshes(index) end - ---- ----Returns the name of a node. ---- ---- ----### NOTE: ----If the node does not have a name, this function returns `nil`. ---- ----@param index number # The index of the node. ----@return string name # The name of the node. -function ModelData:getNodeName(index) end - ---- ----Returns local orientation of a node, relative to its parent. ---- ----@overload fun(self: lovr.ModelData, name: string):number, number, number, number ----@param index number # The index of the node. ----@return number angle # The number of radians the node is rotated around its axis of rotation. ----@return number ax # The x component of the axis of rotation. ----@return number ay # The y component of the axis of rotation. ----@return number az # The z component of the axis of rotation. -function ModelData:getNodeOrientation(index) end - ---- ----Given a child node, this function returns the index of its parent. ---- ----@overload fun(self: lovr.ModelData, name: string):number ----@param index number # The index of the child node. ----@return number parent # The index of the parent. -function ModelData:getNodeParent(index) end - ---- ----Returns local pose (position and orientation) of a node, relative to its parent. ---- ----@overload fun(self: lovr.ModelData, name: string):number, number, number, number, number, number, number ----@param index number # The index of the node. ----@return number x # The x coordinate. ----@return number y # The y coordinate. ----@return number z # The z coordinate. ----@return number angle # The number of radians the node is rotated around its axis of rotation. ----@return number ax # The x component of the axis of rotation. ----@return number ay # The y component of the axis of rotation. ----@return number az # The z component of the axis of rotation. -function ModelData:getNodePose(index) end - ---- ----Returns local position of a node, relative to its parent. ---- ----@overload fun(self: lovr.ModelData, name: string):number, number, number ----@param index number # The index of the node. ----@return number x # The x coordinate. ----@return number y # The y coordinate. ----@return number z # The z coordinate. -function ModelData:getNodePosition(index) end - ---- ----Returns local scale of a node, relative to its parent. ---- ----@overload fun(self: lovr.ModelData, name: string):number, number, number ----@param index number # The index of the node. ----@return number sx # The x scale. ----@return number sy # The y scale. ----@return number sz # The z scale. -function ModelData:getNodeScale(index) end - ---- ----Returns the index of the skin used by a node. ---- ----Skins are collections of joints used for skeletal animation. ---- ----A model can have multiple skins, and each node can use at most one skin to drive the animation of its meshes. ---- ----@overload fun(self: lovr.ModelData, name: string):number ----@param index number # The index of the node. ----@return number skin # The index of the node's skin, or nil if the node isn't skeletally animated. -function ModelData:getNodeSkin(index) end - ---- ----Returns local transform (position, orientation, and scale) of a node, relative to its parent. ---- ---- ----### NOTE: ----For best results when animating, it's recommended to keep the 3 components of the scale the same. ---- ----@overload fun(self: lovr.ModelData, name: string):number, number, number, number, number, number, number, number, number, number ----@param index number # The index of the node. ----@return number x # The x coordinate. ----@return number y # The y coordinate. ----@return number z # The z coordinate. ----@return number sx # The x scale. ----@return number sy # The y scale. ----@return number sz # The z scale. ----@return number angle # The number of radians the node is rotated around its axis of rotation. ----@return number ax # The x component of the axis of rotation. ----@return number ay # The y component of the axis of rotation. ----@return number az # The z component of the axis of rotation. -function ModelData:getNodeTransform(index) end - ---- ----Returns the index of the model's root node. ---- ----@return number root # The index of the root node. -function ModelData:getRootNode() end - ---- ----Returns the number of skins in the model. ---- ----A skin is a collection of joints targeted by an animation. ---- ---- ----### NOTE: ----There is currently a maximum of 256 skins. ---- ----@return number count # The number of skins in the model. -function ModelData:getSkinCount() end - ---- ----Returns the inverse bind matrix for a joint in the skin. ---- ----@param skin number # The index of a skin. ----@param joint number # The index of a joint in the skin. -function ModelData:getSkinInverseBindMatrix(skin, joint) end - ---- ----Returns a table with the node indices of the joints in a skin. ---- ----@param skin number # The index of a skin. ----@return table joints # The joints in the skin. -function ModelData:getSkinJoints(skin) end - ---- ----Returns the total number of triangles in the model. ---- ----This count includes meshes that are attached to multiple nodes, and the count corresponds to the triangles returned by `ModelData:getTriangles`. ---- ----@return number count # The total number of triangles in the model. -function ModelData:getTriangleCount() end - ---- ----Returns the data for all triangles in the model. ---- ----There are a few differences between this and the mesh-specific functions like `ModelData:getMeshVertex` and `ModelData:getMeshIndex`: ---- ----- Only vertex positions are returned, not other vertex attributes. ----- Positions are relative to the origin of the whole model, instead of local to a node. ----- If a mesh is attached to more than one node, its vertices will be in the table multiple times. ----- Vertex indices will be relative to the whole triangle list instead of a mesh. ---- ---- ----### NOTE: ----After this function is called on a ModelData once, the result is cached. ---- ----@return table vertices # The triangle vertex positions, returned as a flat (non-nested) table of numbers. The position of each vertex is given as an x, y, and z coordinate. ----@return table indices # The vertex indices. Every 3 indices describes a triangle. -function ModelData:getTriangles() end - ---- ----Returns the total vertex count of a model. ---- ----This count includes meshes that are attached to multiple nodes, and the count corresponds to the vertices returned by `ModelData:getTriangles`. ---- ----@return number count # The total number of vertices in the model. -function ModelData:getVertexCount() end - ---- ----Returns the width of the model, computed from its axis-aligned bounding box. ---- ----@return number width # The width of the model. -function ModelData:getWidth() end - ---- ----A Rasterizer is an object that parses a TTF file, decoding and rendering glyphs from it. ---- ----Usually you can just use `Font` objects. ---- ----@class lovr.Rasterizer -local Rasterizer = {} - ---- ----Returns the advance metric for a glyph, in pixels. ---- ----The advance is the horizontal distance to advance the cursor after rendering the glyph. ---- ----@overload fun(self: lovr.Rasterizer, codepoint: number):number ----@param character string # A character. ----@return number advance # The advance of the glyph, in pixels. -function Rasterizer:getAdvance(character) end - ---- ----Returns the ascent metric of the font, in pixels. ---- ----The ascent represents how far any glyph of the font ascends above the baseline. ---- ----@return number ascent # The ascent of the font, in pixels. -function Rasterizer:getAscent() end - ---- ----Returns the bearing metric for a glyph, in pixels. ---- ----The bearing is the horizontal distance from the cursor to the edge of the glyph. ---- ----@overload fun(self: lovr.Rasterizer, codepoint: number):number ----@param character string # A character. ----@return number bearing # The bearing of the glyph, in pixels. -function Rasterizer:getBearing(character) end - ---- ----Returns the bounding box of a glyph, or the bounding box surrounding all glyphs. ---- ----Note that font coordinates use a cartesian "y up" coordinate system. ---- ----@overload fun(self: lovr.Rasterizer, codepoint: number):number, number, number, number ----@overload fun(self: lovr.Rasterizer):number, number, number, number ----@param character string # A character. ----@return number x1 # The left edge of the bounding box, in pixels. ----@return number y1 # The bottom edge of the bounding box, in pixels. ----@return number x2 # The right edge of the bounding box, in pixels. ----@return number y2 # The top edge of the bounding box, in pixels. -function Rasterizer:getBoundingBox(character) end - ---- ----Returns the bezier curve control points defining the shape of a glyph. ---- ----@overload fun(self: lovr.Rasterizer, codepoint: number, three: boolean):table ----@param character string # A character. ----@param three boolean # Whether the control points should be 3D or 2D. ----@return table curves # A table of curves. Each curve is a table of numbers representing the control points (2 for a line, 3 for a quadratic curve, etc.). -function Rasterizer:getCurves(character, three) end - ---- ----Returns the descent metric of the font, in pixels. ---- ----The descent represents how far any glyph of the font descends below the baseline. ---- ----@return number descent # The descent of the font, in pixels. -function Rasterizer:getDescent() end - ---- ----Returns the dimensions of a glyph, or the dimensions of any glyph. ---- ----@overload fun(self: lovr.Rasterizer, codepoint: number):number, number ----@overload fun(self: lovr.Rasterizer):number, number ----@param character string # A character. ----@return number width # The width, in pixels. ----@return number height # The height, in pixels. -function Rasterizer:getDimensions(character) end - ---- ----Returns the size of the font, in pixels. ---- ----This is the size the rasterizer was created with, and defines the size of images it rasterizes. ---- ----@return number size # The font size, in pixels. -function Rasterizer:getFontSize() end - ---- ----Returns the number of glyphs stored in the font file. ---- ----@return number count # The number of glyphs stored in the font file. -function Rasterizer:getGlyphCount() end - ---- ----Returns the height of a glyph, or the maximum height of any glyph. ---- ----@overload fun(self: lovr.Rasterizer, codepoint: number):number ----@overload fun(self: lovr.Rasterizer):number ----@param character string # A character. ----@return number height # The height, in pixels. -function Rasterizer:getHeight(character) end - ---- ----Returns the kerning between 2 glyphs, in pixels. ---- ----Kerning is a slight horizontal adjustment between 2 glyphs to improve the visual appearance. ---- ----It will often be negative. ---- ----@overload fun(self: lovr.Rasterizer, firstCodepoint: number, second: string):number ----@overload fun(self: lovr.Rasterizer, first: string, secondCodepoint: number):number ----@overload fun(self: lovr.Rasterizer, firstCodepoint: number, secondCodepoint: number):number ----@param first string # The first character. ----@param second string # The second character. ----@return number keming # The kerning between the two glyphs. -function Rasterizer:getKerning(first, second) end - ---- ----Returns the leading metric of the font, in pixels. ---- ----This is the full amount of space between lines. ---- ----@return number leading # The font leading, in pixels. -function Rasterizer:getLeading() end - ---- ----Returns the width of a glyph, or the maximum width of any glyph. ---- ----@overload fun(self: lovr.Rasterizer, codepoint: number):number ----@overload fun(self: lovr.Rasterizer):number ----@param character string # A character. ----@return number width # The width, in pixels. -function Rasterizer:getWidth(character) end - ---- ----Returns whether the Rasterizer can rasterize a set of glyphs. ---- ----@vararg any # Strings (sets of characters) or numbers (character codes) to check for. ----@return boolean hasGlyphs # true if the Rasterizer can rasterize all of the supplied characters, false otherwise. -function Rasterizer:hasGlyphs(...) end - ---- ----Returns an `Image` containing a rasterized glyph. ---- ----@overload fun(self: lovr.Rasterizer, codepoint: number, spread?: number, padding?: number):lovr.Image ----@param character string # A character. ----@param spread? number # The width of the distance field, for signed distance field rasterization. ----@param padding? number # The number of pixels of padding to add at the edges of the image. ----@return lovr.Image image # The glyph image. It will be in the `rgba32f` format. -function Rasterizer:newImage(character, spread, padding) end - ---- ----A Sound stores the data for a sound. ---- ----The supported sound formats are OGG, WAV, and MP3. ---- ----Sounds cannot be played directly. ---- ----Instead, there are `Source` objects in `lovr.audio` that are used for audio playback. ---- ----All Source objects are backed by one of these Sounds, and multiple Sources can share a single Sound to reduce memory usage. ---- ----Metadata ------- ---- ----Sounds hold a fixed number of frames. ---- ----Each frame contains one audio sample for each channel. The `SampleFormat` of the Sound is the data type used for each sample (floating point, integer, etc.). ---- ----The Sound has a `ChannelLayout`, representing the number of audio channels and how they map to speakers (mono, stereo, etc.). ---- ----The sample rate of the Sound indicates how many frames should be played per second. ---- ----The duration of the sound (in seconds) is the number of frames divided by the sample rate. ---- ----Compression ------- ---- ----Sounds can be compressed. ---- ----Compressed sounds are stored compressed in memory and are decoded as they are played. ---- ----This uses a lot less memory but increases CPU usage during playback. ---- ----OGG and MP3 are compressed audio formats. ---- ----When creating a sound from a compressed format, there is an option to immediately decode it, storing it uncompressed in memory. ---- ----It can be a good idea to decode short sound effects, since they won't use very much memory even when uncompressed and it will improve CPU usage. ---- ----Compressed sounds can not be written to using `Sound:setFrames`. ---- ----Streams ------- ---- ----Sounds can be created as a stream by passing `'stream'` as their contents when creating them. Audio frames can be written to the end of the stream, and read from the beginning. ---- ----This works well for situations where data is being generated in real time or streamed in from some other data source. ---- ----Sources can be backed by a stream and they'll just play whatever audio is pushed to the stream. The audio module also lets you use a stream as a "sink" for an audio device. ---- ----For playback devices, this works like loopback, so the mixed audio from all playing Sources will get written to the stream. ---- ----For capture devices, all the microphone input will get written to the stream. Conversion between sample formats, channel layouts, and sample rates will happen automatically. ---- ----Keep in mind that streams can still only hold a fixed number of frames. ---- ----If too much data is written before it is read, older frames will start to get overwritten. ---- ----Similary, it's possible to read too much data without writing fast enough. ---- ----Ambisonics ------- ---- ----Ambisonic sounds can be imported from WAVs, but can not yet be played. ---- ----Sounds with a `ChannelLayout` of `ambisonic` are stored as first-order full-sphere ambisonics using the AmbiX format (ACN channel ordering and SN3D channel normalization). ---- ----The AMB format is supported for import and will automatically get converted to AmbiX. ---- ----See `lovr.data.newSound` for more info. ---- ----@class lovr.Sound -local Sound = {} - ---- ----Returns a Blob containing the raw bytes of the Sound. ---- ---- ----### NOTE: ----Samples for each channel are stored interleaved. ---- ----The data type of each sample is given by `Sound:getFormat`. ---- ----@return lovr.Blob blob # The Blob instance containing the bytes for the `Sound`. -function Sound:getBlob() end - ---- ----Returns the number of frames that can be written to the Sound. ---- ----For stream sounds, this is the number of frames that can be written without overwriting existing data. ---- ----For normal sounds, this returns the same value as `Sound:getFrameCount`. ---- ----@return number capacity # The number of frames that can be written to the Sound. -function Sound:getCapacity() end - ---- ----Returns the number of channels in the Sound. ---- ----Mono sounds have 1 channel, stereo sounds have 2 channels, and ambisonic sounds have 4 channels. ---- ----@return number channels # The number of channels in the sound. -function Sound:getChannelCount() end - ---- ----Returns the channel layout of the Sound. ---- ----@return lovr.ChannelLayout channels # The channel layout. -function Sound:getChannelLayout() end - ---- ----Returns the duration of the Sound, in seconds. ---- ---- ----### NOTE: ----This can be computed as `(frameCount / sampleRate)`. ---- ----@return number duration # The duration of the Sound, in seconds. -function Sound:getDuration() end - ---- ----Returns the sample format of the Sound. ---- ----@return lovr.SampleFormat format # The data type of each sample. -function Sound:getFormat() end - ---- ----Returns the number of frames in the Sound. ---- ----A frame stores one sample for each channel. ---- ---- ----### NOTE: ----For streams, this returns the number of frames in the stream's buffer. ---- ----@return number frames # The number of frames in the Sound. -function Sound:getFrameCount() end - ---- ----Reads frames from the Sound into a table, Blob, or another Sound. ---- ----@overload fun(self: lovr.Sound, t: table, count?: number, srcOffset?: number, dstOffset?: number):table, number ----@overload fun(self: lovr.Sound, blob: lovr.Blob, count?: number, srcOffset?: number, dstOffset?: number):number ----@overload fun(self: lovr.Sound, sound: lovr.Sound, count?: number, srcOffset?: number, dstOffset?: number):number ----@param count? number # The number of frames to read. If nil, reads as many frames as possible. - -Compressed sounds will automatically be decoded. - -Reading from a stream will ignore the source offset and read the oldest frames. ----@param srcOffset? number # A frame offset to apply to the sound when reading frames. ----@return table t # A table containing audio frames. ----@return number count # The number of frames read. -function Sound:getFrames(count, srcOffset) end - ---- ----Returns the total number of samples in the Sound. ---- ---- ----### NOTE: ----For streams, this returns the number of samples in the stream's buffer. ---- ----@return number samples # The total number of samples in the Sound. -function Sound:getSampleCount() end - ---- ----Returns the sample rate of the Sound, in Hz. ---- ----This is the number of frames that are played every second. ---- ----It's usually a high number like 48000. ---- ----@return number frequency # The number of frames per second in the Sound. -function Sound:getSampleRate() end - ---- ----Returns whether the Sound is compressed. ---- ----Compressed sounds are loaded from compressed audio formats like MP3 and OGG. ---- ----They use a lot less memory but require some extra CPU work during playback. ---- ----Compressed sounds can not be modified using `Sound:setFrames`. ---- ----@return boolean compressed # Whether the Sound is compressed. -function Sound:isCompressed() end - ---- ----Returns whether the Sound is a stream. ---- ----@return boolean stream # Whether the Sound is a stream. -function Sound:isStream() end - ---- ----Writes frames to the Sound. ---- ----@overload fun(self: lovr.Sound, blob: lovr.Blob, count?: number, dstOffset?: number, srcOffset?: number):number ----@overload fun(self: lovr.Sound, sound: lovr.Sound, count?: number, dstOffset?: number, srcOffset?: number):number ----@param t table # A table containing frames to write. ----@param count? number # How many frames to write. If nil, writes as many as possible. ----@param dstOffset? number # A frame offset to apply when writing the frames. ----@param srcOffset? number # A frame, byte, or index offset to apply when reading frames from the source. ----@return number count # The number of frames written. -function Sound:setFrames(t, count, dstOffset, srcOffset) end - ---- ----This indicates the different node properties that can be animated. ---- ----@alias lovr.AnimationProperty ---- ----Node translation. ---- ----| "translation" ---- ----Node rotation. ---- ----| "rotation" ---- ----Node scale. ---- ----| "scale" ---- ----Node blend shape weights. ---- ----| "weights" - ---- ----These are the data types that can be used by vertex data in meshes. ---- ----@alias lovr.AttributeType ---- ----Signed 8 bit integers (-128 to 127). ---- ----| "i8" ---- ----Unsigned 8 bit integers (0 to 255). ---- ----| "u8" ---- ----Signed 16 bit integers (-32768 to 32767). ---- ----| "i16" ---- ----Unsigned 16 bit integers (0 to 65535). ---- ----| "u16" ---- ----Signed 32 bit integers (-2147483648 to 2147483647). ---- ----| "i32" ---- ----Unsigned 32 bit integers (0 to 429467295). ---- ----| "u32" ---- ----Floating point numbers. ---- ----| "f32" - ---- ----Sounds can have different numbers of channels, and those channels can map to various speaker layouts. ---- ----@alias lovr.ChannelLayout ---- ----1 channel. ---- ----| "mono" ---- ----2 channels. ---- ----The first channel is for the left speaker and the second is for the right. ---- ----| "stereo" ---- ----4 channels. ---- ----Ambisonic channels don't map directly to speakers but instead represent directions in 3D space, sort of like the images of a skybox. ---- ----Currently, ambisonic sounds can only be loaded, not played. ---- ----| "ambisonic" - ---- ----These are the different types of attributes that may be present in meshes loaded from models. ---- ----@alias lovr.DefaultAttribute ---- ----Vertex positions. ---- ----| "position" ---- ----Vertex normal vectors. ---- ----| "normal" ---- ----Vertex texture coordinates. ---- ----| "uv" ---- ----Vertex colors. ---- ----| "color" ---- ----Vertex tangent vectors. ---- ----| "tangent" ---- ----Vertex joint indices. ---- ----| "joints" ---- ----Vertex joint weights. ---- ----| "weights" - ---- ----The DrawMode of a mesh determines how its vertices are connected together. ---- ----@alias lovr.DrawMode ---- ----Each vertex is draw as a single point. ---- ----| "points" ---- ----Every pair of vertices is drawn as a line. ---- ----| "lines" ---- ----Draws a single line through all of the vertices. ---- ----| "linestrip" ---- ----Draws a single line through all of the vertices, then connects back to the first vertex. ---- ----| "lineloop" ---- ----Vertices are rendered as triangles. ---- ----After the first 3 vertices, each subsequent vertex connects to the previous two. ---- ----| "strip" ---- ----Every 3 vertices forms a triangle. ---- ----| "triangles" ---- ----Vertices are rendered as triangles. ---- ----After the first 3 vertices, each subsequent vertex is connected to the previous vertex and the first vertex. ---- ----| "fan" - ---- ----Sounds can store audio samples as 16 bit integers or 32 bit floats. ---- ----@alias lovr.SampleFormat ---- ----32 bit floating point samples (between -1.0 and 1.0). ---- ----| "f32" ---- ----16 bit integer samples (between -32768 and 32767). ---- ----| "i16" - ---- ----Different ways to interpolate between animation keyframes. ---- ----@alias lovr.SmoothMode ---- ----The animated property will snap to the nearest keyframe. ---- ----| "step" ---- ----The animated property will linearly interpolate between keyframes. ---- ----| "linear" ---- ----The animated property will follow a smooth curve between nearby keyframes. ---- ----| "cubic" - ---- ----Different data layouts for pixels in `Image` and `Texture` objects. ---- ----Formats starting with `d` are depth formats, used for depth/stencil render targets. ---- ----Formats starting with `bc` and `astc` are compressed formats. ---- ----Compressed formats have better performance since they stay compressed on the CPU and GPU, reducing the amount of memory bandwidth required to look up all the pixels needed for shading. ---- ----Formats without the `f` suffix are unsigned normalized formats, which store values in the range `[0,1]`. ---- ----The `f` suffix indicates a floating point format which can store values outside this range, and is used for HDR rendering or storing data in a texture. ---- ----@alias lovr.TextureFormat ---- ----One 8-bit channel. ---- ----1 byte per pixel. ---- ----| "r8" ---- ----Two 8-bit channels. ---- ----2 bytes per pixel. ---- ----| "rg8" ---- ----Four 8-bit channels. ---- ----4 bytes per pixel. ---- ----| "rgba8" ---- ----One 16-bit channel. ---- ----2 bytes per pixel. ---- ----| "r16" ---- ----Two 16-bit channels. ---- ----4 bytes per pixel. ---- ----| "rg16" ---- ----Four 16-bit channels. ---- ----8 bytes per pixel. ---- ----| "rgba16" ---- ----One 16-bit floating point channel. ---- ----2 bytes per pixel. ---- ----| "r16f" ---- ----Two 16-bit floating point channels. ---- ----4 bytes per pixel. ---- ----| "rg16f" ---- ----Four 16-bit floating point channels. ---- ----8 bytes per pixel. ---- ----| "rgba16f" ---- ----One 32-bit floating point channel. ---- ----4 bytes per pixel. ---- ----| "r32f" ---- ----Two 32-bit floating point channels. ---- ----8 bytes per pixel. ---- ----| "rg32f" ---- ----Four 32-bit floating point channels. ---- ----16 bytes per pixel. ---- ----| "rgba32f" ---- ----Packs three channels into 16 bits. ---- ----2 bytes per pixel. ---- ----| "rgb565" ---- ----Packs four channels into 16 bits, with "cutout" alpha. ---- ----2 bytes per pixel. ---- ----| "rgb5a1" ---- ----Packs four channels into 32 bits. ---- ----4 bytes per pixel. ---- ----| "rgb10a2" ---- ----Packs three unsigned floating point channels into 32 bits. ---- ----4 bytes per pixel. ---- ----| "rg11b10f" ---- ----One 16-bit depth channel. ---- ----2 bytes per pixel. ---- ----| "d16" ---- ----One 24-bit depth channel and one 8-bit stencil channel. ---- ----4 bytes per pixel. ---- ----| "d24s8" ---- ----One 32-bit floating point depth channel. ---- ----4 bytes per pixel. ---- ----| "d32f" ---- ----One 32-bit floating point depth channel and one 8-bit stencil channel. ---- ----5 bytes per pixel. ---- ----| "d32fs8" ---- ----3 channels. ---- ----8 bytes per 4x4 block, or 0.5 bytes per pixel. ---- ----Good for opaque images. ---- ----| "bc1" ---- ----Four channels. ---- ----16 bytes per 4x4 block or 1 byte per pixel. ---- ----Not good for anything, because it only has 16 distinct levels of alpha. ---- ----| "bc2" ---- ----Four channels. ---- ----16 bytes per 4x4 block or 1 byte per pixel. ---- ----Good for color images with transparency. ---- ----| "bc3" ---- ----One unsigned normalized channel. ---- ----8 bytes per 4x4 block or 0.5 bytes per pixel. ---- ----Good for grayscale images, like heightmaps. ---- ----| "bc4u" ---- ----One signed normalized channel. ---- ----8 bytes per 4x4 block or 0.5 bytes per pixel. ---- ----Similar to bc4u but has a range of -1 to 1. ---- ----| "bc4s" ---- ----Two unsigned normalized channels. ---- ----16 bytes per 4x4 block, or 1 byte per pixel. ---- ----Good for normal maps. ---- ----| "bc5u" ---- ----Two signed normalized channels. ---- ----16 bytes per 4x4 block or 1 byte per pixel. ---- ----Good for normal maps. ---- ----| "bc5s" ---- ----Three unsigned floating point channels. ---- ----16 bytes per 4x4 block or 1 byte per pixel. ---- ----Good for HDR images. ---- ----| "bc6uf" ---- ----Three floating point channels. ---- ----16 bytes per 4x4 block or 1 byte per pixel. ---- ----Good for HDR images. ---- ----| "bc6sf" ---- ----Four channels. ---- ----16 bytes per 4x4 block or 1 byte per pixel. ---- ----High quality. ---- ----Good for most color images, including transparency. ---- ----| "bc7" ---- ----Four channels, 16 bytes per 4x4 block or 1 byte per pixel. ---- ----| "astc4x4" ---- ----Four channels, 16 bytes per 5x4 block or 0.80 bytes per pixel. ---- ----| "astc5x4" ---- ----Four channels, 16 bytes per 5x5 block or 0.64 bytes per pixel. ---- ----| "astc5x5" ---- ----Four channels, 16 bytes per 6x5 block or 0.53 bytes per pixel. ---- ----| "astc6x5" ---- ----Four channels, 16 bytes per 6x6 block or 0.44 bytes per pixel. ---- ----| "astc6x6" ---- ----Four channels, 16 bytes per 8x5 block or 0.40 bytes per pixel. ---- ----| "astc8x5" ---- ----Four channels, 16 bytes per 8x6 block or 0.33 bytes per pixel. ---- ----| "astc8x6" ---- ----Four channels, 16 bytes per 8x8 block or 0.25 bytes per pixel. ---- ----| "astc8x8" ---- ----Four channels, 16 bytes per 10x5 block or 0.32 bytes per pixel. ---- ----| "astc10x5" ---- ----Four channels, 16 bytes per 10x6 block or 0.27 bytes per pixel. ---- ----| "astc10x6" ---- ----Four channels, 16 bytes per 10x8 block or 0.20 bytes per pixel. ---- ----| "astc10x8" ---- ----Four channels, 16 bytes per 10x10 block or 0.16 bytes per pixel. ---- ----| "astc10x10" ---- ----Four channels, 16 bytes per 12x10 block or 0.13 bytes per pixel. ---- ----| "astc12x10" ---- ----Four channels, 16 bytes per 12x12 block or 0.11 bytes per pixel. ---- ----| "astc12x12" diff --git a/meta/3rd/lovr/library/lovr/event.lua b/meta/3rd/lovr/library/lovr/event.lua deleted file mode 100644 index a515c1ab..00000000 --- a/meta/3rd/lovr/library/lovr/event.lua +++ /dev/null @@ -1,430 +0,0 @@ ----@meta - ---- ----The `lovr.event` module handles events from the operating system. ---- ----Due to its low-level nature, it's rare to use `lovr.event` in simple projects. ---- ---- ----### NOTE: ----You can define your own custom events by adding a function to the `lovr.handlers` table with a key of the name of the event you want to add. ---- ----Then, push the event using `lovr.event.push`. ---- ----@class lovr.event -lovr.event = {} - ---- ----Clears the event queue, removing any unprocessed events. ---- -function lovr.event.clear() end - ---- ----This function returns a Lua iterator for all of the unprocessed items in the event queue. ---- ----Each event consists of a name as a string, followed by event-specific arguments. ---- ----This function is called in the default implementation of `lovr.run`, so it is normally not necessary to poll for events yourself. ---- ----@return function iterator # The iterator function, usable in a for loop. -function lovr.event.poll() end - ---- ----Fills the event queue with unprocessed events from the operating system. ---- ----This function should be called often, otherwise the operating system will consider the application unresponsive. This function is called in the default implementation of `lovr.run`. ---- -function lovr.event.pump() end - ---- ----Pushes an event onto the event queue. ---- ----It will be processed the next time `lovr.event.poll` is called. ---- ----For an event to be processed properly, there needs to be a function in the `lovr.handlers` table with a key that's the same as the event name. ---- ---- ----### NOTE: ----Only nil, booleans, numbers, strings, and LÖVR objects are supported types for event data. ---- ----@param name string # The name of the event. ----@vararg any # The arguments for the event. Currently, up to 4 are supported. -function lovr.event.push(name, ...) end - ---- ----Pushes an event to quit. ---- ----An optional number can be passed to set the exit code for the application. ---- ----An exit code of zero indicates normal termination, whereas a nonzero exit code indicates that an error occurred. ---- ---- ----### NOTE: ----This function is equivalent to calling `lovr.event.push('quit', )`. ---- ----The event won't be processed until the next time `lovr.event.poll` is called. ---- ----The `lovr.quit` callback will be called when the event is processed, which can be used to do any cleanup work. ---- ----The callback can also return `false` to abort the quitting process. ---- ----@param code? number # The exit code of the program. -function lovr.event.quit(code) end - ---- ----Pushes an event to restart the framework. ---- ---- ----### NOTE: ----The event won't be processed until the next time `lovr.event.poll` is called. ---- ----The `lovr.restart` callback can be used to persist a value between restarts. ---- -function lovr.event.restart() end - ---- ----Keys that can be pressed on a keyboard. ---- ----Notably, numpad keys are missing right now. ---- ----@alias lovr.KeyCode ---- ----The A key. ---- ----| "a" ---- ----The B key. ---- ----| "b" ---- ----The C key. ---- ----| "c" ---- ----The D key. ---- ----| "d" ---- ----The E key. ---- ----| "e" ---- ----The F key. ---- ----| "f" ---- ----The G key. ---- ----| "g" ---- ----The H key. ---- ----| "h" ---- ----The I key. ---- ----| "i" ---- ----The J key. ---- ----| "j" ---- ----The K key. ---- ----| "k" ---- ----The L key. ---- ----| "l" ---- ----The M key. ---- ----| "m" ---- ----The N key. ---- ----| "n" ---- ----The O key. ---- ----| "o" ---- ----The P key. ---- ----| "p" ---- ----The Q key. ---- ----| "q" ---- ----The R key. ---- ----| "r" ---- ----The S key. ---- ----| "s" ---- ----The T key. ---- ----| "t" ---- ----The U key. ---- ----| "u" ---- ----The V key. ---- ----| "v" ---- ----The W key. ---- ----| "w" ---- ----The X key. ---- ----| "x" ---- ----The Y key. ---- ----| "y" ---- ----The Z key. ---- ----| "z" ---- ----The 0 key. ---- ----| "0" ---- ----The 1 key. ---- ----| "1" ---- ----The 2 key. ---- ----| "2" ---- ----The 3 key. ---- ----| "3" ---- ----The 4 key. ---- ----| "4" ---- ----The 5 key. ---- ----| "5" ---- ----The 6 key. ---- ----| "6" ---- ----The 7 key. ---- ----| "7" ---- ----The 8 key. ---- ----| "8" ---- ----The 9 key. ---- ----| "9" ---- ----The space bar. ---- ----| "space" ---- ----The enter key. ---- ----| "return" ---- ----The tab key. ---- ----| "tab" ---- ----The escape key. ---- ----| "escape" ---- ----The backspace key. ---- ----| "backspace" ---- ----The up arrow key. ---- ----| "up" ---- ----The down arrow key. ---- ----| "down" ---- ----The left arrow key. ---- ----| "left" ---- ----The right arrow key. ---- ----| "right" ---- ----The home key. ---- ----| "home" ---- ----The end key. ---- ----| "end" ---- ----The page up key. ---- ----| "pageup" ---- ----The page down key. ---- ----| "pagedown" ---- ----The insert key. ---- ----| "insert" ---- ----The delete key. ---- ----| "delete" ---- ----The F1 key. ---- ----| "f1" ---- ----The F2 key. ---- ----| "f2" ---- ----The F3 key. ---- ----| "f3" ---- ----The F4 key. ---- ----| "f4" ---- ----The F5 key. ---- ----| "f5" ---- ----The F6 key. ---- ----| "f6" ---- ----The F7 key. ---- ----| "f7" ---- ----The F8 key. ---- ----| "f8" ---- ----The F9 key. ---- ----| "f9" ---- ----The F10 key. ---- ----| "f10" ---- ----The F11 key. ---- ----| "f11" ---- ----The F12 key. ---- ----| "f12" ---- ----The backtick/backquote/grave accent key. ---- ----| "`" ---- ----The dash/hyphen/minus key. ---- ----| "-" ---- ----The equal sign key. ---- ----| "=" ---- ----The left bracket key. ---- ----| "[" ---- ----The right bracket key. ---- ----| "]" ---- ----The backslash key. ---- ----| "\\" ---- ----The semicolon key. ---- ----| ";" ---- ----The single quote key. ---- ----| "'" ---- ----The comma key. ---- ----| "," ---- ----The period key. ---- ----| "." ---- ----The slash key. ---- ----| "/" ---- ----The left control key. ---- ----| "lctrl" ---- ----The left shift key. ---- ----| "lshift" ---- ----The left alt key. ---- ----| "lalt" ---- ----The left OS key (windows, command, super). ---- ----| "lgui" ---- ----The right control key. ---- ----| "rctrl" ---- ----The right shift key. ---- ----| "rshift" ---- ----The right alt key. ---- ----| "ralt" ---- ----The right OS key (windows, command, super). ---- ----| "rgui" ---- ----The caps lock key. ---- ----| "capslock" ---- ----The scroll lock key. ---- ----| "scrolllock" ---- ----The numlock key. ---- ----| "numlock" diff --git a/meta/3rd/lovr/library/lovr/filesystem.lua b/meta/3rd/lovr/library/lovr/filesystem.lua deleted file mode 100644 index c2a1220b..00000000 --- a/meta/3rd/lovr/library/lovr/filesystem.lua +++ /dev/null @@ -1,333 +0,0 @@ ----@meta - ---- ----The `lovr.filesystem` module provides access to the filesystem. ---- ----All files written will go in a special folder called the "save directory". ---- ----The location of the save directory is platform-specific: ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
WindowsC:\Users\<user>\AppData\Roaming\LOVR\<identity>
macOS/Users/<user>/Library/Application Support/LOVR/<identity>
Linux/home/<user>/.local/share/LOVR/<identity>
Android/sdcard/Android/data/<identity>/files
---- ----`` is a unique identifier for the project, and can be set in `lovr.conf`. ---- ----On Android, the identity can not be changed and will always be the package id (e.g. `org.lovr.app`). ---- ----When files are read, they will be searched for in multiple places. ---- ----By default, the save directory is checked first, then the project source (folder or zip). ---- ----That way, when data is written to a file, any future reads will see the new data. ---- ----The `t.saveprecedence` conf setting can be used to change this precedence. ---- ----Conceptually, `lovr.filesystem` uses a "virtual filesystem", which is an ordered list of folders and zip files that are merged into a single filesystem hierarchy. ---- ----Folders and archives in the list can be added and removed with `lovr.filesystem.mount` and `lovr.filesystem.unmount`. ---- ----LÖVR extends Lua's `require` function to look for modules in the virtual filesystem. ---- ----The search patterns can be changed with `lovr.filesystem.setRequirePath`, similar to `package.path`. ---- ----@class lovr.filesystem -lovr.filesystem = {} - ---- ----Appends content to the end of a file. ---- ---- ----### NOTE: ----If the file does not exist, it is created. ---- ----@overload fun(filename: string, blob: lovr.Blob):number ----@param filename string # The file to append to. ----@param content string # A string to write to the end of the file. ----@return number bytes # The number of bytes actually appended to the file. -function lovr.filesystem.append(filename, content) end - ---- ----Creates a directory in the save directory. ---- ----Any parent directories that don't exist will also be created. ---- ----@param path string # The directory to create, recursively. ----@return boolean success # Whether the directory was created. -function lovr.filesystem.createDirectory(path) end - ---- ----Returns the application data directory. ---- ----This will be something like: ---- ----- `C:\Users\user\AppData\Roaming` on Windows. ----- `/home/user/.config` on Linux. ----- `/Users/user/Library/Application Support` on macOS. ---- ----@return string path # The absolute path to the appdata directory. -function lovr.filesystem.getAppdataDirectory() end - ---- ----Returns a sorted table containing all files and folders in a single directory. ---- ---- ----### NOTE: ----This function calls `table.sort` to sort the results, so if `table.sort` is not available in the global scope the results are not guaranteed to be sorted. ---- ----@param path string # The directory. ----@return lovr.items table # A table with a string for each file and subfolder in the directory. -function lovr.filesystem.getDirectoryItems(path) end - ---- ----Returns the absolute path of the LÖVR executable. ---- ----@return string path # The absolute path of the LÖVR executable, or `nil` if it is unknown. -function lovr.filesystem.getExecutablePath() end - ---- ----Returns the identity of the game, which is used as the name of the save directory. ---- ----The default is `default`. ---- ----It can be changed using `t.identity` in `lovr.conf`. ---- ---- ----### NOTE: ----On Android, this is always the package id (like `org.lovr.app`). ---- ----@return string identity # The name of the save directory, or `nil` if it isn't set. -function lovr.filesystem.getIdentity() end - ---- ----Returns when a file was last modified, since some arbitrary time in the past. ---- ----@param path string # The file to check. ----@return number time # The modification time of the file, in seconds, or `nil` if it's unknown. -function lovr.filesystem.getLastModified(path) end - ---- ----Get the absolute path of the mounted archive containing a path in the virtual filesystem. ---- ----This can be used to determine if a file is in the game's source directory or the save directory. ---- ----@param path string # The path to check. ----@return string realpath # The absolute path of the mounted archive containing `path`. -function lovr.filesystem.getRealDirectory(path) end - ---- ----Returns the require path. ---- ----The require path is a semicolon-separated list of patterns that LÖVR will use to search for files when they are `require`d. ---- ----Any question marks in the pattern will be replaced with the module that is being required. ---- ----It is similar to Lua\'s `package.path` variable, but the main difference is that the patterns are relative to the virtual filesystem. ---- ---- ----### NOTE: ----The default reqiure path is '?.lua;?/init.lua'. ---- ----@return string path # The semicolon separated list of search patterns. -function lovr.filesystem.getRequirePath() end - ---- ----Returns the absolute path to the save directory. ---- ---- ----### NOTE: ----The save directory takes the following form: ---- ---- /LOVR/ ---- ----Where `` is `lovr.filesystem.getAppdataDirectory` and `` is `lovr.filesystem.getIdentity` and can be customized using `lovr.conf`. ---- ----@return string path # The absolute path to the save directory. -function lovr.filesystem.getSaveDirectory() end - ---- ----Returns the size of a file, in bytes. ---- ---- ----### NOTE: ----If the file does not exist, an error is thrown. ---- ----@param file string # The file. ----@return number size # The size of the file, in bytes. -function lovr.filesystem.getSize(file) end - ---- ----Get the absolute path of the project's source directory or archive. ---- ----@return string path # The absolute path of the project's source, or `nil` if it's unknown. -function lovr.filesystem.getSource() end - ---- ----Returns the absolute path of the user's home directory. ---- ----@return string path # The absolute path of the user's home directory. -function lovr.filesystem.getUserDirectory() end - ---- ----Returns the absolute path of the working directory. ---- ----Usually this is where the executable was started from. ---- ----@return string path # The current working directory, or `nil` if it's unknown. -function lovr.filesystem.getWorkingDirectory() end - ---- ----Check if a path exists and is a directory. ---- ----@param path string # The path to check. ----@return boolean isDirectory # Whether or not the path is a directory. -function lovr.filesystem.isDirectory(path) end - ---- ----Check if a path exists and is a file. ---- ----@param path string # The path to check. ----@return boolean isFile # Whether or not the path is a file. -function lovr.filesystem.isFile(path) end - ---- ----Returns whether the current project source is fused to the executable. ---- ----@return boolean fused # Whether or not the project is fused. -function lovr.filesystem.isFused() end - ---- ----Load a file containing Lua code, returning a Lua chunk that can be run. ---- ---- ----### NOTE: ----An error is thrown if the file contains syntax errors. ---- ----@param filename string # The file to load. ----@return function chunk # The runnable chunk. -function lovr.filesystem.load(filename) end - ---- ----Mounts a directory or `.zip` archive, adding it to the virtual filesystem. ---- ----This allows you to read files from it. ---- ---- ----### NOTE: ----The `append` option lets you control the priority of the archive's files in the event of naming collisions. ---- ----This function is not thread safe. ---- ----Mounting or unmounting an archive while other threads call lovr.filesystem functions is not supported. ---- ----@param path string # The path to mount. ----@param mountpoint? string # The path in the virtual filesystem to mount to. ----@param append? boolean # Whether the archive will be added to the end or the beginning of the search path. ----@param root? string # A subdirectory inside the archive to use as the root. If `nil`, the actual root of the archive is used. ----@return boolean success # Whether the archive was successfully mounted. -function lovr.filesystem.mount(path, mountpoint, append, root) end - ---- ----Creates a new Blob that contains the contents of a file. ---- ----@param filename string # The file to load. ----@return lovr.Blob blob # The new Blob. -function lovr.filesystem.newBlob(filename) end - ---- ----Read the contents of a file. ---- ---- ----### NOTE: ----If the file does not exist or cannot be read, nil is returned. ---- ----@param filename string # The name of the file to read. ----@param bytes? number # The number of bytes to read (if -1, all bytes will be read). ----@return string contents # The contents of the file. ----@return number bytes # The number of bytes read from the file. -function lovr.filesystem.read(filename, bytes) end - ---- ----Remove a file or directory in the save directory. ---- ---- ----### NOTE: ----A directory can only be removed if it is empty. ---- ----To recursively remove a folder, use this function with `lovr.filesystem.getDirectoryItems`. ---- ----@param path string # The file or directory to remove. ----@return boolean success # Whether the path was removed. -function lovr.filesystem.remove(path) end - ---- ----Set the name of the save directory. ---- ----This function can only be called once and is called automatically at startup, so this function normally isn't called manually. ---- ----However, the identity can be changed by setting the `t.identity` option in `lovr.conf`. ---- ----@param identity string # The name of the save directory. -function lovr.filesystem.setIdentity(identity) end - ---- ----Sets the require path. ---- ----The require path is a semicolon-separated list of patterns that LÖVR will use to search for files when they are `require`d. ---- ----Any question marks in the pattern will be replaced with the module that is being required. ---- ----It is similar to Lua\'s `package.path` variable, except the patterns will be checked using `lovr.filesystem` APIs. This allows `require` to work even when the project is packaged into a zip archive, or when the project is launched from a different directory. ---- ---- ----### NOTE: ----The default reqiure path is '?.lua;?/init.lua'. ---- ----@param path? string # An optional semicolon separated list of search patterns. -function lovr.filesystem.setRequirePath(path) end - ---- ----Unmounts a directory or archive previously mounted with `lovr.filesystem.mount`. ---- ---- ----### NOTE: ----This function is not thread safe. ---- ----Mounting or unmounting an archive while other threads call lovr.filesystem functions is not supported. ---- ----@param path string # The path to unmount. ----@return boolean success # Whether the archive was unmounted. -function lovr.filesystem.unmount(path) end - ---- ----Write to a file in the save directory. ---- ---- ----### NOTE: ----If the file does not exist, it is created. ---- ----If the file already has data in it, it will be replaced with the new content. ---- ----If the path contains subdirectories, all of the parent directories need to exist first or the write will fail. ---- ----Use `lovr.filesystem.createDirectory` to make sure they're created first. ---- ----@overload fun(filename: string, blob: lovr.Blob):boolean ----@param filename string # The file to write to. ----@param content string # A string to write to the file. ----@return boolean success # Whether the write was successful. -function lovr.filesystem.write(filename, content) end diff --git a/meta/3rd/lovr/library/lovr/graphics.lua b/meta/3rd/lovr/library/lovr/graphics.lua deleted file mode 100644 index 956d91ae..00000000 --- a/meta/3rd/lovr/library/lovr/graphics.lua +++ /dev/null @@ -1,3815 +0,0 @@ ----@meta - ---- ----The graphics module renders graphics and performs computation using the GPU. ---- ----Most of the graphics functions are on the `Pass` object. ---- ----@class lovr.graphics -lovr.graphics = {} - ---- ----Compiles shader code to SPIR-V bytecode. ---- ----The bytecode can be passed to `lovr.graphics.newShader` to create shaders, which will be faster than creating it from GLSL. The bytecode is portable, so bytecode compiled on one platform will work on other platforms. This allows shaders to be precompiled in a build step. ---- ---- ----### NOTE: ----The input can be GLSL or SPIR-V. ---- ----If it's SPIR-V, it will be returned unchanged as a Blob. ---- ----If the shader fails to compile, an error will be thrown with the error message. ---- ----@overload fun(stage: lovr.ShaderStage, blob: lovr.Blob):lovr.Blob ----@param stage lovr.ShaderStage # The type of shader to compile. ----@param source string # A string or filename with shader code. ----@return lovr.Blob bytecode # A Blob containing compiled SPIR-V code. -function lovr.graphics.compileShader(stage, source) end - ---- ----Returns the global background color. ---- ----The textures in a render pass will be cleared to this color at the beginning of the pass if no other clear option is specified. ---- ----Additionally, the headset and window will be cleared to this color before rendering. ---- ---- ----### NOTE: ----Setting the background color in `lovr.draw` will apply on the following frame, since the default pass is cleared before `lovr.draw` is called. ---- ----Internally, this color is applied to the default pass objects when retrieving one of them using `lovr.headset.getPass` or `lovr.graphics.getPass`. ---- ----Both are called automatically by the default `lovr.run` implementation. ---- ----Using the background color to clear the display is expected to be more efficient than manually clearing after a render pass begins, especially on mobile GPUs. ---- ----@return number r # The red component of the background color. ----@return number g # The green component of the background color. ----@return number b # The blue component of the background color. ----@return number a # The alpha component of the background color. -function lovr.graphics.getBackgroundColor() end - ---- ----Creates a temporary Buffer. ---- ---- ----### NOTE: ----The format table can contain a list of `FieldType`s or a list of tables to provide extra information about each field. ---- ----Each inner table has the following keys: ---- ----- `type` is the `FieldType` of the field and is required. ----- `offset` is the byte offset of the field. ---- ----Any fields with a `nil` offset will be placed next ---- to each other sequentially in memory, subject to any padding required by the Buffer's layout. ---- In practice this means that an `offset` should be set for either all of the fields or none of ---- them. ----- `location` is the vertex attribute location of each field. ---- ----This is used to match up each ---- field with an attribute declared in a shader, and doesn't have any purpose when binding the ---- buffer as a uniform or storage buffer. ---- ----Any fields with a `nil` location will use an ---- autoincrementing location starting at zero. ---- ----Named locations are not currently supported, but ---- may be added in the future. ---- ----If no table or Blob is used to define the initial Buffer contents, its data will be undefined. ---- ----There is currently a max of 16 fields. ---- ----@overload fun(data: table, type: lovr.FieldType):lovr.Buffer ----@overload fun(length: number, format: table):lovr.Buffer ----@overload fun(data: table, format: table):lovr.Buffer ----@overload fun(blob: lovr.Blob, type: lovr.FieldType):lovr.Buffer ----@overload fun(blob: lovr.Blob, format: table):lovr.Buffer ----@param length number # The length of the Buffer. ----@param type lovr.FieldType # The type of each item in the Buffer. ----@return lovr.Buffer buffer # The new Buffer. -function lovr.graphics.getBuffer(length, type) end - ---- ----Returns the default Font. ---- ----The default font is Varela Round, created at 32px with a spread value of `4.0`. ---- ----It's used by `Pass:text` if no Font is provided. ---- ----@return lovr.Font font # The default Font object. -function lovr.graphics.getDefaultFont() end - ---- ----Returns information about the graphics device and driver. ---- ---- ----### NOTE: ----The device and vendor ID numbers will usually be PCI IDs, which are standardized numbers consisting of 4 hex digits. ---- ----Various online databases and system utilities can be used to look up these numbers. ---- ----Here are some example vendor IDs for a few popular GPU manufacturers: ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
IDVendor
0x1002Advanced Micro Devices, Inc.
0x8086Intel Corporation
0x10deNVIDIA Corporation
---- ----It is not currently possible to get the version of the driver, although this could be added. ---- ----Regarding multiple GPUs: If OpenXR is enabled, the OpenXR runtime has control over which GPU is used, which ensures best compatibility with the VR headset. ---- ----Otherwise, the "first" GPU returned by the renderer will be used. ---- ----There is currently no other way to pick a GPU to use. ---- ----@return {id: number, vendor: number, name: string, renderer: string, subgroupSize: number, discrete: boolean} device # nil -function lovr.graphics.getDevice() end - ---- ----Returns a table indicating which features are supported by the GPU. ---- ----@return {textureBC: boolean, textureASTC: boolean, wireframe: boolean, depthClamp: boolean, depthResolve: boolean, indirectDrawFirstInstance: boolean, float64: boolean, int64: boolean, int16: boolean} features # -function lovr.graphics.getFeatures() end - ---- ----Returns limits of the current GPU. ---- ---- ----### NOTE: ----The limit ranges are as follows: ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
LimitMinimumMaximum
textureSize2D4096
textureSize3D256
textureSizeCube4096
textureLayers256
renderSize{ 4096, 4096, 6 }
uniformBuffersPerStage932*
storageBuffersPerStage432*
sampledTexturesPerStage3232*
storageTexturesPerStage432*
samplersPerStage1532*
resourcesPerShader3232*
uniformBufferRange65536
storageBufferRange134217728 (128MB)1073741824 (1GB)*
uniformBufferAlign256
storageBufferAlign64
vertexAttributes1616*
vertexBufferStride204865535*
vertexShaderOutputs64
clipDistances0
cullDistances0
clipAndCullDistances0
computeDispatchCount{ 65536, 65536, 65536 }
computeWorkgroupSize{ 128, 128, 64 }
computeWorkgroupVolume128
computeSharedMemory16384 (16KB)
pushConstantSize128256*
indirectDrawCount1
instances134217727
anisotropy0.0
pointSize1.0
---- ----Note: in the table above, `*` means that LÖVR itself is imposing a cap on the limit, instead of the GPU. ---- ----@return {textureSize2D: number, textureSize3D: number, textureSizeCube: number, textureLayers: number, renderSize: table, uniformBuffersPerStage: number, storageBuffersPerStage: number, sampledTexturesPerStage: number, storageTexturesPerStage: number, samplersPerStage: number, resourcesPerShader: number, uniformBufferRange: number, storageBufferRange: number, uniformBufferAlign: number, storageBufferAlign: number, vertexAttributes: number, vertexBufferStride: number, vertexShaderOutputs: number, clipDistances: number, cullDistances: number, clipAndCullDistances: number, workgroupCount: table, workgroupSize: table, totalWorkgroupSize: number, computeSharedMemory: number, shaderConstantSize: number, indirectDrawCount: number, instances: number, anisotropy: number, pointSize: number} limits # -function lovr.graphics.getLimits() end - ---- ----Creates and returns a temporary Pass object. ---- ---- ----### NOTE: ----Fun facts about render passes: ---- ----- Textures must have been created with the `render` `TextureUsage`. ----- Textures must have the same dimensions, layer counts, and sample counts. ----- When rendering to textures with multiple layers, each draw will be broadcast to all layers. ---- Render passes have multiple "views" (cameras), and each layer uses a corresponding view, ---- allowing each layer to be rendered from a different viewpoint. ---- ----This enables fast stereo ---- rendering, but can also be used to efficiently render to cubemaps. ---- ----The `ViewIndex` variable ---- can also be used in shaders to set up any desired per-view behavior. ----- If `mipmap` is true, then any textures with mipmaps must have the `transfer` `TextureUsage`. ----- It's okay to have zero color textures, but in this case there must be a depth texture. ----- Setting `clear` to `false` for textures is usually very slow on mobile GPUs. ----- It's possible to render to a specific mipmap level of a Texture, or a subset of its layers, by ---- rendering to texture views, see `Texture:newView`. ---- ----For `compute` and `transfer` passes, all of the commands in the pass act as though they run in parallel. ---- ----This means that writing to the same element of a buffer twice, or writing to it and reading from it again is not guaranteed to work properly on all GPUs. ---- ----LÖVR is not currently able to check for this. ---- ----If compute or transfers need to be sequenced, multiple passes should be used. ---- ----It is, however, completely fine to read and write to non-overlapping regions of the same buffer or texture. ---- ----@overload fun(type: lovr.PassType, texture: lovr.Texture):lovr.Pass ----@overload fun(type: lovr.PassType, canvas: table):lovr.Pass ----@param type lovr.PassType # The type of pass to create. ----@return lovr.Pass pass # The new Pass. -function lovr.graphics.getPass(type) end - ---- ----Returns the window pass. ---- ----This is a builtin render `Pass` object that renders to the desktop window texture. ---- ----If the desktop window was not open when the graphics module was initialized, this function will return `nil`. ---- ---- ----### NOTE: ----`lovr.conf` may be used to change the settings for the pass: `t.graphics.antialias` enables antialiasing, and `t.graphics.stencil` enables the stencil buffer. ---- ----This pass clears the window texture to the background color, which can be changed using `lovr.graphics.setBackgroundColor`. ---- ----@return lovr.Pass pass # The window pass, or `nil` if there is no window. -function lovr.graphics.getWindowPass() end - ---- ----Returns the type of operations the GPU supports for a texture format, if any. ---- ----@param format lovr.TextureFormat # The texture format to query. ----@param features lovr.TextureFeature # Zero or more features to check. If no features are given, this function will return whether the GPU supports *any* feature for this format. Otherwise, this function will only return true if *all* of the input features are supported. ----@return boolean supported # Whether the GPU supports these operations for textures with this format. -function lovr.graphics.isFormatSupported(format, features) end - ---- ----Creates a Buffer. ---- ---- ----### NOTE: ----The format table can contain a list of `FieldType`s or a list of tables to provide extra information about each field. ---- ----Each inner table has the following keys: ---- ----- `type` is the `FieldType` of the field and is required. ----- `offset` is the byte offset of the field. ---- ----Any fields with a `nil` offset will be placed next ---- to each other sequentially in memory, subject to any padding required by the Buffer's layout. ---- In practice this means that you probably want to provide an `offset` for either all of the ---- fields or none of them. ----- `location` is the vertex attribute location of each field. ---- ----This is used to match up each ---- field with an attribute declared in a shader, and doesn't have any purpose when binding the ---- buffer as a uniform or storage buffer. ---- ----Any fields with a `nil` location will use an ---- autoincrementing location starting at zero. ---- ----Named locations are not currently supported, but ---- may be added in the future. ---- ----If no table or Blob is used to define the initial Buffer contents, its data will be undefined. ---- ----There is currently a max of 16 fields. ---- ----@overload fun(data: table, type: lovr.FieldType):lovr.Buffer ----@overload fun(length: number, format: table):lovr.Buffer ----@overload fun(data: table, format: table):lovr.Buffer ----@overload fun(blob: lovr.Blob, type: lovr.FieldType):lovr.Buffer ----@overload fun(blob: lovr.Blob, format: table):lovr.Buffer ----@param length number # The length of the Buffer. ----@param type lovr.FieldType # The type of each item in the Buffer. ----@return lovr.Buffer buffer # The new Buffer. -function lovr.graphics.newBuffer(length, type) end - ---- ----Creates a new Font. ---- ----@overload fun(blob: lovr.Blob, size?: number, spread?: number):lovr.Font ----@overload fun(size?: number, spread?: number):lovr.Font ----@overload fun(rasterizer: lovr.Rasterizer, spread?: number):lovr.Font ----@param filename string # A path to a TTF file. ----@param size? number # The size of the Font in pixels. Larger sizes are slower to initialize and use more memory, but have better quality. ----@param spread? number # For signed distance field fonts (currently all fonts), the width of the SDF, in pixels. The greater the distance the font is viewed from, the larger this value needs to be for the font to remain properly antialiased. Increasing this will have a performance penalty similar to increasing the size of the font. ----@return lovr.Font font # The new Font. -function lovr.graphics.newFont(filename, size, spread) end - ---- ----Creates a new Material from a table of properties and textures. ---- ----All fields are optional. ---- ----Once a Material is created, its properties can not be changed. ---- ----Instead, a new Material should be created with the updated properties. ---- ---- ----### NOTE: ----The non-texture material properties can be accessed in shaders using `Material.`, where the property is the same as the Lua table key. ---- ----The textures use capitalized names in shader code, e.g. `ColorTexture`. ---- ----@param properties {color: lovr.Vec4, glow: lovr.Vec4, uvShift: lovr.Vec2, uvScale: lovr.Vec2, metalness: number, roughness: number, clearcoat: number, clearcoatRoughness: number, occlusionStrength: number, normalScale: number, alphaCutoff: number, texture: lovr.Texture, glowTexture: lovr.Texture, metalnessTexture: lovr.Texture, roughnessTexture: lovr.Texture, clearcoatTexture: lovr.Texture, occlusionTexture: lovr.Texture, normalTexture: lovr.Texture} # Material properties. ----@return lovr.Material material # The new material. -function lovr.graphics.newMaterial(properties) end - ---- ----Loads a 3D model from a file. ---- ----Currently, OBJ, glTF, and binary STL files are supported. ---- ---- ----### NOTE: ----Currently, the following features are not supported by the model importer: ---- ----- glTF: Only the default scene is loaded. ----- glTF: Currently, each skin in a Model can have up to 256 joints. ----- glTF: Meshes can't appear multiple times in the node hierarchy with different skins, they need ---- to use 1 skin consistently. ----- glTF: `KHR_texture_transform` is supported, but all textures in a material will use the same ---- transform. ----- STL: ASCII STL files are not supported. ---- ----Diffuse and emissive textures will be loaded using sRGB encoding, all other textures will be loaded as linear. ---- ----Loading a model file will fail if the asset references textures or other files using absolute paths. ---- ----Relative paths should be used instead, and will be relative to the model file within the virtual filesystem. ---- ----@overload fun(blob: lovr.Blob, options?: table):lovr.Model ----@overload fun(modelData: lovr.ModelData, options?: table):lovr.Model ----@param filename string # The path to model file. ----@param options? {mipmaps: boolean} # Model options. ----@return lovr.Model model # The new Model. -function lovr.graphics.newModel(filename, options) end - ---- ----Creates a new Sampler. ---- ----Samplers are immutable, meaning their parameters can not be changed after the sampler is created. ---- ----Instead, a new sampler should be created with the updated properties. ---- ----@param parameters {filter: {["[1]"]: lovr.FilterMode, ["[2]"]: lovr.FilterMode, ["[3]"]: lovr.FilterMode}, wrap: {["[1]"]: lovr.WrapMode, ["[2]"]: lovr.WrapMode, ["[3]"]: lovr.FilterMode}, compare: lovr.CompareMode, anisotropy: number, mipmaprange: table} # Parameters for the sampler. ----@return lovr.Sampler sampler # The new sampler. -function lovr.graphics.newSampler(parameters) end - ---- ----Creates a Shader, which is a small program that runs on the GPU. ---- ----Shader code is usually written in GLSL and compiled to SPIR-V bytecode. ---- ----SPIR-V is faster to load but requires a build step. ---- ----Either form can be used to create a shader. ---- ----@overload fun(compute: string, options: table):lovr.Shader ----@overload fun(default: lovr.DefaultShader, options: table):lovr.Shader ----@param vertex string # A string, path to a file, or Blob containing GLSL or SPIR-V code for the vertex stage. Can also be a `DefaultShader` to use that shader's vertex code. ----@param fragment string # A string, path to a file, or Blob containing GLSL or SPIR-V code for the fragment stage. Can also be a `DefaultShader` to use that shader's fragment code. ----@param options {flags: table, label: string} # Shader options. ----@return lovr.Shader shader # The new shader. -function lovr.graphics.newShader(vertex, fragment, options) end - ---- ----Creates a new Tally. ---- ----@param type lovr.TallyType # The type of the Tally, which controls what "thing" it measures. ----@param count number # The number of slots in the Tally. Each slot holds one measurement. ----@param views? number # Tally objects with the `time` type can only be used in render passes with a certain number of views. This is ignored for other types of tallies. ----@return lovr.Tally tally # The new Tally. -function lovr.graphics.newTally(type, count, views) end - ---- ----Creates a new Texture. ---- ----Image filenames or `Image` objects can be used to provide the initial pixel data and the dimensions, format, and type. ---- ----Alternatively, dimensions can be provided, which will create an empty texture. ---- ---- ----### NOTE: ----If no `type` is provided in the options table, LÖVR will guess the `TextureType` of the Texture based on the number of layers: ---- ----- If there's only 1 layer, the type will be `2d`. ----- If there are 6 images provided, the type will be `cube`. ----- Otherwise, the type will be `array`. ---- ----Note that an Image can contain multiple layers and mipmaps. ---- ----When a single Image is provided, its layer count will be used as the Texture's layer count. ---- ----If multiple Images are used to initialize the Texture, they must all have a single layer, and their dimensions, format, and mipmap counts must match. ---- ----When providing cubemap images in a table, they can be in one of the following forms: ---- ---- { 'px.png', 'nx.png', 'py.png', 'ny.png', 'pz.png', 'nz.png' } ---- { right = 'px.png', left = 'nx.png', top = 'py.png', bottom = 'ny.png', back = 'pz.png', front = 'nz.png' } ---- { px = 'px.png', nx = 'nx.png', py = 'py.png', ny = 'ny.png', pz = 'pz.png', nz = 'nz.png' } ---- ----(Where 'p' stands for positive and 'n' stands for negative). ---- ----If no `usage` is provided in the options table, LÖVR will guess the `TextureUsage` of the Texture. ---- ----The `sample` usage is always included, but if the texture was created without any images then the texture will have the `render` usage as well. ---- ----The supported image formats are png, jpg, hdr, dds, ktx1, ktx2, and astc. ---- ----If image data is provided, mipmaps will be generated for any missing mipmap levels. ---- ----@overload fun(width: number, height: number, options: table):lovr.Texture ----@overload fun(width: number, height: number, layers: number, options: table):lovr.Texture ----@overload fun(image: string, options: table):lovr.Texture ----@overload fun(images: table, options: table):lovr.Texture ----@overload fun(blob: lovr.Blob, options: table):lovr.Texture ----@param filename string # The filename of an image to load. ----@param options {type: lovr.TextureType, format: lovr.TextureFormat, linear: boolean, samples: number, mipmaps: any, usage: table, label: string} # Texture options. ----@return lovr.Texture texture # The new Texture. -function lovr.graphics.newTexture(filename, options) end - ---- ----Presents the window texture to the desktop window. ---- ----This function is called automatically by the default implementation of `lovr.run`, so it normally does not need to be called. ---- ---- ----### NOTE: ----This should be called after submitting the window pass (`lovr.graphics.getWindowPass`). ---- ----If the window texture has not been rendered to since the last present, this function does nothing. ---- -function lovr.graphics.present() end - ---- ----Changes the global background color. ---- ----The textures in a render pass will be cleared to this color at the beginning of the pass if no other clear option is specified. ---- ----Additionally, the headset and window will be cleared to this color before rendering. ---- ---- ----### NOTE: ----Setting the background color in `lovr.draw` will apply on the following frame, since the default pass is cleared before `lovr.draw` is called. ---- ----Internally, this color is applied to the default pass objects when retrieving one of them using `lovr.headset.getPass` or `lovr.graphics.getPass`. ---- ----Both are called automatically by the default `lovr.run` implementation. ---- ----Using the background color to clear the display is expected to be more efficient than manually clearing after a render pass begins, especially on mobile GPUs. ---- ----@overload fun(hex: number, a?: number) ----@overload fun(table: table) ----@param r number # The red component of the background color. ----@param g number # The green component of the background color. ----@param b number # The blue component of the background color. ----@param a? number # The alpha component of the background color. -function lovr.graphics.setBackgroundColor(r, g, b, a) end - ---- ----Submits work to the GPU. ---- ---- ----### NOTE: ----The submitted `Pass` objects will run in the order specified. ---- ----Commands within a single Pass do not have any ordering guarantees. ---- ----Submitting work to the GPU is not thread safe. ---- ----No other `lovr.graphics` or `Pass` functions may run at the same time as `lovr.graphics.submit`. ---- ----Calling this function will invalidate any temporary buffers or passes that were created during the frame. ---- ----Submitting work to the GPU is a relatively expensive operation. ---- ----It's a good idea to batch all `Pass` objects into 1 submission if possible, unless there's a good reason not to. ---- ----One such reason would be that the frame has so much work that some of it needs to be submitted early to prevent the GPU from running out of things to do. ---- ----Another would be for `Readback` objects. ---- ----By default, this function is called with the default pass at the end of `lovr.draw` and `lovr.mirror`. ---- ----It is valid to submit zero passes. ---- ----This will send an empty batch of work to the GPU. ---- ----@overload fun(t: table):boolean ----@vararg lovr.Pass # The pass objects to submit. Falsy values will be skipped. ----@return boolean true # Always returns true, for convenience when returning from `lovr.draw`. -function lovr.graphics.submit(...) end - ---- ----Waits for all submitted GPU work to finish. ---- ----A normal application that is trying to render graphics at a high framerate should never use this function, since waiting like this prevents the CPU from doing other useful work. ---- ----Otherwise, reasons to use this function might be for debugging or to force a `Readback` to finish immediately. ---- -function lovr.graphics.wait() end - ---- ----A Buffer is a block of GPU memory. ---- ----Buffers are similar to Lua tables or arrays: they have a length and store a list of values. ---- ----The length of a Buffer and its format (the type of each value) are declared upfront and can't be changed. ---- ----Each value of a Buffer consists of one or more fields, and each field has a type. ---- ----For example, if a Buffer is used to store vertices, each value might store 3 fields for the position, normal vector, and UV coordinates of a vertex. ---- ----Buffers are commonly used for: ---- ----- Mesh data: Buffers hold the data that define the vertices in a mesh. Buffers also store the ---- vertex indices of a mesh, which define the order the vertices are connected together into ---- triangles. These are often called vertex buffers and index buffers. ----- Shader data: Buffers can be bound to a Shader, letting the Shader read arbitrary data. For ---- example, Lua code could create a Buffer with the positions and colors of all the lights in a ---- scene, which a Shader can use to do lighting calculations. ----- Compute: Compute shaders can write data to Buffers. ---- ----This GPU-generated data can be used in ---- later rendering work or sent back to Lua. ----- Indirect: Indirect rendering is an advanced technique where instructions for rendering work ---- are recorded to a Buffer (potentially by a compute shader) and later drawn. ---- ----There are two types of Buffers: ---- ----- **Temporary** buffers are very inexpensive to create, and writing to them from Lua is fast. ---- However, they become invalid at the end of `lovr.draw` (i.e. when `lovr.graphics.submit` is ---- called). ---- ----The GPU is slightly slower at accessing data from temporary buffers, and compute ---- shaders can not write to them. ---- ----They are designed for storing data that changes every frame. ----- **Permanent** buffers are more expensive to create, and updating their contents requires a ---- transfer from CPU memory to VRAM. ---- ----They act like normal LÖVR objects and don't need to be ---- recreated every frame. ---- ----They often have faster performance when used by the GPU, and compute ---- shaders can write to them. ---- ----They are great for large pieces of data that are initialized once ---- at load time, or data that is updated infrequently. ---- ----@class lovr.Buffer -local Buffer = {} - ---- ----Clears some or all of the data in the **temporary** Buffer to zero. ---- ----Permanent Buffers can be cleared in a transfer pass using `Pass:clear`. ---- ---- ----### NOTE: ----Clearing a permanent buffer requires the byte offset and byte count of the cleared range to be a multiple of 4. ---- ----This will usually be true for most data types. ---- ----@param index? number # The index of the first item to clear. ----@param count? number # The number of items to clear. If `nil`, clears to the end of the Buffer. -function Buffer:clear(index, count) end - ---- ----Returns the format of the Buffer. ---- ----This is the list of fields that comprise each item in the buffer. ---- ----Each field has a type, byte offset, and vertex attribute location. ---- ----@return table format # The format of the Buffer. -function Buffer:getFormat() end - ---- ----Returns the length of the Buffer. ---- ----@return number length # The length of the Buffer. -function Buffer:getLength() end - ---- ----Returns a raw pointer to the Buffer's memory as a lightuserdata, intended for use with the LuaJIT FFI or for passing to C libraries. ---- ----This is only available for temporary buffers, so the pointer is only valid until `lovr.graphics.submit` is called. ---- ----@return lightuserdata pointer # A pointer to the Buffer's memory. -function Buffer:getPointer() end - ---- ----Returns the size of the Buffer, in bytes. ---- ----This is the same as `length * stride`. ---- ----@return number size # The size of the Buffer, in bytes. -function Buffer:getSize() end - ---- ----Returns the distance between each item in the Buffer, in bytes. ---- ---- ----### NOTE: ----When a Buffer is created, the stride can be set explicitly, otherwise it will be automatically computed based on the fields in the Buffer. ---- ----Strides can not be zero, and can not be smaller than the size of a single item. ---- ----To work around this, bind the Buffer as a storage buffer and fetch data from the buffer manually. ---- ----@return number stride # The stride of the Buffer, in bytes. -function Buffer:getStride() end - ---- ----Returns whether the Buffer is temporary. ---- ----@return boolean temporary # Whether the Buffer is temporary. -function Buffer:isTemporary() end - ---- ----Changes data in a temporary Buffer using a table or a Blob. ---- ----Permanent buffers can be changed using `Pass:copy`. ---- ---- ----### NOTE: ----When using a table, the table can contain a nested table for each value in the Buffer, or it can be a flat list of field component values. ---- ----It is not possible to mix both nested tables and flat values. ---- ----For each item updated, components of each field in the item (according to the Buffer's format) are read from either the nested subtable or the table itself. ---- ----A single number can be used to update a field with a scalar type. ---- ----Multiple numbers or a `lovr.math` vector can be used to update a field with a vector or mat4 type. ---- ----Multiple numbers can be used to update mat2 and mat3 fields. ---- ----When updating normalized field types, components read from the table will be clamped to the normalized range ([0,1] or [-1,1]). ---- ----In the Buffer, each field is written at its byte offset according to the Buffer's format, and subsequent items are separated by the byte stride of the Buffer. ---- ----Any missing components for an updated field will be set to zero. ---- ----@overload fun(self: lovr.Buffer, blob: lovr.Blob, sourceOffset?: number, destinationOffset?: number, size?: number) ----@param data table # A flat or nested table of items to copy to the Buffer (see notes for format). ----@param sourceIndex? number # The index in the table to copy from. ----@param destinationIndex? number # The index of the first value in the Buffer to update. ----@param count? number # The number of values to update. `nil` will copy as many items as possible, based on the lengths of the source and destination. -function Buffer:setData(data, sourceIndex, destinationIndex, count) end - ---- ----Font objects are used to render text with `Pass:text`. ---- ----The active font can be changed using `Pass:setFont`. ---- ----The default font is Varela Round, which is used when no font is active, and can be retrieved using `lovr.graphics.getDefaultFont`. ---- ----Custom fonts can be loaded from TTF files using `lovr.graphics.newFont`. ---- ----Each Font uses a `Rasterizer` to load the TTF file and create images for each glyph. As text is drawn, the Font uploads images from the Rasterizer to a GPU texture atlas as needed. ---- ----The Font also performs text layout and mesh generation for strings of text. ---- ----LÖVR uses a text rendering technique called "multichannel signed distance fields" (MSDF), which makes the font rendering remain crisp when text is viewed up close. ---- ---- ----### NOTE: ----MSDF text requires a special shader to work. ---- ----LÖVR will automatically switch to this shader if no shader is active on the `Pass`. ---- ----This font shader is also available as a `DefaultShader`. ---- ----@class lovr.Font -local Font = {} - ---- ----Returns the ascent of the font. ---- ----The ascent is the maximum amount glyphs ascend above the baseline. ---- ----The units depend on the font's pixel density. ---- ----With the default density, the units correspond to meters. ---- ----@return number ascent # The ascent of the font. -function Font:getAscent() end - ---- ----Returns the descent of the font. ---- ----The descent is the maximum amount glyphs descend below the baseline. ---- ----The units depend on the font's pixel density. ---- ----With the default density, the units correspond to meters. ---- ----@return number descent # The descent of the font. -function Font:getDescent() end - ---- ----Returns the height of the font, sometimes also called the leading. ---- ----This is the full height of a line of text, including the space between lines. ---- ----Each line of a multiline string is separated on the y axis by this height, multiplied by the font's line spacing. ---- ----The units depend on the font's pixel density. ---- ----With the default density, the units correspond to meters. ---- ----@return number height # The height of the font. -function Font:getHeight() end - ---- ----Returns the kerning between 2 glyphs. ---- ----Kerning is a slight horizontal adjustment between 2 glyphs to improve the visual appearance. ---- ----It will often be negative. ---- ----The units depend on the font's pixel density. ---- ----With the default density, the units correspond to meters. ---- ----@overload fun(self: lovr.Font, firstCodepoint: number, second: string):number ----@overload fun(self: lovr.Font, first: string, secondCodepoint: number):number ----@overload fun(self: lovr.Font, firstCodepoint: number, secondCodepoint: number):number ----@param first string # The first character. ----@param second string # The second character. ----@return number keming # The kerning between the two glyphs. -function Font:getKerning(first, second) end - ---- ----Returns the line spacing of the Font. ---- ----When spacing out lines, the height of the font is multiplied the line spacing to get the final spacing value. ---- ----The default is 1.0. ---- ----@return number spacing # The line spacing of the font. -function Font:getLineSpacing() end - ---- ----Returns a table of wrapped lines for a piece of text, given a line length limit. ---- ----Newlines are handled correctly. ---- ----The wrap limit units depend on the pixel density of the font. ---- ----With the default pixel density, the units correspond to meters when the font is drawn at 1.0 scale. ---- ----@overload fun(self: lovr.Font, strings: table, wrap: number):table ----@param string string # The text to wrap. ----@param wrap number # The line length to wrap at. ----@return table lines # A table strings, one for each wrapped line (without any color information). -function Font:getLines(string, wrap) end - ---- ----Returns the pixel density of the font. ---- ----The density is a "pixels per world unit" factor that controls how the pixels in the font's texture are mapped to units in the coordinate space. ---- ----The default pixel density is set to the height of the font. ---- ----This means that lines of text rendered with a scale of 1.0 come out to 1 unit (meter) tall. ---- ----However, if this font was drawn to a 2D texture where the units are in pixels, the font would still be drawn 1 unit (pixel) tall! Scaling the coordinate space or the size of the text by the height of the font would fix this. ---- ----However, a more convenient option is to set the pixel density of the font to 1.0 when doing 2D rendering to make the font's size match up with the pixels of the canvas. ---- ----@return number density # The pixel density of the font. -function Font:getPixelDensity() end - ---- ----Returns the Rasterizer object backing the Font. ---- ----@return lovr.Rasterizer rasterizer # The Rasterizer. -function Font:getRasterizer() end - ---- ----Returns a table of vertices for a piece of text, along with a Material to use when rendering it. The Material returned by this function may not be the same if the Font's texture atlas needs to be recreated with a bigger size to make room for more glyphs. ---- ---- ----### NOTE: ----Each vertex is a table of 4 floating point numbers with the following data: ---- ---- { x, y, u, v } ---- ----These could be placed in a vertex buffer using the following buffer format: ---- ---- { 'vec2:VertexPosition', 'vec2:VertexUV' } ---- ----@param halign lovr.HorizontalAlign # The horizontal align. ----@param valign lovr.VerticalAlign # The vertical align. ----@return table vertices # The table of vertices. See below for the format of each vertex. ----@return lovr.Material material # A Material to use when rendering the vertices. -function Font:getVertices(halign, valign) end - ---- ----Returns the maximum width of a piece of text. ---- ----This function does not perform wrapping but does respect newlines in the text. ---- ----@overload fun(self: lovr.Font, strings: table):number ----@param string string # The text to measure. ----@return number width # The maximum width of the text. -function Font:getWidth(string) end - ---- ----Sets the line spacing of the Font. ---- ----When spacing out lines, the height of the font is multiplied by the line spacing to get the final spacing value. ---- ----The default is 1.0. ---- ----@param spacing number # The new line spacing. -function Font:setLineSpacing(spacing) end - ---- ----Sets the pixel density of the font. ---- ----The density is a "pixels per world unit" factor that controls how the pixels in the font's texture are mapped to units in the coordinate space. ---- ----The default pixel density is set to the height of the font. ---- ----This means that lines of text rendered with a scale of 1.0 come out to 1 unit (meter) tall. ---- ----However, if this font was drawn to a 2D texture where the units are in pixels, the font would still be drawn 1 unit (pixel) tall! Scaling the coordinate space or the size of the text by the height of the font would fix this. ---- ----However, a more convenient option is to set the pixel density of the font to 1.0 when doing 2D rendering to make the font's size match up with the pixels of the canvas. ---- ----@overload fun(self: lovr.Font) ----@param density number # The new pixel density of the font. -function Font:setPixelDensity(density) end - ---- ----Materials are a set of properties and textures that define the properties of a surface, like what color it is, how bumpy or shiny it is, etc. `Shader` code can use the data from a material to compute lighting. ---- ----Materials are immutable, and can't be changed after they are created. ---- ----Instead, a new Material should be created with the updated properties. ---- ----`Pass:setMaterial` changes the active material, causing it to affect rendering until the active material is changed again. ---- ----Using material objects is optional. ---- ----`Pass:setMaterial` can take a `Texture`, and `Pass:setColor` can change the color of objects, so basic tinting and texturing of surfaces does not require a full material to be created. ---- ----Also, a custom material system could be developed by sending textures and other data to shaders manually. ---- ----`Model` objects will create materials for all of the materials defined in the model file. ---- ----In shader code, non-texture material properties can be accessed as `Material.`, and material textures can be accessed as `Texture`, e.g. `RoughnessTexture`. ---- ----@class lovr.Material -local Material = {} - ---- ----Returns the properties of the Material in a table. ---- ----@return table properties # The Material properties. -function Material:getProperties() end - ---- ----Models are 3D model assets loaded from files. ---- ----Currently, OBJ, glTF, and binary STL files are supported. ---- ----A model can be drawn using `Pass:draw`. ---- ----The raw CPU data for a model is held in a `ModelData` object, which can be loaded on threads or reused for multiple Model instances. ---- ----Models have a hierarchy of nodes which can have their transforms modified. ---- ----Meshes are attached to these nodes. ---- ----The same mesh can be attached to multiple nodes, allowing it to be drawn multiple times while only storing a single copy of its data. ---- ----Models can have animations. ---- ----Animations have keyframes which affect the transforms of nodes. Right now each model can only be drawn with a single animated pose per frame. ---- ----Models can have materials, which are collections of properties and textures that define how its surface is affected by lighting. ---- ----Each mesh in the model can use a single material. ---- ----@class lovr.Model -local Model = {} - ---- ----Animates a Model by setting or blending the transforms of nodes using data stored in the keyframes of an animation. ---- ----The animation from the model file is evaluated at the timestamp, resulting in a set of node properties. ---- ----These properties are then applied to the nodes in the model, using an optional blend factor. ---- ----If the animation doesn't have keyframes that target a given node, the node will remain unchanged. ---- ---- ----### NOTE: ----If the timestamp is larger than the duration of the animation, it will wrap back around to zero, so looping an animation doesn't require using the modulo operator. ---- ----To change the speed of the animation, multiply the timestamp by a speed factor. ---- ----For each animated property in the animation, if the timestamp used for the animation is less than the timestamp of the first keyframe, the data of the first keyframe will be used. ---- ----This function can be called multiple times to layer and blend animations. ---- ----The model joints will be drawn in the final resulting pose. ---- ----`Model:resetNodeTransforms` can be used to reset the model nodes to their initial transforms, which is helpful to ensure animating starts from a clean slate. ---- ----@overload fun(self: lovr.Model, index: number, time: number, blend?: number) ----@param name string # The name of an animation in the model file. ----@param time number # The timestamp to evaluate the keyframes at, in seconds. ----@param blend? number # How much of the animation's pose to blend into the nodes, from 0 to 1. -function Model:animate(name, time, blend) end - ---- ----Returns the number of animations in the Model. ---- ----@return number count # The number of animations in the Model. -function Model:getAnimationCount() end - ---- ----Returns the duration of an animation in the Model, in seconds. ---- ---- ----### NOTE: ----The duration of an animation is calculated as the largest timestamp of all of its keyframes. ---- ----@overload fun(self: lovr.Model, name: string):number ----@param index number # The animation index. ----@return number duration # The duration of the animation, in seconds. -function Model:getAnimationDuration(index) end - ---- ----Returns the name of an animation in the Model. ---- ----@param index number # The index of an animation. ----@return string name # The name of the animation. -function Model:getAnimationName(index) end - ---- ----Returns the number of blend shapes in the model. ---- ----@return number count # The number of blend shapes in the model. -function Model:getBlendShapeCount() end - ---- ----Returns the name of a blend shape in the model. ---- ---- ----### NOTE: ----This function will throw an error if the blend shape index is invalid. ---- ----@param index number # The index of a blend shape. ----@return string name # The name of the blend shape. -function Model:getBlendShapeName(index) end - ---- ----Returns the weight of a blend shape. ---- ----A blend shape contains offset values for the vertices of one of the meshes in a Model. ---- ----Whenever the Model is drawn, the offsets are multiplied by the weight of the blend shape, allowing for smooth blending between different meshes. ---- ----A weight of zero won't apply any displacement and will skip processing of the blend shape. ---- ---- ----### NOTE: ----The initial weights are declared in the model file. ---- ----Weights can be any number, but usually they're kept between 0 and 1. ---- ----This function will throw an error if the blend shape name or index doesn't exist. ---- ----@overload fun(self: lovr.Model, name: string):number ----@param index number # The index of a blend shape. ----@return number weight # The weight of the blend shape. -function Model:getBlendShapeWeight(index) end - ---- ----Returns the 6 values of the Model's axis-aligned bounding box. ---- ----@return number minx # The minimum x coordinate of the vertices in the Model. ----@return number maxx # The maximum x coordinate of the vertices in the Model. ----@return number miny # The minimum y coordinate of the vertices in the Model. ----@return number maxy # The maximum y coordinate of the vertices in the Model. ----@return number minz # The minimum z coordinate of the vertices in the Model. ----@return number maxz # The maximum z coordinate of the vertices in the Model. -function Model:getBoundingBox() end - ---- ----Returns a sphere approximately enclosing the vertices in the Model. ---- ----@return number x # The x coordinate of the position of the sphere. ----@return number y # The y coordinate of the position of the sphere. ----@return number z # The z coordinate of the position of the sphere. ----@return number radius # The radius of the bounding sphere. -function Model:getBoundingSphere() end - ---- ----Returns the center of the Model's axis-aligned bounding box, relative to the Model's origin. ---- ----@return number x # The x offset of the center of the bounding box. ----@return number y # The y offset of the center of the bounding box. ----@return number z # The z offset of the center of the bounding box. -function Model:getCenter() end - ---- ----Returns the ModelData this Model was created from. ---- ----@return lovr.ModelData data # The ModelData. -function Model:getData() end - ---- ----Returns the depth of the Model, computed from its axis-aligned bounding box. ---- ----@return number depth # The depth of the Model. -function Model:getDepth() end - ---- ----Returns the width, height, and depth of the Model, computed from its axis-aligned bounding box. ---- ----@return number width # The width of the Model. ----@return number height # The height of the Model. ----@return number depth # The depth of the Model. -function Model:getDimensions() end - ---- ----Returns the height of the Model, computed from its axis-aligned bounding box. ---- ----@return number height # The height of the Model. -function Model:getHeight() end - ---- ----Returns the index buffer used by the Model. ---- ----The index buffer describes the order used to draw the vertices in each mesh. ---- ----@return lovr.Buffer buffer # The index buffer. -function Model:getIndexBuffer() end - ---- ----Returns a `Material` loaded from the Model. ---- ----@overload fun(self: lovr.Model, index: number):lovr.Material ----@param name string # The name of the Material to return. ----@return lovr.Material material # The material. -function Model:getMaterial(name) end - ---- ----Returns the number of materials in the Model. ---- ----@return number count # The number of materials in the Model. -function Model:getMaterialCount() end - ---- ----Returns the name of a material in the Model. ---- ----@param index number # The index of a material. ----@return string name # The name of the material. -function Model:getMaterialName(index) end - ---- ----Returns extra information stored in the model file. ---- ----Currently this is only implemented for glTF models and returns the JSON string from the glTF or glb file. ---- ----The metadata can be used to get application-specific data or add support for glTF extensions not supported by LÖVR. ---- ----@return string metadata # The metadata from the model file. -function Model:getMetadata() end - ---- ----Given a parent node, this function returns a table with the indices of its children. ---- ---- ----### NOTE: ----If the node does not have any children, this function returns an empty table. ---- ----@overload fun(self: lovr.Model, name: string):table ----@param index number # The index of the parent node. ----@return table children # A table containing a node index for each child of the node. -function Model:getNodeChildren(index) end - ---- ----Returns the number of nodes in the model. ---- ----@return number count # The number of nodes in the model. -function Model:getNodeCount() end - ---- ----Returns the draw mode, material, and vertex range of a mesh in the model. ---- ----@overload fun(self: lovr.Model, name: string, index: number):lovr.MeshMode, lovr.Material, number, number, number ----@param node number # The index of the node. ----@param index number # The index of the draw. ----@return lovr.MeshMode mode # Whether the vertices are points, lines, or triangles. ----@return lovr.Material material # The Material used by the draw. ----@return number start # The offset of the first vertex in the draw. ----@return number count # The number of vertices in the draw. ----@return number base # The base vertex of the draw (added to each instance value), or nil if the draw does not use an index buffer. -function Model:getNodeDraw(node, index) end - ---- ----Returns the number of meshes attached to a node. ---- ----Each mesh is drawn individually. ---- ----@overload fun(self: lovr.Model, name: string):number ----@param index number # The index of a node. ----@return number count # The number of draws in the node. -function Model:getNodeDrawCount(index) end - ---- ----Returns the name of a node. ---- ----@param index number # The index of the node. ----@return string name # The name of the node. -function Model:getNodeName(index) end - ---- ----Returns the orientation of a node. ---- ----@overload fun(self: lovr.Model, name: string, origin?: lovr.OriginType):number, number, number, number ----@param index number # The index of the node. ----@param origin? lovr.OriginType # Whether the orientation should be returned relative to the root node or the node's parent. ----@return number angle # The number of radians the node is rotated around its axis of rotation. ----@return number ax # The x component of the axis of rotation. ----@return number ay # The y component of the axis of rotation. ----@return number az # The z component of the axis of rotation. -function Model:getNodeOrientation(index, origin) end - ---- ----Given a child node, this function returns the index of its parent. ---- ----@overload fun(self: lovr.Model, name: string):number ----@param index number # The index of the child node. ----@return number parent # The index of the parent. -function Model:getNodeParent(index) end - ---- ----Returns the pose (position and orientation) of a node. ---- ----@overload fun(self: lovr.Model, name: string, origin?: lovr.OriginType):number, number, number, number, number, number, number ----@param index number # The index of a node. ----@param origin? lovr.OriginType # Whether the pose should be returned relative to the root node or the node's parent. ----@return number x # The x position of the node. ----@return number y # The y position of the node. ----@return number z # The z position of the node. ----@return number angle # The number of radians the node is rotated around its axis of rotation. ----@return number ax # The x component of the axis of rotation. ----@return number ay # The y component of the axis of rotation. ----@return number az # The z component of the axis of rotation. -function Model:getNodePose(index, origin) end - ---- ----Returns the position of a node. ---- ----@overload fun(self: lovr.Model, name: string, space?: lovr.OriginType):number, number, number ----@param index number # The index of the node. ----@param space? lovr.OriginType # Whether the position should be returned relative to the root node or the node's parent. ----@return number x # The x coordinate. ----@return number y # The y coordinate. ----@return number z # The z coordinate. -function Model:getNodePosition(index, space) end - ---- ----Returns the scale of a node. ---- ----@overload fun(self: lovr.Model, name: string, origin?: lovr.OriginType):number, number, number ----@param index number # The index of the node. ----@param origin? lovr.OriginType # Whether the scale should be returned relative to the root node or the node's parent. ----@return number x # The x scale. ----@return number y # The y scale. ----@return number z # The z scale. -function Model:getNodeScale(index, origin) end - ---- ----Returns the transform (position, scale, and rotation) of a node. ---- ----@overload fun(self: lovr.Model, name: string, origin?: lovr.OriginType):number, number, number, number, number, number, number, number, number, number ----@param index number # The index of a node. ----@param origin? lovr.OriginType # Whether the transform should be returned relative to the root node or the node's parent. ----@return number x # The x position of the node. ----@return number y # The y position of the node. ----@return number z # The z position of the node. ----@return number sx # The x scale of the node. ----@return number sy # The y scale of the node. ----@return number sz # The z scale of the node. ----@return number angle # The number of radians the node is rotated around its axis of rotation. ----@return number ax # The x component of the axis of rotation. ----@return number ay # The y component of the axis of rotation. ----@return number az # The z component of the axis of rotation. -function Model:getNodeTransform(index, origin) end - ---- ----Returns the index of the model's root node. ---- ----@return number root # The index of the root node. -function Model:getRootNode() end - ---- ----Returns one of the textures in the Model. ---- ----@param index number # The index of the texture to get. ----@return lovr.Texture texture # The texture. -function Model:getTexture(index) end - ---- ----Returns the number of textures in the Model. ---- ----@return number count # The number of textures in the Model. -function Model:getTextureCount() end - ---- ----Returns the total number of triangles in the Model. ---- ---- ----### NOTE: ----This isn't always related to the length of the vertex buffer, since a mesh in the Model could be drawn by multiple nodes. ---- ----@return number count # The total number of triangles in the Model. -function Model:getTriangleCount() end - ---- ----Returns 2 tables containing mesh data for the Model. ---- ----The first table is a list of vertex positions and contains 3 numbers for the x, y, and z coordinate of each vertex. ---- ----The second table is a list of triangles and contains 1-based indices into the first table representing the first, second, and third vertices that make up each triangle. ---- ----The vertex positions will be affected by node transforms. ---- ---- ----### NOTE: ----After this function is called on a Model once, the result is cached (in its ModelData). ---- ----@return table vertices # The triangle vertex positions, returned as a flat (non-nested) table of numbers. The position of each vertex is given as an x, y, and z coordinate. ----@return table indices # The vertex indices. Every 3 indices describes a triangle. -function Model:getTriangles() end - ---- ----Returns a `Buffer` that holds the vertices of all of the meshes in the Model. ---- ----@return lovr.Buffer buffer # The vertex buffer. -function Model:getVertexBuffer() end - ---- ----Returns the total vertex count of the Model. ---- ---- ----### NOTE: ----This isn't always the same as the length of the vertex buffer, since a mesh in the Model could be drawn by multiple nodes. ---- ----@return number count # The total number of vertices. -function Model:getVertexCount() end - ---- ----Returns the width of the Model, computed from its axis-aligned bounding box. ---- ----@return number width # The width of the Model. -function Model:getWidth() end - ---- ----Returns whether the Model has any skeletal animations. ---- ---- ----### NOTE: ----This will return when there's at least one skin in the model, as returned by `ModelData:getSkinCount`. ---- ----Even if this function returns true, the model could still have non-skeletal animations. ---- ----Right now a model can only be drawn with one skeletal pose per frame. ---- ----@return boolean jointed # Whether the animation uses joint nodes for skeletal animation. -function Model:hasJoints() end - ---- ----Resets node transforms to the original ones defined in the model file. ---- -function Model:resetNodeTransforms() end - ---- ----Sets the weight of a blend shape. ---- ----A blend shape contains offset values for the vertices of one of the meshes in a Model. ---- ----Whenever the Model is drawn, the offsets are multiplied by the weight of the blend shape, allowing for smooth blending between different meshes. ---- ----A weight of zero won't apply any displacement and will skip processing of the blend shape. ---- ---- ----### NOTE: ----The initial weights are declared in the model file. ---- ----Weights can be any number, but usually they're kept between 0 and 1. ---- ----This function will throw an error if the blend shape name or index doesn't exist. ---- ----@overload fun(self: lovr.Model, name: string, weight: number) ----@param index number # The index of a blend shape. ----@param weight number # The new weight for the blend shape. -function Model:setBlendShapeWeight(index, weight) end - ---- ----Sets or blends the orientation of a node to a new orientation. ---- ----This sets the local orientation of the node, relative to its parent. ---- ----@overload fun(self: lovr.Model, name: string, angle: number, ax: number, ay: number, az: number, blend?: number) ----@overload fun(self: lovr.Model, index: number, orientation: lovr.Quat, blend?: number) ----@overload fun(self: lovr.Model, name: string, orientation: lovr.Quat, blend?: number) ----@param index number # The index of the node. ----@param angle number # The number of radians the node should be rotated around its rotation axis. ----@param ax number # The x component of the axis of rotation. ----@param ay number # The y component of the axis of rotation. ----@param az number # The z component of the axis of rotation. ----@param blend? number # A number from 0 to 1 indicating how much of the target orientation to blend in. A value of 0 will not change the node's orientation at all, whereas 1 will fully blend to the target orientation. -function Model:setNodeOrientation(index, angle, ax, ay, az, blend) end - ---- ----Sets or blends the pose (position and orientation) of a node to a new pose. ---- ----This sets the local pose of the node, relative to its parent. ---- ----The scale will remain unchanged. ---- ----@overload fun(self: lovr.Model, name: string, x: number, y: number, z: number, angle: number, ax: number, ay: number, az: number, blend?: number) ----@overload fun(self: lovr.Model, index: number, position: lovr.Vec3, orientation: lovr.Quat, blend?: number) ----@overload fun(self: lovr.Model, name: string, position: lovr.Vec3, orientation: lovr.Quat, blend?: number) ----@param index number # The index of the node. ----@param x number # The x component of the position. ----@param y number # The y component of the position. ----@param z number # The z component of the position. ----@param angle number # The number of radians the node should be rotated around its rotation axis. ----@param ax number # The x component of the axis of rotation. ----@param ay number # The y component of the axis of rotation. ----@param az number # The z component of the axis of rotation. ----@param blend? number # A number from 0 to 1 indicating how much of the target pose to blend in. A value of 0 will not change the node's pose at all, whereas 1 will fully blend to the target pose. -function Model:setNodePose(index, x, y, z, angle, ax, ay, az, blend) end - ---- ----Sets or blends the position of a node. ---- ----This sets the local position of the node, relative to its parent. ---- ----@overload fun(self: lovr.Model, name: string, x: number, y: number, z: number, blend?: number) ----@overload fun(self: lovr.Model, index: number, position: lovr.Vec3, blend?: number) ----@overload fun(self: lovr.Model, name: string, position: lovr.Vec3, blend?: number) ----@param index number # The index of the node. ----@param x number # The x coordinate of the new position. ----@param y number # The y coordinate of the new position. ----@param z number # The z coordinate of the new position. ----@param blend? number # A number from 0 to 1 indicating how much of the new position to blend in. A value of 0 will not change the node's position at all, whereas 1 will fully blend to the target position. -function Model:setNodePosition(index, x, y, z, blend) end - ---- ----Sets or blends the scale of a node to a new scale. ---- ----This sets the local scale of the node, relative to its parent. ---- ---- ----### NOTE: ----For best results when animating, it's recommended to keep the 3 scale components the same. ---- ----@overload fun(self: lovr.Model, name: string, sx: number, sy: number, sz: number, blend?: number) ----@overload fun(self: lovr.Model, index: number, scale: lovr.Vec3, blend?: number) ----@overload fun(self: lovr.Model, name: string, scale: lovr.Vec3, blend?: number) ----@param index number # The index of the node. ----@param sx number # The x scale. ----@param sy number # The y scale. ----@param sz number # The z scale. ----@param blend? number # A number from 0 to 1 indicating how much of the new scale to blend in. A value of 0 will not change the node's scale at all, whereas 1 will fully blend to the target scale. -function Model:setNodeScale(index, sx, sy, sz, blend) end - ---- ----Sets or blends the transform of a node to a new transform. ---- ----This sets the local transform of the node, relative to its parent. ---- ---- ----### NOTE: ----For best results when animating, it's recommended to keep the 3 components of the scale the same. ---- ----Even though the translation, scale, and rotation parameters are given in TSR order, they are applied in the normal TRS order. ---- ----@overload fun(self: lovr.Model, name: string, x: number, y: number, z: number, sx: number, sy: number, sz: number, angle: number, ax: number, ay: number, az: number, blend?: number) ----@overload fun(self: lovr.Model, index: number, position: lovr.Vec3, scale: lovr.Vec3, orientation: lovr.Quat, blend?: number) ----@overload fun(self: lovr.Model, name: string, position: lovr.Vec3, scale: lovr.Vec3, orientation: lovr.Quat, blend?: number) ----@overload fun(self: lovr.Model, index: number, transform: lovr.Mat4, blend?: number) ----@overload fun(self: lovr.Model, name: string, transform: lovr.Mat4, blend?: number) ----@param index number # The index of the node. ----@param x number # The x component of the position. ----@param y number # The y component of the position. ----@param z number # The z component of the position. ----@param sx number # The x component of the scale. ----@param sy number # The y component of the scale. ----@param sz number # The z component of the scale. ----@param angle number # The number of radians the node should be rotated around its rotation axis. ----@param ax number # The x component of the axis of rotation. ----@param ay number # The y component of the axis of rotation. ----@param az number # The z component of the axis of rotation. ----@param blend? number # A number from 0 to 1 indicating how much of the target transform to blend in. A value of 0 will not change the node's transform at all, whereas 1 will fully blend to the target transform. -function Model:setNodeTransform(index, x, y, z, sx, sy, sz, angle, ax, ay, az, blend) end - ---- ----Pass objects are used to record commands for the GPU. ---- ----Commands can be recorded by calling functions on the Pass. ---- ----After recording a set of passes, they can be submitted for the GPU to process using `lovr.graphics.submit`. ---- ----Pass objects are **temporary** and only exist for a single frame. ---- ----Once `lovr.graphics.submit` is called to end the frame, any passes that were created during that frame become **invalid**. Each frame, a new set of passes must be created and recorded. ---- ----LÖVR tries to detect if you use a pass after it's invalid, but this error checking is not 100% accurate at the moment. ---- ----There are 3 types of passes. ---- ----Each type can record a specific type of command: ---- ----- `render` passes render graphics to textures. ----- `compute` passes run compute shaders. ----- `transfer` passes can transfer data to/from GPU objects, like `Buffer` and `Texture`. ---- ----@class lovr.Pass -local Pass = {} - ---- ----Copies data between textures. ---- ----Similar to `Pass:copy`, except the source and destination sizes can be different. ---- ----The pixels from the source texture will be scaled to the destination size. This can only be called on a transfer pass, which can be created with `lovr.graphics.getPass`. ---- ---- ----### NOTE: ----When blitting between 3D textures, the layer counts do not need to match, and the layers will be treated as a continuous axis (i.e. pixels will be smoothed between layers). ---- ----When blitting between array textures, the layer counts must match, and the blit occurs as a sequence of distinct 2D blits layer-by-layer. ---- ----@param src lovr.Texture # The texture to copy from. ----@param dst lovr.Texture # The texture to copy to. ----@param srcx? number # The x offset from the left of the source texture to blit from, in pixels. ----@param srcy? number # The y offset from the top of the source texture to blit from, in pixels. ----@param srcz? number # The index of the first layer in the source texture to blit from. ----@param dstx? number # The x offset from the left of the destination texture to blit to, in pixels. ----@param dsty? number # The y offset from the top of the destination texture to blit to, in pixels. ----@param dstz? number # The index of the first layer in the destination texture to blit to. ----@param srcw? number # The width of the region in the source texture to blit. If nil, the region will extend to the right side of the texture. ----@param srch? number # The height of the region in the source texture to blit. If nil, the region will extend to the bottom of the texture. ----@param srcd? number # The number of layers in the source texture to blit. ----@param dstw? number # The width of the region in the destination texture to blit to. If nil, the region will extend to the right side of the texture. ----@param dsth? number # The height of the region in the destination texture to blit to. If nil, the region will extend to the bottom of the texture. ----@param dstd? number # The number of the layers in the destination texture to blit to. ----@param srclevel? number # The index of the mipmap level in the source texture to blit from. ----@param dstlevel? number # The index of the mipmap level in the destination texture to blit to. ----@param filter? lovr.FilterMode # The filtering algorithm used when rescaling. -function Pass:blit(src, dst, srcx, srcy, srcz, dstx, dsty, dstz, srcw, srch, srcd, dstw, dsth, dstd, srclevel, dstlevel, filter) end - ---- ----Draw a box. ---- ----This is like `Pass:cube`, except it takes 3 separate values for the scale. ---- ----@overload fun(self: lovr.Pass, position: lovr.Vec3, size: lovr.Vec3, orientation: lovr.Quat, style?: lovr.DrawStyle) ----@overload fun(self: lovr.Pass, transform: lovr.Mat4, style?: lovr.DrawStyle) ----@param x? number # The x coordinate of the center of the box. ----@param y? number # The y coordinate of the center of the box. ----@param z? number # The z coordinate of the center of the box. ----@param width? number # The width of the box. ----@param height? number # The height of the box. ----@param depth? number # The depth of the box. ----@param angle? number # The rotation of the box around its rotation axis, in radians. ----@param ax? number # The x component of the axis of rotation. ----@param ay? number # The y component of the axis of rotation. ----@param az? number # The z component of the axis of rotation. ----@param style? lovr.DrawStyle # Whether the box should be drawn filled or outlined. -function Pass:box(x, y, z, width, height, depth, angle, ax, ay, az, style) end - ---- ----Draws a capsule. ---- ----A capsule is shaped like a cylinder with a hemisphere on each end. ---- ---- ----### NOTE: ----The length of the capsule does not include the end caps. ---- ----The local origin of the capsule is in the center, and the local z axis points towards the end caps. ---- ----@overload fun(self: lovr.Pass, position: lovr.Vec3, scale: lovr.Vec3, orientation: lovr.Quat, segments?: number) ----@overload fun(self: lovr.Pass, transform: lovr.Mat4, segments?: number) ----@overload fun(self: lovr.Pass, p1: lovr.Vec3, p2: lovr.Vec3, radius?: number, segments?: number) ----@param x? number # The x coordinate of the center of the capsule. ----@param y? number # The y coordinate of the center of the capsule. ----@param z? number # The z coordinate of the center of the capsule. ----@param radius? number # The radius of the capsule. ----@param length? number # The length of the capsule. ----@param angle? number # The rotation of the capsule around its rotation axis, in radians. ----@param ax? number # The x component of the axis of rotation. ----@param ay? number # The y component of the axis of rotation. ----@param az? number # The z component of the axis of rotation. ----@param segments? number # The number of circular segments to render. -function Pass:capsule(x, y, z, radius, length, angle, ax, ay, az, segments) end - ---- ----Draws a circle. ---- ---- ----### NOTE: ----The local origin of the circle is in its center. ---- ----The local z axis is perpendicular to the circle. ---- ----@overload fun(self: lovr.Pass, position: lovr.Vec3, radius?: number, orientation: lovr.Quat, style?: lovr.DrawStyle, angle1?: number, angle2?: number, segments?: number) ----@overload fun(self: lovr.Pass, transform: lovr.Mat4, style?: lovr.DrawStyle, angle1?: number, angle2?: number, segments?: number) ----@param x? number # The x coordinate of the center of the circle. ----@param y? number # The y coordinate of the center of the circle. ----@param z? number # The z coordinate of the center of the circle. ----@param radius? number # The radius of the circle. ----@param angle? number # The rotation of the circle around its rotation axis, in radians. ----@param ax? number # The x component of the axis of rotation. ----@param ay? number # The y component of the axis of rotation. ----@param az? number # The z component of the axis of rotation. ----@param style? lovr.DrawStyle # Whether the circle should be filled or outlined. ----@param angle1? number # The angle of the beginning of the arc. ----@param angle2? number # angle of the end of the arc. ----@param segments? number # The number of segments to render. -function Pass:circle(x, y, z, radius, angle, ax, ay, az, style, angle1, angle2, segments) end - ---- ----Clears a Buffer or Texture. ---- ----This can only be called on a transfer pass, which can be created with `lovr.graphics.getPass`. ---- ----@overload fun(self: lovr.Pass, texture: lovr.Texture, color: lovr.Vec4, layer?: number, layers?: number, level?: number, levels?: number) ----@param buffer lovr.Buffer # The Buffer to clear. ----@param index? number # The index of the first item to clear. ----@param count? number # The number of items to clear. If `nil`, clears to the end of the Buffer. -function Pass:clear(buffer, index, count) end - ---- ----Runs a compute shader. ---- ----Before calling this, a compute shader needs to be active, using `Pass:setShader`. ---- ----This can only be called on a Pass with the `compute` type, which can be created using `lovr.graphics.getPass`. ---- ---- ----### NOTE: ----Usually compute shaders are run many times in parallel: once for each pixel in an image, once per particle, once per object, etc. ---- ----The 3 arguments represent how many times to run, or "dispatch", the compute shader, in up to 3 dimensions. ---- ----Each element of this grid is called a **workgroup**. ---- ----To make things even more complicated, each workgroup itself is made up of a set of "mini GPU threads", which are called **local workgroups**. ---- ----Like workgroups, the local workgroup size can also be 3D. ---- ----It's declared in the shader code, like this: ---- ---- layout(local_size_x = w, local_size_y = h, local_size_z = d) in; ---- ----All these 3D grids can get confusing, but the basic idea is to make the local workgroup size a small block of e.g. 32 particles or 8x8 pixels or 4x4x4 voxels, and then dispatch however many workgroups are needed to cover a list of particles, image, voxel field, etc. ---- ----The reason to do it this way is that the GPU runs its threads in little fixed-size bundles called subgroups. ---- ----Subgroups are usually 32 or 64 threads (the exact size is given by the `subgroupSize` property of `lovr.graphics.getDevice`) and all run together. ---- ----If the local workgroup size was `1x1x1`, then the GPU would only run 1 thread per subgroup and waste the other 31 or 63. ---- ----So for the best performance, be sure to set a local workgroup size bigger than 1! ---- ----Inside the compute shader, a few builtin variables can be used to figure out which workgroup is running: ---- ----- `uvec3 WorkgroupCount` is the workgroup count per axis (the `Pass:compute` arguments). ----- `uvec3 WorkgroupSize` is the local workgroup size (declared in the shader). ----- `uvec3 WorkgroupID` is the index of the current (global) workgroup. ----- `uvec3 LocalThreadID` is the index of the local workgroup inside its workgroup. ----- `uint LocalThreadIndex` is a 1D version of `LocalThreadID`. ----- `uvec3 GlobalThreadID` is the unique identifier for a thread within all workgroups in a ---- dispatch. It's equivalent to `WorkgroupID * WorkgroupSize + LocalThreadID` (usually what you ---- want!) ---- ----Indirect compute dispatches are useful to "chain" compute shaders together, while keeping all of the data on the GPU. ---- ----The first dispatch can do some computation and write some results to buffers, then the second indirect dispatch can use the data in those buffers to know how many times it should run. ---- ----An example would be a compute shader that does some sort of object culling, writing the number of visible objects to a buffer along with the IDs of each one. Subsequent compute shaders can be indirectly dispatched to perform extra processing on the visible objects. ---- ----Finally, an indirect draw can be used to render them. ---- ----@overload fun(self: lovr.Pass, buffer: lovr.Buffer, offset?: number) ----@param x? number # The number of workgroups to dispatch in the x dimension. ----@param y? number # The number of workgroups to dispatch in the y dimension. ----@param z? number # The number of workgroups to dispatch in the z dimension. -function Pass:compute(x, y, z) end - ---- ----Draws a cone. ---- ---- ----### NOTE: ----The local origin is at the center of the base of the cone, and the negative z axis points towards the tip. ---- ----@overload fun(self: lovr.Pass, position: lovr.Vec3, scale: lovr.Vec3, orientation: lovr.Quat, segments?: number) ----@overload fun(self: lovr.Pass, transform: lovr.Mat4, segments?: number) ----@overload fun(self: lovr.Pass, p1: lovr.Vec3, p2: lovr.Vec3, radius?: number, segments?: number) ----@param x? number # The x coordinate of the center of the base of the cone. ----@param y? number # The y coordinate of the center of the base of the cone. ----@param z? number # The z coordinate of the center of the base of the cone. ----@param radius? number # The radius of the cone. ----@param length? number # The length of the cone. ----@param angle? number # The rotation of the cone around its rotation axis, in radians. ----@param ax? number # The x component of the axis of rotation. ----@param ay? number # The y component of the axis of rotation. ----@param az? number # The z component of the axis of rotation. ----@param segments? number # The number of segments in the cone. -function Pass:cone(x, y, z, radius, length, angle, ax, ay, az, segments) end - ---- ----Copies data to or between `Buffer` and `Texture` objects. ---- ----This can only be called on a transfer pass, which can be created with `lovr.graphics.getPass`. ---- ----@overload fun(self: lovr.Pass, blob: lovr.Blob, bufferdst: lovr.Buffer, srcoffset?: number, dstoffset?: number, size?: number) ----@overload fun(self: lovr.Pass, buffersrc: lovr.Buffer, bufferdst: lovr.Buffer, srcoffset?: number, dstoffset?: number, size?: number) ----@overload fun(self: lovr.Pass, image: lovr.Image, texturedst: lovr.Texture, srcx?: number, srcy?: number, dstx?: number, dsty?: number, width?: number, height?: number, srclayer?: number, dstlayer?: number, layers?: number, srclevel?: number, dstlevel?: number) ----@overload fun(self: lovr.Pass, texturesrc: lovr.Texture, texturedst: lovr.Texture, srcx?: number, srcy?: number, dstx?: number, dsty?: number, width?: number, height?: number, srclayer?: number, dstlayer?: number, layers?: number, srclevel?: number, dstlevel?: number) ----@overload fun(self: lovr.Pass, tally: lovr.Tally, bufferdst: lovr.Buffer, srcindex?: number, dstoffset?: number, count?: number) ----@param table table # A table to copy to the buffer. ----@param bufferdst lovr.Buffer # The buffer to copy to. ----@param srcindex? number # The index of the first item to begin copying from. ----@param dstindex? number # The index of the first item in the buffer to begin copying to. ----@param count? number # The number of items to copy. If nil, copies as many items as possible. -function Pass:copy(table, bufferdst, srcindex, dstindex, count) end - ---- ----Draws a cube. ---- ---- ----### NOTE: ----The local origin is in the center of the cube. ---- ----@overload fun(self: lovr.Pass, position: lovr.Vec3, size?: number, orientation: lovr.Quat, style?: lovr.DrawStyle) ----@overload fun(self: lovr.Pass, transform: lovr.Mat4, style?: lovr.DrawStyle) ----@param x? number # The x coordinate of the center of the cube. ----@param y? number # The y coordinate of the center of the cube. ----@param z? number # The z coordinate of the center of the cube. ----@param size? number # The size of the cube. ----@param angle? number # The rotation of the cube around its rotation axis, in radians. ----@param ax? number # The x component of the axis of rotation. ----@param ay? number # The y component of the axis of rotation. ----@param az? number # The z component of the axis of rotation. ----@param style? lovr.DrawStyle # Whether the cube should be drawn filled or outlined. -function Pass:cube(x, y, z, size, angle, ax, ay, az, style) end - ---- ----Draws a cylinder. ---- ---- ----### NOTE: ----The local origin is in the center of the cylinder, and the length of the cylinder is along the z axis. ---- ----@overload fun(self: lovr.Pass, position: lovr.Vec3, scale: lovr.Vec3, orientation: lovr.Quat, capped?: boolean, angle1?: number, angle2?: number, segments?: number) ----@overload fun(self: lovr.Pass, transform: lovr.Mat4, capped?: boolean, angle1?: number, angle2?: number, segments?: number) ----@overload fun(self: lovr.Pass, p1: lovr.Vec3, p2: lovr.Vec3, radius?: number, capped?: boolean, angle1?: number, angle2?: number, segments?: number) ----@param x? number # The x coordinate of the center of the cylinder. ----@param y? number # The y coordinate of the center of the cylinder. ----@param z? number # The z coordinate of the center of the cylinder. ----@param radius? number # The radius of the cylinder. ----@param length? number # The length of the cylinder. ----@param angle? number # The rotation of the cylinder around its rotation axis, in radians. ----@param ax? number # The x component of the axis of rotation. ----@param ay? number # The y component of the axis of rotation. ----@param az? number # The z component of the axis of rotation. ----@param capped? boolean # Whether the tops and bottoms of the cylinder should be rendered. ----@param angle1? number # The angle of the beginning of the arc. ----@param angle2? number # angle of the end of the arc. ----@param segments? number # The number of circular segments to render. -function Pass:cylinder(x, y, z, radius, length, angle, ax, ay, az, capped, angle1, angle2, segments) end - ---- ----Draws a model. ---- ----@overload fun(self: lovr.Pass, model: lovr.Model, position: lovr.Vec3, scale?: number, orientation: lovr.Quat, nodeindex?: number, children?: boolean, instances?: number) ----@overload fun(self: lovr.Pass, model: lovr.Model, transform: lovr.Mat4, nodeindex?: number, children?: boolean, instances?: number) ----@overload fun(self: lovr.Pass, model: lovr.Model, x?: number, y?: number, z?: number, scale?: number, angle?: number, ax?: number, ay?: number, az?: number, nodename?: string, children?: boolean, instances?: number) ----@overload fun(self: lovr.Pass, model: lovr.Model, position: lovr.Vec3, scale?: number, orientation: lovr.Quat, nodename?: string, children?: boolean, instances?: number) ----@overload fun(self: lovr.Pass, model: lovr.Model, transform: lovr.Mat4, nodename?: string, children?: boolean, instances?: number) ----@param model lovr.Model # The model to draw. ----@param x? number # The x coordinate to draw the model at. ----@param y? number # The y coordinate to draw the model at. ----@param z? number # The z coordinate to draw the model at. ----@param scale? number # The scale of the model. ----@param angle? number # The rotation of the model around its rotation axis, in radians. ----@param ax? number # The x component of the axis of rotation. ----@param ay? number # The y component of the axis of rotation. ----@param az? number # The z component of the axis of rotation. ----@param nodeindex? number # The index of the node to draw. If nil, the root node is drawn. ----@param children? boolean # Whether the children of the node should be drawn. ----@param instances? number # The number of instances to draw. -function Pass:draw(model, x, y, z, scale, angle, ax, ay, az, nodeindex, children, instances) end - ---- ----Draws a fullscreen triangle. ---- ----The `fill` shader is used, which stretches the triangle across the screen. ---- ---- ----### NOTE: ----This function has some special behavior for array textures: ---- ----- Filling a single-layer texture to a multi-layer canvas will mirror the texture to all layers, ---- just like regular drawing. ----- Filling a 2-layer texture to a mono canvas will render the 2 layers side-by-side. ----- Filling a multi-layer texture to a multi-layer canvas will do a layer-by-layer fill (the layer ---- counts must match). ---- ----@overload fun(self: lovr.Pass) ----@param texture lovr.Texture # The texture to fill. If nil, the texture from the active material is used. -function Pass:fill(texture) end - ---- ----Returns the clear values of the pass. ---- ----@return table clears # The clear values for the pass. Numeric keys will contain clear values for color textures, either as a table of r, g, b, a values or a boolean. If the pass has a depth texture, there will also be `depth` and `stencil` keys containing the clear values or booleans. -function Pass:getClear() end - ---- ----Returns the dimensions of the textures attached to the render pass. ---- ---- ----### NOTE: ----If the pass is not a render pass, this function returns zeros. ---- ----@return number width # The texture width. ----@return number height # The texture height. -function Pass:getDimensions() end - ---- ----Returns the height of the textures attached to the render pass. ---- ---- ----### NOTE: ----If the pass is not a render pass, this function returns zero. ---- ----@return number height # The texture height. -function Pass:getHeight() end - ---- ----Returns the projection for a single view. ---- ----@overload fun(self: lovr.Pass, view: number, matrix: lovr.Mat4):lovr.Mat4 ----@param view number # The view index. ----@return number left # The left field of view angle, in radians. ----@return number right # The right field of view angle, in radians. ----@return number up # The top field of view angle, in radians. ----@return number down # The bottom field of view angle, in radians. -function Pass:getProjection(view) end - ---- ----Returns the antialiasing setting of a render pass. ---- ----@return number samples # The number of samples used for rendering. Currently, will be 1 or 4. -function Pass:getSampleCount() end - ---- ----Returns the textures a render pass is rendering to. ---- ----@return table target # A table of the color textures targeted by the pass, with an additional `depth` key if the pass has a depth texture. -function Pass:getTarget() end - ---- ----Returns the type of the pass (render, compute, or transfer). ---- ----The type restricts what kinds of functions can be called on the pass. ---- ----@return lovr.PassType type # The type of the Pass. -function Pass:getType() end - ---- ----Returns the view count of a render pass. ---- ----This is the layer count of the textures it is rendering to. ---- ---- ----### NOTE: ----A render pass has one "camera" for each view. ---- ----Whenever something is drawn, it is broadcast to each view (layer) of each texture, using the corresponding camera. ---- ----@return number views # The view count. -function Pass:getViewCount() end - ---- ----Get the pose of a single view. ---- ----@overload fun(self: lovr.Pass, view: number, matrix: lovr.Mat4, invert: boolean):lovr.Mat4 ----@param view number # The view index. ----@return number x # The x position of the viewer, in meters. ----@return number y # The y position of the viewer, in meters. ----@return number z # The z position of the viewer, in meters. ----@return number angle # The number of radians the viewer is rotated around its axis of rotation. ----@return number ax # The x component of the axis of rotation. ----@return number ay # The y component of the axis of rotation. ----@return number az # The z component of the axis of rotation. -function Pass:getViewPose(view) end - ---- ----Returns the width of the textures attached to the render pass. ---- ---- ----### NOTE: ----If the pass is not a render pass, this function returns zero. ---- ----@return number width # The texture width. -function Pass:getWidth() end - ---- ----Draws a line between points. ---- ----`Pass:mesh` can also be used to draw line segments using the `line` `MeshMode`. ---- ---- ----### NOTE: ----There is currently no way to increase line thickness. ---- ----@overload fun(self: lovr.Pass, t: table) ----@overload fun(self: lovr.Pass, v1: lovr.Vec3, v2: lovr.Vec3, ...) ----@param x1 number # The x coordinate of the first point. ----@param y1 number # The y coordinate of the first point. ----@param z1 number # The z coordinate of the first point. ----@param x2 number # The x coordinate of the next point. ----@param y2 number # The y coordinate of the next point. ----@param z2 number # The z coordinate of the next point. ----@vararg any # More points to add to the line. -function Pass:line(x1, y1, z1, x2, y2, z2, ...) end - ---- ----Draws a mesh. ---- ---- ----### NOTE: ----The index buffer defines the order the vertices are drawn in. ---- ----It can be used to reorder, reuse, or omit vertices from the mesh. ---- ----When drawing without a vertex buffer, the `VertexIndex` variable can be used in shaders to compute the position of each vertex, possibly by reading data from other `Buffer` or `Texture` resources. ---- ----The active `MeshMode` controls whether the vertices are drawn as points, lines, or triangles. ---- ----The active `Material` is applied to the mesh. ---- ----@overload fun(self: lovr.Pass, vertices?: lovr.Buffer, position: lovr.Vec3, scales: lovr.Vec3, orientation: lovr.Quat, start?: number, count?: number, instances?: number) ----@overload fun(self: lovr.Pass, vertices?: lovr.Buffer, transform: lovr.Mat4, start?: number, count?: number, instances?: number) ----@overload fun(self: lovr.Pass, vertices?: lovr.Buffer, indices: lovr.Buffer, x?: number, y?: number, z?: number, scale?: number, angle?: number, ax?: number, ay?: number, az?: number, start?: number, count?: number, instances?: number, base?: number) ----@overload fun(self: lovr.Pass, vertices?: lovr.Buffer, indices: lovr.Buffer, position: lovr.Vec3, scales: lovr.Vec3, orientation: lovr.Quat, start?: number, count?: number, instances?: number, base?: number) ----@overload fun(self: lovr.Pass, vertices?: lovr.Buffer, indices: lovr.Buffer, transform: lovr.Mat4, start?: number, count?: number, instances?: number, base?: number) ----@overload fun(self: lovr.Pass, vertices?: lovr.Buffer, indices: lovr.Buffer, draws: lovr.Buffer, drawcount: number, offset: number, stride: number) ----@param vertices? lovr.Buffer # The buffer containing the vertices to draw. ----@param x? number # The x coordinate of the position to draw the mesh at. ----@param y? number # The y coordinate of the position to draw the mesh at. ----@param z? number # The z coordinate of the position to draw the mesh at. ----@param scale? number # The scale of the mesh. ----@param angle? number # The number of radians the mesh is rotated around its rotational axis. ----@param ax? number # The x component of the axis of rotation. ----@param ay? number # The y component of the axis of rotation. ----@param az? number # The z component of the axis of rotation. ----@param start? number # The 1-based index of the first vertex to render from the vertex buffer (or the first index, when using an index buffer). ----@param count? number # The number of vertices to render (or the number of indices, when using an index buffer). When `nil`, as many vertices or indices as possible will be drawn (based on the length of the Buffers and `start`). ----@param instances? number # The number of copies of the mesh to render. -function Pass:mesh(vertices, x, y, z, scale, angle, ax, ay, az, start, count, instances) end - ---- ----Generates mipmaps for a texture. ---- ----This can only be called on a transfer pass, which can be created with `lovr.graphics.getPass`. ---- ----When rendering to textures with a render pass, it's also possible to automatically regenerate mipmaps after rendering by adding the `mipmaps` flag when creating the pass. ---- ----@param texture lovr.Texture # The texture to mipmap. ----@param base? number # The index of the mipmap used to generate the remaining mipmaps. ----@param count? number # The number of mipmaps to generate. If nil, generates the remaining mipmaps. -function Pass:mipmap(texture, base, count) end - ---- ----Resets the transform back to the origin. ---- -function Pass:origin() end - ---- ----Draws a plane. ---- ----@overload fun(self: lovr.Pass, position: lovr.Vec3, size: lovr.Vec2, orientation: lovr.Quat, style?: lovr.DrawStyle, columns?: number, rows?: number) ----@overload fun(self: lovr.Pass, transform: lovr.Mat4, style?: lovr.DrawStyle, columns?: number, rows?: number) ----@param x? number # The x coordinate of the center of the plane. ----@param y? number # The y coordinate of the center of the plane. ----@param z? number # The z coordinate of the center of the plane. ----@param width? number # The width of the plane. ----@param height? number # The height of the plane. ----@param angle? number # The rotation of the plane around its rotation axis, in radians. ----@param ax? number # The x component of the axis of rotation. ----@param ay? number # The y component of the axis of rotation. ----@param az? number # The z component of the axis of rotation. ----@param style? lovr.DrawStyle # Whether the plane should be drawn filled or outlined. ----@param columns? number # The number of horizontal segments in the plane. ----@param rows? number # The number of vertical segments in the plane. -function Pass:plane(x, y, z, width, height, angle, ax, ay, az, style, columns, rows) end - ---- ----Draws points. ---- ----`Pass:mesh` can also be used to draw points using a `Buffer`. ---- ---- ----### NOTE: ----To change the size of points, set the `pointSize` shader flag in `lovr.graphics.newShader` or write to the `PointSize` variable in the vertex shader. ---- ----Points are always the same size on the screen, regardless of distance, and the units are in pixels. ---- ----@overload fun(self: lovr.Pass, t: table) ----@overload fun(self: lovr.Pass, v: lovr.Vec3, ...) ----@param x number # The x coordinate of the first point. ----@param y number # The y coordinate of the first point. ----@param z number # The z coordinate of the first point. ----@vararg any # More points. -function Pass:points(x, y, z, ...) end - ---- ----Pops the transform or render state stack, restoring it to the state it was in when it was last pushed. ---- ---- ----### NOTE: ----If a stack is popped without a corresponding push, the stack "underflows" which causes an error. ---- ----@param stack? lovr.StackType # The type of stack to pop. -function Pass:pop(stack) end - ---- ----Saves a copy of the transform or render states. ---- ----Further changes can be made to the transform or render states, and afterwards `Pass:pop` can be used to restore the original state. ---- ----Pushes and pops can be nested, but it's an error to pop without a corresponding push. ---- ---- ----### NOTE: ----Each stack has a limit of the number of copies it can store. ---- ----There can be 16 transforms and 4 render states saved. ---- ----The `state` stack does not save the camera info or shader variables changed with `Pass:send`. ---- ----@param stack? lovr.StackType # The type of stack to push. -function Pass:push(stack) end - ---- ----Creates a `Readback` object which asynchronously downloads data from a `Buffer`, `Texture`, or `Tally`. ---- ----The readback can be polled for completion, or, after this transfer pass is submitted, `Readback:wait` can be used to block until the download is complete. ---- ----This can only be called on a transfer pass, which can be created with `lovr.graphics.getPass`. ---- ----@overload fun(self: lovr.Pass, texture: lovr.Texture, x?: number, y?: number, layer?: number, level?: number, width?: number, height?: number):lovr.Readback ----@overload fun(self: lovr.Pass, tally: lovr.Tally, index: number, count: number):lovr.Readback ----@param buffer lovr.Buffer # The Buffer to download data from. ----@param index number # The index of the first item to download. ----@param count number # The number of items to download. ----@return lovr.Readback readback # The new readback. -function Pass:read(buffer, index, count) end - ---- ----Rotates the coordinate system. ---- ----@overload fun(self: lovr.Pass, rotation: lovr.Quat) ----@param angle number # The amount to rotate the coordinate system by, in radians. ----@param ax number # The x component of the axis of rotation. ----@param ay number # The y component of the axis of rotation. ----@param az number # The z component of the axis of rotation. -function Pass:rotate(angle, ax, ay, az) end - ---- ----Draws a rounded rectangle. ---- ----@overload fun(self: lovr.Pass, position: lovr.Vec3, size: lovr.Vec3, orientation: lovr.Quat, radius?: number, segments?: number) ----@overload fun(self: lovr.Pass, transform: lovr.Mat4, radius?: number, segments?: number) ----@param x? number # The x coordinate of the center of the rectangle. ----@param y? number # The y coordinate of the center of the rectangle. ----@param z? number # The z coordinate of the center of the rectangle. ----@param width? number # The width of the rectangle. ----@param height? number # The height of the rectangle. ----@param thickness? number # The thickness of the rectangle. ----@param angle? number # The rotation of the rectangle around its rotation axis, in radians. ----@param ax? number # The x component of the axis of rotation. ----@param ay? number # The y component of the axis of rotation. ----@param az? number # The z component of the axis of rotation. ----@param radius? number # The radius of the rectangle corners. If the radius is zero or negative, the rectangle will have sharp corners. ----@param segments? number # The number of circular segments to use for each corner. This increases the smoothness, but increases the number of vertices in the mesh. -function Pass:roundrect(x, y, z, width, height, thickness, angle, ax, ay, az, radius, segments) end - ---- ----Scales the coordinate system. ---- ----@overload fun(self: lovr.Pass, scale: lovr.Vec3) ----@param sx number # The x component of the scale. ----@param sy? number # The y component of the scale. ----@param sz? number # The z component of the scale. -function Pass:scale(sx, sy, sz) end - ---- ----Sends a value to a variable in the Pass's active `Shader`. ---- ----The active shader is changed using `Pass:setShader`. ---- ---- ----### NOTE: ----Shader variables can be in different "sets". ---- ----Variables changed by this function must be in set #2, because LÖVR uses set #0 and set #1 internally. ---- ----The new value will persist until a new shader is set that uses a different "type" for the binding number of the variable. ---- ----See `Pass:setShader` for more details. ---- ----@overload fun(self: lovr.Pass, name: string, texture: lovr.Texture) ----@overload fun(self: lovr.Pass, name: string, sampler: lovr.Sampler) ----@overload fun(self: lovr.Pass, name: string, constant: any) ----@overload fun(self: lovr.Pass, binding: number, buffer: lovr.Buffer, offset?: number, extent?: number) ----@overload fun(self: lovr.Pass, binding: number, texture: lovr.Texture) ----@overload fun(self: lovr.Pass, binding: number, sampler: lovr.Sampler) ----@param name string # The name of the Shader variable. ----@param buffer lovr.Buffer # The Buffer to assign. ----@param offset? number # An offset from the start of the buffer where data will be read, in bytes. ----@param extent? number # The number of bytes that will be available for reading. If zero, as much data as possible will be bound, depending on the offset, buffer size, and the `uniformBufferRange` or `storageBufferRange` limit. -function Pass:send(name, buffer, offset, extent) end - ---- ----Sets whether alpha to coverage is enabled. ---- ----Alpha to coverage factors the alpha of a pixel into antialiasing calculations. ---- ----It can be used to get antialiased edges on textures with transparency. ---- ----It's often used for foliage. ---- ---- ----### NOTE: ----By default, alpha to coverage is disabled. ---- ----@param enable boolean # Whether alpha to coverage should be enabled. -function Pass:setAlphaToCoverage(enable) end - ---- ----Sets the blend mode. ---- ----When a pixel is drawn, the blend mode controls how it is mixed with the color and alpha of the pixel underneath it. ---- ---- ----### NOTE: ----The default blend mode is `alpha` with the `alphamultiply` alpha mode. ---- ----@overload fun(self: lovr.Pass) ----@param blend lovr.BlendMode # The blend mode. ----@param alphaBlend lovr.BlendAlphaMode # The alpha blend mode, used to control premultiplied alpha. -function Pass:setBlendMode(blend, alphaBlend) end - ---- ----Sets the color used for drawing. ---- ----Color components are from 0 to 1. ---- ---- ----### NOTE: ----The default color is `(1, 1, 1, 1)`. ---- ----@overload fun(self: lovr.Pass, t: table) ----@overload fun(self: lovr.Pass, hex: number, a?: number) ----@param r number # The red component of the color. ----@param g number # The green component of the color. ----@param b number # The blue component of the color. ----@param a? number # The alpha component of the color. -function Pass:setColor(r, g, b, a) end - ---- ----Sets the color channels affected by drawing, on a per-channel basis. ---- ----Disabling color writes is often used to render to the depth or stencil buffer without affecting existing pixel colors. ---- ---- ----### NOTE: ----By default, color writes are enabled for all channels. ---- ----@overload fun(self: lovr.Pass, r: boolean, g: boolean, b: boolean, a: boolean) ----@param enable boolean # Whether all color components should be affected by draws. -function Pass:setColorWrite(enable) end - ---- ----Sets whether the front or back faces of triangles are culled. ---- ---- ----### NOTE: ----The default cull mode is `none`. ---- ----@param mode? lovr.CullMode # Whether `front` faces, `back` faces, or `none` of the faces should be culled. -function Pass:setCullMode(mode) end - ---- ----Enables or disables depth clamp. ---- ----Normally, when pixels fall outside of the clipping planes, they are clipped (not rendered). ---- ----Depth clamp will instead render these pixels, clamping their depth on to the clipping planes. ---- ---- ----### NOTE: ----This isn\'t supported on all GPUs. ---- ----Use the `depthClamp` feature of `lovr.graphics.getFeatures` to check for support. ---- ----If depth clamp is enabled when unsupported, it will silently fall back to depth clipping. ---- ----Depth clamping is not enabled by default. ---- ----@param enable boolean # Whether depth clamp should be enabled. -function Pass:setDepthClamp(enable) end - ---- ----Set the depth offset. ---- ----This is a constant offset added to the depth value of pixels. ---- ----It can be used to fix Z fighting when rendering decals or other nearly-overlapping objects. ---- ---- ----### NOTE: ----The default depth offset is zero for both values. ---- ----@param offset? number # The depth offset. ----@param sloped? number # The sloped depth offset. -function Pass:setDepthOffset(offset, sloped) end - ---- ----Sets the depth test. ---- ---- ----### NOTE: ----When using LÖVR's default projection (reverse Z with infinite far plane) the default depth test is `gequal`, depth values of 0.0 are on the far plane and depth values of 1.0 are on the near plane, closer to the camera. ---- ----A depth buffer must be present to use the depth test, but this is enabled by default. ---- ----@overload fun(self: lovr.Pass) ----@param test lovr.CompareMode # The new depth test to use. -function Pass:setDepthTest(test) end - ---- ----Sets whether draws write to the depth buffer. ---- ----When a pixel is drawn, if depth writes are enabled and the pixel passes the depth test, the depth buffer will be updated with the pixel's depth value. ---- ---- ----### NOTE: ----The default depth write is `true`. ---- ----@param write boolean # Whether the depth buffer should be affected by draws. -function Pass:setDepthWrite(write) end - ---- ----Sets the font used for `Pass:text`. ---- ----@param font lovr.Font # The Font to use when rendering text. -function Pass:setFont(font) end - ---- ----Sets the material. ---- ----This will apply to most drawing, except for text, skyboxes, and models, which use their own materials. ---- ----@overload fun(self: lovr.Pass, texture: lovr.Texture) ----@overload fun(self: lovr.Pass) ----@param material lovr.Material # The material to use for drawing. -function Pass:setMaterial(material) end - ---- ----Changes the way vertices are connected together when drawing using `Pass:mesh`. ---- ---- ----### NOTE: ----The default mesh mode is `triangles`. ---- ----@param mode lovr.MeshMode # The mesh mode to use. -function Pass:setMeshMode(mode) end - ---- ----Sets the projection for a single view. ---- ----4 field of view angles can be used, similar to the field of view returned by `lovr.headset.getViewAngles`. ---- ----Alternatively, a projection matrix can be used for other types of projections like orthographic, oblique, etc. ---- ----Up to 6 views are supported. ---- ----The Pass returned by `lovr.headset.getPass` will have its views automatically configured to match the headset. ---- ---- ----### NOTE: ----A far clipping plane of 0.0 can be used for an infinite far plane with reversed Z range. ---- ----This is the default because it improves depth precision and reduces Z fighting. ---- ----Using a non-infinite far plane requires the depth buffer to be cleared to 1.0 instead of 0.0 and the default depth test to be changed to `lequal` instead of `gequal`. ---- ----@overload fun(self: lovr.Pass, view: number, matrix: lovr.Mat4) ----@param view number # The index of the view to update. ----@param left number # The left field of view angle, in radians. ----@param right number # The right field of view angle, in radians. ----@param up number # The top field of view angle, in radians. ----@param down number # The bottom field of view angle, in radians. ----@param near? number # The near clipping plane distance, in meters. ----@param far? number # The far clipping plane distance, in meters. -function Pass:setProjection(view, left, right, up, down, near, far) end - ---- ----Sets the default `Sampler` to use when sampling textures. ---- ----It is also possible to send a custom sampler to a shader using `Pass:send` and use that instead, which allows customizing the sampler on a per-texture basis. ---- ---- ----### NOTE: ----The `getPixel` shader helper function will use this sampler. ---- ----@overload fun(self: lovr.Pass, sampler: lovr.Sampler) ----@param filter? lovr.FilterMode # The default filter mode to use when sampling textures (the `repeat` wrap mode will be used). -function Pass:setSampler(filter) end - ---- ----Sets the scissor rectangle. ---- ----Any pixels outside the scissor rectangle will not be drawn. ---- ---- ----### NOTE: ----`x` and `y` can not be negative. ---- ----The default scissor rectangle covers the entire dimensions of the render pass textures. ---- ----@param x number # The x coordinate of the upper-left corner of the scissor rectangle. ----@param y number # The y coordinate of the upper-left corner of the scissor rectangle. ----@param w number # The width of the scissor rectangle. ----@param h number # The height of the scissor rectangle. -function Pass:setScissor(x, y, w, h) end - ---- ----Sets the active shader. ---- ----In a render pass, the Shader will affect all drawing operations until it is changed again. ---- ----In a compute pass, the Shader will be run when `Pass:compute` is called. ---- ---- ----### NOTE: ----Changing the shader will preserve resource bindings (the ones set using `Pass:send`) **unless** the new shader declares a resource for a binding number using a different type than the current shader. ---- ----In this case, the resource "type" means one of the following: ---- ----- Uniform buffer (`uniform`). ----- Storage buffer (`buffer`). ----- Sampled texture, (`uniform texture`). ----- Storage texture, (`uniform image`). ----- Sampler (`uniform sampler`). ---- ----If the new shader doesn't declare a resource in a particular binding number, any resource there will be preserved. ---- ----If there's a clash in resource types like this, the variable will be "cleared". ---- ----Using a buffer variable that has been cleared is not well-defined, and may return random data or even crash the GPU. ---- ----For textures, white pixels will be returned. ---- ----Samplers will use `linear` filtering and the `repeat` wrap mode. ---- ----Changing the shader will not clear push constants set in the `Constants` block. ---- ----@overload fun(self: lovr.Pass, default: lovr.DefaultShader) ----@overload fun(self: lovr.Pass) ----@param shader lovr.Shader # The shader to use. -function Pass:setShader(shader) end - ---- ----Sets the stencil test. ---- ----Any pixels that fail the stencil test won't be drawn. ---- ----For example, setting the stencil test to `('equal', 1)` will only draw pixels that have a stencil value of 1. The stencil buffer can be modified by drawing while stencil writes are enabled with `lovr.graphics.setStencilWrite`. ---- ---- ----### NOTE: ----The stencil test is disabled by default. ---- ----Setting the stencil test requires the `Pass` to have a depth texture with the `d24s8` or `d32fs8` format (the `s` means "stencil"). ---- ----The `t.graphics.stencil` and `t.headset.stencil` flags in `lovr.conf` can be used to request a stencil format for the default window and headset passes, respectively. ---- ----@overload fun(self: lovr.Pass) ----@param test lovr.CompareMode # The new stencil test to use. ----@param value number # The stencil value to compare against. ----@param mask? number # An optional mask to apply to stencil values before the comparison. -function Pass:setStencilTest(test, value, mask) end - ---- ----Sets or disables stencil writes. ---- ----When stencil writes are enabled, any pixels drawn will update the values in the stencil buffer using the `StencilAction` set. ---- ---- ----### NOTE: ----By default, stencil writes are disabled. ---- ----Setting the stencil test requires the `Pass` to have a depth texture with the `d24s8` or `d32fs8` format (the `s` means "stencil"). ---- ----The `t.graphics.stencil` and `t.headset.stencil` flags in `lovr.conf` can be used to request a stencil format for the default window and headset passes, respectively. ---- ----@overload fun(self: lovr.Pass, actions: table, value?: number, mask?: number) ----@overload fun(self: lovr.Pass) ----@param action lovr.StencilAction # How pixels drawn will update the stencil buffer. ----@param value? number # When using the 'replace' action, this is the value to replace with. ----@param mask? number # An optional mask to apply to stencil values before writing. -function Pass:setStencilWrite(action, value, mask) end - ---- ----Sets the pose for a single view. ---- ----Objects rendered in this view will appear as though the camera is positioned using the given pose. ---- ----Up to 6 views are supported. ---- ----When rendering to the headset, views are changed to match the eye positions. ---- ----These view poses are also available using `lovr.headset.getViewPose`. ---- ----@overload fun(self: lovr.Pass, view: number, position: lovr.Vec3, orientation: lovr.Quat) ----@overload fun(self: lovr.Pass, view: number, matrix: lovr.Mat4, inverted: boolean) ----@param view number # The index of the view to update. ----@param x number # The x position of the viewer, in meters. ----@param y number # The y position of the viewer, in meters. ----@param z number # The z position of the viewer, in meters. ----@param angle number # The number of radians the viewer is rotated around its axis of rotation. ----@param ax number # The x component of the axis of rotation. ----@param ay number # The y component of the axis of rotation. ----@param az number # The z component of the axis of rotation. -function Pass:setViewPose(view, x, y, z, angle, ax, ay, az) end - ---- ----Sets the viewport. ---- ----Everything rendered will get mapped to the rectangle defined by the viewport. ---- ----More specifically, this defines the transformation from normalized device coordinates to pixel coordinates. ---- ---- ----### NOTE: ----The viewport rectangle can use floating point numbers. ---- ----A negative viewport height (with a y coordinate equal to the bottom of the viewport) can be used to flip the rendering vertically. ---- ----The default viewport extends from `(0, 0)` to the dimensions of the target textures, with min depth and max depth respectively set to 0 and 1. ---- ----@param x number # The x coordinate of the upper-left corner of the viewport. ----@param y number # The y coordinate of the upper-left corner of the viewport. ----@param w number # The width of the viewport. ----@param h number # The height of the viewport. May be negative. ----@param dmin? number # The min component of the depth range. ----@param dmax? number # The max component of the depth range. -function Pass:setViewport(x, y, w, h, dmin, dmax) end - ---- ----Sets whether vertices in the clockwise or counterclockwise order vertices are considered the "front" face of a triangle. ---- ----This is used for culling with `Pass:setCullMode`. ---- ---- ----### NOTE: ----The default winding is counterclockwise. ---- ----LÖVR's builtin shapes are wound counterclockwise. ---- ----@param winding lovr.Winding # Whether triangle vertices are ordered `clockwise` or `counterclockwise`. -function Pass:setWinding(winding) end - ---- ----Enables or disables wireframe rendering. ---- ----This will draw all triangles as lines while active. It's intended to be used for debugging, since it usually has a performance cost. ---- ---- ----### NOTE: ----Wireframe rendering is disabled by default. ---- ----There is currently no way to change the thickness of the lines. ---- ----@param enable boolean # Whether wireframe rendering should be enabled. -function Pass:setWireframe(enable) end - ---- ----Draws a skybox. ---- ---- ----### NOTE: ----The skybox will be rotated based on the camera rotation. ---- ----The skybox is drawn using a fullscreen triangle. ---- ----The skybox uses a custom shader, so set the shader to `nil` before calling this function (unless explicitly using a custom shader). ---- ----@overload fun(self: lovr.Pass) ----@param skybox lovr.Texture # The skybox to render. Its `TextureType` can be `cube` to render as a cubemap, or `2d` to render as an equirectangular (spherical) 2D image. -function Pass:skybox(skybox) end - ---- ----Draws a sphere ---- ---- ----### NOTE: ----The local origin of the sphere is in its center. ---- ----@overload fun(self: lovr.Pass, position: lovr.Vec3, radius?: number, orientation: lovr.Quat, longitudes?: number, latitudes?: number) ----@overload fun(self: lovr.Pass, transform: lovr.Mat4, longitudes?: number, latitudes?: number) ----@param x? number # The x coordinate of the center of the sphere. ----@param y? number # The y coordinate of the center of the sphere. ----@param z? number # The z coordinate of the center of the sphere. ----@param radius? number # The radius of the sphere. ----@param angle? number # The rotation of the sphere around its rotation axis, in radians. ----@param ax? number # The x component of the axis of rotation. ----@param ay? number # The y component of the axis of rotation. ----@param az? number # The z component of the axis of rotation. ----@param longitudes? number # The number of "horizontal" segments. ----@param latitudes? number # The number of "vertical" segments. -function Pass:sphere(x, y, z, radius, angle, ax, ay, az, longitudes, latitudes) end - ---- ----Draws text. ---- ----The font can be changed using `Pass:setFont`. ---- ---- ----### NOTE: ----UTF-8 encoded strings are supported. ---- ----Newlines will start a new line of text. ---- ----Tabs will be rendered as four spaces. ---- ----Carriage returns are ignored. ---- ----With the default font pixel density, a scale of 1.0 makes the text height 1 meter. ---- ----The wrap value does not take into account the text's scale. ---- ----Text rendering requires a special shader, which will only be automatically used when the active shader is set to `nil`. ---- ----Blending should be enabled when rendering text (it's on by default). ---- ----This function can draw up to 16384 visible characters at a time, and will currently throw an error if the string is too long. ---- ----@overload fun(self: lovr.Pass, text: string, position: lovr.Vec3, scale?: number, orientation: lovr.Quat, wrap?: number, halign?: lovr.HorizontalAlign, valign?: lovr.VerticalAlign) ----@overload fun(self: lovr.Pass, text: string, transform: lovr.Mat4, wrap?: number, halign?: lovr.HorizontalAlign, valign?: lovr.VerticalAlign) ----@overload fun(self: lovr.Pass, colortext: table, x?: number, y?: number, z?: number, scale?: number, angle?: number, ax?: number, ay?: number, az?: number, wrap?: number, halign?: lovr.HorizontalAlign, valign?: lovr.VerticalAlign) ----@overload fun(self: lovr.Pass, colortext: table, position: lovr.Vec3, scale?: number, orientation: lovr.Quat, wrap?: number, halign?: lovr.HorizontalAlign, valign?: lovr.VerticalAlign) ----@overload fun(self: lovr.Pass, colortext: table, transform: lovr.Mat4, wrap?: number, halign?: lovr.HorizontalAlign, valign?: lovr.VerticalAlign) ----@param text string # The text to render. ----@param x? number # The x coordinate of the text origin. ----@param y? number # The y coordinate of the text origin. ----@param z? number # The z coordinate of the text origin. ----@param scale? number # The scale of the text (with the default pixel density, units are meters). ----@param angle? number # The rotation of the text around its rotation axis, in radians. ----@param ax? number # The x component of the axis of rotation. ----@param ay? number # The y component of the axis of rotation. ----@param az? number # The z component of the axis of rotation. ----@param wrap? number # The maximum width of each line in meters (before scale is applied). When zero, the text will not wrap. ----@param halign? lovr.HorizontalAlign # The horizontal alignment relative to the text origin. ----@param valign? lovr.VerticalAlign # The vertical alignment relative to the text origin. -function Pass:text(text, x, y, z, scale, angle, ax, ay, az, wrap, halign, valign) end - ---- ----Starts a GPU measurement. ---- ----One of the slots in a `Tally` object will be used to hold the result. Commands on the Pass will continue being measured until `Pass:tock` is called with the same tally and slot combination. ---- ----Afterwards, `Pass:read` can be used to read back the tally result, or the tally can be copied to a `Buffer`. ---- ---- ----### NOTE: ----`pixel` and `shader` measurements can not be nested, but `time` measurements can be nested. ---- ----For `time` measurements, the view count of the pass (`Pass:getViewCount`) must match the view count of the tally, which defaults to `2`. ---- ----@param tally lovr.Tally # The tally that will store the measurement. ----@param slot number # The index of the slot in the tally to store the measurement in. -function Pass:tick(tally, slot) end - ---- ----Stops a GPU measurement. ---- ----`Pass:tick` must be called to start the measurement before this can be called. ---- ----Afterwards, `Pass:read` can be used to read back the tally result, or the tally can be copied to a `Buffer`. ---- ----@param tally lovr.Tally # The tally storing the measurement. ----@param slot number # The index of the slot in the tally storing the measurement. -function Pass:tock(tally, slot) end - ---- ----Draws a torus. ---- ---- ----### NOTE: ----The local origin is in the center of the torus, and the torus forms a circle around the local Z axis. ---- ----@overload fun(self: lovr.Pass, position: lovr.Vec3, scale: lovr.Vec3, orientation: lovr.Quat, tsegments?: number, psegments?: number) ----@overload fun(self: lovr.Pass, transform: lovr.Mat4, tsegments?: number, psegments?: number) ----@param x? number # The x coordinate of the center of the torus. ----@param y? number # The y coordinate of the center of the torus. ----@param z? number # The z coordinate of the center of the torus. ----@param radius? number # The radius of the torus. ----@param thickness? number # The thickness of the torus. ----@param angle? number # The rotation of the torus around its rotation axis, in radians. ----@param ax? number # The x component of the axis of rotation. ----@param ay? number # The y component of the axis of rotation. ----@param az? number # The z component of the axis of rotation. ----@param tsegments? number # The number of toroidal (circular) segments to render. ----@param psegments? number # The number of poloidal (tubular) segments to render. -function Pass:torus(x, y, z, radius, thickness, angle, ax, ay, az, tsegments, psegments) end - ---- ----Transforms the coordinate system. ---- ----@overload fun(self: lovr.Pass, translation: lovr.Vec3, scale: lovr.Vec3, rotation: lovr.Quat) ----@overload fun(self: lovr.Pass, transform: lovr.Mat4) ----@param x number # The x component of the translation. ----@param y number # The y component of the translation. ----@param z number # The z component of the translation. ----@param sx number # The x component of the scale. ----@param sy number # The y component of the scale. ----@param sz number # The z component of the scale. ----@param angle number # The amount to rotate the coordinate system by, in radians. ----@param ax number # The x component of the axis of rotation. ----@param ay number # The y component of the axis of rotation. ----@param az number # The z component of the axis of rotation. -function Pass:transform(x, y, z, sx, sy, sz, angle, ax, ay, az) end - ---- ----Translates the coordinate system. ---- ---- ----### NOTE: ----Order matters when scaling, translating, and rotating the coordinate system. ---- ----@overload fun(self: lovr.Pass, translation: lovr.Vec3) ----@param x number # The x component of the translation. ----@param y number # The y component of the translation. ----@param z number # The z component of the translation. -function Pass:translate(x, y, z) end - ---- ----Readbacks track the progress of an asynchronous read of a `Buffer`, `Texture`, or `Tally`. ---- ----Once a Readback is created in a transfer pass, and the transfer pass is submitted, the Readback can be polled for completion or the CPU can wait for it to finish using `Readback:wait`. ---- ----@class lovr.Readback -local Readback = {} - ---- ----Returns the Readback's data as a Blob. ---- ---- ----### NOTE: ----If the Readback is reading back a Texture, returns `nil`. ---- ----@return lovr.Blob blob # The Blob. -function Readback:getBlob() end - ---- ----Returns the data from the Readback, as a table. ---- ---- ----### NOTE: ----This currently returns `nil` for readbacks of `Buffer` and `Texture` objects. ---- ----Only readbacks of `Tally` objects return valid data. ---- ----For `time` and `pixel` tallies, the table will have 1 number per slot that was read. ---- ----For `shader` tallies, there will be 4 numbers for each slot. ---- ----@return table data # A flat table of numbers containing the values that were read back. -function Readback:getData() end - ---- ----Returns the Readback's data as an Image. ---- ---- ----### NOTE: ----If the Readback is not reading back a Texture, returns `nil`. ---- ----@return lovr.Image image # The Image. -function Readback:getImage() end - ---- ----Returns whether the Readback has completed on the GPU and its data is available. ---- ----@return boolean complete # Whether the readback is complete. -function Readback:isComplete() end - ---- ----Blocks the CPU until the Readback is finished on the GPU. ---- ---- ----### NOTE: ----If the transfer pass that created the readback has not been submitted yet, no wait will occur and this function will return `false`. ---- ----@return boolean waited # Whether the CPU had to be blocked for waiting. -function Readback:wait() end - ---- ----Samplers are objects that control how pixels are read from a texture. ---- ----They can control whether the pixels are smoothed, whether the texture wraps at the edge of its UVs, and more. ---- ----Each `Pass` has a default sampler that will be used by default, which can be changed using `Pass:setSampler`. ---- ----Also, samplers can be declared in shaders using the following syntax: ---- ---- layout(set = 2, binding = X) uniform sampler mySampler; ---- ----A Sampler can be sent to the variable using `Pass:send('mySampler', sampler)`. ---- ----The properties of a Sampler are immutable, and can't be changed after it's created. ---- ----@class lovr.Sampler -local Sampler = {} - ---- ----Returns the anisotropy level of the Sampler. ---- ----Anisotropy smooths out a texture's appearance when viewed at grazing angles. ---- ---- ----### NOTE: ----Not all GPUs support anisotropy. ---- ----The maximum anisotropy level is given by the `anisotropy` limit of `lovr.graphics.getLimits`, which may be zero. ---- ----It's very common for the maximum to be 16, however. ---- ----@return number anisotropy # The anisotropy level of the sampler. -function Sampler:getAnisotropy() end - ---- ----Returns the compare mode of the Sampler. ---- ----This is a feature typically only used for shadow mapping. ---- ----Using a sampler with a compare mode requires it to be declared in a shader as a `samplerShadow` instead of a `sampler` variable, and used with a texture that has a depth format. ---- ----The result of sampling a depth texture with a shadow sampler is a number between 0 and 1, indicating the percentage of sampled pixels that passed the comparison. ---- ----@return lovr.CompareMode compare # The compare mode of the sampler. -function Sampler:getCompareMode() end - ---- ----Returns the filter mode of the Sampler. ---- ----@return lovr.FilterMode min # The filter mode used when the texture is minified. ----@return lovr.FilterMode mag # The filter mode used when the texture is magnified. ----@return lovr.FilterMode mip # The filter mode used to select a mipmap level. -function Sampler:getFilter() end - ---- ----Returns the mipmap range of the Sampler. ---- ----This is used to clamp the range of mipmap levels that can be accessed from a texture. ---- ----@return number min # The minimum mipmap level that will be sampled (0 is the largest image). ----@return number max # The maximum mipmap level that will be sampled. -function Sampler:getMipmapRange() end - ---- ----Returns the wrap mode of the sampler, used to wrap or clamp texture coordinates when the extend outside of the 0-1 range. ---- ----@return lovr.WrapMode x # The wrap mode used in the horizontal direction. ----@return lovr.WrapMode y # The wrap mode used in the vertical direction. ----@return lovr.WrapMode z # The wrap mode used in the "z" direction, for 3D textures only. -function Sampler:getWrap() end - ---- ----Shaders are small GPU programs. ---- ----See the `Shaders` guide for a full introduction to Shaders. ---- ----@class lovr.Shader -local Shader = {} - ---- ----Clones a shader. ---- ----This creates an inexpensive copy of it with different flags. ---- ----It can be used to create several variants of a shader with different behavior. ---- ----@param source lovr.Shader # The Shader to clone. ----@param flags table # The flags used by the clone. ----@return lovr.Shader shader # The new Shader. -function Shader:clone(source, flags) end - ---- ----Returns whether the shader is a graphics or compute shader. ---- ----@return lovr.ShaderType type # The type of the Shader. -function Shader:getType() end - ---- ----Returns the workgroup size of a compute shader. ---- ----The workgroup size defines how many times a compute shader is invoked for each workgroup dispatched by `Pass:compute`. ---- ---- ----### NOTE: ----For example, if the workgroup size is `8x8x1` and `16x16x16` workgroups are dispatched, then the compute shader will run `16 * 16 * 16 * (8 * 8 * 1) = 262144` times. ---- ----@return number x # The x size of a workgroup. ----@return number y # The y size of a workgroup. ----@return number z # The z size of a workgroup. -function Shader:getWorkgroupSize() end - ---- ----Returns whether the Shader has a vertex attribute, by name or location. ---- ----@overload fun(self: lovr.Shader, location: number):boolean ----@param name string # The name of an attribute. ----@return boolean exists # Whether the Shader has the attribute. -function Shader:hasAttribute(name) end - ---- ----Returns whether the Shader has a given stage. ---- ----@param stage lovr.ShaderStage # The stage. ----@return boolean exists # Whether the Shader has the stage. -function Shader:hasStage(stage) end - ---- ----Tally objects are able to measure events on the GPU. ---- ----Tallies can measure three types of things: ---- ----- `time` - measures elapsed GPU time. ----- `pixel` - measures how many pixels were rendered, which can be used for occlusion culling. ----- `shader` - measure how many times shaders were run. ---- ----Tally objects can be created with up to 4096 slots. ---- ----Each slot can hold a single measurement value. ---- ----`Pass:tick` is used to begin a measurement, storing the result in one of the slots. ---- ----All commands recorded on the Pass will be measured until `Pass:tock` is called with the same tally and slot. ---- ----The measurement value stored in the slots can be copied to a `Buffer` using `Pass:copy`, or they can be read back to Lua using `Pass:read`. ---- ----@class lovr.Tally -local Tally = {} - ---- ----Returns the number of slots in the Tally. ---- ----@return number count # The number of slots in the Tally. -function Tally:getCount() end - ---- ----Returns the type of the tally, which is the thing it measures between `Pass:tick` and `Pass:tock`. ---- ----@return lovr.TallyType type # The type of measurement. -function Tally:getType() end - ---- ----Tally objects with the `time` type can only be used in render passes with a certain number of views. ---- ----This returns that number. ---- ----@return number views # The number of views the Tally is compatible with. -function Tally:getViewCount() end - ---- ----Textures are multidimensional blocks of memory on the GPU, contrasted with `Buffer` objects which are one-dimensional. ---- ----Textures are used as the destination for rendering operations, and textures loaded from images provide surface data to `Material` objects. ---- ----@class lovr.Texture -local Texture = {} - ---- ----Returns the width, height, and depth of the Texture. ---- ----@return number width # The width of the Texture. ----@return number height # The height of the Texture. ----@return number layers # The number of layers in the Texture. -function Texture:getDimensions() end - ---- ----Returns the format of the texture. ---- ----@return lovr.TextureFormat format # The format of the Texture. -function Texture:getFormat() end - ---- ----Returns the height of the Texture, in pixels. ---- ----@return number height # The height of the Texture, in pixels. -function Texture:getHeight() end - ---- ----Returns the layer count of the Texture. ---- ----2D textures always have 1 layer and cubemaps always have 6 layers. ---- ----3D and array textures have a variable number of layers. ---- ----@return number layers # The layer count of the Texture. -function Texture:getLayerCount() end - ---- ----Returns the number of mipmap levels in the Texture. ---- ----@return number mipmaps # The number of mipmap levels in the Texture. -function Texture:getMipmapCount() end - ---- ----Returns the parent of a Texture view, which is the Texture that it references. ---- ----Returns `nil` if the Texture is not a view. ---- ----@return lovr.Texture parent # The parent of the texture, or `nil` if the texture is not a view. -function Texture:getParent() end - ---- ----Returns the number of samples in the texture. ---- ----Multiple samples are used for multisample antialiasing when rendering to the texture. ---- ----Currently, the sample count is either 1 (not antialiased) or 4 (antialiased). ---- ----@return number samples # The number of samples in the Texture. -function Texture:getSampleCount() end - ---- ----Returns the type of the texture. ---- ----@return lovr.TextureType type # The type of the Texture. -function Texture:getType() end - ---- ----Returns the width of the Texture, in pixels. ---- ----@return number width # The width of the Texture, in pixels. -function Texture:getWidth() end - ---- ----Returns whether a Texture was created with a set of `TextureUsage` flags. ---- ----Usage flags are specified when the Texture is created, and restrict what you can do with a Texture object. ---- ----By default, only the `sample` usage is enabled. ---- ----Applying a smaller set of usage flags helps LÖVR optimize things better. ---- ----@vararg lovr.TextureUsage # One or more usage flags. ----@return boolean supported # Whether the Texture has all the provided usage flags. -function Texture:hasUsage(...) end - ---- ----Returns whether a Texture is a texture view, created with `Texture:newView`. ---- ----@return boolean view # Whether the Texture is a texture view. -function Texture:isView() end - ---- ----Creates a new Texture view. ---- ----A texture view does not store any pixels on its own, but instead uses the pixel data of a "parent" Texture object. ---- ----The width, height, format, sample count, and usage flags all match the parent. ---- ----The view may have a different `TextureType` from the parent, and it may reference a subset of the parent texture's layers and mipmap levels. ---- ----Texture views can be used as render targets in a render pass and they can be bound to Shaders. They can not currently be used for transfer operations. ---- ----They are used for: ---- ----- Reinterpretation of texture contents. ---- ----For example, a cubemap can be treated as ---- an array texture. ----- Rendering to a particular image or mipmap level of a texture. ----- Binding a particular image or mipmap level to a shader. ---- ----@param type lovr.TextureType # The texture type of the view. ----@param layer? number # The index of the first layer in the view. ----@param layerCount? number # The number of layers in the view, or `nil` to use all remaining layers. ----@param mipmap? number # The index of the first mipmap in the view. ----@param mipmapCount? number # The number of mipmaps in the view, or `nil` to use all remaining mipmaps. ----@return lovr.Texture view # The new texture view. -function Texture:newView(type, layer, layerCount, mipmap, mipmapCount) end - ---- ----Controls whether premultiplied alpha is enabled. ---- ---- ----### NOTE: ----The premultiplied mode should be used if pixels being drawn have already been blended, or "pre-multiplied", by the alpha channel. ---- ----This happens when rendering to a texture that contains pixels with transparent alpha values, since the stored color values have already been faded by alpha and don't need to be faded a second time with the alphamultiply blend mode. ---- ----@alias lovr.BlendAlphaMode ---- ----Color channel values are multiplied by the alpha channel during blending. ---- ----| "alphamultiply" ---- ----Color channel values are not multiplied by the alpha. ---- ----Instead, it's assumed that the colors have already been multiplied by the alpha. ---- ----This should be used if the pixels being drawn have already been blended, or "pre-multiplied". ---- ----| "premultiplied" - ---- ----Different ways pixels can blend with the pixels behind them. ---- ----@alias lovr.BlendMode ---- ----Colors will be mixed based on alpha. ---- ----| "alpha" ---- ----Colors will be added to the existing color, alpha will not be changed. ---- ----| "add" ---- ----Colors will be subtracted from the existing color, alpha will not be changed. ---- ----| "subtract" ---- ----All color channels will be multiplied together, producing a darkening effect. ---- ----| "multiply" ---- ----The maximum value of each color channel will be used. ---- ----| "lighten" ---- ----The minimum value of each color channel will be used. ---- ----| "darken" ---- ----The opposite of multiply: the pixel colors are inverted, multiplied, and inverted again, producing a lightening effect. ---- ----| "screen" - ---- ----The different ways to pack Buffer fields into memory. ---- ----The default is `packed`, which is suitable for vertex buffers and index buffers. ---- ----It doesn't add any padding between elements, and so it doesn't waste any space. ---- ----However, this layout won't necessarily work for uniform buffers and storage buffers. ---- ----The `std140` layout corresponds to the std140 layout used for uniform buffers in GLSL. ---- ----It adds the most padding between fields, and requires the stride to be a multiple of 16. ---- ----Example: ---- ---- layout(std140) uniform ObjectScales { float scales[64]; }; ---- ----The `std430` layout corresponds to the std430 layout used for storage buffers in GLSL. ---- ----It adds some padding between certain types, and may round up the stride. ---- ----Example: ---- ---- layout(std430) buffer TileSizes { vec2 sizes[]; } ---- ----@alias lovr.BufferLayout ---- ----The packed layout, without any padding. ---- ----| "packed" ---- ----The std140 layout. ---- ----| "std140" ---- ----The std430 layout. ---- ----| "std430" - ---- ----The method used to compare depth and stencil values when performing the depth and stencil tests. Also used for compare modes in `Sampler`s. ---- ---- ----### NOTE: ----This type can also be specified using mathematical notation, e.g. `=`, `>`, `<=`, etc. `notequal` can be provided as `~=` or `!=`. ---- ----@alias lovr.CompareMode ---- ----The test does not take place, and acts as though it always passes. ---- ----| "none" ---- ----The test passes if the values are equal. ---- ----| "equal" ---- ----The test passes if the values are not equal. ---- ----| "notequal" ---- ----The test passes if the value is less than the existing one. ---- ----| "less" ---- ----The test passes if the value is less than or equal to the existing one. ---- ----| "lequal" ---- ----The test passes if the value is greater than the existing one. ---- ----| "greater" ---- ----The test passes if the value is greater than or equal to the existing one. ---- ----| "gequal" - ---- ----The different ways of doing triangle backface culling. ---- ----@alias lovr.CullMode ---- ----Both sides of triangles will be drawn. ---- ----| "none" ---- ----Skips rendering the back side of triangles. ---- ----| "back" ---- ----Skips rendering the front side of triangles. ---- ----| "front" - ---- ----The set of shaders built in to LÖVR. ---- ----These can be passed to `Pass:setShader` or `lovr.graphics.newShader` instead of writing GLSL code. ---- ----The shaders can be further customized by using the `flags` option to change their behavior. ---- ----If the active shader is set to `nil`, LÖVR picks one of these shaders to use. ---- ----@alias lovr.DefaultShader ---- ----Basic shader without lighting that uses colors and a texture. ---- ----| "unlit" ---- ----Shades triangles based on their normal, resulting in a cool rainbow effect. ---- ----| "normal" ---- ----Renders font glyphs. ---- ----| "font" ---- ----Renders cubemaps. ---- ----| "cubemap" ---- ----Renders spherical textures. ---- ----| "equirect" ---- ----Renders a fullscreen triangle. ---- ----| "fill" - ---- ----Whether a shape should be drawn filled or outlined. ---- ----@alias lovr.DrawStyle ---- ----The shape will be filled in (the default). ---- ----| "fill" ---- ----The shape will be outlined. ---- ----| "line" - ---- ----Different types for `Buffer` fields. ---- ----These are scalar, vector, or matrix types, usually packed into small amounts of space to reduce the amount of memory they occupy. ---- ----The names are encoded as follows: ---- ----- The data type: ---- - `i` for signed integer ---- - `u` for unsigned integer ---- - `sn` for signed normalized (-1 to 1) ---- - `un` for unsigned normalized (0 to 1) ---- - `f` for floating point ----- The bit depth of each component ----- The letter `x` followed by the component count (for vectors) ---- ---- ----### NOTE: ----In addition to these values, the following aliases can be used: ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
AliasMaps to
vec2f32x2
vec3f32x3
vec4f32x4
inti32
uintu32
floatf32
colorun8x4
---- ----Additionally, the following convenience rules apply: ---- ----- Field types can end in an `s`, which will be stripped off. ----- Field types can end in `x1`, which will be stripped off. ---- ----So you can write, e.g. `lovr.graphics.newBuffer(4, 'floats')`, which is cute! ---- ----@alias lovr.FieldType ---- ----Four 8-bit signed integers. ---- ----| "i8x4" ---- ----Four 8-bit unsigned integers. ---- ----| "u8x4" ---- ----Four 8-bit signed normalized values. ---- ----| "sn8x4" ---- ----Four 8-bit unsigned normalized values (aka `color`). ---- ----| "un8x4" ---- ----Three 10-bit unsigned normalized values, and 2 padding bits (aka `normal`). ---- ----| "un10x3" ---- ----One 16-bit signed integer. ---- ----| "i16" ---- ----Two 16-bit signed integers. ---- ----| "i16x2" ---- ----Four 16-bit signed integers. ---- ----| "i16x4" ---- ----One 16-bit unsigned integer. ---- ----| "u16" ---- ----Two 16-bit unsigned integers. ---- ----| "u16x2" ---- ----Four 16-bit unsigned integers. ---- ----| "u16x4" ---- ----Two 16-bit signed normalized values. ---- ----| "sn16x2" ---- ----Four 16-bit signed normalized values. ---- ----| "sn16x4" ---- ----Two 16-bit unsigned normalized values. ---- ----| "un16x2" ---- ----Four 16-bit unsigned normalized values. ---- ----| "un16x4" ---- ----One 32-bit signed integer (aka `int`). ---- ----| "i32" ---- ----Two 32-bit signed integers. ---- ----| "i32x2" ---- ----Two 32-bit signed integers. ---- ----| "i32x2" ---- ----Three 32-bit signed integers. ---- ----| "i32x3" ---- ----Four 32-bit signed integers. ---- ----| "i32x4" ---- ----One 32-bit unsigned integer (aka `uint`). ---- ----| "u32" ---- ----Two 32-bit unsigned integers. ---- ----| "u32x2" ---- ----Three 32-bit unsigned integers. ---- ----| "u32x3" ---- ----Four 32-bit unsigned integers. ---- ----| "u32x4" ---- ----Two 16-bit floating point numbers. ---- ----| "f16x2" ---- ----Four 16-bit floating point numbers. ---- ----| "f16x4" ---- ----One 32-bit floating point number (aka `float`). ---- ----| "f32" ---- ----Two 32-bit floating point numbers (aka `vec2`). ---- ----| "f32x2" ---- ----Three 32-bit floating point numbers (aka `vec3`). ---- ----| "f32x3" ---- ----Four 32-bit floating point numbers (aka `vec4`). ---- ----| "f32x4" ---- ----A 2x2 matrix containing four 32-bit floats. ---- ----| "mat2" ---- ----A 3x3 matrix containing nine 32-bit floats. ---- ----| "mat3" ---- ----A 4x4 matrix containing sixteen 32-bit floats. ---- ----| "mat4" ---- ----Like u16, but 1-indexed. ---- ----| "index16" ---- ----Like u32, but 1-indexed. ---- ----| "index32" - ---- ----Controls how `Sampler` objects smooth pixels in textures. ---- ----@alias lovr.FilterMode ---- ----A pixelated appearance where the "nearest neighbor" pixel is used. ---- ----| "nearest" ---- ----A smooth appearance where neighboring pixels are averaged. ---- ----| "linear" - ---- ----Different ways to horizontally align text with `Pass:text`. ---- ----@alias lovr.HorizontalAlign ---- ----Left-aligned text. ---- ----| "left" ---- ----Centered text. ---- ----| "center" ---- ----Right-aligned text. ---- ----| "right" - ---- ----Different ways vertices in a mesh can be connected together and filled in with pixels. ---- ----@alias lovr.MeshMode ---- ----Each vertex is rendered as a single point. ---- ----The size of the point can be controlled using the `pointSize` shader flag, or by writing to the `PointSize` variable in shaders. ---- ----The maximum point size is given by the `pointSize` limit from `lovr.graphics.getLimits`. ---- ----| "points" ---- ----Pairs of vertices are connected with line segments. ---- ----To draw a single line through all of the vertices, an index buffer can be used to repeat vertices. ---- ----It is not currently possible to change the width of the lines, although cylinders or capsules can be used as an alternative. ---- ----| "lines" ---- ----Every 3 vertices form a triangle, which is filled in with pixels (unless `Pass:setWireframe` is used). ---- ----This mode is the most commonly used. ---- ----| "triangles" - ---- ----Different coordinate spaces for nodes in a `Model`. ---- ----@alias lovr.OriginType ---- ----Transforms are relative to the origin (root) of the Model. ---- ----| "root" ---- ----Transforms are relative to the parent of the node. ---- ----| "parent" - ---- ----The three different types of `Pass` objects. ---- ----Each Pass has a single type, which determines the type of work it does and which functions can be called on it. ---- ----@alias lovr.PassType ---- ----A render pass renders graphics to a set of up to four color textures and an optional depth texture. ---- ----The textures all need to have the same dimensions and sample counts. ---- ----The textures can have multiple layers, and all rendering work will be broadcast to each layer. ---- ----Each layer can use a different camera pose, which is used for stereo rendering. ---- ----| "render" ---- ----A compute pass runs compute shaders. ---- ----Compute passes usually only call `Pass:setShader`, `Pass:send`, and `Pass:compute`. ---- ----All of the compute work in a single compute pass is run in parallel, so multiple compute passes should be used if one compute pass needs to happen after a different one. ---- ----| "compute" ---- ----A transfer pass copies data to and from GPU memory in `Buffer` and `Texture` objects. Transfer passes use `Pass:copy`, `Pass:clear`, `Pass:blit`, `Pass:mipmap`, and `Pass:read`. Similar to compute passes, all the work in a transfer pass happens in parallel, so multiple passes should be used if the transfers need to be ordered. ---- ----| "transfer" - ---- ----Different shader stages. ---- ----Graphics shaders have a `vertex` and `fragment` stage, and compute shaders have a single `compute` stage. ---- ----@alias lovr.ShaderStage ---- ----The vertex stage, which computes transformed vertex positions. ---- ----| "vertex" ---- ----The fragment stage, which computes pixel colors. ---- ----| "fragment" ---- ----The compute stage, which performs arbitrary computation. ---- ----| "compute" - ---- ----The two types of shaders that can be created. ---- ----@alias lovr.ShaderType ---- ----A graphics shader with a vertex and pixel stage. ---- ----| "graphics" ---- ----A compute shader with a single compute stage. ---- ----| "compute" - ---- ----Different types of stacks that can be pushed and popped with `Pass:push` and `Pass:pop`. ---- ----@alias lovr.StackType ---- ----The transform stack (`Pass:transform`, `Pass:translate`, etc.). ---- ----| "transform" ---- ----Graphics state, like `Pass:setColor`, `Pass:setFont`, etc. ---- ----Notably this does not include camera poses/projections or shader variables changed with `Pass:send`. ---- ----| "state" - ---- ----Different ways of updating the stencil buffer with `Pass:setStencilWrite`. ---- ----@alias lovr.StencilAction ---- ----Stencil buffer pixels will not be changed by draws. ---- ----| "keep" ---- ----Stencil buffer pixels will be set to zero. ---- ----| "zero" ---- ----Stencil buffer pixels will be replaced with a custom value. ---- ----| "replace" ---- ----Stencil buffer pixels will be incremented each time they're rendered to. ---- ----| "increment" ---- ----Stencil buffer pixels will be decremented each time they're rendered to. ---- ----| "decrement" ---- ----Similar to increment, but will wrap around to 0 when it exceeds 255. ---- ----| "incrementwrap" ---- ----Similar to decrement, but will wrap around to 255 when it goes below 0. ---- ----| "decrementwrap" ---- ----The bits in the stencil buffer pixels will be inverted. ---- ----| "invert" - ---- ----These are the different metrics a `Tally` can measure. ---- ----@alias lovr.TallyType ---- ----Each slot measures elapsed time in nanoseconds. ---- ----| "time" ---- ----Each slot measures 4 numbers: the total number of vertices processed, the number of times the vertex shader was run, the number of triangles that were visible in the view, and the number of times the fragment shader was run. ---- ----| "shader" ---- ----Each slot measures the approximate number of pixels affected by rendering. ---- ----| "pixel" - ---- ----These are the different ways `Texture` objects can be used. ---- ----These are passed in to `lovr.graphics.isFormatSupported` to see which texture operations are supported by the GPU for a given format. ---- ----@alias lovr.TextureFeature ---- ----The Texture can be sampled (e.g. a `texture2D` or `sampler2D` variable in shaders). ---- ----| "sample" ---- ----The Texture can be used with a `Sampler` using a `FilterMode` of `linear`. ---- ----| "filter" ---- ----The Texture can be rendered to by using it as a target in a render `Pass`. ---- ----| "render" ---- ----Blending can be enabled when rendering to this format in a render pass. ---- ----| "blend" ---- ----The Texture can be sent to an image variable in shaders (e.g. `image2D`). ---- ----| "storage" ---- ----Atomic operations can be used on storage textures with this format. ---- ----| "atomic" ---- ----Source textures in `Pass:blit` can use this format. ---- ----| "blitsrc" ---- ----Destination textures in `Pass:blit` can use this format. ---- ----| "blitdst" - ---- ----Different types of textures. ---- ----Textures are multidimensional blocks of GPU memory, and the texture's type determines how many dimensions there are, and adds some semantics about what the 3rd dimension means. ---- ----@alias lovr.TextureType ---- ----A single 2D image, the most common type. ---- ----| "2d" ---- ----A 3D image, where a sequence of 2D images defines a 3D volume. ---- ----Each mipmap level of a 3D texture gets smaller in the x, y, and z axes, unlike cubemap and array textures. ---- ----| "3d" ---- ----Six square 2D images with the same dimensions that define the faces of a cubemap, used for skyboxes or other "directional" images. ---- ----| "cube" ---- ----Array textures are sequences of distinct 2D images that all have the same dimensions. ---- ----| "array" - ---- ----These are the different things `Texture`s can be used for. ---- ----When creating a Texture, a set of these flags can be provided, restricting what operations are allowed on the texture. ---- ----Using a smaller set of flags may improve performance. ---- ----If none are provided, the only usage flag applied is `sample`. ---- ----@alias lovr.TextureUsage ---- ----Whether the texture can be sampled from in Shaders (i.e. used in a material, or bound to a variable with a `texture` type, like `texture2D`). ---- ----| "sample" ---- ----Whether the texture can be rendered to (i.e. by using it as a render target in `lovr.graphics.pass`). ---- ----| "render" ---- ----Whether the texture can be used as a storage texture for compute operations (i.e. bound to a variable with an `image` type, like `image2D`). ---- ----| "storage" ---- ----Whether the texture can be used in a transfer pass. ---- ----| "transfer" - ---- ----Different ways to vertically align text with `Pass:text`. ---- ----@alias lovr.VerticalAlign ---- ----Top-aligned text. ---- ----| "top" ---- ----Centered text. ---- ----| "middle" ---- ----Bottom-aligned text. ---- ----| "bottom" - ---- ----Indicates whether the front face of a triangle uses the clockwise or counterclockwise vertex order. ---- ----@alias lovr.Winding ---- ----Clockwise winding. ---- ----| "clockwise" ---- ----Counterclockwise winding. ---- ----| "counterclockwise" - ---- ----Controls how `Sampler` objects wrap textures. ---- ----@alias lovr.WrapMode ---- ----Pixels will be clamped to the edge, with pixels outside the 0-1 uv range using colors from the nearest edge. ---- ----| "clamp" ---- ----Tiles the texture. ---- ----| "repeat" diff --git a/meta/3rd/lovr/library/lovr/headset.lua b/meta/3rd/lovr/library/lovr/headset.lua deleted file mode 100644 index 82c0e6c4..00000000 --- a/meta/3rd/lovr/library/lovr/headset.lua +++ /dev/null @@ -1,826 +0,0 @@ ----@meta - ---- ----The `lovr.headset` module is where all the magical VR functionality is. ---- ----With it, you can access connected VR hardware and get information about the available space the player has. ---- ----Note that all units are reported in meters. ---- ----Position `(0, 0, 0)` is on the floor in the center of the play area. ---- ----@class lovr.headset -lovr.headset = {} - ---- ----Animates a device model to match its current input state. ---- ----The buttons and joysticks on a controller will move as they're pressed/moved and hand models will move to match skeletal input. ---- ----The model should have been created using `lovr.headset.newModel` with the `animated` flag set to `true`. ---- ---- ----### NOTE: ----Currently this function is only supported for hand models on the Oculus Quest. ---- ----It's possible to use models that weren't created with `lovr.headset.newModel` but they need to be set up carefully to have the same structure as the models provided by the headset SDK. ---- ----@param device? lovr.Device # The device to use for the animation data. ----@param model lovr.Model # The model to animate. ----@return boolean success # Whether the animation was applied successfully to the Model. If the Model was not compatible or animation data for the device was not available, this will be `false`. -function lovr.headset.animate(device, model) end - ---- ----Returns the current angular velocity of a device. ---- ---- ----### NOTE: ----If the device isn't tracked, all zeroes will be returned. ---- ----@param device? lovr.Device # The device to get the velocity of. ----@return number x # The x component of the angular velocity. ----@return number y # The y component of the angular velocity. ----@return number z # The z component of the angular velocity. -function lovr.headset.getAngularVelocity(device) end - ---- ----Get the current state of an analog axis on a device. ---- ----Some axes are multidimensional, for example a 2D touchpad or thumbstick with x/y axes. ---- ----For multidimensional axes, this function will return multiple values, one number for each axis. ---- ----In these cases, it can be useful to use the `select` function built in to Lua to select a particular axis component. ---- ---- ----### NOTE: ----The axis values will be between 0 and 1 for 1D axes, and between -1 and 1 for each component of a multidimensional axis. ---- ----When hand tracking is active, pinch strength will be mapped to the `trigger` axis. ---- ----@param device lovr.Device # The device. ----@param axis lovr.DeviceAxis # The axis. -function lovr.headset.getAxis(device, axis) end - ---- ----Returns the depth of the play area, in meters. ---- ----@return number depth # The depth of the play area, in meters. -function lovr.headset.getBoundsDepth() end - ---- ----Returns the size of the play area, in meters. ---- ----@return number width # The width of the play area, in meters. ----@return number depth # The depth of the play area, in meters. -function lovr.headset.getBoundsDimensions() end - ---- ----Returns a list of points representing the boundaries of the play area, or `nil` if the current headset driver does not expose this information. ---- ----@param t table # A table to fill with the points. If `nil`, a new table will be created. ----@return table points # A flat table of 3D points representing the play area boundaries. -function lovr.headset.getBoundsGeometry(t) end - ---- ----Returns the width of the play area, in meters. ---- ----@return number width # The width of the play area, in meters. -function lovr.headset.getBoundsWidth() end - ---- ----Returns the near and far clipping planes used to render to the headset. ---- ----Objects closer than the near clipping plane or further than the far clipping plane will be clipped out of view. ---- ---- ----### NOTE: ----The default near and far clipping planes are 0.01 meters and 0.0 meters. ---- ----@return number near # The distance to the near clipping plane, in meters. ----@return number far # The distance to the far clipping plane, in meters, or 0 for an infinite far clipping plane with a reversed Z range. -function lovr.headset.getClipDistance() end - ---- ----Returns the headset delta time, which is the difference between the current and previous predicted display times. ---- ----When the headset is active, this will be the `dt` value passed in to `lovr.update`. ---- ----@return number dt # The delta time. -function lovr.headset.getDeltaTime() end - ---- ----Returns the texture dimensions of the headset display (for one eye), in pixels. ---- ----@return number width # The width of the display. ----@return number height # The height of the display. -function lovr.headset.getDisplayDimensions() end - ---- ----Returns a table with all the refresh rates supported by the headset display, in Hz. ---- ----@return table frequencies # A flat table of the refresh rates supported by the headset display, nil if not supported. -function lovr.headset.getDisplayFrequencies() end - ---- ----Returns the refresh rate of the headset display, in Hz. ---- ----@return number frequency # The frequency of the display, or `nil` if I have no idea what it is. -function lovr.headset.getDisplayFrequency() end - ---- ----Returns the height of the headset display (for one eye), in pixels. ---- ----@return number height # The height of the display. -function lovr.headset.getDisplayHeight() end - ---- ----Returns the width of the headset display (for one eye), in pixels. ---- ----@return number width # The width of the display. -function lovr.headset.getDisplayWidth() end - ---- ----Returns the `HeadsetDriver` that is currently in use, optionally for a specific device. ---- ----The order of headset drivers can be changed using `lovr.conf` to prefer or exclude specific VR APIs. ---- ----@overload fun(device: lovr.Device):lovr.HeadsetDriver ----@return lovr.HeadsetDriver driver # The driver of the headset in use, e.g. "OpenVR". -function lovr.headset.getDriver() end - ---- ----Returns a table with all of the currently tracked hand devices. ---- ---- ----### NOTE: ----The hand paths will *always* be either `hand/left` or `hand/right`. ---- ----@return table hands # The currently tracked hand devices. -function lovr.headset.getHands() end - ---- ----Returns the name of the headset as a string. ---- ----The exact string that is returned depends on the hardware and VR SDK that is currently in use. ---- ---- ----### NOTE: ----The desktop driver name will always be `Simulator`. ---- ----@return string name # The name of the headset as a string. -function lovr.headset.getName() end - ---- ----Returns the current orientation of a device, in angle/axis form. ---- ---- ----### NOTE: ----If the device isn't tracked, all zeroes will be returned. ---- ----@param device? lovr.Device # The device to get the orientation of. ----@return number angle # The amount of rotation around the axis of rotation, in radians. ----@return number ax # The x component of the axis of rotation. ----@return number ay # The y component of the axis of rotation. ----@return number az # The z component of the axis of rotation. -function lovr.headset.getOrientation(device) end - ---- ----Returns the type of origin used for the tracking volume. ---- ----The different types of origins are explained on the `HeadsetOrigin` page. ---- ----@return lovr.HeadsetOrigin origin # The type of origin. -function lovr.headset.getOriginType() end - ---- ----Returns a `Pass` that renders to the headset display. ---- ---- ----### NOTE: ----The same Pass will be returned until `lovr.headset.submit` is called. ---- ----The first time this function is called during a frame, the views of the Pass will be initialized with the headset view poses and view angles. ---- ----The pass will be cleared to the background color, which can be changed using `lovr.graphics.setBackgroundColor`. ---- ----The pass will have a depth buffer. ---- ----If `t.headset.stencil` was set to a truthy value in `lovr.conf`, the depth buffer will use the `d32fs8` format, otherwise `d32f` will be used. ---- ----If `t.headset.antialias` was set to a truthy value in `lovr.conf`, the pass will be multisampled. ---- ----@return lovr.Pass pass # The pass. -function lovr.headset.getPass() end - ---- ----Returns the current position and orientation of a device. ---- ---- ----### NOTE: ----Units are in meters. ---- ----If the device isn't tracked, all zeroes will be returned. ---- ----@param device? lovr.Device # The device to get the pose of. ----@return number x # The x position. ----@return number y # The y position. ----@return number z # The z position. ----@return number angle # The amount of rotation around the axis of rotation, in radians. ----@return number ax # The x component of the axis of rotation. ----@return number ay # The y component of the axis of rotation. ----@return number az # The z component of the axis of rotation. -function lovr.headset.getPose(device) end - ---- ----Returns the current position of a device, in meters, relative to the play area. ---- ---- ----### NOTE: ----If the device isn't tracked, all zeroes will be returned. ---- ----@param device? lovr.Device # The device to get the position of. ----@return number x # The x position of the device. ----@return number y # The y position of the device. ----@return number z # The z position of the device. -function lovr.headset.getPosition(device) end - ---- ----Returns a list of joint transforms tracked by a device. ---- ----Currently, only hand devices are able to track joints. ---- ---- ----### NOTE: ----If the Device does not support tracking joints or the transforms are unavailable, `nil` is returned. ---- ----The joint orientation is similar to the graphics coordinate system: -Z is the forwards direction, pointing towards the fingertips. ---- ----The +Y direction is "up", pointing out of the back of the hand. ---- ----The +X direction is to the right, perpendicular to X and Z. ---- ----Hand joints are returned in the following order: ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
JointIndex
Palm1
Wrist2
ThumbMetacarpal3
Proximal4
Distal5
Tip6
IndexMetacarpal7
Proximal8
Intermediate9
Distal10
Tip11
MiddleMetacarpal12
Proximal13
Intermediate14
Distal15
Tip16
RingMetacarpal17
Proximal18
Intermediate19
Distal20
Tip21
PinkyMetacarpal22
Proximal23
Intermediate24
Distal25
Tip26
---- ----@overload fun(device: lovr.Device, t: table):table ----@param device lovr.Device # The Device to query. ----@return table transforms # A list of joint transforms for the device. Each transform is a table with 3 numbers for the position of the joint, 1 number for the joint radius (in meters), and 4 numbers for the angle/axis orientation of the joint. -function lovr.headset.getSkeleton(device) end - ---- ----Returns a Texture that will be submitted to the headset display. ---- ----This will be the render target used in the headset's render pass. ---- ----The texture is not guaranteed to be the same every frame, and must be called every frame to get the current texture. ---- ---- ----### NOTE: ----This function may return `nil` if the headset is not being rendered to this frame. ---- ----@return lovr.Texture texture # The headset texture. -function lovr.headset.getTexture() end - ---- ----Returns the estimated time in the future at which the light from the pixels of the current frame will hit the eyes of the user. ---- ----This can be used as a replacement for `lovr.timer.getTime` for timestamps that are used for rendering to get a smoother result that is synchronized with the display of the headset. ---- ---- ----### NOTE: ----This has a different epoch than `lovr.timer.getTime`, so it is not guaranteed to be close to that value. ---- ----@return number time # The predicted display time, in seconds. -function lovr.headset.getTime() end - ---- ----Returns the current linear velocity of a device, in meters per second. ---- ---- ----### NOTE: ----If the device isn't tracked, all zeroes will be returned. ---- ----@param device? lovr.Device # The device to get the velocity of. ----@return number vx # The x component of the linear velocity. ----@return number vy # The y component of the linear velocity. ----@return number vz # The z component of the linear velocity. -function lovr.headset.getVelocity(device) end - ---- ----Returns the view angles of one of the headset views. ---- ----These can be used with `Mat4:fov` to create a projection matrix. ---- ----If tracking data is unavailable for the view or the index is invalid, `nil` is returned. ---- ----@param view number # The view index. ----@return number left # The left view angle, in radians. ----@return number right # The right view angle, in radians. ----@return number top # The top view angle, in radians. ----@return number bottom # The bottom view angle, in radians. -function lovr.headset.getViewAngles(view) end - ---- ----Returns the number of views used for rendering. ---- ----Each view consists of a pose in space and a set of angle values that determine the field of view. ---- ----This is usually 2 for stereo rendering configurations, but it can also be different. ---- ----For example, one way of doing foveated rendering uses 2 views for each eye -- one low quality view with a wider field of view, and a high quality view with a narrower field of view. ---- ----@return number count # The number of views. -function lovr.headset.getViewCount() end - ---- ----Returns the pose of one of the headset views. ---- ----This info can be used to create view matrices or do other eye-dependent calculations. ---- ----If tracking data is unavailable for the view or the index is invalid, `nil` is returned. ---- ----@param view number # The view index. ----@return number x # The x coordinate of the view position, in meters. ----@return number y # The y coordinate of the view position, in meters. ----@return number z # The z coordinate of the view position, in meters. ----@return number angle # The amount of rotation around the rotation axis, in radians. ----@return number ax # The x component of the axis of rotation. ----@return number ay # The y component of the axis of rotation. ----@return number az # The z component of the axis of rotation. -function lovr.headset.getViewPose(view) end - ---- ----Returns whether a button on a device is pressed. ---- ---- ----### NOTE: ----When hand tracking is active, pinching will be mapped to the `trigger` button. ---- ----@param device lovr.Device # The device. ----@param button lovr.DeviceButton # The button. ----@return boolean down # Whether the button on the device is currently pressed, or `nil` if the device does not have the specified button. -function lovr.headset.isDown(device, button) end - ---- ----Returns whether LÖVR has VR input focus. ---- ----Focus is lost when the VR system menu is shown. ---- ----The `lovr.focus` callback can be used to detect when this changes. ---- ----@return boolean focused # Whether the application is focused. -function lovr.headset.isFocused() end - ---- ----Returns whether passthrough is active. ---- ----When passthrough is active, the real world will be rendered behind any content rendered by LÖVR, using the alpha channel to blend between the two. ---- ---- ----### NOTE: ----This feature is currently only supported on Oculus Quest devices. ---- ----@return boolean active # Whether passthrough is active. -function lovr.headset.isPassthroughEnabled() end - ---- ----Returns whether a button on a device is currently touched. ---- ----@param device lovr.Device # The device. ----@param button lovr.DeviceButton # The button. ----@return boolean touched # Whether the button on the device is currently touched, or `nil` if the device does not have the button or it isn't touch-sensitive. -function lovr.headset.isTouched(device, button) end - ---- ----Returns whether any active headset driver is currently returning pose information for a device. ---- ---- ----### NOTE: ----If a device is tracked, it is guaranteed to return a valid pose until the next call to `lovr.headset.update`. ---- ----@param device? lovr.Device # The device to get the pose of. ----@return boolean tracked # Whether the device is currently tracked. -function lovr.headset.isTracked(device) end - ---- ----Returns a new Model for the specified device. ---- ---- ----### NOTE: ----Currently this is only implemented for hand models on the Oculus Quest. ---- ----@param device? lovr.Device # The device to load a model for. ----@param options? {animated: boolean} # Options for loading the model. ----@return lovr.Model model # The new Model, or `nil` if a model could not be loaded. -function lovr.headset.newModel(device, options) end - ---- ----Sets the near and far clipping planes used to render to the headset. ---- ----Objects closer than the near clipping plane or further than the far clipping plane will be clipped out of view. ---- ---- ----### NOTE: ----The default clip distances are 0.01 and 0.0. ---- ----@param near number # The distance to the near clipping plane, in meters. ----@param far number # The distance to the far clipping plane, in meters, or 0 for an infinite far clipping plane with a reversed Z range. -function lovr.headset.setClipDistance(near, far) end - ---- ----Sets the display refresh rate, in Hz. ---- ---- ----### NOTE: ----Changing the display refresh-rate also changes the frequency of lovr.update() and lovr.draw() as they depend on the display frequency. ---- ----@param frequency number # The new refresh rate, in Hz. ----@return boolean success # Whether the display refresh rate was successfully set. -function lovr.headset.setDisplayFrequency(frequency) end - ---- ----Sets whether passthrough is active. ---- ----When passthrough is active, the real world will be rendered behind any content rendered by LÖVR, using the alpha channel to blend between the two. ---- ---- ----### NOTE: ----This feature is currently only supported on Oculus Quest devices. ---- ----@param enable boolean # Whether passthrough should be enabled. ----@return boolean success # Whether the passthrough state was set successfully. -function lovr.headset.setPassthroughEnabled(enable) end - ---- ----Starts the headset session. ---- ----This must be called after the graphics module is initialized, and can only be called once. ---- ----Normally it is called automatically by `boot.lua`. ---- -function lovr.headset.start() end - ---- ----Submits the current headset texture to the VR display. ---- ----This should be called after calling `lovr.graphics.submit` with the headset render pass. ---- ----Normally this is taken care of by `lovr.run`. ---- -function lovr.headset.submit() end - ---- ----Causes the device to vibrate with a custom strength, duration, and frequency, if possible. ---- ----@param device? lovr.Device # The device to vibrate. ----@param strength? number # The strength of the vibration (amplitude), between 0 and 1. ----@param duration? number # The duration of the vibration, in seconds. ----@param frequency? number # The frequency of the vibration, in hertz. 0 will use a default frequency. ----@return boolean vibrated # Whether the vibration was successfully triggered by an active headset driver. -function lovr.headset.vibrate(device, strength, duration, frequency) end - ---- ----Returns whether a button on a device was pressed this frame. ---- ---- ----### NOTE: ----Some headset backends are not able to return pressed/released information. ---- ----These drivers will always return false for `lovr.headset.wasPressed` and `lovr.headset.wasReleased`. ---- ----Typically the internal `lovr.headset.update` function will update pressed/released status. ---- ----@param device lovr.Device # The device. ----@param button lovr.DeviceButton # The button to check. ----@return boolean pressed # Whether the button on the device was pressed this frame. -function lovr.headset.wasPressed(device, button) end - ---- ----Returns whether a button on a device was released this frame. ---- ---- ----### NOTE: ----Some headset backends are not able to return pressed/released information. ---- ----These drivers will always return false for `lovr.headset.wasPressed` and `lovr.headset.wasReleased`. ---- ----Typically the internal `lovr.headset.update` function will update pressed/released status. ---- ----@param device lovr.Device # The device. ----@param button lovr.DeviceButton # The button to check. ----@return boolean released # Whether the button on the device was released this frame. -function lovr.headset.wasReleased(device, button) end - ---- ----Different types of input devices supported by the `lovr.headset` module. ---- ---- ----### NOTE: ----The difference between `hand/left` and `hand/left/point` is the first represents an object held in the hand, whereas the second represents the laser pointer used to aim. ---- ----Drawing a controller model would use `hand/left`, whereas drawing a pointer or aiming would use `hand/left/point`. ---- ----@alias lovr.Device ---- ----The headset. ---- ----| "head" ---- ----A shorthand for hand/left. ---- ----| "left" ---- ----A shorthand for hand/right. ---- ----| "right" ---- ----The left controller. ---- ----| "hand/left" ---- ----The right controller. ---- ----| "hand/right" ---- ----The left controller pointer (pose only). ---- ----| "hand/left/point" ---- ----The right controller pointer (pose only). ---- ----| "hand/right/point" ---- ----A device tracking the left elbow. ---- ----| "elbow/left" ---- ----A device tracking the right elbow. ---- ----| "elbow/right" ---- ----A device tracking the left shoulder. ---- ----| "shoulder/left" ---- ----A device tracking the right shoulder. ---- ----| "shoulder/right" ---- ----A device tracking the chest. ---- ----| "chest" ---- ----A device tracking the waist. ---- ----| "waist" ---- ----A device tracking the left knee. ---- ----| "knee/left" ---- ----A device tracking the right knee. ---- ----| "knee/right" ---- ----A device tracking the left foot or ankle. ---- ----| "foot/left" ---- ----A device tracking the right foot or ankle. ---- ----| "foot/right" ---- ----A camera device, often used for recording "mixed reality" footage. ---- ----| "camera" ---- ----A tracked keyboard. ---- ----| "keyboard" ---- ----The left eye. ---- ----| "eye/left" ---- ----The right eye. ---- ----| "eye/right" - ---- ----Axes on an input device. ---- ----@alias lovr.DeviceAxis ---- ----A trigger (1D). ---- ----| "trigger" ---- ----A thumbstick (2D). ---- ----| "thumbstick" ---- ----A touchpad (2D). ---- ----| "touchpad" ---- ----A grip button or grab gesture (1D). ---- ----| "grip" - ---- ----Buttons on an input device. ---- ----@alias lovr.DeviceButton ---- ----The trigger button. ---- ----| "trigger" ---- ----The thumbstick. ---- ----| "thumbstick" ---- ----The touchpad. ---- ----| "touchpad" ---- ----The grip button. ---- ----| "grip" ---- ----The menu button. ---- ----| "menu" ---- ----The A button. ---- ----| "a" ---- ----The B button. ---- ----| "b" ---- ----The X button. ---- ----| "x" ---- ----The Y button. ---- ----| "y" ---- ----The proximity sensor on a headset. ---- ----| "proximity" - ---- ----These are all of the supported VR APIs that LÖVR can use to power the lovr.headset module. ---- ----You can change the order of headset drivers using `lovr.conf` to prefer or exclude specific VR APIs. ---- ----At startup, LÖVR searches through the list of drivers in order. ---- ----@alias lovr.HeadsetDriver ---- ----A VR simulator using keyboard/mouse. ---- ----| "desktop" ---- ----OpenXR. ---- ----| "openxr" - ---- ----Represents the different types of origins for coordinate spaces. ---- ----An origin of "floor" means that the origin is on the floor in the middle of a room-scale play area. ---- ----An origin of "head" means that no positional tracking is available, and consequently the origin is always at the position of the headset. ---- ----@alias lovr.HeadsetOrigin ---- ----The origin is at the head. ---- ----| "head" ---- ----The origin is on the floor. ---- ----| "floor" diff --git a/meta/3rd/lovr/library/lovr/math.lua b/meta/3rd/lovr/library/lovr/math.lua deleted file mode 100644 index 163e5954..00000000 --- a/meta/3rd/lovr/library/lovr/math.lua +++ /dev/null @@ -1,1268 +0,0 @@ ----@meta - ---- ----The `lovr.math` module provides math helpers commonly used for 3D applications. ---- ----@class lovr.math -lovr.math = {} - ---- ----Drains the temporary vector pool, invalidating existing temporary vectors. ---- ----This is called automatically at the end of each frame. ---- -function lovr.math.drain() end - ---- ----Converts a color from gamma space to linear space. ---- ----@overload fun(color: table):number, number, number ----@overload fun(x: number):number ----@param gr number # The red component of the gamma-space color. ----@param gg number # The green component of the gamma-space color. ----@param gb number # The blue component of the gamma-space color. ----@return number lr # The red component of the resulting linear-space color. ----@return number lg # The green component of the resulting linear-space color. ----@return number lb # The blue component of the resulting linear-space color. -function lovr.math.gammaToLinear(gr, gg, gb) end - ---- ----Get the seed used to initialize the random generator. ---- ----@return number seed # The new seed. -function lovr.math.getRandomSeed() end - ---- ----Converts a color from linear space to gamma space. ---- ----@overload fun(color: table):number, number, number ----@overload fun(x: number):number ----@param lr number # The red component of the linear-space color. ----@param lg number # The green component of the linear-space color. ----@param lb number # The blue component of the linear-space color. ----@return number gr # The red component of the resulting gamma-space color. ----@return number gg # The green component of the resulting gamma-space color. ----@return number gb # The blue component of the resulting gamma-space color. -function lovr.math.linearToGamma(lr, lg, lb) end - ---- ----Creates a temporary 4D matrix. ---- ----This function takes the same arguments as `Mat4:set`. ---- ----@overload fun(n: lovr.Mat4):lovr.Mat4 ----@overload fun(position?: lovr.Vec3, scale?: lovr.Vec3, rotation?: lovr.Quat):lovr.Mat4 ----@overload fun(position?: lovr.Vec3, rotation?: lovr.Quat):lovr.Mat4 ----@overload fun(...):lovr.Mat4 ----@overload fun(d: number):lovr.Mat4 ----@return lovr.Mat4 m # The new matrix. -function lovr.math.mat4() end - ---- ----Creates a new `Curve` from a list of control points. ---- ----@overload fun(v: lovr.Vec3, ...):lovr.Curve ----@overload fun(points: table):lovr.Curve ----@overload fun(n: number):lovr.Curve ----@param x number # The x coordinate of the first control point. ----@param y number # The y coordinate of the first control point. ----@param z number # The z coordinate of the first control point. ----@vararg any # Additional control points. ----@return lovr.Curve curve # The new Curve. -function lovr.math.newCurve(x, y, z, ...) end - ---- ----Creates a new 4D matrix. ---- ----This function takes the same arguments as `Mat4:set`. ---- ----@overload fun(n: lovr.Mat4):lovr.Mat4 ----@overload fun(position?: lovr.Vec3, scale?: lovr.Vec3, rotation?: lovr.Quat):lovr.Mat4 ----@overload fun(position?: lovr.Vec3, rotation?: lovr.Quat):lovr.Mat4 ----@overload fun(...):lovr.Mat4 ----@overload fun(d: number):lovr.Mat4 ----@return lovr.Mat4 m # The new matrix. -function lovr.math.newMat4() end - ---- ----Creates a new quaternion. ---- ----This function takes the same arguments as `Quat:set`. ---- ----@overload fun(r: lovr.Quat):lovr.Quat ----@overload fun(v: lovr.Vec3):lovr.Quat ----@overload fun(v: lovr.Vec3, u: lovr.Vec3):lovr.Quat ----@overload fun(m: lovr.Mat4):lovr.Quat ----@overload fun():lovr.Quat ----@param angle? number # An angle to use for the rotation, in radians. ----@param ax? number # The x component of the axis of rotation. ----@param ay? number # The y component of the axis of rotation. ----@param az? number # The z component of the axis of rotation. ----@param raw? boolean # Whether the components should be interpreted as raw `(x, y, z, w)` components. ----@return lovr.Quat q # The new quaternion. -function lovr.math.newQuat(angle, ax, ay, az, raw) end - ---- ----Creates a new `RandomGenerator`, which can be used to generate random numbers. If you just want some random numbers, you can use `lovr.math.random`. Individual RandomGenerator objects are useful if you need more control over the random sequence used or need a random generator isolated from other instances. ---- ----@overload fun(seed: number):lovr.RandomGenerator ----@overload fun(low: number, high: number):lovr.RandomGenerator ----@return lovr.RandomGenerator randomGenerator # The new RandomGenerator. -function lovr.math.newRandomGenerator() end - ---- ----Creates a new 2D vector. ---- ----This function takes the same arguments as `Vec2:set`. ---- ----@overload fun(u: lovr.Vec2):lovr.Vec2 ----@param x? number # The x value of the vector. ----@param y? number # The y value of the vector. ----@return lovr.Vec2 v # The new vector. -function lovr.math.newVec2(x, y) end - ---- ----Creates a new 3D vector. ---- ----This function takes the same arguments as `Vec3:set`. ---- ----@overload fun(u: lovr.Vec3):lovr.Vec3 ----@overload fun(m: lovr.Mat4):lovr.Vec3 ----@param x? number # The x value of the vector. ----@param y? number # The y value of the vector. ----@param z? number # The z value of the vector. ----@return lovr.Vec3 v # The new vector. -function lovr.math.newVec3(x, y, z) end - ---- ----Creates a new 4D vector. ---- ----This function takes the same arguments as `Vec4:set`. ---- ----@overload fun(u: lovr.Vec4):lovr.Vec4 ----@param x? number # The x value of the vector. ----@param y? number # The y value of the vector. ----@param z? number # The z value of the vector. ----@param w? number # The w value of the vector. ----@return lovr.Vec4 v # The new vector. -function lovr.math.newVec4(x, y, z, w) end - ---- ----Returns a 1D, 2D, 3D, or 4D simplex noise value. ---- ----The number will be between 0 and 1. ---- ----@overload fun(x: number, y: number):number ----@overload fun(x: number, y: number, z: number):number ----@overload fun(x: number, y: number, z: number, w: number):number ----@param x number # The x coordinate of the input. ----@return number noise # The noise value, between 0 and 1. -function lovr.math.noise(x) end - ---- ----Creates a temporary quaternion. ---- ----This function takes the same arguments as `Quat:set`. ---- ----@overload fun(r: lovr.Quat):lovr.Quat ----@overload fun(v: lovr.Vec3):lovr.Quat ----@overload fun(v: lovr.Vec3, u: lovr.Vec3):lovr.Quat ----@overload fun(m: lovr.Mat4):lovr.Quat ----@overload fun():lovr.Quat ----@param angle? number # An angle to use for the rotation, in radians. ----@param ax? number # The x component of the axis of rotation. ----@param ay? number # The y component of the axis of rotation. ----@param az? number # The z component of the axis of rotation. ----@param raw? boolean # Whether the components should be interpreted as raw `(x, y, z, w)` components. ----@return lovr.Quat q # The new quaternion. -function lovr.math.quat(angle, ax, ay, az, raw) end - ---- ----Returns a uniformly distributed pseudo-random number. ---- ----This function has improved randomness over Lua's `math.random` and also guarantees that the sequence of random numbers will be the same on all platforms (given the same seed). ---- ---- ----### NOTE: ----You can set the random seed using `lovr.math.setRandomSeed`. ---- ----@overload fun(high: number):number ----@overload fun(low: number, high: number):number ----@return number x # A pseudo-random number. -function lovr.math.random() end - ---- ----Returns a pseudo-random number from a normal distribution (a bell curve). ---- ----You can control the center of the bell curve (the mean value) and the overall width (sigma, or standard deviation). ---- ----@param sigma? number # The standard deviation of the distribution. This can be thought of how "wide" the range of numbers is or how much variability there is. ----@param mu? number # The average value returned. ----@return number x # A normally distributed pseudo-random number. -function lovr.math.randomNormal(sigma, mu) end - ---- ----Seed the random generator with a new seed. ---- ----Each seed will cause `lovr.math.random` and `lovr.math.randomNormal` to produce a unique sequence of random numbers. ---- ----This is done once automatically at startup by `lovr.run`. ---- ----@param seed number # The new seed. -function lovr.math.setRandomSeed(seed) end - ---- ----Creates a temporary 2D vector. ---- ----This function takes the same arguments as `Vec2:set`. ---- ----@overload fun(u: lovr.Vec2):lovr.Vec2 ----@param x? number # The x value of the vector. ----@param y? number # The y value of the vector. ----@return lovr.Vec2 v # The new vector. -function lovr.math.vec2(x, y) end - ---- ----Creates a temporary 3D vector. ---- ----This function takes the same arguments as `Vec3:set`. ---- ----@overload fun(u: lovr.Vec3):lovr.Vec3 ----@overload fun(m: lovr.Mat4):lovr.Vec3 ----@param x? number # The x value of the vector. ----@param y? number # The y value of the vector. ----@param z? number # The z value of the vector. ----@return lovr.Vec3 v # The new vector. -function lovr.math.vec3(x, y, z) end - ---- ----Creates a temporary 4D vector. ---- ----This function takes the same arguments as `Vec4:set`. ---- ----@overload fun(u: lovr.Vec4):lovr.Vec4 ----@param x? number # The x value of the vector. ----@param y? number # The y value of the vector. ----@param z? number # The z value of the vector. ----@param w? number # The w value of the vector. ----@return lovr.Vec4 v # The new vector. -function lovr.math.vec4(x, y, z, w) end - ---- ----A Curve is an object that represents a Bézier curve in three dimensions. ---- ----Curves are defined by an arbitrary number of control points (note that the curve only passes through the first and last control point). ---- ----Once a Curve is created with `lovr.math.newCurve`, you can use `Curve:evaluate` to get a point on the curve or `Curve:render` to get a list of all of the points on the curve. ---- ----These points can be passed directly to `Pass:points` or `Pass:line` to render the curve. ---- ----Note that for longer or more complicated curves (like in a drawing application) it can be easier to store the path as several Curve objects. ---- ----@class lovr.Curve -local Curve = {} - ---- ----Inserts a new control point into the Curve at the specified index. ---- ---- ----### NOTE: ----An error will be thrown if the index is less than one or more than the number of control points. ---- ----@param x number # The x coordinate of the control point. ----@param y number # The y coordinate of the control point. ----@param z number # The z coordinate of the control point. ----@param index? number # The index to insert the control point at. If nil, the control point is added to the end of the list of control points. -function Curve:addPoint(x, y, z, index) end - ---- ----Returns a point on the Curve given a parameter `t` from 0 to 1. ---- ----0 will return the first control point, 1 will return the last point, .5 will return a point in the "middle" of the Curve, etc. ---- ---- ----### NOTE: ----An error will be thrown if `t` is not between 0 and 1, or if the Curve has less than two points. ---- ----@param t number # The parameter to evaluate the Curve at. ----@return number x # The x position of the point. ----@return number y # The y position of the point. ----@return number z # The z position of the point. -function Curve:evaluate(t) end - ---- ----Returns a control point of the Curve. ---- ---- ----### NOTE: ----An error will be thrown if the index is less than one or more than the number of control points. ---- ----@param index number # The index to retrieve. ----@return number x # The x coordinate of the control point. ----@return number y # The y coordinate of the control point. ----@return number z # The z coordinate of the control point. -function Curve:getPoint(index) end - ---- ----Returns the number of control points in the Curve. ---- ----@return number count # The number of control points. -function Curve:getPointCount() end - ---- ----Returns a direction vector for the Curve given a parameter `t` from 0 to 1. ---- ----0 will return the direction at the first control point, 1 will return the direction at the last point, .5 will return the direction at the "middle" of the Curve, etc. ---- ---- ----### NOTE: ----The direction vector returned by this function will have a length of one. ---- ----@param t number # Where on the Curve to compute the direction. ----@return number x # The x position of the point. ----@return number y # The y position of the point. ----@return number z # The z position of the point. -function Curve:getTangent(t) end - ---- ----Removes a control point from the Curve. ---- ---- ----### NOTE: ----An error will be thrown if the index is less than one or more than the number of control points. ---- ----@param index number # The index of the control point to remove. -function Curve:removePoint(index) end - ---- ----Returns a list of points on the Curve. ---- ----The number of points can be specified to get a more or less detailed representation, and it is also possible to render a subsection of the Curve. ---- ---- ----### NOTE: ----This function will always return 2 points if the Curve is a line with only 2 control points. ---- ----@param n? number # The number of points to use. ----@param t1? number # How far along the curve to start rendering. ----@param t2? number # How far along the curve to stop rendering. ----@return table t # A (flat) table of 3D points along the curve. -function Curve:render(n, t1, t2) end - ---- ----Changes the position of a control point on the Curve. ---- ---- ----### NOTE: ----An error will be thrown if the index is less than one or more than the number of control points. ---- ----@param index number # The index to modify. ----@param x number # The new x coordinate. ----@param y number # The new y coordinate. ----@param z number # The new z coordinate. -function Curve:setPoint(index, x, y, z) end - ---- ----Returns a new Curve created by slicing the Curve at the specified start and end points. ---- ---- ----### NOTE: ----The new Curve will have the same number of control points as the existing curve. ---- ----An error will be thrown if t1 or t2 are not between 0 and 1, or if the Curve has less than two points. ---- ----@param t1 number # The starting point to slice at. ----@param t2 number # The ending point to slice at. ----@return lovr.Curve curve # A new Curve. -function Curve:slice(t1, t2) end - ---- ----A `mat4` is a math type that holds 16 values in a 4x4 grid. ---- ----@class lovr.Mat4 -local Mat4 = {} - ---- ----Returns whether a matrix is approximately equal to another matrix. ---- ----@param n lovr.Mat4 # The other matrix. ----@return boolean equal # Whether the 2 matrices approximately equal each other. -function Mat4:equals(n) end - ---- ----Sets a projection matrix using raw projection angles and clipping planes. ---- ----This can be used for asymmetric or oblique projections. ---- ----@param left number # The left half-angle of the projection, in radians. ----@param right number # The right half-angle of the projection, in radians. ----@param up number # The top half-angle of the projection, in radians. ----@param down number # The bottom half-angle of the projection, in radians. ----@param near number # The near plane of the projection. ----@param far? number # The far plane. Zero is a special value that will set an infinite far plane with a reversed Z range, which improves depth buffer precision and is the default. ----@return lovr.Mat4 self # The modified matrix. -function Mat4:fov(left, right, up, down, near, far) end - ---- ----Resets the matrix to the identity, effectively setting its translation to zero, its scale to 1, and clearing any rotation. ---- ----@return lovr.Mat4 self # The modified matrix. -function Mat4:identity() end - ---- ----Inverts the matrix, causing it to represent the opposite of its old transform. ---- ----@return lovr.Mat4 self # The inverted matrix. -function Mat4:invert() end - ---- ----Sets a view transform matrix that moves and orients camera to look at a target point. ---- ----This is useful for changing camera position and orientation. The resulting Mat4 matrix can be passed to `lovr.graphics.transform()` directly (without inverting) before rendering the scene. ---- ----The lookAt() function produces same result as target() after matrix inversion. ---- ----@param from lovr.Vec3 # The position of the viewer. ----@param to lovr.Vec3 # The position of the target. ----@param up? lovr.Vec3 # The up vector of the viewer. ----@return lovr.Mat4 self # The modified matrix. -function Mat4:lookAt(from, to, up) end - ---- ----Multiplies this matrix by another value. ---- ----Multiplying by a matrix combines their two transforms together. ---- ----Multiplying by a vector applies the transformation from the matrix to the vector and returns the vector. ---- ---- ----### NOTE: ----When multiplying by a vec4, the vector is treated as either a point if its w component is 1, or a direction vector if the w is 0 (the matrix translation won't be applied). ---- ----@overload fun(self: lovr.Mat4, v3: lovr.Vec3):lovr.Vec3 ----@overload fun(self: lovr.Mat4, v4: lovr.Vec4):lovr.Vec4 ----@param n lovr.Mat4 # The matrix. ----@return lovr.Mat4 self # The modified matrix. -function Mat4:mul(n) end - ---- ----Sets this matrix to represent an orthographic projection, useful for 2D/isometric rendering. ---- ----This can be used with `Pass:setProjection`, or it can be sent to a `Shader` for use in GLSL. ---- ----@overload fun(self: lovr.Mat4, width: number, height: number, near: number, far: number):lovr.Mat4 ----@param left number # The left edge of the projection. ----@param right number # The right edge of the projection. ----@param bottom number # The bottom edge of the projection. ----@param top number # The top edge of the projection. ----@param near number # The position of the near clipping plane. ----@param far number # The position of the far clipping plane. ----@return lovr.Mat4 self # The modified matrix. -function Mat4:orthographic(left, right, bottom, top, near, far) end - ---- ----Sets this matrix to represent a perspective projection. ---- ----This can be used with `Pass:setProjection`, or it can be sent to a `Shader` for use in GLSL. ---- ----@param fov number # The vertical field of view (in radians). ----@param aspect number # The horizontal aspect ratio of the projection (width / height). ----@param near number # The near plane. ----@param far? number # The far plane. Zero is a special value that will set an infinite far plane with a reversed Z range, which improves depth buffer precision and is the default. ----@return lovr.Mat4 self # The modified matrix. -function Mat4:perspective(fov, aspect, near, far) end - ---- ----Turns the matrix into a reflection matrix that transforms values as though they were reflected across a plane. ---- ----@param position lovr.Vec3 # The position of the plane. ----@param normal lovr.Vec3 # The normal vector of the plane. ----@return lovr.Mat4 self # The reflected matrix. -function Mat4:reflect(position, normal) end - ---- ----Rotates the matrix using a quaternion or an angle/axis rotation. ---- ----@overload fun(self: lovr.Mat4, angle: number, ax?: number, ay?: number, az?: number):lovr.Mat4 ----@param q lovr.Quat # The rotation to apply to the matrix. ----@return lovr.Mat4 self # The rotated matrix. -function Mat4:rotate(q) end - ---- ----Scales the matrix. ---- ----@overload fun(self: lovr.Mat4, sx: number, sy?: number, sz?: number):lovr.Mat4 ----@param scale lovr.Vec3 # The 3D scale to apply. ----@return lovr.Mat4 self # The modified matrix. -function Mat4:scale(scale) end - ---- ----Sets the components of the matrix from separate position, rotation, and scale arguments or an existing matrix. ---- ----@overload fun(self: lovr.Mat4, n: lovr.Mat4):lovr.Mat4 ----@overload fun(self: lovr.Mat4, x: number, y: number, z: number, sx: number, sy: number, sz: number, angle: number, ax: number, ay: number, az: number):lovr.Mat4 ----@overload fun(self: lovr.Mat4, x: number, y: number, z: number, angle: number, ax: number, ay: number, az: number):lovr.Mat4 ----@overload fun(self: lovr.Mat4, position: lovr.Vec3, scale: lovr.Vec3, rotation: lovr.Quat):lovr.Mat4 ----@overload fun(self: lovr.Mat4, position: lovr.Vec3, rotation: lovr.Quat):lovr.Mat4 ----@overload fun(self: lovr.Mat4, ...):lovr.Mat4 ----@overload fun(self: lovr.Mat4, d: number):lovr.Mat4 ----@return lovr.Mat4 m # The input matrix. -function Mat4:set() end - ---- ----Sets a model transform matrix that moves to `from` and orients model towards `to` point. ---- ----This is used when rendered model should always point towards a point of interest. The resulting Mat4 object can be used as model pose. ---- ----The target() function produces same result as lookAt() after matrix inversion. ---- ----@param from lovr.Vec3 # The position of the viewer. ----@param to lovr.Vec3 # The position of the target. ----@param up? lovr.Vec3 # The up vector of the viewer. ----@return lovr.Mat4 self # The modified matrix. -function Mat4:target(from, to, up) end - ---- ----Translates the matrix. ---- ----@overload fun(self: lovr.Mat4, x: number, y: number, z: number):lovr.Mat4 ----@param v lovr.Vec3 # The translation vector. ----@return lovr.Mat4 self # The translated matrix. -function Mat4:translate(v) end - ---- ----Transposes the matrix, mirroring its values along the diagonal. ---- ----@return lovr.Mat4 self # The transposed matrix. -function Mat4:transpose() end - ---- ----Returns the components of matrix, either as 10 separated numbers representing the position, scale, and rotation, or as 16 raw numbers representing the individual components of the matrix in column-major order. ---- ----@param raw? boolean # Whether to return the 16 raw components. -function Mat4:unpack(raw) end - ---- ----A `quat` is a math type that represents a 3D rotation, stored as four numbers. ---- ----@class lovr.Quat -local Quat = {} - ---- ----Conjugates the input quaternion in place, returning the input. ---- ----If the quaternion is normalized, this is the same as inverting it. ---- ----It negates the (x, y, z) components of the quaternion. ---- ----@return lovr.Quat self # The inverted quaternion. -function Quat:conjugate() end - ---- ----Creates a new temporary vec3 facing the forward direction, rotates it by this quaternion, and returns the vector. ---- ----@return lovr.Vec3 v # The direction vector. -function Quat:direction() end - ---- ----Returns whether a quaternion is approximately equal to another quaternion. ---- ----@param r lovr.Quat # The other quaternion. ----@return boolean equal # Whether the 2 quaternions approximately equal each other. -function Quat:equals(r) end - ---- ----Returns the length of the quaternion. ---- ----@return number length # The length of the quaternion. -function Quat:length() end - ---- ----Multiplies this quaternion by another value. ---- ----If the value is a quaternion, the rotations in the two quaternions are applied sequentially and the result is stored in the first quaternion. ---- ----If the value is a vector, then the input vector is rotated by the quaternion and returned. ---- ----@overload fun(self: lovr.Quat, v3: lovr.Vec3):lovr.Vec3 ----@param r lovr.Quat # A quaternion to combine with the original. ----@return lovr.Quat self # The modified quaternion. -function Quat:mul(r) end - ---- ----Adjusts the values in the quaternion so that its length becomes 1. ---- ---- ----### NOTE: ----A common source of bugs with quaternions is to forget to normalize them after performing a series of operations on them. ---- ----Try normalizing a quaternion if some of the calculations aren't working quite right! ---- ----@return lovr.Quat self # The normalized quaternion. -function Quat:normalize() end - ---- ----Sets the components of the quaternion. ---- ----There are lots of different ways to specify the new components, the summary is: ---- ----- Four numbers can be used to specify an angle/axis rotation, similar to other LÖVR functions. ----- Four numbers plus the fifth `raw` flag can be used to set the raw values of the quaternion. ----- An existing quaternion can be passed in to copy its values. ----- A single direction vector can be specified to turn its direction (relative to the default ---- forward direction of "negative z") into a rotation. ----- Two direction vectors can be specified to set the quaternion equal to the rotation between the ---- two vectors. ----- A matrix can be passed in to extract the rotation of the matrix into a quaternion. ---- ----@overload fun(self: lovr.Quat, r: lovr.Quat):lovr.Quat ----@overload fun(self: lovr.Quat, v: lovr.Vec3):lovr.Quat ----@overload fun(self: lovr.Quat, v: lovr.Vec3, u: lovr.Vec3):lovr.Quat ----@overload fun(self: lovr.Quat, m: lovr.Mat4):lovr.Quat ----@overload fun(self: lovr.Quat):lovr.Quat ----@param angle? number # The angle to use for the rotation, in radians. ----@param ax? number # The x component of the axis of rotation. ----@param ay? number # The y component of the axis of rotation. ----@param az? number # The z component of the axis of rotation. ----@param raw? boolean # Whether the components should be interpreted as raw `(x, y, z, w)` components. ----@return lovr.Quat self # The modified quaternion. -function Quat:set(angle, ax, ay, az, raw) end - ---- ----Performs a spherical linear interpolation between this quaternion and another one, which can be used for smoothly animating between two rotations. ---- ----The amount of interpolation is controlled by a parameter `t`. ---- ----A `t` value of zero leaves the original quaternion unchanged, whereas a `t` of one sets the original quaternion exactly equal to the target. ---- ----A value between `0` and `1` returns a rotation between the two based on the value. ---- ----@param r lovr.Quat # The quaternion to slerp towards. ----@param t number # The lerping parameter. ----@return lovr.Quat self # The modified quaternion, containing the new lerped values. -function Quat:slerp(r, t) end - ---- ----Returns the components of the quaternion as numbers, either in an angle/axis representation or as raw quaternion values. ---- ----@param raw? boolean # Whether the values should be returned as raw values instead of angle/axis. ----@return number a # The angle in radians, or the x value. ----@return number b # The x component of the rotation axis or the y value. ----@return number c # The y component of the rotation axis or the z value. ----@return number d # The z component of the rotation axis or the w value. -function Quat:unpack(raw) end - ---- ----A RandomGenerator is a standalone object that can be used to independently generate pseudo-random numbers. If you just need basic randomness, you can use `lovr.math.random` without needing to create a random generator. ---- ----@class lovr.RandomGenerator -local RandomGenerator = {} - ---- ----Returns the seed used to initialize the RandomGenerator. ---- ---- ----### NOTE: ----Since the seed is a 64 bit integer, each 32 bits of the seed are returned separately to avoid precision issues. ---- ----@return number low # The lower 32 bits of the seed. ----@return number high # The upper 32 bits of the seed. -function RandomGenerator:getSeed() end - ---- ----Returns the current state of the RandomGenerator. ---- ----This can be used with `RandomGenerator:setState` to reliably restore a previous state of the generator. ---- ---- ----### NOTE: ----The seed represents the starting state of the RandomGenerator, whereas the state represents the current state of the generator. ---- ----@return string state # The serialized state. -function RandomGenerator:getState() end - ---- ----Returns the next uniformly distributed pseudo-random number from the RandomGenerator's sequence. ---- ----@overload fun(self: lovr.RandomGenerator, high: number):number ----@overload fun(self: lovr.RandomGenerator, low: number, high: number):number ----@return number x # A pseudo-random number. -function RandomGenerator:random() end - ---- ----Returns a pseudo-random number from a normal distribution (a bell curve). ---- ----You can control the center of the bell curve (the mean value) and the overall width (sigma, or standard deviation). ---- ----@param sigma? number # The standard deviation of the distribution. This can be thought of how "wide" the range of numbers is or how much variability there is. ----@param mu? number # The average value returned. ----@return number x # A normally distributed pseudo-random number. -function RandomGenerator:randomNormal(sigma, mu) end - ---- ----Seed the RandomGenerator with a new seed. ---- ----Each seed will cause the RandomGenerator to produce a unique sequence of random numbers. ---- ---- ----### NOTE: ----For precise 64 bit seeds, you should specify the lower and upper 32 bits of the seed separately. Otherwise, seeds larger than 2^53 will start to lose precision. ---- ----@overload fun(self: lovr.RandomGenerator, low: number, high: number) ----@param seed number # The random seed. -function RandomGenerator:setSeed(seed) end - ---- ----Sets the state of the RandomGenerator, as previously obtained using `RandomGenerator:getState`. This can be used to reliably restore a previous state of the generator. ---- ---- ----### NOTE: ----The seed represents the starting state of the RandomGenerator, whereas the state represents the current state of the generator. ---- ----@param state string # The serialized state. -function RandomGenerator:setState(state) end - ---- ----A vector object that holds two numbers. ---- ----@class lovr.Vec2 -local Vec2 = {} - ---- ----Adds a vector or a number to the vector. ---- ----@overload fun(self: lovr.Vec2, x: number, y?: number):lovr.Vec2 ----@param u lovr.Vec2 # The other vector. ----@return lovr.Vec2 self # The modified vector. -function Vec2:add(u) end - ---- ----Returns the angle between vectors. ---- ---- ----### NOTE: ----If any of the two vectors have a length of zero, the angle between them is not well defined. ---- ----In this case the function returns `math.pi / 2`. ---- ----@overload fun(self: lovr.Vec2, x: number, y: number):number ----@param u lovr.Vec2 # The other vector. ----@return number angle # The angle to the other vector, in radians. -function Vec2:angle(u) end - ---- ----Returns the distance to another vector. ---- ----@overload fun(self: lovr.Vec2, x: number, y: number):number ----@param u lovr.Vec2 # The vector to measure the distance to. ----@return number distance # The distance to `u`. -function Vec2:distance(u) end - ---- ----Divides the vector by a vector or a number. ---- ----@overload fun(self: lovr.Vec2, x: number, y?: number):lovr.Vec2 ----@param u lovr.Vec2 # The other vector to divide the components by. ----@return lovr.Vec2 self # The modified vector. -function Vec2:div(u) end - ---- ----Returns the dot product between this vector and another one. ---- ---- ----### NOTE: ----This is computed as: ---- ---- dot = v.x * u.x + v.y * u.y ---- ----The vectors are not normalized before computing the dot product. ---- ----@overload fun(self: lovr.Vec2, x: number, y: number):number ----@param u lovr.Vec2 # The vector to compute the dot product with. ----@return number dot # The dot product between `v` and `u`. -function Vec2:dot(u) end - ---- ----Returns whether a vector is approximately equal to another vector. ---- ---- ----### NOTE: ----To handle floating point precision issues, this function returns true as long as the squared distance between the vectors is below `1e-10`. ---- ----@overload fun(self: lovr.Vec2, x: number, y: number):boolean ----@param u lovr.Vec2 # The other vector. ----@return boolean equal # Whether the 2 vectors approximately equal each other. -function Vec2:equals(u) end - ---- ----Returns the length of the vector. ---- ---- ----### NOTE: ----The length is equivalent to this: ---- ---- math.sqrt(v.x * v.x + v.y * v.y) ---- ----@return number length # The length of the vector. -function Vec2:length() end - ---- ----Performs a linear interpolation between this vector and another one, which can be used to smoothly animate between two vectors, based on a parameter value. ---- ----A parameter value of `0` will leave the vector unchanged, a parameter value of `1` will set the vector to be equal to the input vector, and a value of `.5` will set the components to be halfway between the two vectors. ---- ----@overload fun(self: lovr.Vec2, x: number, y: number, t: number):lovr.Vec2 ----@param u lovr.Vec2 # The vector to lerp towards. ----@param t number # The lerping parameter. ----@return lovr.Vec2 self # The interpolated vector. -function Vec2:lerp(u, t) end - ---- ----Multiplies the vector by a vector or a number. ---- ----@overload fun(self: lovr.Vec2, x: number, y?: number):lovr.Vec2 ----@param u lovr.Vec2 # The other vector to multiply the components by. ----@return lovr.Vec2 self # The modified vector. -function Vec2:mul(u) end - ---- ----Adjusts the values in the vector so that its direction stays the same but its length becomes 1. ---- ----@return lovr.Vec2 self # The normalized vector. -function Vec2:normalize() end - ---- ----Sets the components of the vector, either from numbers or an existing vector. ---- ----@overload fun(self: lovr.Vec2, u: lovr.Vec2):lovr.Vec2 ----@param x? number # The new x value of the vector. ----@param y? number # The new y value of the vector. ----@return lovr.Vec2 v # The input vector. -function Vec2:set(x, y) end - ---- ----Subtracts a vector or a number from the vector. ---- ----@overload fun(self: lovr.Vec2, x: number, y?: number):lovr.Vec2 ----@param u lovr.Vec2 # The other vector. ----@return lovr.Vec2 self # The modified vector. -function Vec2:sub(u) end - ---- ----Returns the 2 components of the vector as numbers. ---- ----@return number x # The x value. ----@return number y # The y value. -function Vec2:unpack() end - ---- ----A vector object that holds three numbers. ---- ----@class lovr.Vec3 -local Vec3 = {} - ---- ----Adds a vector or a number to the vector. ---- ----@overload fun(self: lovr.Vec3, x: number, y?: number, z?: number):lovr.Vec3 ----@param u lovr.Vec3 # The other vector. ----@return lovr.Vec3 self # The modified vector. -function Vec3:add(u) end - ---- ----Returns the angle between vectors. ---- ---- ----### NOTE: ----If any of the two vectors have a length of zero, the angle between them is not well defined. ---- ----In this case the function returns `math.pi / 2`. ---- ----@overload fun(self: lovr.Vec3, x: number, y: number, z: number):number ----@param u lovr.Vec3 # The other vector. ----@return number angle # The angle to the other vector, in radians. -function Vec3:angle(u) end - ---- ----Sets this vector to be equal to the cross product between this vector and another one. ---- ----The new `v` will be perpendicular to both the old `v` and `u`. ---- ---- ----### NOTE: ----The vectors are not normalized before or after computing the cross product. ---- ----@overload fun(self: lovr.Vec3, x: number, y: number, z: number):lovr.Vec3 ----@param u lovr.Vec3 # The vector to compute the cross product with. ----@return lovr.Vec3 self # The modified vector. -function Vec3:cross(u) end - ---- ----Returns the distance to another vector. ---- ----@overload fun(self: lovr.Vec3, x: number, y: number, z: number):number ----@param u lovr.Vec3 # The vector to measure the distance to. ----@return number distance # The distance to `u`. -function Vec3:distance(u) end - ---- ----Divides the vector by a vector or a number. ---- ----@overload fun(self: lovr.Vec3, x: number, y?: number, z?: number):lovr.Vec3 ----@param u lovr.Vec3 # The other vector to divide the components by. ----@return lovr.Vec3 self # The modified vector. -function Vec3:div(u) end - ---- ----Returns the dot product between this vector and another one. ---- ---- ----### NOTE: ----This is computed as: ---- ---- dot = v.x * u.x + v.y * u.y + v.z * u.z ---- ----The vectors are not normalized before computing the dot product. ---- ----@overload fun(self: lovr.Vec3, x: number, y: number, z: number):number ----@param u lovr.Vec3 # The vector to compute the dot product with. ----@return number dot # The dot product between `v` and `u`. -function Vec3:dot(u) end - ---- ----Returns whether a vector is approximately equal to another vector. ---- ---- ----### NOTE: ----To handle floating point precision issues, this function returns true as long as the squared distance between the vectors is below `1e-10`. ---- ----@overload fun(self: lovr.Vec3, x: number, y: number, z: number):boolean ----@param u lovr.Vec3 # The other vector. ----@return boolean equal # Whether the 2 vectors approximately equal each other. -function Vec3:equals(u) end - ---- ----Returns the length of the vector. ---- ---- ----### NOTE: ----The length is equivalent to this: ---- ---- math.sqrt(v.x * v.x + v.y * v.y + v.z * v.z) ---- ----@return number length # The length of the vector. -function Vec3:length() end - ---- ----Performs a linear interpolation between this vector and another one, which can be used to smoothly animate between two vectors, based on a parameter value. ---- ----A parameter value of `0` will leave the vector unchanged, a parameter value of `1` will set the vector to be equal to the input vector, and a value of `.5` will set the components to be halfway between the two vectors. ---- ----@overload fun(self: lovr.Vec3, x: number, y: number, z: number, t: number):lovr.Vec3 ----@param u lovr.Vec3 # The vector to lerp towards. ----@param t number # The lerping parameter. ----@return lovr.Vec3 self # The interpolated vector. -function Vec3:lerp(u, t) end - ---- ----Multiplies the vector by a vector or a number. ---- ----@overload fun(self: lovr.Vec3, x: number, y?: number, z?: number):lovr.Vec3 ----@param u lovr.Vec3 # The other vector to multiply the components by. ----@return lovr.Vec3 self # The modified vector. -function Vec3:mul(u) end - ---- ----Adjusts the values in the vector so that its direction stays the same but its length becomes 1. ---- ----@return lovr.Vec3 self # The normalized vector. -function Vec3:normalize() end - ---- ----Sets the components of the vector, either from numbers or an existing vector. ---- ----@overload fun(self: lovr.Vec3, u: lovr.Vec3):lovr.Vec3 ----@overload fun(self: lovr.Vec3, q: lovr.Quat):lovr.Vec3 ----@overload fun(self: lovr.Vec3, m: lovr.Mat4):lovr.Vec3 ----@param x? number # The new x value of the vector. ----@param y? number # The new y value of the vector. ----@param z? number # The new z value of the vector. ----@return lovr.Vec3 v # The input vector. -function Vec3:set(x, y, z) end - ---- ----Subtracts a vector or a number from the vector. ---- ----@overload fun(self: lovr.Vec3, x: number, y?: number, z?: number):lovr.Vec3 ----@param u lovr.Vec3 # The other vector. ----@return lovr.Vec3 self # The modified vector. -function Vec3:sub(u) end - ---- ----Returns the 3 components of the vector as numbers. ---- ----@return number x # The x value. ----@return number y # The y value. ----@return number z # The z value. -function Vec3:unpack() end - ---- ----A vector object that holds four numbers. ---- ----@class lovr.Vec4 -local Vec4 = {} - ---- ----Adds a vector or a number to the vector. ---- ----@overload fun(self: lovr.Vec4, x: number, y?: number, z?: number, w?: number):lovr.Vec4 ----@param u lovr.Vec4 # The other vector. ----@return lovr.Vec4 self # The modified vector. -function Vec4:add(u) end - ---- ----Returns the angle between vectors. ---- ---- ----### NOTE: ----If any of the two vectors have a length of zero, the angle between them is not well defined. ---- ----In this case the function returns `math.pi / 2`. ---- ----@overload fun(self: lovr.Vec4, x: number, y: number, z: number, w: number):number ----@param u lovr.Vec4 # The other vector. ----@return number angle # The angle to other vector, in radians. -function Vec4:angle(u) end - ---- ----Returns the distance to another vector. ---- ----@overload fun(self: lovr.Vec4, x: number, y: number, z: number, w: number):number ----@param u lovr.Vec4 # The vector to measure the distance to. ----@return number distance # The distance to `u`. -function Vec4:distance(u) end - ---- ----Divides the vector by a vector or a number. ---- ----@overload fun(self: lovr.Vec4, x: number, y?: number, z?: number, w?: number):lovr.Vec4 ----@param u lovr.Vec4 # The other vector to divide the components by. ----@return lovr.Vec4 self # The modified vector. -function Vec4:div(u) end - ---- ----Returns the dot product between this vector and another one. ---- ---- ----### NOTE: ----This is computed as: ---- ---- dot = v.x * u.x + v.y * u.y + v.z * u.z + v.w * u.w ---- ----The vectors are not normalized before computing the dot product. ---- ----@overload fun(self: lovr.Vec4, x: number, y: number, z: number, w: number):number ----@param u lovr.Vec4 # The vector to compute the dot product with. ----@return number dot # The dot product between `v` and `u`. -function Vec4:dot(u) end - ---- ----Returns whether a vector is approximately equal to another vector. ---- ---- ----### NOTE: ----To handle floating point precision issues, this function returns true as long as the squared distance between the vectors is below `1e-10`. ---- ----@overload fun(self: lovr.Vec4, x: number, y: number, z: number, w: number):boolean ----@param u lovr.Vec4 # The other vector. ----@return boolean equal # Whether the 2 vectors approximately equal each other. -function Vec4:equals(u) end - ---- ----Returns the length of the vector. ---- ---- ----### NOTE: ----The length is equivalent to this: ---- ---- math.sqrt(v.x * v.x + v.y * v.y + v.z * v.z + v.w * v.w) ---- ----@return number length # The length of the vector. -function Vec4:length() end - ---- ----Performs a linear interpolation between this vector and another one, which can be used to smoothly animate between two vectors, based on a parameter value. ---- ----A parameter value of `0` will leave the vector unchanged, a parameter value of `1` will set the vector to be equal to the input vector, and a value of `.5` will set the components to be halfway between the two vectors. ---- ----@overload fun(self: lovr.Vec4, x: number, y: number, z: number, w: number, t: number):lovr.Vec4 ----@param u lovr.Vec4 # The vector to lerp towards. ----@param t number # The lerping parameter. ----@return lovr.Vec4 self # The interpolated vector. -function Vec4:lerp(u, t) end - ---- ----Multiplies the vector by a vector or a number. ---- ----@overload fun(self: lovr.Vec4, x: number, y?: number, z?: number, w?: number):lovr.Vec4 ----@param u lovr.Vec4 # The other vector to multiply the components by. ----@return lovr.Vec4 self # The modified vector. -function Vec4:mul(u) end - ---- ----Adjusts the values in the vector so that its direction stays the same but its length becomes 1. ---- ----@return lovr.Vec4 self # The normalized vector. -function Vec4:normalize() end - ---- ----Sets the components of the vector, either from numbers or an existing vector. ---- ----@overload fun(self: lovr.Vec4, u: lovr.Vec4):lovr.Vec4 ----@param x? number # The new x value of the vector. ----@param y? number # The new y value of the vector. ----@param z? number # The new z value of the vector. ----@param w? number # The new w value of the vector. ----@return lovr.Vec4 v # The input vector. -function Vec4:set(x, y, z, w) end - ---- ----Subtracts a vector or a number from the vector. ---- ----@overload fun(self: lovr.Vec4, x: number, y?: number, z?: number, w?: number):lovr.Vec4 ----@param u lovr.Vec4 # The other vector. ----@return lovr.Vec4 self # The modified vector. -function Vec4:sub(u) end - ---- ----Returns the 4 components of the vector as numbers. ---- ----@return number x # The x value. ----@return number y # The y value. ----@return number z # The z value. ----@return number w # The w value. -function Vec4:unpack() end - ---- ----LÖVR has math objects for vectors, matrices, and quaternions, collectively called "vector objects". ---- ----Vectors are useful because they can represent a multidimensional quantity (like a 3D position) using just a single value. ---- ---- ----### NOTE: ----Most LÖVR functions that accept positions, orientations, transforms, velocities, etc. also accept vector objects, so they can be used interchangeably with numbers: ---- ---- function lovr.draw(pass) ---- -- position and size are vec3's, rotation is a quat ---- pass:box(position, size, rotation) ---- end ---- ----### Temporary vs. Permanent ---- ----Vectors can be created in two different ways: **permanent** and **temporary**. ---- ----**Permanent** vectors behave like normal Lua values. ---- ----They are individual objects that are garbage collected when no longer needed. ---- ----They're created using the usual `lovr.math.new` syntax: ---- ---- self.position = lovr.math.newVec3(x, y, z) ---- ----**Temporary** vectors are created from a shared pool of vector objects. ---- ----This makes them faster because they use temporary memory and do not need to be garbage collected. ---- ----To make a temporary vector, leave off the `new` prefix: ---- ---- local position = lovr.math.vec3(x, y, z) ---- ----As a shortcut, vector constructors are placed on the global scope. ---- ----The uppercase name of the vector is a function that will create a permanent vector, and the lowercase name will create a temporary vector. ---- ----This can be disabled using the `t.math.globals` option in `lovr.conf`. ---- ---- local position = vec3(x1, y1, z1) + vec3(x2, y2, z2) ---- local transform = Mat4() ---- ----Temporary vectors, with all their speed, come with an important restriction: they can only be used during the frame in which they were created. ---- ----Saving them into variables and using them later on will throw an error: ---- ---- local position = vec3(1, 2, 3) ---- ---- function lovr.update(dt) ---- -- Reusing the temporary 'position' vector across frames will error: ---- position:add(vec3(dt)) ---- end ---- ----It's possible to overflow the temporary vector pool. ---- ----If that happens, `lovr.math.drain` can be used to periodically drain the pool, invalidating any existing temporary vectors. ---- ----### Metamethods ---- ----Vectors have metamethods, allowing them to be used using the normal math operators like `+`, `-`, `*`, `/`, etc. ---- ---- print(vec3(2, 4, 6) * .5 + vec3(10, 20, 30)) ---- ----These metamethods will create new temporary vectors. ---- ----### Components and Swizzles ---- ----The raw components of a vector can be accessed like normal fields: ---- ---- print(vec3(1, 2, 3).z) --> 3 ---- print(mat4()[16]) --> 1 ---- ----Also, multiple fields can be accessed and combined into a new (temporary) vector, called swizzling: ---- ---- local position = vec3(10, 5, 1) ---- print(position.xy) --> vec2(10, 5) ---- print(position.xyy) --> vec3(10, 5, 5) ---- print(position.zyxz) --> vec4(1, 5, 10, 1) ---- ----The following fields are supported for vectors: ---- ----- `x`, `y`, `z`, `w` ----- `r`, `g`, `b`, `a` ----- `s`, `t`, `p`, `q` ---- ----Quaternions support `x`, `y`, `z`, and `w`. ---- ----Matrices use numbers for accessing individual components in "column-major" order. ---- ----All fields can also be assigned to. ---- ---- -- Swap the components of a 2D vector ---- v.xy = v.yx ---- ----The `unpack` function can be used (on any vector type) to access all of the individual components of a vector object. ---- ----For quaternions you can choose whether you want to unpack the angle/axis representation or the raw quaternion components. ---- ----Similarly, matrices support raw unpacking as well as decomposition into translation/scale/rotation values. ---- ----### Vector Constants ---- ----The following vector constants are available. ---- ----They return new temporary vectors each time they are used: ---- ----- `vec2.zero` (0, 0) ----- `vec2.one` (1, 1) ----- `vec3.zero` (0, 0, 0) ----- `vec3.one` (1, 1, 1) ----- `vec3.left` (-1, 0, 0) ----- `vec3.right` (1, 0, 0) ----- `vec3.up` (0, 1, 0) ----- `vec3.down` (0, -1, 0) ----- `vec3.back` (0, 0, 1) ----- `vec3.forward` (0, 0, -1) ----- `vec4.zero` (0, 0, 0, 0) ----- `vec4.one` (1, 1, 1, 1) ----- `quat.identity` (0, 0, 0, 1) ---- ----@class lovr.Vectors -local Vectors = {} diff --git a/meta/3rd/lovr/library/lovr/physics.lua b/meta/3rd/lovr/library/lovr/physics.lua deleted file mode 100644 index b699fc81..00000000 --- a/meta/3rd/lovr/library/lovr/physics.lua +++ /dev/null @@ -1,1843 +0,0 @@ ----@meta - ---- ----The `lovr.physics` module simulates 3D rigid body physics. ---- ----@class lovr.physics -lovr.physics = {} - ---- ----Creates a new BallJoint. ---- ---- ----### NOTE: ----A ball joint is like a ball and socket between the two colliders. ---- ----It tries to keep the distance between the colliders and the anchor position the same, but does not constrain the angle between them. ---- ----@overload fun(colliderA: lovr.Collider, colliderB: lovr.Collider, anchor: lovr.Vec3):lovr.BallJoint ----@param colliderA lovr.Collider # The first collider to attach the Joint to. ----@param colliderB lovr.Collider # The second collider to attach the Joint to. ----@param x number # The x position of the joint anchor point, in world coordinates. ----@param y number # The y position of the joint anchor point, in world coordinates. ----@param z number # The z position of the joint anchor point, in world coordinates. ----@return lovr.BallJoint ball # The new BallJoint. -function lovr.physics.newBallJoint(colliderA, colliderB, x, y, z) end - ---- ----Creates a new BoxShape. ---- ---- ----### NOTE: ----A Shape can be attached to a Collider using `Collider:addShape`. ---- ----@param width? number # The width of the box, in meters. ----@param height? number # The height of the box, in meters. ----@param depth? number # The depth of the box, in meters. ----@return lovr.BoxShape box # The new BoxShape. -function lovr.physics.newBoxShape(width, height, depth) end - ---- ----Creates a new CapsuleShape. ---- ----Capsules are cylinders with hemispheres on each end. ---- ---- ----### NOTE: ----A Shape can be attached to a Collider using `Collider:addShape`. ---- ----@param radius? number # The radius of the capsule, in meters. ----@param length? number # The length of the capsule, not including the caps, in meters. ----@return lovr.CapsuleShape capsule # The new CapsuleShape. -function lovr.physics.newCapsuleShape(radius, length) end - ---- ----Creates a new CylinderShape. ---- ---- ----### NOTE: ----A Shape can be attached to a Collider using `Collider:addShape`. ---- ----@param radius? number # The radius of the cylinder, in meters. ----@param length? number # The length of the cylinder, in meters. ----@return lovr.CylinderShape cylinder # The new CylinderShape. -function lovr.physics.newCylinderShape(radius, length) end - ---- ----Creates a new DistanceJoint. ---- ---- ----### NOTE: ----A distance joint tries to keep the two colliders a fixed distance apart. ---- ----The distance is determined by the initial distance between the anchor points. ---- ----The joint allows for rotation on the anchor points. ---- ----@overload fun(colliderA: lovr.Collider, colliderB: lovr.Collider, first: lovr.Vec3, second: lovr.Vec3):lovr.DistanceJoint ----@param colliderA lovr.Collider # The first collider to attach the Joint to. ----@param colliderB lovr.Collider # The second collider to attach the Joint to. ----@param x1 number # The x position of the first anchor point, in world coordinates. ----@param y1 number # The y position of the first anchor point, in world coordinates. ----@param z1 number # The z position of the first anchor point, in world coordinates. ----@param x2 number # The x position of the second anchor point, in world coordinates. ----@param y2 number # The y position of the second anchor point, in world coordinates. ----@param z2 number # The z position of the second anchor point, in world coordinates. ----@return lovr.DistanceJoint joint # The new DistanceJoint. -function lovr.physics.newDistanceJoint(colliderA, colliderB, x1, y1, z1, x2, y2, z2) end - ---- ----Creates a new HingeJoint. ---- ---- ----### NOTE: ----A hinge joint constrains two colliders to allow rotation only around the hinge's axis. ---- ----@overload fun(colliderA: lovr.Collider, colliderB: lovr.Collider, anchor: lovr.Vec3, axis: lovr.Vec3):lovr.HingeJoint ----@param colliderA lovr.Collider # The first collider to attach the Joint to. ----@param colliderB lovr.Collider # The second collider to attach the Joint to. ----@param x number # The x position of the hinge anchor, in world coordinates. ----@param y number # The y position of the hinge anchor, in world coordinates. ----@param z number # The z position of the hinge anchor, in world coordinates. ----@param ax number # The x component of the hinge axis direction. ----@param ay number # The y component of the hinge axis direction. ----@param az number # The z component of the hinge axis direction. ----@return lovr.HingeJoint hinge # The new HingeJoint. -function lovr.physics.newHingeJoint(colliderA, colliderB, x, y, z, ax, ay, az) end - ---- ----Creates a new MeshShape. ---- ---- ----### NOTE: ----A Shape can be attached to a Collider using `Collider:addShape`. ---- ----@overload fun(model: lovr.Model):lovr.MeshShape ----@param vertices table # The table of vertices in the mesh. Each vertex is a table with 3 numbers. ----@param indices table # A table of triangle indices representing how the vertices are connected in the Mesh. ----@return lovr.MeshShape mesh # The new MeshShape. -function lovr.physics.newMeshShape(vertices, indices) end - ---- ----Creates a new SliderJoint. ---- ---- ----### NOTE: ----A slider joint constrains two colliders to only allow movement along the slider's axis. ---- ----@overload fun(colliderA: lovr.Collider, colliderB: lovr.Collider, axis: lovr.Vec3):lovr.SliderJoint ----@param colliderA lovr.Collider # The first collider to attach the Joint to. ----@param colliderB lovr.Collider # The second collider to attach the Joint to. ----@param ax number # The x component of the slider axis. ----@param ay number # The y component of the slider axis. ----@param az number # The z component of the slider axis. ----@return lovr.SliderJoint slider # The new SliderJoint. -function lovr.physics.newSliderJoint(colliderA, colliderB, ax, ay, az) end - ---- ----Creates a new SphereShape. ---- ---- ----### NOTE: ----A Shape can be attached to a Collider using `Collider:addShape`. ---- ----@param radius? number # The radius of the sphere, in meters. ----@return lovr.SphereShape sphere # The new SphereShape. -function lovr.physics.newSphereShape(radius) end - ---- ----Creates a new TerrainShape. ---- ---- ----### NOTE: ----A Shape can be attached to a Collider using `Collider:addShape`. For immobile terrain use the `Collider:setKinematic`. ---- ----@overload fun(scale: number, heightmap: lovr.Image, stretch?: number):lovr.TerrainShape ----@overload fun(scale: number, callback: function, samples?: number):lovr.TerrainShape ----@param scale number # The width and depth of the terrain, in meters. ----@return lovr.TerrainShape terrain # The new TerrainShape. -function lovr.physics.newTerrainShape(scale) end - ---- ----Creates a new physics World, which tracks the overall physics simulation, holds collider objects, and resolves collisions between them. ---- ---- ----### NOTE: ----A World must be updated with `World:update` in `lovr.update` for the physics simulation to advance. ---- ----@param xg? number # The x component of the gravity force. ----@param yg? number # The y component of the gravity force. ----@param zg? number # The z component of the gravity force. ----@param allowSleep? boolean # Whether or not colliders will automatically be put to sleep. ----@param tags table # A list of collision tags colliders can be assigned to. ----@return lovr.World world # A whole new World. -function lovr.physics.newWorld(xg, yg, zg, allowSleep, tags) end - ---- ----A BallJoint is a type of `Joint` that acts like a ball and socket between two colliders. ---- ----It allows the colliders to rotate freely around an anchor point, but does not allow the colliders' distance from the anchor point to change. ---- ----@class lovr.BallJoint -local BallJoint = {} - ---- ----Returns the anchor points of the BallJoint, in world coordinates. ---- ----The first point is the anchor on the first collider, and the second point is on the second collider. ---- ----The joint tries to keep these points the same, but they may be different if the joint is forced apart by some other means. ---- ----@return number x1 # The x coordinate of the first anchor point, in world coordinates. ----@return number y1 # The y coordinate of the first anchor point, in world coordinates. ----@return number z1 # The z coordinate of the first anchor point, in world coordinates. ----@return number x2 # The x coordinate of the second anchor point, in world coordinates. ----@return number y2 # The y coordinate of the second anchor point, in world coordinates. ----@return number z2 # The z coordinate of the second anchor point, in world coordinates. -function BallJoint:getAnchors() end - ---- ----Returns the response time of the joint. ---- ----See `World:setResponseTime` for more info. ---- ----@return number responseTime # The response time setting for the joint. -function BallJoint:getResponseTime() end - ---- ----Returns the tightness of the joint. ---- ----See `World:setTightness` for how this affects the joint. ---- ----@return number tightness # The tightness of the joint. -function BallJoint:getTightness() end - ---- ----Sets a new anchor point for the BallJoint. ---- ----@overload fun(self: lovr.BallJoint, anchor: lovr.Vec3) ----@param x number # The x coordinate of the anchor point, in world coordinates. ----@param y number # The y coordinate of the anchor point, in world coordinates. ----@param z number # The z coordinate of the anchor point, in world coordinates. -function BallJoint:setAnchor(x, y, z) end - ---- ----Sets the response time of the joint. ---- ----See `World:setResponseTime` for more info. ---- ----@param responseTime number # The new response time setting for the joint. -function BallJoint:setResponseTime(responseTime) end - ---- ----Sets the tightness of the joint. ---- ----See `World:setTightness` for how this affects the joint. ---- ----@param tightness number # The tightness of the joint. -function BallJoint:setTightness(tightness) end - ---- ----A type of `Shape` that can be used for cubes or boxes. ---- ----@class lovr.BoxShape -local BoxShape = {} - ---- ----Returns the width, height, and depth of the BoxShape. ---- ----@return number width # The width of the box, in meters. ----@return number height # The height of the box, in meters. ----@return number depth # The depth of the box, in meters. -function BoxShape:getDimensions() end - ---- ----Sets the width, height, and depth of the BoxShape. ---- ----@param width number # The width of the box, in meters. ----@param height number # The height of the box, in meters. ----@param depth number # The depth of the box, in meters. -function BoxShape:setDimensions(width, height, depth) end - ---- ----A type of `Shape` that can be used for capsule-shaped things. ---- ----@class lovr.CapsuleShape -local CapsuleShape = {} - ---- ----Returns the length of the CapsuleShape, not including the caps. ---- ----@return number length # The length of the capsule, in meters. -function CapsuleShape:getLength() end - ---- ----Returns the radius of the CapsuleShape. ---- ----@return number radius # The radius of the capsule, in meters. -function CapsuleShape:getRadius() end - ---- ----Sets the length of the CapsuleShape. ---- ----@param length number # The new length, in meters, not including the caps. -function CapsuleShape:setLength(length) end - ---- ----Sets the radius of the CapsuleShape. ---- ----@param radius number # The new radius, in meters. -function CapsuleShape:setRadius(radius) end - ---- ----Colliders are objects that represent a single rigid body in a physics simulation. ---- ----They can have forces applied to them and collide with other colliders. ---- ----@class lovr.Collider -local Collider = {} - ---- ----Attaches a Shape to the collider. ---- ----Attached shapes will collide with other shapes in the world. ---- ----@param shape lovr.Shape # The Shape to attach. -function Collider:addShape(shape) end - ---- ----Applies a force to the Collider. ---- ---- ----### NOTE: ----If the Collider is asleep, it will need to be woken up with `Collider:setAwake` for this function to have any affect. ---- ----@overload fun(self: lovr.Collider, x: number, y: number, z: number, px: number, py: number, pz: number) ----@overload fun(self: lovr.Collider, force: lovr.Vec3) ----@overload fun(self: lovr.Collider, force: lovr.Vec3, position: lovr.Vec3) ----@param x number # The x component of the force to apply. ----@param y number # The y component of the force to apply. ----@param z number # The z component of the force to apply. -function Collider:applyForce(x, y, z) end - ---- ----Applies torque to the Collider. ---- ---- ----### NOTE: ----If the Collider is asleep, it will need to be woken up with `Collider:setAwake` for this function to have any effect. ---- ----@overload fun(self: lovr.Collider, torque: lovr.Vec3) ----@param x number # The x component of the torque. ----@param y number # The y component of the torque. ----@param z number # The z component of the torque. -function Collider:applyTorque(x, y, z) end - ---- ----Destroy the Collider, removing it from the World. ---- ---- ----### NOTE: ----Calling functions on the collider after destroying it is a bad idea. ---- -function Collider:destroy() end - ---- ----Returns the bounding box for the Collider, computed from attached shapes. ---- ----@return number minx # The minimum x coordinate of the box. ----@return number maxx # The maximum x coordinate of the box. ----@return number miny # The minimum y coordinate of the box. ----@return number maxy # The maximum y coordinate of the box. ----@return number minz # The minimum z coordinate of the box. ----@return number maxz # The maximum z coordinate of the box. -function Collider:getAABB() end - ---- ----Returns the angular damping parameters of the Collider. ---- ----Angular damping makes things less "spinny", making them slow down their angular velocity over time. ---- ---- ----### NOTE: ----Angular damping can also be set on the World. ---- ----@return number damping # The angular damping. ----@return number threshold # Velocity limit below which the damping is not applied. -function Collider:getAngularDamping() end - ---- ----Returns the angular velocity of the Collider. ---- ----@return number vx # The x component of the angular velocity. ----@return number vy # The y component of the angular velocity. ----@return number vz # The z component of the angular velocity. -function Collider:getAngularVelocity() end - ---- ----Returns the friction of the Collider. ---- ----By default, the friction of two Colliders is combined (multiplied) when they collide to generate a friction force. ---- ----The initial friction is 0. ---- ----@return number friction # The friction of the Collider. -function Collider:getFriction() end - ---- ----Returns a list of Joints attached to the Collider. ---- ----@return table joints # A list of Joints attached to the Collider. -function Collider:getJoints() end - ---- ----Returns the Collider's linear damping parameters. ---- ----Linear damping is similar to drag or air resistance, slowing the Collider down over time. ---- ---- ----### NOTE: ----A linear damping of 0 means the Collider won't slow down over time. ---- ----This is the default. ---- ----Linear damping can also be set on the World using `World:setLinearDamping`, which will affect all new colliders. ---- ----@return number damping # The linear damping. ----@return number threshold # Velocity limit below which the damping is not applied. -function Collider:getLinearDamping() end - ---- ----Returns the linear velocity of the Collider. ---- ----This is how fast the Collider is moving. ---- ----There is also angular velocity, which is how fast the Collider is spinning. ---- ----@return number vx # The x velocity of the Collider, in meters per second. ----@return number vy # The y velocity of the Collider, in meters per second. ----@return number vz # The z velocity of the Collider, in meters per second. -function Collider:getLinearVelocity() end - ---- ----Returns the linear velocity of a point relative to the Collider. ---- ----@overload fun(self: lovr.Collider, point: number):number, number, number ----@param x number # The x coordinate. ----@param y number # The y coordinate. ----@param z number # The z coordinate. ----@return number vx # The x component of the velocity of the point. ----@return number vy # The y component of the velocity of the point. ----@return number vz # The z component of the velocity of the point. -function Collider:getLinearVelocityFromLocalPoint(x, y, z) end - ---- ----Returns the linear velocity of a point on the Collider specified in world space. ---- ----@overload fun(self: lovr.Collider, point: lovr.Vec3):number, number, number ----@param x number # The x coordinate in world space. ----@param y number # The y coordinate in world space. ----@param z number # The z coordinate in world space. ----@return number vx # The x component of the velocity of the point. ----@return number vy # The y component of the velocity of the point. ----@return number vz # The z component of the velocity of the point. -function Collider:getLinearVelocityFromWorldPoint(x, y, z) end - ---- ----Returns the Collider's center of mass. ---- ----@return number cx # The x position of the center of mass. ----@return number cy # The y position of the center of mass. ----@return number cz # The z position of the center of mass. -function Collider:getLocalCenter() end - ---- ----Converts a point from world coordinates into local coordinates relative to the Collider. ---- ----@overload fun(self: lovr.Collider, point: lovr.Vec3):number, number, number ----@param wx number # The x coordinate of the world point. ----@param wy number # The y coordinate of the world point. ----@param wz number # The z coordinate of the world point. ----@return number x # The x position of the local-space point. ----@return number y # The y position of the local-space point. ----@return number z # The z position of the local-space point. -function Collider:getLocalPoint(wx, wy, wz) end - ---- ----Converts a direction vector from world space to local space. ---- ----@overload fun(self: lovr.Collider, vector: lovr.Vec3):number, number, number ----@param wx number # The x component of the world vector. ----@param wy number # The y component of the world vector. ----@param wz number # The z component of the world vector. ----@return number x # The x coordinate of the local vector. ----@return number y # The y coordinate of the local vector. ----@return number z # The z coordinate of the local vector. -function Collider:getLocalVector(wx, wy, wz) end - ---- ----Returns the total mass of the Collider. ---- ----The mass of a Collider depends on its attached shapes. ---- ----@return number mass # The mass of the Collider, in kilograms. -function Collider:getMass() end - ---- ----Computes mass properties for the Collider. ---- ----@return number cx # The x position of the center of mass. ----@return number cy # The y position of the center of mass. ----@return number cz # The z position of the center of mass. ----@return number mass # The computed mass of the Collider. ----@return table inertia # A table containing 6 values of the rotational inertia tensor matrix. The table contains the 3 diagonal elements of the matrix (upper left to bottom right), followed by the 3 elements of the upper right portion of the 3x3 matrix. -function Collider:getMassData() end - ---- ----Returns the orientation of the Collider in angle/axis representation. ---- ----@return number angle # The number of radians the Collider is rotated around its axis of rotation. ----@return number ax # The x component of the axis of rotation. ----@return number ay # The y component of the axis of rotation. ----@return number az # The z component of the axis of rotation. -function Collider:getOrientation() end - ---- ----Returns the position and orientation of the Collider. ---- ----@return number x # The x position of the Collider, in meters. ----@return number y # The y position of the Collider, in meters. ----@return number z # The z position of the Collider, in meters. ----@return number angle # The number of radians the Collider is rotated around its axis of rotation. ----@return number ax # The x component of the axis of rotation. ----@return number ay # The y component of the axis of rotation. ----@return number az # The z component of the axis of rotation. -function Collider:getPose() end - ---- ----Returns the position of the Collider. ---- ----@return number x # The x position of the Collider, in meters. ----@return number y # The y position of the Collider, in meters. ----@return number z # The z position of the Collider, in meters. -function Collider:getPosition() end - ---- ----Returns the restitution (bounciness) of the Collider. ---- ----By default, the restitution of two Colliders is combined (the max is used) when they collide to cause them to bounce away from each other. ---- ----The initial restitution is 0. ---- ----@return number restitution # The restitution of the Collider. -function Collider:getRestitution() end - ---- ----Returns a list of Shapes attached to the Collider. ---- ----@return table shapes # A list of Shapes attached to the Collider. -function Collider:getShapes() end - ---- ----Returns the Collider's tag. ---- ---- ----### NOTE: ----Collision between tags can be enabled and disabled using `World:enableCollisionBetween` and `World:disableCollisionBetween`. ---- ----@return string tag # The Collider's collision tag. -function Collider:getTag() end - ---- ----Returns the user data associated with the Collider. ---- ---- ----### NOTE: ----User data can be useful to identify the Collider in callbacks. ---- ----@return any data # The custom value associated with the Collider. -function Collider:getUserData() end - ---- ----Returns the World the Collider is in. ---- ---- ----### NOTE: ----Colliders can only be in one World at a time. ---- ----@return lovr.World world # The World the Collider is in. -function Collider:getWorld() end - ---- ----Convert a point relative to the collider to a point in world coordinates. ---- ----@overload fun(self: lovr.Collider, point: lovr.Vec3):number, number, number ----@param x number # The x position of the point. ----@param y number # The y position of the point. ----@param z number # The z position of the point. ----@return number wx # The x coordinate of the world point. ----@return number wy # The y coordinate of the world point. ----@return number wz # The z coordinate of the world point. -function Collider:getWorldPoint(x, y, z) end - ---- ----Converts a direction vector from local space to world space. ---- ----@overload fun(self: lovr.Collider, vector: lovr.Vec3):number, number, number ----@param x number # The x coordinate of the local vector. ----@param y number # The y coordinate of the local vector. ----@param z number # The z coordinate of the local vector. ----@return number wx # The x component of the world vector. ----@return number wy # The y component of the world vector. ----@return number wz # The z component of the world vector. -function Collider:getWorldVector(x, y, z) end - ---- ----Returns whether the Collider is currently awake. ---- ----@return boolean awake # Whether the Collider is awake. -function Collider:isAwake() end - ---- ----Returns whether the Collider is currently ignoring gravity. ---- ----@return boolean ignored # Whether gravity is ignored for this Collider. -function Collider:isGravityIgnored() end - ---- ----Returns whether the Collider is kinematic. ---- ---- ----### NOTE: ----Kinematic colliders behave as though they have infinite mass, ignoring external forces like gravity, joints, or collisions (though non-kinematic colliders will collide with them). They can be useful for static objects like floors or walls. ---- ----@return boolean kinematic # Whether the Collider is kinematic. -function Collider:isKinematic() end - ---- ----Returns whether the Collider is allowed to sleep. ---- ---- ----### NOTE: ----If sleeping is enabled, the simulation will put the Collider to sleep if it hasn't moved in a while. Sleeping colliders don't impact the physics simulation, which makes updates more efficient and improves physics performance. ---- ----However, the physics engine isn't perfect at waking up sleeping colliders and this can lead to bugs where colliders don't react to forces or collisions properly. ---- ----It is possible to set the default value for new colliders using `World:setSleepingAllowed`. ---- ----Colliders can be manually put to sleep or woken up using `Collider:setAwake`. ---- ----@return boolean allowed # Whether the Collider can go to sleep. -function Collider:isSleepingAllowed() end - ---- ----Removes a Shape from the Collider. ---- ---- ----### NOTE: ----Colliders without any shapes won't collide with anything. ---- ----@param shape lovr.Shape # The Shape to remove. -function Collider:removeShape(shape) end - ---- ----Sets the angular damping of the Collider. ---- ----Angular damping makes things less "spinny", causing them to slow down their angular velocity over time. Damping is only applied when angular velocity is over the threshold value. ---- ---- ----### NOTE: ----Angular damping can also be set on the World. ---- ----@param damping number # The angular damping. ----@param threshold? number # Velocity limit below which the damping is not applied. -function Collider:setAngularDamping(damping, threshold) end - ---- ----Sets the angular velocity of the Collider. ---- ----@overload fun(self: lovr.Collider, velocity: lovr.Vec3) ----@param vx number # The x component of the angular velocity. ----@param vy number # The y component of the angular velocity. ----@param vz number # The z component of the angular velocity. -function Collider:setAngularVelocity(vx, vy, vz) end - ---- ----Manually puts the Collider to sleep or wakes it up. ---- ----You can do this if you know a Collider won't be touched for a while or if you need to it be active. ---- ----@param awake boolean # Whether the Collider should be awake. -function Collider:setAwake(awake) end - ---- ----Sets the friction of the Collider. ---- ----By default, the friction of two Colliders is combined (multiplied) when they collide to generate a friction force. ---- ----The initial friction is 0. ---- ----@param friction number # The new friction. -function Collider:setFriction(friction) end - ---- ----Sets whether the Collider should ignore gravity. ---- ----@param ignored boolean # Whether gravity should be ignored. -function Collider:setGravityIgnored(ignored) end - ---- ----Sets whether the Collider is kinematic. ---- ---- ----### NOTE: ----Kinematic colliders behave as though they have infinite mass, ignoring external forces like gravity, joints, or collisions (though non-kinematic colliders will collide with them). They can be useful for static objects like floors or walls. ---- ----@param kinematic boolean # Whether the Collider is kinematic. -function Collider:setKinematic(kinematic) end - ---- ----Sets the Collider's linear damping parameter. ---- ----Linear damping is similar to drag or air resistance, slowing the Collider down over time. Damping is only applied when linear velocity is over the threshold value. ---- ---- ----### NOTE: ----A linear damping of 0 means the Collider won't slow down over time. ---- ----This is the default. ---- ----Linear damping can also be set on the World using `World:setLinearDamping`, which will affect all new colliders. ---- ----@param damping number # The linear damping. ----@param threshold? number # Velocity limit below which the damping is not applied. -function Collider:setLinearDamping(damping, threshold) end - ---- ----Sets the linear velocity of the Collider directly. ---- ----Usually it's preferred to use `Collider:applyForce` to change velocity since instantaneous velocity changes can lead to weird glitches. ---- ----@overload fun(self: lovr.Collider, velocity: lovr.Vec3) ----@param vx number # The x velocity of the Collider, in meters per second. ----@param vy number # The y velocity of the Collider, in meters per second. ----@param vz number # The z velocity of the Collider, in meters per second. -function Collider:setLinearVelocity(vx, vy, vz) end - ---- ----Sets the total mass of the Collider. ---- ----@param mass number # The new mass for the Collider, in kilograms. -function Collider:setMass(mass) end - ---- ----Sets mass properties for the Collider. ---- ----@param cx number # The x position of the center of mass. ----@param cy number # The y position of the center of mass. ----@param cz number # The z position of the center of mass. ----@param mass number # The computed mass of the Collider. ----@param inertia table # A table containing 6 values of the rotational inertia tensor matrix. The table contains the 3 diagonal elements of the matrix (upper left to bottom right), followed by the 3 elements of the upper right portion of the 3x3 matrix. -function Collider:setMassData(cx, cy, cz, mass, inertia) end - ---- ----Sets the orientation of the Collider in angle/axis representation. ---- ----@overload fun(self: lovr.Collider, orientation: lovr.Quat) ----@param angle number # The number of radians the Collider is rotated around its axis of rotation. ----@param ax number # The x component of the axis of rotation. ----@param ay number # The y component of the axis of rotation. ----@param az number # The z component of the axis of rotation. -function Collider:setOrientation(angle, ax, ay, az) end - ---- ----Sets the position and orientation of the Collider. ---- ----@overload fun(self: lovr.Collider, position: lovr.Vec3, orientation: lovr.Quat) ----@param x number # The x position of the Collider, in meters. ----@param y number # The y position of the Collider, in meters. ----@param z number # The z position of the Collider, in meters. ----@param angle number # The number of radians the Collider is rotated around its axis of rotation. ----@param ax number # The x component of the axis of rotation. ----@param ay number # The y component of the axis of rotation. ----@param az number # The z component of the axis of rotation. -function Collider:setPose(x, y, z, angle, ax, ay, az) end - ---- ----Sets the position of the Collider. ---- ----@overload fun(self: lovr.Collider, position: lovr.Vec3) ----@param x number # The x position of the Collider, in meters. ----@param y number # The y position of the Collider, in meters. ----@param z number # The z position of the Collider, in meters. -function Collider:setPosition(x, y, z) end - ---- ----Sets the restitution (bounciness) of the Collider. ---- ----By default, the restitution of two Colliders is combined (the max is used) when they collide to cause them to bounce away from each other. The initial restitution is 0. ---- ----@param restitution number # The new restitution. -function Collider:setRestitution(restitution) end - ---- ----Sets whether the Collider is allowed to sleep. ---- ---- ----### NOTE: ----If sleeping is enabled, the simulation will put the Collider to sleep if it hasn't moved in a while. Sleeping colliders don't impact the physics simulation, which makes updates more efficient and improves physics performance. ---- ----However, the physics engine isn't perfect at waking up sleeping colliders and this can lead to bugs where colliders don't react to forces or collisions properly. ---- ----It is possible to set the default value for new colliders using `World:setSleepingAllowed`. ---- ----Colliders can be manually put to sleep or woken up using `Collider:setAwake`. ---- ----@param allowed boolean # Whether the Collider can go to sleep. -function Collider:setSleepingAllowed(allowed) end - ---- ----Sets the Collider's tag. ---- ---- ----### NOTE: ----Collision between tags can be enabled and disabled using `World:enableCollisionBetween` and `World:disableCollisionBetween`. ---- ----@param tag string # The Collider's collision tag. -function Collider:setTag(tag) end - ---- ----Associates a custom value with the Collider. ---- ---- ----### NOTE: ----User data can be useful to identify the Collider in callbacks. ---- ----@param data any # The custom value to associate with the Collider. -function Collider:setUserData(data) end - ---- ----A type of `Shape` that can be used for cylinder-shaped things. ---- ----@class lovr.CylinderShape -local CylinderShape = {} - ---- ----Returns the length of the CylinderShape. ---- ----@return number length # The length of the cylinder, in meters. -function CylinderShape:getLength() end - ---- ----Returns the radius of the CylinderShape. ---- ----@return number radius # The radius of the cylinder, in meters. -function CylinderShape:getRadius() end - ---- ----Sets the length of the CylinderShape. ---- ----@param length number # The new length, in meters. -function CylinderShape:setLength(length) end - ---- ----Sets the radius of the CylinderShape. ---- ----@param radius number # The new radius, in meters. -function CylinderShape:setRadius(radius) end - ---- ----A DistanceJoint is a type of `Joint` that tries to keep two colliders a fixed distance apart. The distance is determined by the initial distance between the anchor points. ---- ----The joint allows for rotation on the anchor points. ---- ----@class lovr.DistanceJoint -local DistanceJoint = {} - ---- ----Returns the anchor points of the DistanceJoint. ---- ----@return number x1 # The x coordinate of the first anchor point, in world coordinates. ----@return number y1 # The y coordinate of the first anchor point, in world coordinates. ----@return number z1 # The z coordinate of the first anchor point, in world coordinates. ----@return number x2 # The x coordinate of the second anchor point, in world coordinates. ----@return number y2 # The y coordinate of the second anchor point, in world coordinates. ----@return number z2 # The z coordinate of the second anchor point, in world coordinates. -function DistanceJoint:getAnchors() end - ---- ----Returns the target distance for the DistanceJoint. ---- ----The joint tries to keep the Colliders this far apart. ---- ----@return number distance # The target distance. -function DistanceJoint:getDistance() end - ---- ----Returns the response time of the joint. ---- ----See `World:setResponseTime` for more info. ---- ----@return number responseTime # The response time setting for the joint. -function DistanceJoint:getResponseTime() end - ---- ----Returns the tightness of the joint. ---- ----See `World:setTightness` for how this affects the joint. ---- ----@return number tightness # The tightness of the joint. -function DistanceJoint:getTightness() end - ---- ----Sets the anchor points of the DistanceJoint. ---- ----@overload fun(self: lovr.DistanceJoint, first: lovr.Vec3, second: lovr.Vec3) ----@param x1 number # The x coordinate of the first anchor point, in world coordinates. ----@param y1 number # The y coordinate of the first anchor point, in world coordinates. ----@param z1 number # The z coordinate of the first anchor point, in world coordinates. ----@param x2 number # The x coordinate of the second anchor point, in world coordinates. ----@param y2 number # The y coordinate of the second anchor point, in world coordinates. ----@param z2 number # The z coordinate of the second anchor point, in world coordinates. -function DistanceJoint:setAnchors(x1, y1, z1, x2, y2, z2) end - ---- ----Sets the target distance for the DistanceJoint. ---- ----The joint tries to keep the Colliders this far apart. ---- ----@param distance number # The new target distance. -function DistanceJoint:setDistance(distance) end - ---- ----Sets the response time of the joint. ---- ----See `World:setResponseTime` for more info. ---- ----@param responseTime number # The new response time setting for the joint. -function DistanceJoint:setResponseTime(responseTime) end - ---- ----Sets the tightness of the joint. ---- ----See `World:setTightness` for how this affects the joint. ---- ----@param tightness number # The tightness of the joint. -function DistanceJoint:setTightness(tightness) end - ---- ----A HingeJoint is a type of `Joint` that only allows colliders to rotate on a single axis. ---- ----@class lovr.HingeJoint -local HingeJoint = {} - ---- ----Returns the anchor points of the HingeJoint. ---- ----@return number x1 # The x coordinate of the first anchor point, in world coordinates. ----@return number y1 # The y coordinate of the first anchor point, in world coordinates. ----@return number z1 # The z coordinate of the first anchor point, in world coordinates. ----@return number x2 # The x coordinate of the second anchor point, in world coordinates. ----@return number y2 # The y coordinate of the second anchor point, in world coordinates. ----@return number z2 # The z coordinate of the second anchor point, in world coordinates. -function HingeJoint:getAnchors() end - ---- ----Get the angle between the two colliders attached to the HingeJoint. ---- ----When the joint is created or when the anchor or axis is set, the current angle is the new "zero" angle. ---- ----@return number angle # The hinge angle, in radians. -function HingeJoint:getAngle() end - ---- ----Returns the axis of the hinge. ---- ----@return number x # The x component of the axis. ----@return number y # The y component of the axis. ----@return number z # The z component of the axis. -function HingeJoint:getAxis() end - ---- ----Returns the upper and lower limits of the hinge angle. ---- ----These will be between -π and π. ---- ----@return number lower # The lower limit, in radians. ----@return number upper # The upper limit, in radians. -function HingeJoint:getLimits() end - ---- ----Returns the lower limit of the hinge angle. ---- ----This will be greater than -π. ---- ----@return number limit # The lower limit, in radians. -function HingeJoint:getLowerLimit() end - ---- ----Returns the upper limit of the hinge angle. ---- ----This will be less than π. ---- ----@return number limit # The upper limit, in radians. -function HingeJoint:getUpperLimit() end - ---- ----Sets a new anchor point for the HingeJoint. ---- ----@overload fun(self: lovr.HingeJoint, anchor: lovr.Vec3) ----@param x number # The x coordinate of the anchor point, in world coordinates. ----@param y number # The y coordinate of the anchor point, in world coordinates. ----@param z number # The z coordinate of the anchor point, in world coordinates. -function HingeJoint:setAnchor(x, y, z) end - ---- ----Sets the axis of the hinge. ---- ----@overload fun(self: lovr.HingeJoint, axis: lovr.Vec3) ----@param x number # The x component of the axis. ----@param y number # The y component of the axis. ----@param z number # The z component of the axis. -function HingeJoint:setAxis(x, y, z) end - ---- ----Sets the upper and lower limits of the hinge angle. ---- ----These should be between -π and π. ---- ----@param lower number # The lower limit, in radians. ----@param upper number # The upper limit, in radians. -function HingeJoint:setLimits(lower, upper) end - ---- ----Sets the lower limit of the hinge angle. ---- ----This should be greater than -π. ---- ----@param limit number # The lower limit, in radians. -function HingeJoint:setLowerLimit(limit) end - ---- ----Sets the upper limit of the hinge angle. ---- ----This should be less than π. ---- ----@param limit number # The upper limit, in radians. -function HingeJoint:setUpperLimit(limit) end - ---- ----A Joint is a physics object that constrains the movement of two Colliders. ---- ----@class lovr.Joint -local Joint = {} - ---- ----Destroy the Joint, removing it from Colliders it's attached to. ---- ---- ----### NOTE: ----Calling functions on the Joint after destroying it is a bad idea. ---- -function Joint:destroy() end - ---- ----Returns the Colliders the Joint is attached to. ---- ----All Joints are attached to two colliders. ---- ----@return lovr.Collider colliderA # The first Collider. ----@return lovr.Collider colliderB # The second Collider. -function Joint:getColliders() end - ---- ----Returns the type of the Joint. ---- ----@return lovr.JointType type # The type of the Joint. -function Joint:getType() end - ---- ----Returns the user data associated with the Joint. ---- ----@return any data # The custom value associated with the Joint. -function Joint:getUserData() end - ---- ----Returns whether the Joint is enabled. ---- ----@return boolean enabled # Whether the Joint is enabled. -function Joint:isEnabled() end - ---- ----Enable or disable the Joint. ---- ----@param enabled boolean # Whether the Joint should be enabled. -function Joint:setEnabled(enabled) end - ---- ----Sets the user data associated with the Joint. ---- ----@param data any # The custom value associated with the Joint. -function Joint:setUserData(data) end - ---- ----A type of `Shape` that can be used for triangle meshes. ---- ----@class lovr.MeshShape -local MeshShape = {} - ---- ----A Shape is a physics object that can be attached to colliders to define their shape. ---- ----@class lovr.Shape -local Shape = {} - ---- ----Destroy the Shape, removing it from Colliders it's attached to. ---- ---- ----### NOTE: ----Calling functions on the Shape after destroying it is a bad idea. ---- -function Shape:destroy() end - ---- ----Returns the bounding box for the Shape. ---- ----@return number minx # The minimum x coordinate of the box. ----@return number maxx # The maximum x coordinate of the box. ----@return number miny # The minimum y coordinate of the box. ----@return number maxy # The maximum y coordinate of the box. ----@return number minz # The minimum z coordinate of the box. ----@return number maxz # The maximum z coordinate of the box. -function Shape:getAABB() end - ---- ----Returns the Collider the Shape is attached to. ---- ---- ----### NOTE: ----A Shape can only be attached to one Collider at a time. ---- ----@return lovr.Collider collider # The Collider the Shape is attached to. -function Shape:getCollider() end - ---- ----Computes mass properties of the Shape. ---- ----@param density number # The density to use, in kilograms per cubic meter. ----@return number cx # The x position of the center of mass. ----@return number cy # The y position of the center of mass. ----@return number cz # The z position of the center of mass. ----@return number mass # The mass of the Shape. ----@return table inertia # A table containing 6 values of the rotational inertia tensor matrix. The table contains the 3 diagonal elements of the matrix (upper left to bottom right), followed by the 3 elements of the upper right portion of the 3x3 matrix. -function Shape:getMass(density) end - ---- ----Get the orientation of the Shape relative to its Collider. ---- ----@return number angle # The number of radians the Shape is rotated. ----@return number ax # The x component of the rotation axis. ----@return number ay # The y component of the rotation axis. ----@return number az # The z component of the rotation axis. -function Shape:getOrientation() end - ---- ----Get the position of the Shape relative to its Collider. ---- ----@return number x # The x offset. ----@return number y # The y offset. ----@return number z # The z offset. -function Shape:getPosition() end - ---- ----Returns the type of the Shape. ---- ----@return lovr.ShapeType type # The type of the Shape. -function Shape:getType() end - ---- ----Returns the user data associated with the Shape. ---- ---- ----### NOTE: ----User data can be useful to identify the Shape in callbacks. ---- ----@return any data # The custom value associated with the Shape. -function Shape:getUserData() end - ---- ----Returns whether the Shape is enabled. ---- ---- ----### NOTE: ----Disabled shapes won't collide with anything. ---- ----@return boolean enabled # Whether the Shape is enabled. -function Shape:isEnabled() end - ---- ----Returns whether the Shape is a sensor. ---- ----Sensors do not trigger any collision response, but they still report collisions in `World:collide`. ---- ----@return boolean sensor # Whether the Shape is a sensor. -function Shape:isSensor() end - ---- ----Enable or disable the Shape. ---- ---- ----### NOTE: ----Disabled shapes won't collide with anything. ---- ----@param enabled boolean # Whether the Shape should be enabled. -function Shape:setEnabled(enabled) end - ---- ----Set the orientation of the Shape relative to its Collider. ---- ---- ----### NOTE: ----If the Shape isn't attached to a Collider, this will error. ---- ----@overload fun(self: lovr.Shape, orientation: lovr.Quat) ----@param angle number # The number of radians the Shape is rotated. ----@param ax number # The x component of the rotation axis. ----@param ay number # The y component of the rotation axis. ----@param az number # The z component of the rotation axis. -function Shape:setOrientation(angle, ax, ay, az) end - ---- ----Set the position of the Shape relative to its Collider. ---- ---- ----### NOTE: ----If the Shape isn't attached to a Collider, this will error. ---- ----@overload fun(self: lovr.Shape, position: lovr.Vec3) ----@param x number # The x offset. ----@param y number # The y offset. ----@param z number # The z offset. -function Shape:setPosition(x, y, z) end - ---- ----Sets whether this Shape is a sensor. ---- ----When a Shape is a sensor, it will not generate any collision response when it collides with things, but collisions can still be detected with `World:collide` and `World:getContacts`. ---- ----@param sensor boolean # Whether the Shape should be a sensor. -function Shape:setSensor(sensor) end - ---- ----Sets the user data associated with the Shape. ---- ---- ----### NOTE: ----User data can be useful to identify the Shape in callbacks. ---- ----@param data any # The custom value associated with the Shape. -function Shape:setUserData(data) end - ---- ----A SliderJoint is a type of `Joint` that only allows colliders to move on a single axis. ---- ----@class lovr.SliderJoint -local SliderJoint = {} - ---- ----Returns the axis of the slider. ---- ----@return number x # The x component of the axis. ----@return number y # The y component of the axis. ----@return number z # The z component of the axis. -function SliderJoint:getAxis() end - ---- ----Returns the upper and lower limits of the slider position. ---- ----@return number lower # The lower limit. ----@return number upper # The upper limit. -function SliderJoint:getLimits() end - ---- ----Returns the lower limit of the slider position. ---- ----@return number limit # The lower limit. -function SliderJoint:getLowerLimit() end - ---- ----Returns how far the slider joint is extended (zero is the position the slider was created at, positive values are further apart). ---- ----@return number position # The joint position along its axis. -function SliderJoint:getPosition() end - ---- ----Returns the upper limit of the slider position. ---- ----@return number limit # The upper limit. -function SliderJoint:getUpperLimit() end - ---- ----Sets the axis of the slider. ---- ----@overload fun(self: lovr.SliderJoint, axis: lovr.Vec3) ----@param x number # The x component of the axis. ----@param y number # The y component of the axis. ----@param z number # The z component of the axis. -function SliderJoint:setAxis(x, y, z) end - ---- ----Sets the upper and lower limits of the slider position. ---- ----@param lower number # The lower limit. ----@param upper number # The upper limit. -function SliderJoint:setLimits(lower, upper) end - ---- ----Sets the lower limit of the slider position. ---- ----@param limit number # The lower limit. -function SliderJoint:setLowerLimit(limit) end - ---- ----Sets the upper limit of the slider position. ---- ----@param limit number # The upper limit. -function SliderJoint:setUpperLimit(limit) end - ---- ----A type of `Shape` that can be used for spheres. ---- ----@class lovr.SphereShape -local SphereShape = {} - ---- ----Returns the radius of the SphereShape. ---- ----@return number radius # The radius of the sphere, in meters. -function SphereShape:getRadius() end - ---- ----Sets the radius of the SphereShape. ---- ----@param radius number # The radius of the sphere, in meters. -function SphereShape:setRadius(radius) end - ---- ----A type of `Shape` that can be used for terrains and irregular surfaces. ---- ----@class lovr.TerrainShape -local TerrainShape = {} - ---- ----A World is an object that holds the colliders, joints, and shapes in a physics simulation. ---- ---- ----### NOTE: ----Be sure to update the World in `lovr.update` using `World:update`, otherwise everything will stand still. ---- ----@class lovr.World -local World = {} - ---- ----Attempt to collide two shapes. ---- ----Internally this sets up constraint forces to move the shapes' colliders apart if they are touching. ---- ----The colliders won't actually move until `World:update` is called again to advance the physics simulation. ---- ----Collision responses can be customized using friction and restitution (bounciness) parameters, and default to using a mix between the parameters of the two colliders. ---- ----Usually this is called internally by `World:update`, or in a custom collision resolver passed to `World:update`. ---- ----If you want to detect if objects are touching without colliding them, use `World:getContacts` or make one or both of the shapes sensors using `Shape:setSensor`. ---- ---- ----### NOTE: ----For friction, numbers in the range of 0-1 are common, but larger numbers can also be used. ---- ----For restitution, numbers in the range 0-1 should be used. ---- ----This function respects collision tags, so using `World:disableCollisionBetween` and `World:enableCollisionBetween` will change the behavior of this function. ---- ----@param shapeA lovr.Shape # The first shape. ----@param shapeB lovr.Shape # The second shape. ----@param friction? number # The friction parameter for the collision. ----@param restitution? number # The restitution (bounciness) parameter for the collision. ----@return boolean collided # Whether the shapes collided. -function World:collide(shapeA, shapeB, friction, restitution) end - ---- ----Detects which pairs of shapes in the world are near each other and could be colliding. ---- ----After calling this function, the `World:overlaps` iterator can be used to iterate over the overlaps, and `World:collide` can be used to resolve a collision for the shapes (if any). Usually this is called automatically by `World:update`. ---- ---- ----### NOTE: ----This performs the "broad phase" culling of objects in the World, usually using a spatial hash or other acceleration structure like a quad tree or octree. ---- -function World:computeOverlaps() end - ---- ----Destroy the World! ---- ---- ----### NOTE: ----Bad things will happen if you destroy the world and then try to access it or anything that was in it. ---- -function World:destroy() end - ---- ----Disables collision between two collision tags. ---- ---- ----### NOTE: ----Tags must be set up when creating the World, see `lovr.physics.newWorld`. ---- ----By default, collision is enabled between all tags. ---- ----@param tag1 string # The first tag. ----@param tag2 string # The second tag. -function World:disableCollisionBetween(tag1, tag2) end - ---- ----Enables collision between two collision tags. ---- ---- ----### NOTE: ----Tags must be set up when creating the World, see `lovr.physics.newWorld`. ---- ----By default, collision is enabled between all tags. ---- ----@param tag1 string # The first tag. ----@param tag2 string # The second tag. -function World:enableCollisionBetween(tag1, tag2) end - ---- ----Returns the angular damping parameters of the World. ---- ----Angular damping makes things less "spinny", making them slow down their angular velocity over time. ---- ---- ----### NOTE: ----Angular damping can also be set on individual colliders. ---- ----@return number damping # The angular damping. ----@return number threshold # Velocity limit below which the damping is not applied. -function World:getAngularDamping() end - ---- ----Returns a table of all Colliders in the World. ---- ----@overload fun(self: lovr.World, t: table):table ----@return table colliders # A table of `Collider` objects. -function World:getColliders() end - ---- ----Computes collision information between two shapes and returns a list of contacts where the shapes intersect. ---- ----Each contact point consists of a position, a normal vector, and a penetration depth. ---- ---- ----### NOTE: ----This only detects collision information, it does not cause the shapes to collide with each other. ---- ----Use `World:collide` for that. ---- ----This function ignores collision tags. ---- ----@param shapeA lovr.Shape # The first shape. ----@param shapeB lovr.Shape # The second shape. ----@return table contacts # A list of contacts. Each contact consists of 7 numbers: the contact position, the normal vector, and a depth value indicating how far the shapes intersect each other at the contact point (`{ x, y, z, nx, ny, nz, depth }`). -function World:getContacts(shapeA, shapeB) end - ---- ----Returns the gravity of the World. ---- ----@return number xg # The x component of the gravity force. ----@return number yg # The y component of the gravity force. ----@return number zg # The z component of the gravity force. -function World:getGravity() end - ---- ----Returns the linear damping parameters of the World. ---- ----Linear damping is similar to drag or air resistance, slowing down colliders over time as they move. ---- ---- ----### NOTE: ----A linear damping of 0 means colliders won't slow down over time. ---- ----This is the default. ---- ----Linear damping can also be set on individual colliders. ---- ----@return number damping # The linear damping. ----@return number threshold # Velocity limit below which the damping is not applied. -function World:getLinearDamping() end - ---- ----Returns the response time factor of the World. ---- ----The response time controls how relaxed collisions and joints are in the physics simulation, and functions similar to inertia. ---- ----A low response time means collisions are resolved quickly, and higher values make objects more spongy and soft. ---- ----The value can be any positive number. ---- ----It can be changed on a per-joint basis for `DistanceJoint` and `BallJoint` objects. ---- ----@return number responseTime # The response time setting for the World. -function World:getResponseTime() end - ---- ----Returns the step count of the World. ---- ----The step count influences how many steps are taken during a call to `World:update`. ---- ----A higher number of steps will be slower, but more accurate. ---- ----The default step count is 20. ---- ----@return number steps # The step count. -function World:getStepCount() end - ---- ----Returns the list of collision tags used when creating the World. ---- ----@return table tags # A table of collision tags (strings). -function World:getTags() end - ---- ----Returns the tightness of joints in the World. ---- ----The tightness controls how much force is applied to colliders connected by joints. ---- ----With a value of 0, no force will be applied and joints won't have any effect. ---- ----With a tightness of 1, a strong force will be used to try to keep the Colliders constrained. ---- ----A tightness larger than 1 will overcorrect the joints, which can sometimes be desirable. ---- ----Negative tightness values are not supported. ---- ----@return number tightness # The tightness of the World. -function World:getTightness() end - ---- ----Returns whether collisions are currently enabled between two tags. ---- ---- ----### NOTE: ----Tags must be set up when creating the World, see `lovr.physics.newWorld`. ---- ----By default, collision is enabled between all tags. ---- ----@param tag1 string # The first tag. ----@param tag2 string # The second tag. ----@return boolean enabled # Whether or not two colliders with the specified tags will collide. -function World:isCollisionEnabledBetween(tag1, tag2) end - ---- ----Returns whether colliders can go to sleep in the World. ---- ---- ----### NOTE: ----If sleeping is enabled, the World will try to detect colliders that haven't moved for a while and put them to sleep. ---- ----Sleeping colliders don't impact the physics simulation, which makes updates more efficient and improves physics performance. ---- ----However, the physics engine isn't perfect at waking up sleeping colliders and this can lead to bugs where colliders don't react to forces or collisions properly. ---- ----This can be set on individual colliders. ---- ----Colliders can be manually put to sleep or woken up using `Collider:setAwake`. ---- ----@return boolean allowed # Whether colliders can sleep. -function World:isSleepingAllowed() end - ---- ----Adds a new Collider to the World with a BoxShape already attached. ---- ----@overload fun(self: lovr.World, position: lovr.Vec3, size: lovr.Vec3):lovr.Collider ----@param x? number # The x coordinate of the center of the box. ----@param y? number # The y coordinate of the center of the box. ----@param z? number # The z coordinate of the center of the box. ----@param width? number # The total width of the box, in meters. ----@param height? number # The total height of the box, in meters. ----@param depth? number # The total depth of the box, in meters. ----@return lovr.Collider collider # The new Collider. -function World:newBoxCollider(x, y, z, width, height, depth) end - ---- ----Adds a new Collider to the World with a CapsuleShape already attached. ---- ----@overload fun(self: lovr.World, position: lovr.Vec3, radius?: number, length?: number):lovr.Collider ----@param x? number # The x coordinate of the center of the capsule, in meters. ----@param y? number # The y coordinate of the center of the capsule, in meters. ----@param z? number # The z coordinate of the center of the capsule, in meters. ----@param radius? number # The radius of the capsule, in meters. ----@param length? number # The length of the capsule, not including the caps, in meters. ----@return lovr.Collider collider # The new Collider. -function World:newCapsuleCollider(x, y, z, radius, length) end - ---- ----Adds a new Collider to the World. ---- ---- ----### NOTE: ----This function creates a collider without any shapes attached to it, which means it won't collide with anything. ---- ----To add a shape to the collider, use `Collider:addShape`, or use one of the following functions to create the collider: ---- ----- `World:newBoxCollider` ----- `World:newCapsuleCollider` ----- `World:newCylinderCollider` ----- `World:newSphereCollider` ---- ----@overload fun(self: lovr.World, position: lovr.Vec3):lovr.Collider ----@param x? number # The x position of the Collider. ----@param y? number # The y position of the Collider. ----@param z? number # The z position of the Collider. ----@return lovr.Collider collider # The new Collider. -function World:newCollider(x, y, z) end - ---- ----Adds a new Collider to the World with a CylinderShape already attached. ---- ----@overload fun(self: lovr.World, position: lovr.Vec3, radius?: number, length?: number):lovr.Collider ----@param x? number # The x coordinate of the center of the cylinder, in meters. ----@param y? number # The y coordinate of the center of the cylinder, in meters. ----@param z? number # The z coordinate of the center of the cylinder, in meters. ----@param radius? number # The radius of the cylinder, in meters. ----@param length? number # The length of the cylinder, in meters. ----@return lovr.Collider collider # The new Collider. -function World:newCylinderCollider(x, y, z, radius, length) end - ---- ----Adds a new Collider to the World with a MeshShape already attached. ---- ----@overload fun(self: lovr.World, model: lovr.Model):lovr.Collider ----@param vertices table # The table of vertices in the mesh. Each vertex is a table with 3 numbers. ----@param indices table # A table of triangle indices representing how the vertices are connected in the Mesh. ----@return lovr.Collider collider # The new Collider. -function World:newMeshCollider(vertices, indices) end - ---- ----Adds a new Collider to the World with a SphereShape already attached. ---- ----@overload fun(self: lovr.World, position: lovr.Vec3, radius?: number):lovr.Collider ----@param x? number # The x coordinate of the center of the sphere, in meters. ----@param y? number # The y coordinate of the center of the sphere, in meters. ----@param z? number # The z coordinate of the center of the sphere, in meters. ----@param radius? number # The radius of the sphere, in meters. ----@return lovr.Collider collider # The new Collider. -function World:newSphereCollider(x, y, z, radius) end - ---- ----Adds a new Collider to the World with a TerrainShape already attached. ---- ---- ----### NOTE: ----The collider will be positioned at 0, 0, 0. ---- ----Unlike other colliders, it will automatically be set as kinematic when created. ---- ----@overload fun(self: lovr.World, scale: number, heightmap: lovr.Image, stretch?: number):lovr.Collider ----@overload fun(self: lovr.World, scale: number, callback: function, samples?: number):lovr.Collider ----@param scale number # The width and depth of the terrain, in meters. ----@return lovr.Collider collider # The new Collider. -function World:newTerrainCollider(scale) end - ---- ----Returns an iterator that can be used to iterate over "overlaps", or potential collisions between pairs of shapes in the World. ---- ----This should be called after using `World:computeOverlaps` to compute the list of overlaps. Usually this is called automatically by `World:update`. ---- ----@return function iterator # A Lua iterator, usable in a for loop. -function World:overlaps() end - ---- ----Casts a ray through the World, calling a function every time the ray intersects with a Shape. ---- ---- ----### NOTE: ----The callback is passed the shape that was hit, the hit position (in world coordinates), and the normal vector of the hit. ---- ----@overload fun(self: lovr.World, start: lovr.Vec3, end: lovr.Vec3, callback: function) ----@param x1 number # The x coordinate of the starting position of the ray. ----@param y1 number # The y coordinate of the starting position of the ray. ----@param z1 number # The z coordinate of the starting position of the ray. ----@param x2 number # The x coordinate of the ending position of the ray. ----@param y2 number # The y coordinate of the ending position of the ray. ----@param z2 number # The z coordinate of the ending position of the ray. ----@param callback function # The function to call when an intersection is detected. -function World:raycast(x1, y1, z1, x2, y2, z2, callback) end - ---- ----Sets the angular damping of the World. ---- ----Angular damping makes things less "spinny", making them slow down their angular velocity over time. Damping is only applied when angular velocity is over the threshold value. ---- ---- ----### NOTE: ----Angular damping can also be set on individual colliders. ---- ----@param damping number # The angular damping. ----@param threshold? number # Velocity limit below which the damping is not applied. -function World:setAngularDamping(damping, threshold) end - ---- ----Sets the gravity of the World. ---- ----@overload fun(self: lovr.World, gravity: lovr.Vec3) ----@param xg number # The x component of the gravity force. ----@param yg number # The y component of the gravity force. ----@param zg number # The z component of the gravity force. -function World:setGravity(xg, yg, zg) end - ---- ----Sets the linear damping of the World. ---- ----Linear damping is similar to drag or air resistance, slowing down colliders over time as they move. Damping is only applied when linear velocity is over the threshold value. ---- ---- ----### NOTE: ----A linear damping of 0 means colliders won't slow down over time. ---- ----This is the default. ---- ----Linear damping can also be set on individual colliders. ---- ----@param damping number # The linear damping. ----@param threshold? number # Velocity limit below which the damping is not applied. -function World:setLinearDamping(damping, threshold) end - ---- ----Sets the response time factor of the World. ---- ----The response time controls how relaxed collisions and joints are in the physics simulation, and functions similar to inertia. ---- ----A low response time means collisions are resolved quickly, and higher values make objects more spongy and soft. ---- ----The value can be any positive number. ---- ----It can be changed on a per-joint basis for `DistanceJoint` and `BallJoint` objects. ---- ----@param responseTime number # The new response time setting for the World. -function World:setResponseTime(responseTime) end - ---- ----Sets whether colliders can go to sleep in the World. ---- ---- ----### NOTE: ----If sleeping is enabled, the World will try to detect colliders that haven't moved for a while and put them to sleep. ---- ----Sleeping colliders don't impact the physics simulation, which makes updates more efficient and improves physics performance. ---- ----However, the physics engine isn't perfect at waking up sleeping colliders and this can lead to bugs where colliders don't react to forces or collisions properly. ---- ----This can be set on individual colliders. ---- ----Colliders can be manually put to sleep or woken up using `Collider:setAwake`. ---- ----@param allowed boolean # Whether colliders can sleep. -function World:setSleepingAllowed(allowed) end - ---- ----Sets the step count of the World. ---- ----The step count influences how many steps are taken during a call to `World:update`. ---- ----A higher number of steps will be slower, but more accurate. ---- ----The default step count is 20. ---- ----@param steps number # The new step count. -function World:setStepCount(steps) end - ---- ----Sets the tightness of joints in the World. ---- ----The tightness controls how much force is applied to colliders connected by joints. ---- ----With a value of 0, no force will be applied and joints won't have any effect. ---- ----With a tightness of 1, a strong force will be used to try to keep the Colliders constrained. ---- ----A tightness larger than 1 will overcorrect the joints, which can sometimes be desirable. ---- ----Negative tightness values are not supported. ---- ----@param tightness number # The new tightness for the World. -function World:setTightness(tightness) end - ---- ----Updates the World, advancing the physics simulation forward in time and resolving collisions between colliders in the World. ---- ---- ----### NOTE: ----It is common to pass the `dt` variable from `lovr.update` into this function. ---- ----The default collision resolver function is: ---- ---- function defaultResolver(world) ---- world:computeOverlaps() ---- for shapeA, shapeB in world:overlaps() do ---- world:collide(shapeA, shapeB) ---- end ---- end ---- ----Additional logic could be introduced to the collision resolver function to add custom collision behavior or to change the collision parameters (like friction and restitution) on a per-collision basis. ---- ----> If possible, use a fixed timestep value for updating the World. It will greatly improve the ----> accuracy of the simulation and reduce bugs. For more information on implementing a fixed ----> timestep loop, see [this article](http://gafferongames.com/game-physics/fix-your-timestep/). ---- ----@param dt number # The amount of time to advance the simulation forward. ----@param resolver? function # The collision resolver function to use. This will be called before updating to allow for custom collision processing. If absent, a default will be used. -function World:update(dt, resolver) end - ---- ----Represents the different types of physics Joints available. ---- ----@alias lovr.JointType ---- ----A BallJoint. ---- ----| "ball" ---- ----A DistanceJoint. ---- ----| "distance" ---- ----A HingeJoint. ---- ----| "hinge" ---- ----A SliderJoint. ---- ----| "slider" - ---- ----Represents the different types of physics Shapes available. ---- ----@alias lovr.ShapeType ---- ----A BoxShape. ---- ----| "box" ---- ----A CapsuleShape. ---- ----| "capsule" ---- ----A CylinderShape. ---- ----| "cylinder" ---- ----A SphereShape. ---- ----| "sphere" diff --git a/meta/3rd/lovr/library/lovr/system.lua b/meta/3rd/lovr/library/lovr/system.lua deleted file mode 100644 index c0a5b739..00000000 --- a/meta/3rd/lovr/library/lovr/system.lua +++ /dev/null @@ -1,136 +0,0 @@ ----@meta - ---- ----The `lovr.system` provides information about the current platform and hardware. ---- ----@class lovr.system -lovr.system = {} - ---- ----Returns the number of logical cores on the system. ---- ----@return number cores # The number of logical cores on the system. -function lovr.system.getCoreCount() end - ---- ----Returns the position of the mouse. ---- ----@return number x # The x position of the mouse, relative to the top-left of the window. ----@return number y # The y position of the mouse, relative to the top-left of the window. -function lovr.system.getMousePosition() end - ---- ----Returns the x position of the mouse. ---- ----@return number x # The x position of the mouse, relative to the top-left of the window. -function lovr.system.getMouseX() end - ---- ----Returns the y position of the mouse. ---- ----@return number y # The y position of the mouse, relative to the top-left of the window. -function lovr.system.getMouseY() end - ---- ----Returns the current operating system. ---- ----@return string os # Either "Windows", "macOS", "Linux", "Android" or "Web". -function lovr.system.getOS() end - ---- ----Returns the window pixel density. ---- ----High DPI windows will usually return 2.0 to indicate that there are 2 pixels for every window coordinate in each axis. ---- ----On a normal display, 1.0 is returned, indicating that window coordinates match up with pixels 1:1. ---- ----@return number density # The pixel density of the window. -function lovr.system.getWindowDensity() end - ---- ----Returns the dimensions of the desktop window. ---- ---- ----### NOTE: ----If the window is not open, this will return zeros. ---- ----@return number width # The width of the desktop window. ----@return number height # The height of the desktop window. -function lovr.system.getWindowDimensions() end - ---- ----Returns the height of the desktop window. ---- ---- ----### NOTE: ----If the window is not open, this will return zero. ---- ----@return number width # The height of the desktop window. -function lovr.system.getWindowHeight() end - ---- ----Returns the width of the desktop window. ---- ---- ----### NOTE: ----If the window is not open, this will return zero. ---- ----@return number width # The width of the desktop window. -function lovr.system.getWindowWidth() end - ---- ----Returns whether a key on the keyboard is pressed. ---- ----@param key lovr.KeyCode # The key. ----@return boolean down # Whether the key is currently pressed. -function lovr.system.isKeyDown(key) end - ---- ----Returns whether a mouse button is currently pressed. ---- ----@param button number # The index of a button to check. Use 1 for the primary mouse button, 2 for the secondary button, and 3 for the middle button. Other indices can be used, but are hardware-specific. ----@return boolean down # Whether the mouse button is currently down. -function lovr.system.isMouseDown(button) end - ---- ----Returns whether the desktop window is open. ---- ----`t.window` can be set to `nil` in `lovr.conf` to disable automatic opening of the window. ---- ----In this case, the window can be opened manually using `lovr.system.openWindow`. ---- ----@return boolean open # Whether the desktop window is open. -function lovr.system.isWindowOpen() end - ---- ----Opens the desktop window. ---- ----If the window is already open, this function does nothing. ---- ---- ----### NOTE: ----By default, the window is opened automatically, but this can be disabled by setting `t.window` to `nil` in `conf.lua`. ---- ----@param options {width: number, height: number, fullscreen: boolean, resizable: boolean, title: string, icon: string} # Window options. -function lovr.system.openWindow(options) end - ---- ----Requests permission to use a feature. ---- ----Usually this will pop up a dialog box that the user needs to confirm. ---- ----Once the permission request has been acknowledged, the `lovr.permission` callback will be called with the result. ---- ----Currently, this is only used for requesting microphone access on Android devices. ---- ----@param permission lovr.Permission # The permission to request. -function lovr.system.requestPermission(permission) end - ---- ----These are the different permissions that need to be requested using `lovr.system.requestPermission` on some platforms. ---- ----@alias lovr.Permission ---- ----Requests microphone access. ---- ----| "audiocapture" diff --git a/meta/3rd/lovr/library/lovr/thread.lua b/meta/3rd/lovr/library/lovr/thread.lua deleted file mode 100644 index 5b22c9c3..00000000 --- a/meta/3rd/lovr/library/lovr/thread.lua +++ /dev/null @@ -1,170 +0,0 @@ ----@meta - ---- ----The `lovr.thread` module provides functions for creating threads and communicating between them. ---- ----These are operating system level threads, which are different from Lua coroutines. ---- ----Threads are useful for performing expensive background computation without affecting the framerate or performance of the main thread. ---- ----Some examples of this include asset loading, networking and network requests, and physics simulation. ---- ----Threads come with some caveats: ---- ----- Threads run in a bare Lua environment. ---- ----The `lovr` module (and any of lovr's modules) need to ---- be required before they can be used. ---- - To get `require` to work properly, add `require 'lovr.filesystem'` to the thread code. ----- Threads are completely isolated from other threads. ---- ----They do not have access to the variables ---- or functions of other threads, and communication between threads must be coordinated through ---- `Channel` objects. ----- The graphics module (or any functions that perform rendering) cannot be used in a thread. ---- Note that this includes creating graphics objects like Models and Textures. ---- ----There are "data" ---- equivalent `ModelData` and `Image` objects that can be used in threads though. ----- `lovr.event.pump` cannot be called from a thread. ----- Crashes or problems can happen if two threads access the same object at the same time, so ---- special care must be taken to coordinate access to objects from multiple threads. ---- ----@class lovr.thread -lovr.thread = {} - ---- ----Returns a named Channel for communicating between threads. ---- ----@param name string # The name of the Channel to get. ----@return lovr.Channel channel # The Channel with the specified name. -function lovr.thread.getChannel(name) end - ---- ----Creates a new Thread from Lua code. ---- ---- ----### NOTE: ----The Thread won\'t start running immediately. ---- ----Use `Thread:start` to start it. ---- ----The string argument is assumed to be a filename if there isn't a newline in the first 1024 characters. ---- ----For really short thread code, an extra newline can be added to trick LÖVR into loading it properly. ---- ----@overload fun(filename: string):lovr.Thread ----@overload fun(blob: lovr.Blob):lovr.Thread ----@param code string # The code to run in the Thread. ----@return lovr.Thread thread # The new Thread. -function lovr.thread.newThread(code) end - ---- ----A Channel is an object used to communicate between `Thread` objects. ---- ----Channels are obtained by name using `lovr.thread.getChannel`. ---- ----Different threads can send messages on the same Channel to communicate with each other. ---- ----Messages can be sent and received on a Channel using `Channel:push` and `Channel:pop`, and are received in a first-in-first-out fashion. The following types of data can be passed through Channels: nil, boolean, number, string, and any LÖVR object. ---- ----@class lovr.Channel -local Channel = {} - ---- ----Removes all pending messages from the Channel. ---- -function Channel:clear() end - ---- ----Returns whether or not the message with the given ID has been read. ---- ----Every call to `Channel:push` returns a message ID. ---- ----@param id number # The ID of the message to check. ----@return boolean read # Whether the message has been read. -function Channel:hasRead(id) end - ---- ----Returns a message from the Channel without popping it from the queue. ---- ----If the Channel is empty, `nil` is returned. ---- ----This can be useful to determine if the Channel is empty. ---- ---- ----### NOTE: ----The second return value can be used to detect if a `nil` message is in the queue. ---- ----@return any message # The message, or `nil` if there is no message. ----@return boolean present # Whether a message was returned (use to detect nil). -function Channel:peek() end - ---- ----Pops a message from the Channel. ---- ----If the Channel is empty, an optional timeout argument can be used to wait for a message, otherwise `nil` is returned. ---- ---- ----### NOTE: ----Threads can get stuck forever waiting on Channel messages, so be careful. ---- ----@param wait? number # How long to wait for a message to be popped, in seconds. `true` can be used to wait forever and `false` can be used to avoid waiting. ----@return any message # The received message, or `nil` if nothing was received. -function Channel:pop(wait) end - ---- ----Pushes a message onto the Channel. ---- ----The following types of data can be pushed: nil, boolean, number, string, lightuserdata, vectors, and userdata (LÖVR objects). ---- ----Notably, tables are not currently supported and should be serialized to strings. ---- ---- ----### NOTE: ----Threads can get stuck forever waiting on Channel messages, so be careful. ---- ----@param message any # The message to push. ----@param wait? number # How long to wait for the message to be popped, in seconds. `true` can be used to wait forever and `false` can be used to avoid waiting. ----@return number id # The ID of the pushed message. ----@return boolean read # Whether the message was read by another thread before the wait timeout. -function Channel:push(message, wait) end - ---- ----A Thread is an object that runs a chunk of Lua code in the background. ---- ----Threads are completely isolated from other threads, meaning they have their own Lua context and can't access the variables and functions of other threads. ---- ----Communication between threads is limited and is accomplished by using `Channel` objects. ---- ----To get `require` to work properly, add `require 'lovr.filesystem'` to the thread code. ---- ----@class lovr.Thread -local Thread = {} - ---- ----Returns the message for the error that occurred on the Thread, or nil if no error has occurred. ---- ----@return string error # The error message, or `nil` if no error has occurred on the Thread. -function Thread:getError() end - ---- ----Returns whether or not the Thread is currently running. ---- ----@return boolean running # Whether or not the Thread is running. -function Thread:isRunning() end - ---- ----Starts the Thread. ---- ---- ----### NOTE: ----The arguments can be nil, booleans, numbers, strings, or LÖVR objects. ---- ----@param arguments any # Up to 4 arguments to pass to the Thread's function. -function Thread:start(arguments) end - ---- ----Waits for the Thread to complete, then returns. ---- -function Thread:wait() end diff --git a/meta/3rd/lovr/library/lovr/timer.lua b/meta/3rd/lovr/library/lovr/timer.lua deleted file mode 100644 index 4bcb02f1..00000000 --- a/meta/3rd/lovr/library/lovr/timer.lua +++ /dev/null @@ -1,59 +0,0 @@ ----@meta - ---- ----The `lovr.timer` module provides a few functions that deal with time. ---- ----All times are measured in seconds. ---- ----@class lovr.timer -lovr.timer = {} - ---- ----Returns the average delta over the last second. ---- ----@return number delta # The average delta, in seconds. -function lovr.timer.getAverageDelta() end - ---- ----Returns the time between the last two frames. ---- ----This is the same value as the `dt` argument provided to `lovr.update`. ---- ---- ----### NOTE: ----The return value of this function will remain the same until `lovr.timer.step` is called. ---- ----This function should not be used to measure times for game behavior or benchmarking, use `lovr.timer.getTime` for that. ---- ----@return number dt # The delta time, in seconds. -function lovr.timer.getDelta() end - ---- ----Returns the current frames per second, averaged over the last 90 frames. ---- ----@return number fps # The current FPS. -function lovr.timer.getFPS() end - ---- ----Returns the time since some time in the past. ---- ----This can be used to measure the difference between two points in time. ---- ----@return number time # The current time, in seconds. -function lovr.timer.getTime() end - ---- ----Sleeps the application for a specified number of seconds. ---- ----While the game is asleep, no code will be run, no graphics will be drawn, and the window will be unresponsive. ---- ----@param duration number # The number of seconds to sleep for. -function lovr.timer.sleep(duration) end - ---- ----Steps the timer, returning the new delta time. ---- ----This is called automatically in `lovr.run` and it's used to calculate the new `dt` to pass to `lovr.update`. ---- ----@return number delta # The amount of time since the last call to this function, in seconds. -function lovr.timer.step() end -- cgit v1.2.3 From 1c94bfc9d73452fc34011450de3c7b07290b224a Mon Sep 17 00:00:00 2001 From: carsakiller Date: Fri, 27 Oct 2023 20:42:08 -0400 Subject: refactor: replace luaecs with LuaCATS submodule --- meta/3rd/luaecs | 1 + meta/3rd/luaecs/config.json | 4 - meta/3rd/luaecs/library/ecs.lua | 380 ---------------------------------------- 3 files changed, 1 insertion(+), 384 deletions(-) create mode 160000 meta/3rd/luaecs delete mode 100644 meta/3rd/luaecs/config.json delete mode 100644 meta/3rd/luaecs/library/ecs.lua (limited to 'meta') diff --git a/meta/3rd/luaecs b/meta/3rd/luaecs new file mode 160000 index 00000000..21192fbd --- /dev/null +++ b/meta/3rd/luaecs @@ -0,0 +1 @@ +Subproject commit 21192fbdccc0f140dae2f74f7c3ec7d74e2aadd0 diff --git a/meta/3rd/luaecs/config.json b/meta/3rd/luaecs/config.json deleted file mode 100644 index 21d5453c..00000000 --- a/meta/3rd/luaecs/config.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name" : "luaecs", - "words" : [ "ecs%.world()" ] -} diff --git a/meta/3rd/luaecs/library/ecs.lua b/meta/3rd/luaecs/library/ecs.lua deleted file mode 100644 index 56b421ca..00000000 --- a/meta/3rd/luaecs/library/ecs.lua +++ /dev/null @@ -1,380 +0,0 @@ ----@meta - ----Library of https://github.com/cloudwu/luaecs - ----We use a component id and a index in a component pooid, then we can ----get this component's entity id ,then get all other components. ----@class ITER ----@field index integer index of the component pool ----@field cid integer component type id ----@field iter ENTITY_GROUPITER #userdata - ----Return depend the pattern, every pattern will be return a table. ----This is a C function, and it will be used as the __call metamethod of the ----ECSWorld#_groupiter 's return usedata's metatable. ----If the pattern of select is a component name but not a condition,then return ----is the component pool index and component id. ----@alias ENTITY_GROUPITER fun():ITER - ----Every entity must defined which component it contains on new. ----@class ECSWorld -local meta = {} - ----Register a component, use Lua table to describe data struct. ----The table is a name field and data field list, and can has a type field, field will be 'filed_name:type'. ----Then, will caulate the size of component type's data. ----Support type is: int, float, bool, int64, dword, word, byte, double, userdata ----* if type is `lua`, the size is ecs._LUAOBJECT, -1; ----* if type is `raw`, we must set the type's size explict; ----* or the size may bigger than 0, which caculated from the data field list. ----* or if the size is 0, it is a one value component, if it has type field, then the size is the type size; ----* or if the size litter then 0, it is a tag. ----``` ----In C, this is init a component pool, every component pool's data will in a continus memory. ---- {name = 'vector', 'x:float','y:float'} -- normal component ---- {name = 'object',type='lua'}} -- lua component ---- {name = 'hp', type='int'} -- one value component ---- {name = 'mark'}, -- tag, default it boolean -----{name = 'rawobj', type='raw', size= '20'} -- raw object ---- {name = 'byname', order = true} -- order tag ---- Then the c api _newtype will malloc a continus memory of the types' size. ----@param typeclass table ----@see ECSWorld#_newtype -function meta:register(typeclass) -end - ----Construct a new entity, use Lua table to describe it. ----The key is the component type, must register it before, ----so, every kv pair is a component. ----Every component pool will get the new entity id. ----@param obj? table #{name = "hello", position= {x = 1, y = 2}} ----@return integer #eid -function meta:new(obj) -end - ----Return the info of a list of component names. ----May be, for test use? ----@param t string[] component name list ----@return userdata #ctx info ----@see ECSWorld#_context -function meta:context(t) -end - ----Select a patterns of entitys, the mainkey( first key) can't not be has absent condtion. ----The pattern is a space-separated combination of `componentname[:?]action`, and the `action` can be ----* in : read the component ----* out : write the component ----* update : read / write ----* absent : check if the component is not exist ----* exist (default) : check if the component is exist ----* new : create the component ----* ? means it's an optional action if the component is not exist ----NOTICE: If you use action `new` , you must guarantee the component is clear (None entity has this component) before iteration. ----If opt and inout is absent, the return is the id info of the entitys.{ {pooid, cid}} ----**Return value will only has components in he pattern** ----**Return value will like {component_index, component_id,ENTITY_GROUPITER,component1, component2} ----@param pat string #key [{opt inout}] , opt is : or ?, inout is in, out, update, exist(default), absent, new.like t:in, b:out, id?update ----@return ENTITY_GROUPITER #iter function ----@see ECSWorld#_groupiter -function meta:select(pat) -end - ----Sync all then component of the entity represent by a iter to LUA ----@param iter number|ITER #ITER or entity id ----@return table ----@see ECSWorld#_read ----@see ECSWorld#access ----@see ECSWorld#fetch -function meta:readall(iter) -end - ----Clear a component type of name `name` ----@param name string component name ----@see ECSWorld#_clear -function meta:clear(name) -end - ----Clear all component types. ----@see ECSWorld#clear -function meta:clearall() -end - ----Dump all indexes of a component of name `name` ----@param name string ----@return integer[] ----@see ECSWorld#_dumpid -function meta:dumpid(name) -end - ----Update world, will free removed(default, or with tag `tagname`) entity. ----@param tagname? string #tagname, default is REMOVED, but we also can use other tag to delete entities. ----@see ECSWorld#_update -function meta:update(tagname) -end - -local M = { - _MAXTYPE = 255, - _METHODS = meta, - _TYPE_INT = 0, - _TYPE_FLOAT = 1, - _TYPE_BOOL = 2, - _TYPE_INT64 = 3, - _TYPE_DWORD = 4, - _TYPE_WORD = 5, - _TYPE_BYTE = 6, - _TYPE_DOUBLE = 7, - _TYPE_USERDATA = 8, - _TYPE_COUNT = 9, - _LUAOBJECT = -1, - _REMOVED = 0, - _ORDERKEY = -2, - NULL = 0x0, -- userdata -} - ----Lua function ----Construct a new LuaECS World ----@return ECSWorld -function M.world() -end - ----Like new(obj), but use a specifie entity ----@param eid integer #entity id ----@param obj table #describe all component of the type -function meta:import(eid, obj) -end - --- Create a template first ----local t = w:template { ---- name = "foobar" ----} --- instance the template into an entity, and add visible tag. ---- The additional components ( { visible = true } ) is optional. ---- local eid = w:template_instance(w:new(), t, { visible = true }) ----Use a templat to Construct an entity. ----@param eid integer #entity id ----@param temp string #template name ----@param obj table -function meta:template_instance(eid, temp, obj) -end - ----Get an entity's one component, can can write the value. ----@param eid integer ----@param pat string #only one key ----@param value? any # when with this values, is write. ----@return any|nil # pattern key is tag, return boolean; lua type, return lua data; else table; if write, return nil. ----@see ECSWorld#readall ----@see ECSWorld#fetch -function meta:access(eid, pat, value) -end - ----Count the pattern 's object number ----@param pat string ----@return integer -function meta:count(pat) -end - ----Extend an iter with pattern. ----@param iter ITER ----@param expat string ----@see ECSWorld#_read -function meta:extend(iter, expat) end - ----Get component id by name ----@param name string ----@return integer #component id -function meta:component_id(name) end - ----Persist Use -function meta:read_component(reader, name, offset, stride, n) end - ----Get the first entity of pattern `pattern` ----We can use this as a signletone component. ----@param pattern string ----@return ITER -function meta:first(pattern) end - ----Check pattern `pattern` whether has entitys. ----Work same as ECSWorld#first but return boolean. ----@param pattern string ----@return boolean -function meta:check(pattern) end - ----Register a template. ----@param obj table #component and value pairs -function meta:template(obj) end - ----You can tags entities in groups with `w:group_enable(tagname, groupid1, groupid2,...)` ----Enable tag `tagname` on multi groups ----@param tagname string tagname ----@param ... number #group id s ----@see ECSWorld#_group_enable -function meta:group_enable(tagname, ...) end - ----Get a component's type. ----@param name string ----@return string # tag | lua | c | M._TYPE* -function meta:type(name) end - ----This will reset `tagname`'s component pool. ----Set tag on entitys in pattern `pat` ----@param tagname string ----@param pat string -function meta:filter(tagname, pat) end - ----Fetch entity's component with pattern `pat` ----You can use out, update and then w:sumit() to modify entity. ----@param eid integer ----@param pat? string ----@see ECSWorld#readall ----@see ECSWorld#access ----@return table # entity with pat specified component -function meta:fetch(eid, pat) end - ------------ C API ------------- ----C API ----Get the world size ----@return integer, integer #capaticy size, used size -function meta:memory() end - ----C API ----shrink_component_pool -function meta:collect() end - ----C API ----New component type. ----@param cid integer component id, cacul from the Lua ----@param size integer # size ----@see ECSWorld#register -function meta:_newtype(cid, size) -end - ---- C API ----Return a new entity ----@return integer entity id -function meta:_newentity() -end - ---- C API ----Check the entity is exist ----@param eid integer ----@return integer #entity's index in the world, start at 0 ----@see ECSWorld#exist -function meta:_indexentity(eid) end - ---- C API ----Add entity of id `eid` to the component pool of id `cid`, return the pool index. ----@param eid integer entity id ----@param cid integer component id, ----@return integer #pool index id -function meta:_addcomponent(eid, cid) -end - ---- C API ----Update world. ----Remove all entity which removed(default) or with component id `cid`, and will rearrange the world. ----@param cid? integer #tagid ----@see ECSWorld#update -function meta:_update(cid) -end - ---- C API ----Clear component of id `cid` ----@param cid integer component id ----@see ECSWorld#clear -function meta:_clear(cid) -end - ---- C API ----Return the info of a list of component ids. ----@param t integer[] ----@return userdata #ctx info ----@see ECSWorld#context -function meta:_context(t) -end - ---- C API ----Return an iter function for a list of pattren. ----@param pat_desc table[] #{ {name, id, type, [opt, r, w, exist, absent, new] } ----@return ENTITY_GROUPITER #iter C function -function meta:_groupiter(pat_desc) -end - ---- C API -function meta:_mergeiter(...) end - ---- C API ----Get a iter of entity eid. ----@param eid integer ----@return ITER # the cid will by -1 -function meta:_fetch(eid) end - ---- C API ----Entity exists? ----@param eid integer -function meta:exist(eid) end - ---- C API ---- Remove an entity with eid ---- The removed entity will has a tag REMOVED ----@param eid number -function meta:remove(eid) -end - ----C API ----@param ref ENTITY_GROUPITER #the iter of component ----@param cv any #the inited component ----@param index integer #the index of the component pool -function meta:_object(ref, cv, index) -end - ----@param pattern string ----@param iter ITER -function meta:_read(pattern, iter) -end - ----C API ----Commit an mod of a group iter with out or new ----@param iter ITER -function meta:submit(iter) end - ----@see ECSWorld:#first -function meta:_first(...) end - ----Dump all id of a component of id `cid` ----@param cid integer ----@return integer[] ----@see ECSWorld#dumpid -function meta:_dumpid(cid) -end - ----@see ECSWorld:count -function meta:_count(...) end - ----@see ECSWorld:filter -function meta:_filter(...) end - -function meta:_access(...) end - -function meta:__gc(...) end - ----C API ---- Add entity (eid) into a group with groupid (32bit integer) ----**NOTE:We can add entity to a group, but we can not remove it from a group.** ----**NOTE:We can iterate a group, but we can not random visit a group member.** ----@param groupid number #32bit ----@param eid number -function meta:group_add(groupid, eid) end - ----C API. Add tag of group's entitys ----**NOTICE: this call will clear the the tag's component pool.** ----@param tagid number ----@param ... number #max number is 1024 ----@see ECSWorld#group_enable -function meta:_group_enable(tagid, ...) end - ----C api, get the eid list of a group ----@param groupid number ----@return table # eid list -function meta:group_get(groupid) end - -return M -- cgit v1.2.3 From ea9526298837c1ea25aad8c2d9af14fdc4662aab Mon Sep 17 00:00:00 2001 From: carsakiller Date: Fri, 27 Oct 2023 20:42:08 -0400 Subject: refactor: replace luassert with LuaCATS submodule --- meta/3rd/luassert | 1 + meta/3rd/luassert/config.json | 3 - meta/3rd/luassert/library/luassert.lua | 442 --------------------------- meta/3rd/luassert/library/luassert/array.lua | 16 - meta/3rd/luassert/library/luassert/match.lua | 416 ------------------------- meta/3rd/luassert/library/luassert/mock.lua | 28 -- meta/3rd/luassert/library/luassert/spy.lua | 81 ----- meta/3rd/luassert/library/luassert/spy/d.lua | 100 ------ meta/3rd/luassert/library/luassert/stub.lua | 50 --- 9 files changed, 1 insertion(+), 1136 deletions(-) create mode 160000 meta/3rd/luassert delete mode 100644 meta/3rd/luassert/config.json delete mode 100644 meta/3rd/luassert/library/luassert.lua delete mode 100644 meta/3rd/luassert/library/luassert/array.lua delete mode 100644 meta/3rd/luassert/library/luassert/match.lua delete mode 100644 meta/3rd/luassert/library/luassert/mock.lua delete mode 100644 meta/3rd/luassert/library/luassert/spy.lua delete mode 100644 meta/3rd/luassert/library/luassert/spy/d.lua delete mode 100644 meta/3rd/luassert/library/luassert/stub.lua (limited to 'meta') diff --git a/meta/3rd/luassert b/meta/3rd/luassert new file mode 160000 index 00000000..d3528bb6 --- /dev/null +++ b/meta/3rd/luassert @@ -0,0 +1 @@ +Subproject commit d3528bb679302cbfdedefabb37064515ab95f7b9 diff --git a/meta/3rd/luassert/config.json b/meta/3rd/luassert/config.json deleted file mode 100644 index 71e12fc6..00000000 --- a/meta/3rd/luassert/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "words" : [ "require[%s%(\"']+luassert[%)\"']" ] -} diff --git a/meta/3rd/luassert/library/luassert.lua b/meta/3rd/luassert/library/luassert.lua deleted file mode 100644 index 21f2fe9a..00000000 --- a/meta/3rd/luassert/library/luassert.lua +++ /dev/null @@ -1,442 +0,0 @@ ----@meta - ----@class luassert.internal -local internal = {} - ----@class luassert:luassert.internal -local luassert = {} - ---#region Assertions - ----Assert that `value == true`. ----@param value any The value to confirm is `true`. -function internal.True(value) end - -internal.is_true = internal.True -internal.is_not_true = internal.True - ----Assert that `value == false`. ----@param value any The value to confirm is `false`. -function internal.False(value) end - -internal.is_false = internal.False -internal.is_not_false = internal.False - ----Assert that `type(value) == "boolean"`. ----@param value any The value to confirm is of type `boolean`. -function internal.Boolean(value) end - -internal.boolean = internal.Boolean -internal.is_boolean = internal.Boolean -internal.is_not_boolean = internal.Boolean - ----Assert that `type(value) == "number"`. ----@param value any The value to confirm is of type `number`. -function internal.Number(value) end - -internal.number = internal.Number -internal.is_number = internal.Number -internal.is_not_number = internal.Number - ----Assert that `type(value) == "string"`. ----@param value any The value to confirm is of type `string`. -function internal.String(value) end - -internal.string = internal.String -internal.is_string = internal.String -internal.is_not_string = internal.String - ----Assert that `type(value) == "table"`. ----@param value any The value to confirm is of type `table`. -function internal.Table(value) end - -internal.table = internal.Table -internal.is_table = internal.Table -internal.is_not_table = internal.Table - ----Assert that `type(value) == "nil"`. ----@param value any The value to confirm is of type `nil`. -function internal.Nil(value) end - -internal.is_nil = internal.Nil -internal.is_not_nil = internal.Nil - ----Assert that `type(value) == "userdata"`. ----@param value any The value to confirm is of type `userdata`. -function internal.Userdata(value) end - -internal.userdata = internal.Userdata -internal.is_userdata = internal.Userdata -internal.is_not_userdata = internal.Userdata - ----Assert that `type(value) == "function"`. ----@param value any The value to confirm is of type `function`. -function internal.Function(value) end - -internal.is_function = internal.Function -internal.is_not_function = internal.Function - ----Assert that `type(value) == "thread"`. ----@param value any The value to confirm is of type `thread`. -function internal.Thread(value) end - -internal.thread = internal.Thread -internal.is_thread = internal.Thread -internal.is_not_thread = internal.Thread - - ----Assert that a value is truthy. ----@param value any The value to confirm is truthy. -function internal.truthy(value) end - -internal.Truthy = internal.truthy -internal.is_truthy = internal.truthy -internal.is_not_truthy = internal.truthy - ----Assert that a value is falsy. ----@param value any The value to confirm is falsy. -function internal.falsy(value) end - -internal.Falsy = internal.falsy -internal.is_falsy = internal.falsy -internal.is_not_falsy = internal.falsy - ----Assert that a callback throws an error. ----@param callback function A callback function that should error ----@param error? string The specific error message that will be asserted -function internal.error(callback, error) end - -internal.Error = internal.error -internal.has_error = internal.error -internal.no_error = internal.error -internal.no_has_error = internal.error -internal.has_no_error = internal.error - ---- the api is the same as string.find ----@param pattern string ----@param actual string ----@param init? integer ----@param plain? boolean ----## Example ---[[ -```lua - it("Checks matches() assertion does string matching", function() - assert.is.error(function() assert.matches('.*') end) -- minimum 2 arguments - assert.is.error(function() assert.matches(nil, 's') end) -- arg1 must be a string - assert.is.error(function() assert.matches('s', {}) end) -- arg2 must be convertable to string - assert.is.error(function() assert.matches('s', 's', 's', 's') end) -- arg3 or arg4 must be a number or nil - assert.matches("%w+", "test") - assert.has.match("%w+", "test") - assert.has_no.match("%d+", "derp") - assert.has.match("test", "test", nil, true) - assert.has_no.match("%w+", "test", nil, true) - assert.has.match("^test", "123 test", 5) - assert.has_no.match("%d+", "123 test", '4') - end) -``` -]] -function internal.matches(pattern, actual, init, plain) end - -internal.is_matches = internal.matches -internal.is_not_matches = internal.matches - -internal.match = internal.matches -internal.is_match = internal.matches -internal.is_not_match = internal.matches - ----Assert that two values are near (equal to within a tolerance). ----@param expected number The expected value ----@param actual number The actual value ----@param tolerance number The tolerable difference between the two values ----## Example ---[[ - ```lua - it("Checks near() assertion handles tolerances", function() - assert.is.error(function() assert.near(0) end) -- minimum 3 arguments - assert.is.error(function() assert.near(0, 0) end) -- minimum 3 arguments - assert.is.error(function() assert.near('a', 0, 0) end) -- arg1 must be convertable to number - assert.is.error(function() assert.near(0, 'a', 0) end) -- arg2 must be convertable to number - assert.is.error(function() assert.near(0, 0, 'a') end) -- arg3 must be convertable to number - assert.is.near(1.5, 2.0, 0.5) - assert.is.near('1.5', '2.0', '0.5') - assert.is_not.near(1.5, 2.0, 0.499) - assert.is_not.near('1.5', '2.0', '0.499') - end) - ``` -]] -function internal.near(expected, actual, tolerance) end - -internal.Near = internal.near -internal.is_near = internal.near -internal.is_not_near = internal.near - ----Check that two or more items are equal. ---- ----When comparing tables, a reference check will be used. ----@param expected any The expected value ----@param ... any Values to check the equality of -function internal.equal(expected, ...) end - -internal.Equal = internal.equal -internal.are_equal = internal.equal -internal.are_not_equal = internal.equal - ----Check that two or more items that are considered the "same". ---- ----When comparing tables, a deep compare will be performed. ----@param expected any The expected value ----@param ... any Values to check -function internal.same(expected, ...) end - -internal.Same = internal.same -internal.are_same = internal.same -internal.are_not_same = internal.same - ---- Number of return values of function ----@param argument_number integer ----@param func fun() -function internal.returned_arguments(argument_number, func) end - -internal.not_returned_arguments = internal.returned_arguments - ---- check error message by string.match/string.find(`plain`=true) ----@param func function ----@param pattern string ----@param init? integer ----@param plain? boolean ----##Example ---[[ -```lua - it("Checks error_matches to accept only callable arguments", function() - local t_ok = setmetatable( {}, { __call = function() end } ) - local t_nok = setmetatable( {}, { __call = function() error("some error") end } ) - local f_ok = function() end - local f_nok = function() error("some error") end - - assert.error_matches(f_nok, ".*") - assert.no_error_matches(f_ok, ".*") - assert.error_matches(t_nok, ".*") - assert.no_error_matches(t_ok, ".*") - end) -``` -]] -function internal.error_matches(func, pattern, init, plain) end - -internal.no_error_matches = internal.error_matches - -internal.error_match = internal.error_matches -internal.no_error_match = internal.error_matches - -internal.matches_error = internal.error_matches -internal.no_matches_error = internal.error_matches - -internal.match_error = internal.error_matches -internal.no_match_error = internal.error_matches - ---#endregion - ---[[ Helpers ]] - ---#region - ----Assert that all numbers in two arrays are within a specified tolerance of ----each other. ----@param expected number[] The expected values ----@param actual number[] The actual values ----@param tolerance number The tolerable difference between the values in the two arrays -function internal.all_near(expected, actual, tolerance) end - -internal.are_all_near = internal.all_near -internal.are_not_all_near = internal.all_near - ---- array is uniqued ----@param arr any[] ----## Example ----```lua ----it("Checks to see if table1 only contains unique elements", function() ---- local table2 = { derp = false} ---- local table3 = { derp = true } ---- local table1 = {table2,table3} ---- local tablenotunique = {table2,table2} ---- assert.is.unique(table1) ---- assert.is_not.unique(tablenotunique) ---- end) ----``` -function internal.unique(arr) end - -internal.is_unique = internal.unique -internal.is_not_unique = internal.unique - ---#endregion - ---#region Spies - ----Perform an assertion on a spy object. This will allow you to call further ----functions to perform an assertion. ----@param spy luassert.spy The spy object to begin asserting ----@return luassert.spy.assert spyAssert A new object that has further assert function options -function internal.spy(spy) end - ----Perform an assertion on a stub object. This will allow you to call further ----functions to perform an assertion. ----@param stub luassert.spy The stub object to begin asserting ----@return luassert.spy.assert stubAssert A new object that has further assert function options -function internal.stub(stub) end - ---#endregion - ---#region Array - ----Perform an assertion on an array object. This will allow you to call further ----function to perform an assertion. ----@param object table The array object to begin asserting ----@return luassert.array arrayAssert A new object that has further assert function options -function internal.array(object) end - ---#endregion - ---#region test apis - ---- register custom assertions ----@param namespace 'assertion' | 'matcher' | 'modifier' | string ----@param name string ----@param callback function ----@param positive_message string ----@param negative_message string ----## Example ---[[ -```lua - it("Checks register creates custom assertions", function() - local say = require("say") - - local function has_property(state, arguments) - local property = arguments[1] - local table = arguments[2] - for key, value in pairs(table) do - if key == property then - return true - end - end - return false - end - - say:set_namespace("en") - say:set("assertion.has_property.positive", "Expected property %s in:\n%s") - say:set("assertion.has_property.negative", "Expected property %s to not be in:\n%s") - assert:register("assertion", "has_property", has_property, "assertion.has_property.positive", "assertion.has_property.negative") - - assert.has_property("name", { name = "jack" }) - assert.has.property("name", { name = "jack" }) - assert.not_has_property("surname", { name = "jack" }) - assert.Not.has.property("surname", { name = "jack" }) - assert.has_error(function() assert.has_property("surname", { name = "jack" }) end) - assert.has_error(function() assert.has.property("surname", { name = "jack" }) end) - assert.has_error(function() assert.no_has_property("name", { name = "jack" }) end) - assert.has_error(function() assert.no.has.property("name", { name = "jack" }) end) - end) -``` -]] -function luassert:register(namespace, name, callback, positive_message, negative_message) end - ---[[ - ### Customized formatters -The formatters are functions taking a single argument that needs to be converted to a string representation. The formatter should examine the value provided, if it can format the value, it should return the formatted string, otherwise it should return `nil`. -Formatters can be added through `assert:add_formatter(formatter_func)`, and removed by calling `assert:remove_formatter(formatter_func)`. - -Example using the included binary string formatter: -```lua -local binstring = require("luassert.formatters.binarystring") - -describe("Tests using a binary string formatter", function() - - setup(function() - assert:add_formatter(binstring) - end) - - teardown(function() - assert:remove_formatter(binstring) - end) - - it("tests a string comparison with binary formatting", function() - local s1, s2 = "", "" - for n = 65,88 do - s1 = s1 .. string.char(n) - s2 = string.char(n) .. s2 - end - assert.are.same(s1, s2) - - end) - -end) -``` - -Because this formatter formats string values, and is added last, it will take precedence over the regular string formatter. The results will be: -``` -Failure: ...ua projects\busted\formatter\spec\formatter_spec.lua @ 13 -tests a string comparison with binary formatting -...ua projects\busted\formatter\spec\formatter_spec.lua:19: Expected objects to be the same. Passed in: -Binary string length; 24 bytes -58 57 56 55 54 53 52 51 50 4f 4e 4d 4c 4b 4a 49 XWVUTSRQ PONMLKJI -48 47 46 45 44 43 42 41 HGFEDCBA - -Expected: -Binary string length; 24 bytes -41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 ABCDEFGH IJKLMNOP -51 52 53 54 55 56 57 58 QRSTUVWX -``` -]] ----@param callback fun(obj:any):string|nil -function luassert:add_formatter(callback) end - ----@param fmtr function -function luassert:remove_formatter(fmtr) end - ---- To register state information 'parameters' can be used. The parameter is included in a snapshot and can hence be restored in between tests. For an example see `Configuring table depth display` below. ----@param name any ----@param value any ----## Example ---[[ -```lua -assert:set_parameter("my_param_name", 1) -local s = assert:snapshot() -assert:set_parameter("my_param_name", 2) -s:revert() -assert.are.equal(1, assert:get_parameter("my_param_name")) -``` -]] -function luassert:set_parameter(name, value) end - ---- get current snapshot parameter ----@param name any ----@return any value -function luassert:get_parameter(name) end - ----To be able to revert changes created by tests, inserting spies and stubs for example, luassert supports 'snapshots'. A snapshot includes the following; ----@return {revert:fun()} -function luassert:snapshot() end - ---#endregion - ---- unregister custom assertions ----@param namespace 'assertion' | 'matcher' | 'modifier' | string ----@param name string -function luassert:unregister(namespace, name) end - ---#region modifier namespace - -internal.are = internal -internal.is = internal -internal.has = internal -internal.does = internal - -internal.is_not = internal -internal.are_not = internal -internal.has_no = internal -internal.no_has = internal -internal.does_not = internal -internal.no = internal -internal.Not = internal - ---#endregion - -return luassert diff --git a/meta/3rd/luassert/library/luassert/array.lua b/meta/3rd/luassert/library/luassert/array.lua deleted file mode 100644 index 89253a12..00000000 --- a/meta/3rd/luassert/library/luassert/array.lua +++ /dev/null @@ -1,16 +0,0 @@ ----@meta - ----@class luassert.array -local array = {} - - ----Assert that an array has holes in it ----@param length? integer The expected length of the array ----@return integer|nil holeIndex The index of the first found hole or `nil` if there was no hole. -function array.holes(length) end - -array.has = array - -array.no = array - -return array diff --git a/meta/3rd/luassert/library/luassert/match.lua b/meta/3rd/luassert/library/luassert/match.lua deleted file mode 100644 index 6a61b728..00000000 --- a/meta/3rd/luassert/library/luassert/match.lua +++ /dev/null @@ -1,416 +0,0 @@ ----@meta - ----Matchers are used to provide flexible argument matching for `called_with` and ----`returned_with` asserts for spies. Just like with asserts, you can chain a ----modifier value using `is` or `is_not`, followed by the matcher you wish to use. ----@class luassert.match -match = {} - ----Match a value from a spy -match.is = {} - ----Match inverse values from a spy -match.is_not = {} - ---- Wildcard match, matches anything. --- ----## Example ----``` ----it("tests wildcard matcher", function() ---- local s = spy.new(function() end) ---- local _ = match._ ---- ---- s("foo") ---- ---- assert.spy(s).was_called_with(_) -- matches any argument ---- assert.spy(s).was_not_called_with(_, _) -- does not match two arguments ----end) ----``` -match._ = {} - ---[[ Modifiers ]] - ---#region - ----If you're creating a spy for functions that mutate any properties on a table ----(like `self`) and you want to use `was_called_with`, you should use ----`match.is_ref(obj)`. ---- ----## Example ----```lua ----describe("combine matchers", function() ---- local match = require("luassert.match") ---- ---- it("tests ref matchers for passed in table", function() ---- local t = { count = 0, } ---- function t.incrby(t, i) t.count = t.count + i end ---- ---- local s = spy.on(t, "incrby") ---- ---- s(t, 2) ---- ---- assert.spy(s).was_called_with(match.is_ref(t), 2) ---- end) ---- ---- it("tests ref matchers for self", function() ---- local t = { count = 0, } ---- function t:incrby(i) self.count = self.count + i end ---- ---- local s = spy.on(t, "incrby") ---- ---- t:incrby(2) ---- ---- assert.spy(s).was_called_with(match.is_ref(t), 2) ---- end) ----end) ----``` ----@param obj any -function match.Ref(obj) end -match.ref = match.Ref -match.is.Ref = match.Ref -match.is.ref = match.Ref -match.is_ref = match.Ref - - ----Combine matchers, matching all provided matchers. ----@param ... table|function ----```lua ----describe("combine matchers", function() ---- local match = require("luassert.match") ---- ---- it("tests composite matchers", function() ---- local s = spy.new(function() end) ---- ---- s("foo") ---- ---- assert.spy(s).was_called_with(match.is_all_of( ---- match.is_not_nil(), ---- match.is_not_number() ---- )) ---- end) ----end) ----``` -function match.all_of(...) end -match.is_all_of = match.all_of -match.is.all_of = match.all_of - ----Combine matchers, matching at least one provided matcher. ----@param ... table|function ----```lua ----describe("combine matchers", function() ---- local match = require("luassert.match") ---- ---- it("tests composite matchers", function() ---- local s = spy.new(function() end) ---- ---- s("foo") ---- ---- assert.spy(s).was_called_with(match.is_any_of( ---- match.is_number(), ---- match.is_string(), ---- match.is_boolean() ---- )) ---- end) ----end) ----``` -function match.any_of(...) end -match.is_any_of = match.any_of -match.is.any_of = match.any_of - ----Combine matchers, matching none of the provided matchers. ----@param ... table|function ----```lua ----describe("combine matchers", function() ---- local match = require("luassert.match") ---- ---- it("tests composite matchers", function() ---- local s = spy.new(function() end) ---- ---- s("foo") ---- ---- assert.spy(s).was_called_with(match.is_none_of( ---- match.is_number(), ---- match.is_table(), ---- match.is_boolean() ---- )) ---- end) ----end) ----``` -function match.none_of(...) end -match.is_none_of = match.none_of -match.is.none_of = match.none_of - ---#endregion - - ---[[ Matchers ]] - ---#region - ----Check that the value is `true`. ----@return boolean isTrue -function match.True() end -match.is.True = match.True -match.is_true = match.True - ----Check that the value is `false`. ----@return boolean isFalse -function match.False() end -match.is.True = match.False -match.is_false = match.False - ----Check that the value is `nil`. ----@return boolean isNil -function match.Nil() end -match.is.Nil = match.Nil -match.is_nil = match.Nil - ----Check that the value is of type `boolean`. ----@return boolean isBoolean -function match.Boolean() end -match.boolean = match.Boolean -match.is.Boolean = match.Boolean -match.is.boolean = match.Boolean -match.is_boolean = match.Boolean - ----Check that the value is of type `number`. ----@return boolean isNumber -function match.Number() end -match.number = match.Number -match.is.Number = match.Number -match.is.number = match.Number -match.is_number = match.Number - ----Check that the value is of type `string`. ----@return boolean isString -function match.String() end -match.string = match.String -match.is.String = match.String -match.is.string = match.String -match.is_string = match.String - ----Check that the value is of type `table`. ----@return boolean isTable -function match.Table() end -match.table = match.Table -match.is.Table = match.Table -match.is.table = match.Table -match.is_table = match.Table - ----Check that the value is of type `function`. ----@return boolean isFunction -function match.Function() end -match.is.Function = match.Function -match.is_function = match.Function - ----Check that the value is of type `userdata`. ----@return boolean isUserdata -function match.Userdata() end -match.userdata = match.Userdata -match.is.Userdata = match.Userdata -match.is.userdata = match.Userdata -match.is_userdata = match.Userdata - ----Check that the value is of type `thread`. ----@return boolean isThread -function match.Thread() end -match.thread = match.Thread -match.is.thread = match.Thread -match.is.Thread = match.Thread -match.is_thread = match.Thread - ----Check that the value is truthy. ----@return boolean isTruthy -function match.truthy() end -match.Truthy = match.truthy -match.is.truthy = match.truthy -match.is.Truthy = match.truthy -match.is_truthy = match.truthy - ----Check that the value is falsy. ----@return boolean isFalsy -function match.falsy() end -match.Falsy = match.falsy -match.is.falsy = match.falsy -match.is.Falsy = match.falsy -match.is_falsy = match.falsy - ----Check that the two values are equal. ---- ----When comparing tables, a reference check will be used. ----@param value any The target value ----@return boolean isEqual -function match.Equals(value) end -match.equals = match.Equals -match.is.equals = match.Equals -match.is.equals = match.Equals -match.is_equals = match.Equals - ----Check that the two values are considered the "same". ---- ----When comparing tables, a deep compare will be performed. ----@param value any The target value ----@return boolean isSame -function match.Same(value) end -match.same = match.Same -match.is.same = match.Same -match.is.same = match.Same -match.is_same = match.Same - ----Match a table with unique values. Will pass if no values are duplicates. ----@param deep boolean If a deep check should be performed or just the first level ----@return boolean isUnique -function match.Unique(deep) end -match.unique = match.Unique -match.is.unique = match.Unique -match.is.unique = match.Unique -match.is_unique = match.Unique - ----Match a certain numerical value with a specified +/- tolerance. ----@param value number The target value ----@param tolerance number The amount that the true value can be off by (inclusive) ----@return boolean isNear -function match.Near(value, tolerance) end -match.near = match.Near -match.is.near = match.Near -match.is.near = match.Near -match.is_near = match.Near - ----Perform a `string.find()` match. ----@param pattern string String match pattern ----@param init integer Index of character to start searching for a match at ----@param plain boolean If the `pattern` should be treated as plain text instead of a pattern ----@return boolean matches -function match.Matches(pattern, init, plain) end -match.matches = match.Matches -match.is.matches = match.Matches -match.is.matches = match.Matches -match.is_matches = match.Matches -match.match = match.Matches -match.Match = match.matches -match.is.match = match.Matches -match.is.Matches = match.Matches -match.is_match = match.Matches - ---#endregion - - ---[[ Inverse Matchers ]] - ---#region - ----Check that the value is **NOT** `true`. ----@return boolean isTrue -function match.is_not.True() end -match.is_not_true = match.is_not.True - ----Check that the value is **NOT** `false`. ----@return boolean isFalse -function match.is_not.False() end -match.is_not_false = match.is_not.False - ----Check that the value is **NOT** `nil`. ----@return boolean isNil -function match.is_not.Nil() end -match.is_not_nil = match.is_not.Nil - ----Check that the value is **NOT** of type `boolean`. ----@return boolean isBoolean -function match.is_not.Boolean() end -match.is_not.boolean = match.is_not.Boolean -match.is_not_boolean = match.is_not.Boolean - ----Check that the value is **NOT** of type `number`. ----@return boolean isNumber -function match.is_not.Number() end -match.is_not.number = match.is_not.Number -match.is_not_number = match.is_not.Number - ----Check that the value is **NOT** of type `string`. ----@return boolean isString -function match.is_not.String() end -match.is_not.string = match.is_not.String -match.is_not_string = match.is_not.String - ----Check that the value is **NOT** of type `table`. ----@return boolean isTable -function match.is_not.Table() end -match.is_not.table = match.is_not.Table -match.is_not_table = match.is_not.Table - ----Check that the value is **NOT** of type `function`. ----@return boolean isFunction -function match.is_not.Function() end -match.is_not_function = match.is_not.Function - ----Check that the value is **NOT** of type `userdata`. ----@return boolean isUserdata -function match.is_not.Userdata() end -match.is_not.userdata = match.is_not.Userdata -match.is_not_userdata = match.is_not.Userdata - ----Check that the value is **NOT** of type `thread`. ----@return boolean isThread -function match.is_not.Thread() end -match.is_not.Thread = match.is_not.Thread -match.is_not_thread = match.is_not.Thread - ----Check that the value is **NOT** truthy. ----@return boolean isTruthy -function match.is_not.truthy() end -match.is_not.Truthy = match.is_not.truthy -match.is_not_truthy = match.is_not.truthy - ----Check that the value is **NOT** falsy. ----@return boolean isFalsy -function match.is_not.falsy() end -match.is_not.Falsy = match.is_not.falsy -match.is_not_falsy = match.is_not.falsy - ----Check that the two values are **NOT** equal. ---- ----When comparing tables, a reference check will be used. ----@param value any The target value ----@return boolean isEqual -function match.is_not.Equals(value) end -match.is_not.equals = match.is_not.Equals -match.is_not_equals = match.is_not.Equals - ----Check that the two values are **NOT** considered the "same". ---- ----When comparing tables, a deep compare will be performed. ----@param value any The target value ----@return boolean isSame -function match.is_not.Same(value) end -match.is_not.same = match.is_not.Same -match.is_not_same = match.is_not.Same - ----Match a table with **NOT** unique values. Will pass if at least one duplicate is found. ----@param deep boolean If a deep check should be performed or just the first level ----@return boolean isUnique -function match.is_not.Unique(deep) end -match.is_not.unique = match.is_not.Unique -match.is_not_unique = match.is_not.Unique - ----Match a certain numerical value outside a specified +/- tolerance. ----@param value number The target value ----@param tolerance number The amount that the true value must be off by (inclusive) ----@return boolean isNear -function match.is_not.Near(value, tolerance) end -match.is_not.near = match.is_not.Near -match.is_not_near = match.is_not.Near - ----Perform a `string.find()` match to find a value that does **NOT** match. ----@param pattern string String match pattern ----@param init integer Index of character to start searching for a match at ----@param plain boolean If the `pattern` should be treated as plain text instead of a pattern ----@return boolean matches -function match.is_not.Matches(pattern, init, plain) end -match.is_not.matches = match.is_not.Matches -match.is_not_matches = match.is_not.Matches -match.is_not.match = match.is_not.Matches -match.is_not_match = match.is_not.Matches - ---#endregion - -return match diff --git a/meta/3rd/luassert/library/luassert/mock.lua b/meta/3rd/luassert/library/luassert/mock.lua deleted file mode 100644 index 856bce4e..00000000 --- a/meta/3rd/luassert/library/luassert/mock.lua +++ /dev/null @@ -1,28 +0,0 @@ ----@meta - ----@alias luassert.mockeds table - ----A mock wraps an entire table's functions in spies or mocks ----@class luassert.mock : luassert.spy.factory -local mock = {} ----@generic T ----Create a new mock from a table, wrapping all of it's functions in spies or mocks. ----@param object T The table to wrap ----@param doStubs? boolean If the table should be wrapped with stubs instead of spies ----@param func? function Callback function used for stubs ----@param self? table Table to replace with a spy ----@param key? string The key of the method to replace in `self` ----@return luassert.mockeds -function mock(object, doStubs, func, self, key) end - ----@generic T ----Create a new mock from a table, wrapping all of it's functions in spies or mocks. ----@param object T The table to wrap ----@param doStubs? boolean If the table should be wrapped with stubs instead of spies ----@param func? function Callback function used for stubs ----@param self? table Table to replace with a spy ----@param key? string The key of the method to replace in `self` ----@return luassert.mockeds -function mock.new(object, doStubs, func, self, key) end - -return mock diff --git a/meta/3rd/luassert/library/luassert/spy.lua b/meta/3rd/luassert/library/luassert/spy.lua deleted file mode 100644 index 4d1a7944..00000000 --- a/meta/3rd/luassert/library/luassert/spy.lua +++ /dev/null @@ -1,81 +0,0 @@ ----@meta - ----Spies allow you to wrap a function in order to track how that function was ----called. ----@class luassert.spy.factory ----## Example ----``` ----describe("New Spy", function() ---- it("Registers a new function to spy on", function() ---- local s = spy.new(function() end) ---- ---- s(1, 2, 3) ---- s(4, 5, 6) ---- ---- assert.spy(s).was.called() ---- assert.spy(s).was.called(2) ---- assert.spy(s).was.called_with(1, 2, 3) ---- end) ----``` ----@overload fun(target:function):luassert.spy -local spy_factory = {} - ---#region - ----Register a new function to spy on. ----@param target function The function to spy on ----@return luassert.spy spy A spy object that can be used to perform assertions ---- ----## Example ----``` ----describe("New Spy", function() ---- it("Registers a new function to spy on", function() ---- local s = spy.new(function() end) ---- ---- s(1, 2, 3) ---- s(4, 5, 6) ---- ---- assert.spy(s).was.called() ---- assert.spy(s).was.called(2) ---- assert.spy(s).was.called_with(1, 2, 3) ---- end) ----``` -function spy_factory.new(target) end - ----Create a new spy that replaces a method in a table in place. ----@param table table The table that the method is a part of ----@param methodName string The method to spy on ----@return luassert.spy spy A spy object that can be used to perform assertions ---- ----## Example ----``` ----describe("Spy On", function() ---- it("Replaces a method in a table", function() ---- local t = { ---- greet = function(msg) print(msg) end ---- } ---- ---- local s = spy.on(t, "greet") ---- ---- t.greet("Hey!") -- prints 'Hey!' ---- assert.spy(t.greet).was_called_with("Hey!") ---- ---- t.greet:clear() -- clears the call history ---- assert.spy(s).was_not_called_with("Hey!") ---- ---- t.greet:revert() -- reverts the stub ---- t.greet("Hello!") -- prints 'Hello!', will not pass through the spy ---- assert.spy(s).was_not_called_with("Hello!") ---- end) ----end) ----``` -function spy_factory.on(table, methodName) end - ----Check that the provided object is a spy. ----@param object any The object to confirm is a spy ----@return boolean isSpy If the object is a spy or not -function spy_factory.is_spy(object) end - ---#endregion - -return spy_factory diff --git a/meta/3rd/luassert/library/luassert/spy/d.lua b/meta/3rd/luassert/library/luassert/spy/d.lua deleted file mode 100644 index 2789c93e..00000000 --- a/meta/3rd/luassert/library/luassert/spy/d.lua +++ /dev/null @@ -1,100 +0,0 @@ ----@meta ---[[ Instance ]] - ---#region - ----An instance of a spy. ----@class luassert.spy -local spy = {} - ----Revert the spied on function to its state before being spied on. ---- ----Effectively removes spy from spied-on function. -function spy:revert() end - ----Clear the call history for this spy. -function spy:clear() end - ----Check how many times this spy has been called. ----@param times integer The expected number of calls ----@param compare? fun(callCount, expected): any A compare function, whose result will be returned as the first return value ----@return any result By default, `true` if the spy was called `times` times. Will be the result of `compare` if given ----@return integer calls Number of times called -function spy:called(times, compare) end - ----Check that the spy was called with the provided arguments. ----@param args any[] An array of arguments that are expected to have been passed to this spy ----@return boolean was If this spy was called with the provided arguments ----@return any[] arguments If `was == false`, this will be an array of the arguments *last* given to this spy. If `was == true`, this will be an array of the arguments given to the matching call of this spy. -function spy:called_with(args) end - ----Check that the spy returned the provided values ----@pasram ... any An array of values that are expected to have been returned by this spy ----@return boolean did If this spy did return the provided values. ----@return any[] returns If `did == false`, this will be an array of the values *last* returned by this spy. If `did == true`, this will be an array of the values returned by the matching call of this spy. -function spy:returned_with(...) end - ---#endregion - ---[[ Spy Assertion ]] - ---#region - ----The result of asserting a spy. ---- ----Includes functions for performing assertions on a spy. ----@class luassert.spy.assert -local spy_assert = {} - ----Assert that the function being spied on was called. ----@param times integer Assert the number of times the function was called -function spy_assert.called(times) end - ----Assert that the function being spied on was called with the provided ----parameters. ----@param ... any The parameters that the function is expected to have been called with -function spy_assert.called_with(...) end - ----Assert that the function being spied on was **NOT** called with the provided ----parameters. ----@param ... any The parameters that the function is expected to **NOT** have been called with -function spy_assert.not_called_with(...) end - ----Assert that the function being spied on was called at **least** a specified ----number of times. ----@param times integer The minimum number of times that the spied-on function should have been called -function spy_assert.called_at_least(times) end - ----Assert that the function being spied on was called at **most** a specified ----number of times. ----@param times integer The maximum number of times that the spied-on function should have been called -function spy_assert.called_at_most(times) end - ----Assert that the function being spied on was called **more** than the ----specified number of times. ----@param times integer The number of times that the spied-on function should have been called more than -function spy_assert.called_more_than(times) end - ----Assert that the function being spied on was called **less** than the ----specified number of times. ----@param times integer The number of times that the spied-on function should have been called less than -function spy_assert.called_less_than(times) end - ----Check that the spy returned the provided values ----@param ... any An array of values that are expected to have been returned by this spy ----@return boolean did If this spy did return the provided values. ----@return any[] returns If `did == false`, this will be an array of the values *last* returned by this spy. If `did == true`, this will be an array of the values returned by the matching call of this spy. -function spy_assert.returned_with(...) end - -spy_assert.was = { - called = spy_assert.called, - called_with = spy_assert.called_with, - not_called_with = spy_assert.not_called_with, - called_at_least = spy_assert.called_at_least, - called_at_most = spy_assert.called_at_most, - called_more_than = spy_assert.called_more_than, - called_less_than = spy_assert.called_less_than, - returned_with = spy_assert.returned_with, -} - ---#endregion diff --git a/meta/3rd/luassert/library/luassert/stub.lua b/meta/3rd/luassert/library/luassert/stub.lua deleted file mode 100644 index 6332d3ed..00000000 --- a/meta/3rd/luassert/library/luassert/stub.lua +++ /dev/null @@ -1,50 +0,0 @@ ----@meta - ----Function similarly to spies, except that stubs do not call the function that they replace. ----@class luassert.stub -local stub = {} - ----Creates a new stub that replaces a method in a table in place. ----@param object table The object that the method is in ----@param key string The key of the method in the `object` to replace ----@param ... any A function that operates on the remaining passed in values and returns more values or just values to return ----@return luassert.spy stub A stub object that can be used to perform assertions ----@return any ... Values returned by a passed in function or just the values passed in -function stub(object, key, ...) end - ----Creates a new stub that replaces a method in a table in place. ----@param object table The object that the method is in ----@param key string The key of the method in the `object` to replace ----@param ... any A function that operates on the remaining passed in values and returns more values or just values to return ----@return luassert.spy stub A stub object that can be used to perform assertions ----@return any ... Values returned by a passed in function or just the values passed in ---- ----## Example ----``` ----describe("Stubs", function() ---- local t = { ---- lottery = function(...) ---- print("Your numbers: " .. table.concat({ ... }, ",")) ---- end, ---- } ---- ---- it("Tests stubs", function() ---- local myStub = stub.new(t, "lottery") ---- ---- t.lottery(1, 2, 3) -- does not print ---- t.lottery(4, 5, 6) -- does not print ---- ---- assert.stub(myStub).called_with(1, 2, 3) ---- assert.stub(myStub).called_with(4, 5, 6) ---- assert.stub(myStub).called(2) ---- assert.stub(myStub).called_less_than(3) ---- ---- myStub:revert() ---- ---- t.lottery(10, 11, 12) -- prints ---- end) ----end) ----``` -function stub.new(object, key, ...) end - -return stub -- cgit v1.2.3 From 1ca29ac7ba2d2ac84d24644fd8400ee3c353c83f Mon Sep 17 00:00:00 2001 From: carsakiller Date: Fri, 27 Oct 2023 20:42:08 -0400 Subject: refactor: replace skynet with LuaCATS submodule --- meta/3rd/skynet | 1 + meta/3rd/skynet/config.json | 4 - meta/3rd/skynet/library/skynet.lua | 561 ----------------------- meta/3rd/skynet/library/skynet/cluster.lua | 52 --- meta/3rd/skynet/library/skynet/crypt.lua | 90 ---- meta/3rd/skynet/library/skynet/db/mongo.lua | 221 --------- meta/3rd/skynet/library/skynet/db/mysql.lua | 54 --- meta/3rd/skynet/library/skynet/db/redis.lua | 82 ---- meta/3rd/skynet/library/skynet/debug.lua | 17 - meta/3rd/skynet/library/skynet/habor.lua | 27 -- meta/3rd/skynet/library/skynet/muliticast.lua | 24 - meta/3rd/skynet/library/skynet/netpack.lua | 43 -- meta/3rd/skynet/library/skynet/profile.lua | 31 -- meta/3rd/skynet/library/skynet/sharedata.lua | 39 -- meta/3rd/skynet/library/skynet/sharemap.lua | 52 --- meta/3rd/skynet/library/skynet/sharetable.lua | 37 -- meta/3rd/skynet/library/skynet/socket.lua | 141 ------ meta/3rd/skynet/library/skynet/socketchannel.lua | 69 --- meta/3rd/skynet/library/skynet/socketdriver.lua | 158 ------- meta/3rd/skynet/library/skynet/stm.lua | 36 -- 20 files changed, 1 insertion(+), 1738 deletions(-) create mode 160000 meta/3rd/skynet delete mode 100644 meta/3rd/skynet/config.json delete mode 100644 meta/3rd/skynet/library/skynet.lua delete mode 100644 meta/3rd/skynet/library/skynet/cluster.lua delete mode 100644 meta/3rd/skynet/library/skynet/crypt.lua delete mode 100644 meta/3rd/skynet/library/skynet/db/mongo.lua delete mode 100644 meta/3rd/skynet/library/skynet/db/mysql.lua delete mode 100644 meta/3rd/skynet/library/skynet/db/redis.lua delete mode 100644 meta/3rd/skynet/library/skynet/debug.lua delete mode 100644 meta/3rd/skynet/library/skynet/habor.lua delete mode 100644 meta/3rd/skynet/library/skynet/muliticast.lua delete mode 100644 meta/3rd/skynet/library/skynet/netpack.lua delete mode 100644 meta/3rd/skynet/library/skynet/profile.lua delete mode 100644 meta/3rd/skynet/library/skynet/sharedata.lua delete mode 100644 meta/3rd/skynet/library/skynet/sharemap.lua delete mode 100644 meta/3rd/skynet/library/skynet/sharetable.lua delete mode 100644 meta/3rd/skynet/library/skynet/socket.lua delete mode 100644 meta/3rd/skynet/library/skynet/socketchannel.lua delete mode 100644 meta/3rd/skynet/library/skynet/socketdriver.lua delete mode 100644 meta/3rd/skynet/library/skynet/stm.lua (limited to 'meta') diff --git a/meta/3rd/skynet b/meta/3rd/skynet new file mode 160000 index 00000000..afa6717a --- /dev/null +++ b/meta/3rd/skynet @@ -0,0 +1 @@ +Subproject commit afa6717ac4f71e42012fa2ebf4b410d04db647ae diff --git a/meta/3rd/skynet/config.json b/meta/3rd/skynet/config.json deleted file mode 100644 index 17210c43..00000000 --- a/meta/3rd/skynet/config.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name" : "skynet", - "words" : [ "skynet.start" ] -} diff --git a/meta/3rd/skynet/library/skynet.lua b/meta/3rd/skynet/library/skynet.lua deleted file mode 100644 index 0e4d19dd..00000000 --- a/meta/3rd/skynet/library/skynet.lua +++ /dev/null @@ -1,561 +0,0 @@ ----@meta ----@alias MESSAGENAME ----|+'"lua"' ----|+'"socket"' ----|+'"client"' ----|+'"response"' ----|+'"muliticast"' ----|+'"system"' ----|+'"harbor"' ----|+'"error"' ----|+'"queue"' ----|+'"debug"' ----|+'"trace"' ----@alias SERVICEADDR '".servicename"' | '":0000000C"' | integer ----@alias MESSAGEHANDLER fun(session:integer, source:integer, cmd:string, ...) -local skynet = { - -- read skynet.h - PTYPE_TEXT = 0, - PTYPE_RESPONSE = 1, - PTYPE_MULTICAST = 2, - PTYPE_CLIENT = 3, - PTYPE_SYSTEM = 4, - PTYPE_HARBOR = 5, - PTYPE_SOCKET = 6, - PTYPE_ERROR = 7, - PTYPE_QUEUE = 8, -- used in deprecated mqueue, use skynet.queue instead - PTYPE_DEBUG = 9, - PTYPE_LUA = 10, - PTYPE_SNAX = 11, - PTYPE_TRACE = 12, -- use for debug trace - PNAME_TEXT = "text", - PNAME_RESPONSE = "response", - PNAME_MULTICAST = "muliticast", - PNAME_CLIENT = "client", - PNAME_SYSTEM = "system", - PNAME_HARBOR = "harbor", - PNAME_SOCKET = "socket", - PNAME_ERROR = "error", - PNAME_QUEUE = "queue", - PNAME_DEBUG = "debug", - PNAME_LUA = "lua", - PNAME_SNAX = "snax", - PNAME_TRACE = "trace", - -} - --------------- 地址相关 API --------------- - ----* 获取服务自己的整型服务地址 ----@return integer -function skynet.self() -end - ----* 获取服务所属的节点 ----@param addr number ----@return number -function skynet.harbor(addr) -end - ----* 将服务的整型地址转换成一个16进制字符串,若不是整型,则 tostring() 返回 ----* :0000000c ----@param addr SERVICEADDR ----@return string -function skynet.address(addr) -end - ----* skynet.localname(name) 用来查询一个 . 开头的名字对应的地址。它是一个非阻塞 API ,不可以查询跨节点的全局名字。 ----* 返回地址类似 :0000000b ----@return string -function skynet.localname(name) -end - -----------------消息分发和响应相关 API ----------- - ----* 注册一类消息的处理机制 ----* 需要 require 'skynet.manager' ----* skynet.register_protocol { ----* name = "text", ----* id = skynet.PTYPE_TEXT, ----* pack = function(m) return tostring(m) end, ----* unpack = skynet.tostring, ----* } ----@param class table -function skynet.register_protocol(class) -end - ----* 注册特定类消息的处理函数。大多数程序会注册 lua 类消息的处理函数,惯例的写法是: ----* local CMD = {} ----* skynet.dispatch("lua", function(session, source, cmd, ...) ----* local f = assert(CMD[cmd]) ----* f(...) ----* end) ----@param typename MESSAGENAME ----@param func MESSAGEHANDLER -function skynet.dispatch(typename, func) -end - ----* 向当前会话返回数据 ----* 会自动获取当前线程所关联的会话ID和返回地址 ----* 由于某些历史原因(早期的 skynet 默认消息类别是文本,而没有经过特殊编码), ----这个 API 被设计成传递一个 C 指针和长度,而不是经过当前消息的 pack 函数打包。或者你也可以省略 size 而传入一个字符串。 ----* 在同一个消息处理的 coroutine 中只可以被调用一次,多次调用会触发异常。 ----* 你需要挂起一个请求,等将来时机满足,再回应它。而回应的时候已经在别的 coroutine 中了。 ----针对这种情况,你可以调用 skynet.response(skynet.pack) 获得一个闭包,以后调用这个闭包即可把回应消息发回。 ----这里的参数 skynet.pack 是可选的,你可以传入其它打包函数,默认即是 skynet.pack 。 ----@param msg lightuserdata|string ----@param sz? integer -function skynet.ret(msg, sz) -end - ----* 与 skynet.ret(skynet.pack(...)) 相等 -function skynet.retpack(...) -end - ----返回一个闭包以进行延迟回应 ----@param pack fun(...):string|lightuserdata,integer #默认会用 skynet.pack ----@return fun(isOK:boolean | 'TEST', ...) -function skynet.response(pack) -end - ----* 一般来说每个请求都需要给出一个响应, ----* 但当我们不需要响应的时候调用这个,就不会给出警告了 ----* 如我们使用 C Gate 将套接字作为会话ID -function skynet.ignoreret() -end - ----设置未知请求的处理函数 ----@param unknown fun(session:number, source:number, msg:lightuserdata, sz:number, prototype:number) -function skynet.dispatch_unknown_request(unknown) -end - ----设置未知响应的处理函数 ----@param unknown fun(session:number, source:number, msg:lightuserdata , sz:number) -function skynet.dispatch_unknown_response(unknown) -end - ----SNLUA 默认的Lua回调 -function skynet.dispatch_message(...) -end - ---------------------序列化相关API--------------- - ----* 可以将一组 lua 对象序列化为一个由 malloc 分配出来的 C 指针加一个数字长度 ----* 你需要考虑 C 指针引用的数据块何时释放的问题。当然,如果你只是将 skynet.pack 填在消息 ---- 处理框架里时,框架解决了这个管理问题。skynet 将 C 指针发送到其他服务,而接收方会在使用完 ---- 后释放这个指针。 ----@vararg any ----@return lightuserdata, number -function skynet.pack(...) -end - ----* 将 Lua 多个数据打包成一个 Lua 字符串 ----* 这里不用考虑内存何时释放的问题,而 skynet.pack 如果在消息框架外调用就需要 ----@vararg any ----@return string -function skynet.packstring(...) -end - ----* 将 C 指针 或字符串转换成 Lua 数据 ----@param msg lightuserdata | string ----@param sz? number ----@return any ... -function skynet.unpack(msg, sz) -end - ----* 将 C 指针转换成 Lua 字符串 ----@param msg lightuserdata|string ----@param sz number #如果是传递的 string,则不需要 此参数 ----@return string -function skynet.tostring(msg, sz) -end - ----# 将 C 指针释放 ----@param msg lightuserdata ----@param sz number -function skynet.trash(msg, sz) -end - ------------------- 消息推送和远程调用 API ----------------- - ----* **非阻塞API** ----* 这条 API 可以把一条类别为 typename 的消息发送给 address 。它会先经过事先注册的 pack 函数打包 ... 的内容。 ----* 实际上也是利用了 c.send 不过传送的会话ID是0 ----* 接收端接收完毕消息后,默认情况下,消息会由 skynet 释放。 ---- 具体可以查看 skynet-server.c 中的 dispatch_message 的代码 ----@param addr SERVICEADDR ----@param typename string @类型名 ----@vararg any @传输的数据 -function skynet.send(addr, typename, ...) -end - ----* 向一个服务发送消息 ----* 它和 skynet.send 功能类似,但更细节一些。它可以指定发送地址(把消息源伪装成另一个服务),指定发送的消息的 session 。 ----* 注:address 和 source 都必须是数字地址,不可以是别名。 ----* skynet.redirect 不会调用 pack ,所以这里的 ... 必须是一个编码过的字符串,或是 userdata 加一个长度。 ----@param address number @目标服务地址 ----@param source number @伪装的源地址 ----@param typename string @类型名 ----@param session number @会话ID ----@vararg any @传输的数据 -function skynet.redirect(address, source, typename, session, ...) -end - ----* 向一个服务发送不打包的消息 ----@param addr SERVICEADDR @目标服务地址 ----@param typename string @类型名 ----@param msg lightuserdata ----@param sz? number -function skynet.rawsend(addr, typename, msg, sz) -end - ----* **阻塞API** ----* 向一个服务发送消息,并期待得到响应,用了此函数后,当前的线程会挂起,直到响应到达 ----* 若长时间没有响应,会有警告在控制台显示 ----* **挂起期间,状态可能会变更,造成重入** ----* 实际上,他也是利用 c.send 来发送消息,不过传送的会话 ID 是nil,会由引擎来生成这个会话ID ----@param addr SERVICEADDR @目标服务地址 ----@param typename string @类型名 ----@vararg any @传输的数据 ----@return ... -function skynet.call(addr, typename, ...) -end - ----* **阻塞API** ----* 向一个服务,不打包发送数据,并期待得到响应 ----* 收到回应后,也不走 unpack 流程。 ----* 调用了此函数后,当前的线程会挂起,直到响应到达 ----* 挂起期间,状态可能会变更,造成重入 ----@param addr SERVICEADDR @目标服务地址 ----@param typename string @类型名 ----@param msg lightuserdata|string ----@param sz? number -function skynet.rawcall(addr, typename, msg, sz) -end - ---- https://blog.codingnow.com/2020/09/skynet_select.html ----@class request -local request = {} -request.__call = request.add - ----@param obj table # {addr, typename, ...} -function request:add(obj) -end - -function request:close() -end - -function request:select(timeout) -end - ----@param obj? table ----@return request -function skynet.request(obj) -end - ----* 返回一个唯一的会话ID ----@return number -function skynet.genid() -end - ----带跟踪的发送一条消息 ----@param tag string ----@param addr SERVICEADDR ----@param typename string ----@param msg lightuserdata ----@param sz number -function skynet.tracecall(tag, addr, typename, msg, sz) -end - ----------------- 服务的启动和退出API --------------- - ----* 为 snlua 服务注册一个启动函数,在 Lua 加载完服务脚本后,并不会立即进行执行,而是会注册一个 0 的定时器,再回来执行。 ----* 执行时,这个启动函数会在 skynet.init 注册的函数之后执行 ----* 这个函数执行完毕后,方可收发消息 ----* 注意,这个函数才会设置 snlua 服务的消息处理回调函数 skynet.dispatch_message,若在此之前就进行调用阻塞API,可能会卡住。 ----* 这是因为,消息回调处理函数才会唤醒挂起的协程 ----* **但是,不要在此函数外面调用 skynet 的阻塞 API ,因为框架将无法唤醒它们。** ----@param start_func fun() -function skynet.start(start_func) -end - ----* 初始化服务,执行 skynet.init 注册的函数 和 start 函数,并向 .launcher 上报结果 ----* 一般不直接使用,而是由 skynet.start 调用 ----@param start fun() -function skynet.init_service(start) -end - ----* 注册一个在 start_func 执行前的执行的函数 ----@param fun fun() -function skynet.init(fun) -end - ---- 用于退出当前的服务。skynet.exit 之后的代码都不会被运行。而且,当前服务被阻塞住的 coroutine 也会立刻中断退出。这些通常是一些 RPC 尚未收到回应。所以调用 skynet.exit() 请务必小心。 -function skynet.exit() -end - ---- 用于启动一个新的 Lua 服务。name 是脚本的名字(不用写 .lua 后缀)。只有被启动的脚本的 start 函数返回后,这个 API 才会返回启动的服务的地址,这是一个阻塞 API 。如果被启动的脚本在初始化环节抛出异常,或在初始化完成前就调用 skynet.exit 退出,skynet.newservice 都会抛出异常。如果被启动的脚本的 start 函数是一个永不结束的循环,那么 newservice 也会被永远阻塞住。 ---- > 启动参数其实是以字符串拼接的方式传递过去的。所以不要在参数中传递复杂的 Lua 对象。接收到的参数都是字符串,且字符串中不可以有空格(否则会被分割成多个参数)。这种参数传递方式是历史遗留下来的,有很多潜在的问题。目前推荐的惯例是,让你的服务响应一个启动消息。在 newservice 之后,立刻调用 skynet.call 发送启动请求。 ----@param name string #脚本名字 ----@vararg string|number #可选参数 -function skynet.newservice(name, ...) -end - ---- 启动一个全局唯一服务 ----* global 为 true 表示启动全局服务 ,信息从后面参数获取 ----* global 为其他的,表示在本地启动一个本地唯一的服务,global 就代表了服务名 ----@param global boolean|string ----@vararg any -function skynet.uniqueservice(global, ...) -end - ---- 查询一个全局服务 ----* global 为 true 表示启动全局服务 ,信息从后面参数获取 ----* global 为其他的,表示在本地启动一个本地唯一的服务,global 就代表了服务名 ----@param global boolean|string ----@vararg any -function skynet.queryservice(global, ...) -end - ------------------- 时钟和线程 ------------------------ - ----* 将返回 skynet 节点进程内部时间。这个返回值的数值不是真实时间, 本身意义不大。 ----* 不同节点在同一时刻取到的值也不相同。只有两次调用的差值才有意义。用来测量经过的时间, 单位是 1/100秒。 ----* **(注意:这里的时间片表示小于skynet内部时钟周期的时间片,假如执行了比较费时的操作如超长时间的循环,或者调用了外部的阻塞调用,** ----* **如os.execute('sleep 1'), 即使中间没有skynet的阻塞api调用,两次调用的返回值还是会不同的.)** ----@return number -function skynet.now() -end - ----* 如果你需要做性能分析,可以使用 skynet.hpc ,它会返回精度为 ns (1000000000 分之一 秒)的 64 位整数。 ----@return number -function skynet.hpc() -end - ----* 返回 skynet 节点进程启动的 UTC 时间,以秒为单位 ----@return number -function skynet.starttime() -end - ----返回以秒为单位(精度为小数点后两位)的 UTC 时间。它时间上等价于:skynet.now()/100 + skynet.starttime() ----@return number -function skynet.time() -end - ----* 相当于 skynet.sleep(0) 。 ----* 交出当前服务对 CPU 的控制权。通常在你想做大量的操作,又没有机会调用阻塞 API 时,可以选择调用 yield 让系统跑的更平滑。 -function skynet.yield() -end - ----* 让框架在 ti 个单位时间后,调用 func 这个函数。 ----* 这不是一个阻塞 API ,当前 coroutine 会继续向下运行,而 func 将来会在新的 coroutine 中执行。 ----* skynet 的定时器实现的非常高效,所以一般不用太担心性能问题。不过,如果你的服务想大量使用定时器的话,可以考虑一个更好的方法: ----* 即在一个service里,尽量只使用一个 skynet.timeout ,用它来触发自己的定时事件模块。 ----* 这样可以减少大量从框架发送到服务的消息数量。毕竟一个服务在同一个单位时间能处理的外部消息数量是有限的。 ----* 事实上,这个 API 相当于向引擎 调用 skynet.send 发送了一个请求,会由请求在定时器超时后进行响应, ----@param ti number @ ti 的单位是 0.01秒 ----@param func fun() @回调函数 -function skynet.timeout(ti, func) -end - ----* **阻塞API** ----* 将当前 coroutine 挂起 ti 个单位时间。一个单位是 1/100 秒。 ----* 它是向框架注册一个定时器实现的。框架会在 ti 时间后,发送一个定时器消息来唤醒这个 coroutine 。 ----* 这是一个阻塞 API 。它的返回值会告诉你是时间到了,还是被 skynet.wakeup 唤醒 (返回 "BREAK")。 ----@param ti number ti*0.01s ----@param token? any 默认coroutine.running() -function skynet.sleep(ti, token) -end - ----* skynet.wait(token) 把当前 coroutine 挂起,之后由 skynet.wakeup 唤醒。 ----* 将当前线程移入 sleep 队列 ----* token 必须是唯一的,默认为 coroutine.running() 。 ----@param token any -function skynet.wait(token) -end - ----* skynet.wakeup(token) 唤醒一个被 skynet.sleep 或 skynet.wait 挂起的 coroutine 。 ----* 这会将一个处于 挂起状态,sleep 队列中的线程移到待唤醒的队列中,一旦主线程有一个挂起其他线程的操作,就会进行唤醒。 ----* 在 1.0 版中 wakeup 不保证次序,目前的版本则可以保证。 -function skynet.wakeup(token) -end - ----* skynet.fork(func, ...) 从功能上,它等价于 skynet.timeout(0, function() func(...) end) ----* 但是比 timeout 高效一点。因为它并不需要向框架注册一个定时器。 ----* fork 出来的线程的执行时机,是在处理完一条消息时。(skynet.start 内调用此 API 可以保证被触发执行,因为 start 注册的函数是以定时器的形式触发执行的) ----@param func function ----@vararg any -function skynet.fork(func, ...) -end - --------------- 日志跟踪 API ------------- - ----* 写日志 ----@vararg any -function skynet.error(...) -end - ----跟踪一条消息的处理 ----* tag = string.format(":%08x-%d",skynet.self(), traceid ----@param info string notifymsg -function skynet.trace(info) -end - ----返回当前线程的 trace tag ----* tag = string.format(":%08x-%d",skynet.self(), traceid ----@return string -function skynet.tracetag() -end - ----是否打开超时跟踪 ----@param on boolean -function skynet.trace_timeout(on) -end - ----设置消息类型的跟踪标志 ----* true: force on ----* false: force off ----* nil: optional (use skynet.trace() to trace one message) ----@param prototype string|number ----@param flag? boolean -function skynet.traceproto(prototype, flag) -end - ------------------ 其他 API ------------- ----设置回调 ----@param fun function ----@param forward boolean @设置是否是进行转发,如果是 true 那消息将不会由 skynet 释放 -function skynet.callback(fun, forward) - -end - ----干掉一个线程 ----@param thread string | table -function skynet.killthread(thread) -end - ----获取我们为 skynet 设置的环境变量 ----@param key string ----@return any -function skynet.getenv(key) -end - ----为 skynet 设置的环境变量 ----@param key string ----@param value any -function skynet.setenv(key, value) -end - ----返回当前线程的会话ID和协程地址 ----@return number co_session, number co_address -function skynet.context() -end - -----------------------状态相关 API ------------------ ----是否 (c.intcommand("STAT", "endless") == 1) -function skynet.endless() -end - ---- 返回队列长度 c.intcommand("STAT", "mqlen") ----@return number -function skynet.mqlen() -end - ---- 返回状态信息 c.intcommand("STAT", what) ---- 可以返回当前服务的性能统计信息,what 可以是以下字符串。 ----* "mqlen" 消息队列中堆积的消息数量。如果消息是均匀输入的,那么 mqlen 不断增长就说明已经过载。你可以在消息的 dispatch 函数中首先判断 mqlen ,在过载发生时做一些处理(至少 log 记录下来,方便定位问题)。 ----* "cpu" 占用的 cpu 总时间。需要在 [[Config]] 配置 profile 为 true 。 ----* "message" 处理的消息条数 ----@param what string -function skynet.stat(what) -end - ----返回任务信息 ----这里说的任务是指:服务发出了请求,但未收到响应,已挂起的协程 ----当参数ret的值为: ---- nil: 返回挂起的协程数量 ---- "init": 返回 traceback(init_thread) ---- table: 所有挂起协程的状态信息 ---- number :代表一个会话ID,显示此会话状态信息 ---- thread: 某个协程的信息 ----@param ret nil|number|table|string -function skynet.task(ret) -end - -function skynet.uniqtask() -end - -function skynet.term(service) -end - ---- 只能调用一次,设置 lua 最多使用的内存字节属 ----@param bytes integer -function skynet.memlimit(bytes) -end - -------------------以下是属于 skynet.manager 中的 api - ----* **skynet.manager API** ----* 启动一个C 服务,具体参数要看 C服务是怎么编写的 ----@vararg any -function skynet.launch(...) -end - ----* **skynet.manager API** ---- 可以用来强制关闭别的服务。但强烈不推荐这样做。因为对象会在任意一条消息处理完毕后,毫无征兆的退出。所以推荐的做法是,发送一条消息,让对方自己善后以及调用 skynet.exit 。注:skynet.kill(skynet.self()) 不完全等价于 skynet.exit() ,后者更安全。 ----@param name number|string -function skynet.kill(name) -end - ----* **skynet.manager API** ----* 向引擎发送一个 ABORT 命令,退出自身服务 -function skynet.abort() -end - ----* **skynet.manager API** ----* 给服务注册一个名字 ----@param name string -function skynet.register(name) -end - ----* **skynet.manager API** ----* 给服务命名 以 . 开头的名字是在同一 skynet 节点下有效的 ----* skynet.name(name, skynet.self()) 和 skynet.register(name) 功能等价。 ----@param name string ----@param handle number -function skynet.name(name, handle) -end - ----* **skynet.manager API** ----* 将本服务实现为消息转发器,对一类消息进行转发 ----* 设置指定类型的消息,不由 skynet 框架释放 ----* 对于在 map 中的消息,不进行释放 ----* 不在 map 中的消息,由 此函数中调用 skynet.trash 进行释放 ----@param map table ----@param start_func function -function skynet.forward_type(map, start_func) -end - ----* **skynet.manager API** ----过滤消息再处理。(注:filter 可以将 type, msg, sz, session, source 五个参数先处理过再返回新的 5 个参数。) ----@param f any ----@param start_func any -function skynet.filter(f, start_func) -end - ----* **skynet.manager API** ----给当前 skynet 进程设置一个全局的服务监控。 ----@param service any ----@param query any -function skynet.monitor(service, query) -end - ------------------------debug API-------------- ----注册一个响应 debug console 中 info 命令的函数 ----* 这个 API 不是由 skynet 模块定义,而是将 skynet 模块传递给 skynet.debug 模块后,由 skynet.debug 模块类似 mixin 的形式定义的 ----@param fun fun() -function skynet.info_func(fun) - -end - -return skynet diff --git a/meta/3rd/skynet/library/skynet/cluster.lua b/meta/3rd/skynet/library/skynet/cluster.lua deleted file mode 100644 index 2b12b15b..00000000 --- a/meta/3rd/skynet/library/skynet/cluster.lua +++ /dev/null @@ -1,52 +0,0 @@ ----@meta ----* cluster 相关的库 ----* 这个库,使用了一个叫 clusterd 的服务来进行工作 ----@class cluster -local cluster = {} - ----* 对某个节点上的服务传输消息 ----@param node string @配置中给出的节点名 ----@param address string | number @推荐使用 . 开头本地服务名,因为没有必要再用 master/slave 模式 ----@varargs any @传输数据 -function cluster.call(node, address, ...) -end ----* 对某个节点上的服务传输消息 ----* 越节点推送消息有丢失消息的风险。因为 cluster 基于 tcp 连接,当 cluster 间的连接断开,cluster.send 的消息就可能丢失。而这个函数会立刻返回,所以调用者没有机会知道发送出错。 ----@param node string @配置中给出的节点名 ----@param address string | number @推荐使用 . 开头本地服务名,因为没有必要再用 master/slave 模式 ----@varargs any @传输数据 -function cluster.send(node, address, ...) -end ----* 打开节点 ----* 如果参数是一个节点名,那么会从配置文件中加载的名称对应的IP和端口进行监听 ----* 实际上就是开了一个 gate 服务,监听套接字 ----@param port string | number @节点名或者是端口号 -function cluster.open(port) -end ----* 重新加载节点配置信息 ----* Cluster 是去中心化的,所以需要在每台机器上都放置一份配置文件(通常是相同的)。 ----* 通过调用 cluster.reload 可以让本进程重新加载配置。 ----* 如果你修改了每个节点名字对应的地址,那么 reload 之后的请求都会发到新的地址。 ----* 而之前没有收到回应的请求还是会在老地址上等待。如果你老的地址已经无效(通常是主动关闭了进程)那么请求方会收到一个错误。 ----@param config table @ 名称=IP:端口键值对 -function cluster.reload(config) -end ----* 为某个节点上的服务生成一个代理服务 clusterproxy ----@param node string ----@param name string -function cluster.proxy(node, name) -end -function cluster.snax(node, name, address) -end ----* 可以把 addr 注册为 cluster 可见的一个字符串名字 name 。如果不传 addr 表示把自身注册为 name 。 ----@param name string ----@param addr number -function cluster.register(name, addr) -end ----* 查询节点上服务的地址 ----@param node string ----@param name string ----@return number -function cluster.query(node, name) -end -return cluster diff --git a/meta/3rd/skynet/library/skynet/crypt.lua b/meta/3rd/skynet/library/skynet/crypt.lua deleted file mode 100644 index 17e51631..00000000 --- a/meta/3rd/skynet/library/skynet/crypt.lua +++ /dev/null @@ -1,90 +0,0 @@ ----@meta ----@class crypt -local crypt = {} - ----计算 hash ----@param key any ----@return string -function crypt.hashkey(key) -end ----生成一个8位的 key ----@return string -function crypt.randomkey() -end ----des 加密 ----@param key number ----@param data string ----@param padding number | nil @对齐模式 默认 iso7816_4 ----@return string -function crypt.desencode(key, data, padding) -end ----desc 解密 ----@param key number ----@param data string ----@param padding number | nil @对齐模式 默认 iso7816_4 ----@return string -function crypt.desdecode(key, data, padding) -end ----hex 编码 ----@param data string ----@return string -function crypt.hexencode(data) -end ----hex 解码 ----@param data string ----@return string -function crypt.hexdecode(data) -end ----hmac 签名 ----@param challenge string @挑战消息 ----@param secret string @密钥 ----@return string -function crypt.hmac64(challenge, secret) -end ----hmac md5签名 ----@param msg string ----@param secret string ----@return string -function crypt.hmac64_md5(msg, secret) -end ----dh交换 ----@param key string ----@return string -function crypt.dhexchange(key) -end ----密钥计算 ----@param dhkey string @经过 exchange 后的密钥 ----@param selfkey string @原始 -function crypt.dhsecret(dhkey, selfkey) -end ----base64编码 ----@param msg string ----@return string -function crypt.base64encode(msg) -end ----base64解码 ----@param msg string ----@return string -function crypt.base64decode(msg) -end ----sha1 ----@param msg string ----@return string -function crypt.sha1(msg) -end -function crypt.hmac_sha1() -end ----hmac hash ----@param key string ----@param msg string ----@return string -function crypt.hmac_hash(key, msg) -end ----xor 字符串 ----@param s1 string ----@param key string ----@return lightuserdata -function crypt.xor_str(s1, key) -end - -return crypt diff --git a/meta/3rd/skynet/library/skynet/db/mongo.lua b/meta/3rd/skynet/library/skynet/db/mongo.lua deleted file mode 100644 index ca24493c..00000000 --- a/meta/3rd/skynet/library/skynet/db/mongo.lua +++ /dev/null @@ -1,221 +0,0 @@ ----@meta -local mongo = {} - ----@class mongo_client ----@field host string ----@field port number ----@field username string ----@field password string ----@field authdb string ----@field authmod string ----@field __id number ----@field __sock socketchannel -local mongo_client = {} - ----@class mongo_db ----@field connection mongo_client ----@field name string ----@field full_name string ----@field database mongo_db ----@field _cmd string dbname.$cmd -local mongo_db = {} - ----@class mongo_collection ----@field connection mongo_client ----@field name string ----@field full_name string ----@field database boolean -local mongo_collection = {} - ----@class mongo_cursor -local mongo_cursor = {} ----建立一个客户端 ----@param conf table {host, port, username, password, authdb, authmod} ----@return mongo_client -function mongo.client(conf) -end ----获取一个 mongo_db 对象 ----@param dbname string ----@return mongo_db -function mongo_client:getDB(dbname) -end - ----断开连接 -function mongo_client:disconnect() -end ----以 self.admin:runCommand(...) 来执行命令 -function mongo_client:runCommand(...) -end - ----退出登录 -function mongo_client:logout() -end - ----验证登录 ----@param user string ----@param pass string -function mongo_db:auth(user, pass) - -end ----执行命令,命令的格式需要参考 [https://docs.mongodb.com/manual/reference/command/](https://docs.mongodb.com/manual/reference/command/), ----命令的键要单独分开来放,如 mongo_db:runCommand('find','account','limit','1') -function mongo_db:runCommand(cmd, cmd_v, ...) -end ----获取集合 ----@param collection string ----@return mongo_collection -function mongo_db:getCollection(collection) -end ----获取集合 ----@param collection string ----@return mongo_collection -function mongo_collection:getCollection(collection) -end - ----向集合插入文档 ----@param doc table -function mongo_collection:insert(doc) -end ----向集合安全的插入数据 ----@param doc table ----@return boolean ok #是否成功 ----@return string|nil err #错误消息 ----@return table r #成功时表示返回的数据,失败时表示错误的详细信息 -function mongo_collection:safe_insert(doc) -end - ----插入批量数据 ----@param docs table[] -function mongo_collection:batch_insert(docs) - -end ----安全插入批量数据 ----@param docs table[] ----@return boolean ok #是否成功 ----@return string|nil err #错误消息 ----@return table r #成功时表示返回的数据,失败时表示错误的详细信息 -function mongo_collection:safe_batch_insert(docs) - -end ----更新数据 ----@param selector table ----@param update table ----@param upsert boolean ----@param multi boolean -function mongo_collection:update(selector, update, upsert, multi) - -end ----安全更新数据 ----@param selector table ----@param update table ----@param upsert boolean #没有数据是否插入 ----@param multi boolean #是否更新多行 ----@return boolean ok #是否成功 ----@return string|nil err #错误消息 ----@return table r #成功时表示返回的数据,失败时表示错误的详细信息 -function mongo_collection:safe_update(selector, update, upsert, multi) - -end - ----删除数据 ----@param selector table ----@param single boolean -function mongo_collection:delete(selector, single) - -end ----安全删除数据 ----@param selector table ----@param single boolean ----@return boolean ok #是否成功 ----@return string err #错误消息 ----@return table r #错误返回数据 -function mongo_collection:safe_delete(selector, single) - -end ----查找数据,返回的是一个游标,我们需要遍历游标才能获取所有返回 ----@param query table ----@param selector table ----@return mongo_cursor -function mongo_collection:find(query, selector) - -end ----@param query table ----@param selector table ----@return table -function mongo_collection:findOne(query, selector) - -end - ----建立索引 ----* collection:createIndex { { key1 = 1}, { key2 = 1 }, unique = true } ----* or collection:createIndex { "key1", "key2", unique = true } ----* or collection:createIndex( { key1 = 1} , { unique = true } ) -- For compatibility ----@param arg1 table ----@param arg2? table -function mongo_collection:createIndex(arg1, arg2) - -end ----建立多个索引 ----@vararg table -function mongo_collection:createIndexs(...) - -end -mongo_collection.ensureIndex = mongo_collection.createIndex - ----删除集合 -function mongo_collection:drop() - -end ---- 删除索引 ----* collection:dropIndex("age_1") ----* collection:dropIndex("*") ----@param indexName string -function mongo_collection:dropIndex(indexName) - -end - ----查找并修改 ----* collection:findAndModify({query = {name = "userid"}, update = {["$inc"] = {nextid = 1}}, }) ----* keys, value type ----* query, table ----* sort, table ----* remove, bool ----* update, table ----* new, bool ----* fields, bool ----* upsert, boolean ----@param doc table -function mongo_collection:findAndModify(doc) - -end - ----排序 ----* cursor:sort { key = 1 } or cursor:sort( {key1 = 1}, {key2 = -1}) ----@param key table ----@param key_v table -function mongo_cursor:sort(key, key_v, ...) -end ----跳过多少行 ----@param amount number -function mongo_cursor:skip(amount) -end ----限制行数 ----@param amount number -function mongo_cursor:limit(amount) -end ----统计行数 ----@param with_limit_and_skip? boolean -function mongo_cursor:count(with_limit_and_skip) -end ----是否有下一行 ----@return boolean -function mongo_cursor:hasNext() -end ----下一行 ----@return table -function mongo_cursor:next() -end ----关闭游标 -function mongo_cursor:close() -end -return mongo diff --git a/meta/3rd/skynet/library/skynet/db/mysql.lua b/meta/3rd/skynet/library/skynet/db/mysql.lua deleted file mode 100644 index 330ed379..00000000 --- a/meta/3rd/skynet/library/skynet/db/mysql.lua +++ /dev/null @@ -1,54 +0,0 @@ ----@meta ----@class MySQL -local _M = {} - ----comment ----@param opts table {database,user, password,charset,host, port, overload} ----@return MySQL -function _M.connect(opts) -end -function _M:disconnect() -end ----@param query string ----@return boolean #whether ok ----@return table # error description table or rows list -function _M:query(query) -end - ----@class STMT ----@field prepare_id number ----@field field_count integer ----@field param_count integer ----@field warning_count integer ----@field params table ----@field fields table -local STMT = {} ----@param sql string ----@return boolean #whether ok ----@return STMT|table # error description table or STMT -function _M:prepare(sql) -end - ----@param stmt STMT ----@param ... any ----@return boolean #whether ok ----@return table # error description table or rows list -function _M:execute(stmt, ...) -end ----@param stmt STMT ----@return boolean #whether ok ----@return table # error description table or rows list -function _M:stmt_reset(stmt) -end ----@param stmt STMT -function _M:stmt_close(stmt) -end -function _M:ping() -end -function _M.server_ver() -end -function _M.quote_sql_str(str) -end -function _M:set_compact_arrays(value) -end -return _M diff --git a/meta/3rd/skynet/library/skynet/db/redis.lua b/meta/3rd/skynet/library/skynet/db/redis.lua deleted file mode 100644 index 0d807c25..00000000 --- a/meta/3rd/skynet/library/skynet/db/redis.lua +++ /dev/null @@ -1,82 +0,0 @@ ----@meta -local redis = {} - ----@class redisconfig ----@field host string ----@field port integer ----@field overload boolean ----@field auth table ----@field db integer ----@field username? string - ----一个 Redis 连接,返回这个 Command 对象。当在此对象上执行指令时,若指令不存在,会在第一次执行的时候构造 ----指令对象的方法。 ----指令的参数的第一个可以是 nil, 也可以是 table,还可以有多个参数。 ----异步形式,底层用 socketchannel 进行通信,这点要注意。 ----更多命令查看 [https://www.redis.com.cn/commands.html](https://www.redis.com.cn/commands.html) ----@see socketchannel ----@class command -local command = {} -function command:disconnect() -end - ----Is key exists ----@param k string ----@return boolean -function command:exists(k) -end - ----Does value is a member of set key. ----@param key string #key of a set ----@param value string #value -function command:sismember(key, value) -end - ----Pipline command ----If resp is a table and exits, return boolean, resp. ----Or return the last result. boolean, out ----@param ops string[] ----@param resp? table -function command:pipeline(ops, resp) -end - ---- watch mode, only can do SUBSCRIBE, PSUBSCRIBE, UNSUBSCRIBE, PUNSUBSCRIBE, PING and QUIT command. ---- we can call watch:message in endless loop. ----@class watch -local watch = {} -function watch:disconnect() -end - ----阻塞模式读取消息 -function watch:message() -end - ----subscribe channel -function watch:subscribe(...) -end - ----pattern subscribe channels -function watch:psubscribe(...) -end - ----unsubscribe -function watch:unsubscribe(...) -end - ----punsubscribe -function watch:punsubscribe(...) -end - ----connect to redis server ----@param conf redisconfig ----@return command -function redis.connect(conf) -end - ----connect to redis server on watch mode ----@param conf redisconfig ----@return watch -function redis.watch(conf) -end - -return redis diff --git a/meta/3rd/skynet/library/skynet/debug.lua b/meta/3rd/skynet/library/skynet/debug.lua deleted file mode 100644 index 02032649..00000000 --- a/meta/3rd/skynet/library/skynet/debug.lua +++ /dev/null @@ -1,17 +0,0 @@ ----@meta ----@class debug -local debug = {} - ----初始化 debug ----@param skynet table ----@param export table -function debug.init(skynet, export) - -end ----注册一个 debug 指令函数 ----@param name string ----@param fn fun() -function debug.reg_debugcmd(name, fn) - -end -return debug diff --git a/meta/3rd/skynet/library/skynet/habor.lua b/meta/3rd/skynet/library/skynet/habor.lua deleted file mode 100644 index b5b0484d..00000000 --- a/meta/3rd/skynet/library/skynet/habor.lua +++ /dev/null @@ -1,27 +0,0 @@ ----@meta ----* 多节点相关的 API ----@class harbor -local harbor = {} - ----* 注册一个全局名字。如果 handle 为空,则注册自己。skynet.name 和 skynet.register 是用其实现的。 ----@param name string @服务名称 ----@param handle number | nil @服务地址,可为空,表示注册自己 -function harbor.globalname(name, handle) -end ----* 可以用来查询全局名字或本地名字对应的服务地址。它是一个阻塞调用。 ----@param name string -function harbor.queryname(name) -end ----* 用来监控一个 slave 是否断开。如果 harbor id 对应的 slave 正常,这个 api 将阻塞。当 slave 断开时,会立刻返回。 ----@param id number @harbor id -function harbor.link(id) -end ----* 和 harbor.link 相反。如果 harbor id 对应的 slave 没有连接,这个 api 将阻塞,一直到它连上来才返回。 ----@param id number @harbor id -function harbor.connect(id) -end ----* 用来在 slave 上监控和 master 的连接是否正常。这个 api 多用于异常时的安全退出(因为当 slave 和 master 断开后,没有手段可以恢复)。 -function harbor.linkmaster() -end - -return harbor diff --git a/meta/3rd/skynet/library/skynet/muliticast.lua b/meta/3rd/skynet/library/skynet/muliticast.lua deleted file mode 100644 index 9924891e..00000000 --- a/meta/3rd/skynet/library/skynet/muliticast.lua +++ /dev/null @@ -1,24 +0,0 @@ ----@meta ----* 此模块使用了一个唯一服务 multicastd 来进行通信 ----@class multicast -local multicast = {} - ----@class channel_meta ----@field delete fun() @删除频道自身 ----@field publish fun(...) @发布消息 ----@field subscribe fun() @订阅频道,这个必须调用之后才能收到消息 ----@field unsubscribe fun() @取消订阅 - ----@class multicastchannel : channel_meta ----@field channel number @频道ID ----@field __pack fun(...) @打包函数 默认 skynet.pack ----@field __unpack fun(...) @解包函数 默认 skynet.unpack ----@field __dispatch fun(...) @分发函数 - ----新建频道 ----@param conf table ----@return multicastchannel -function multicast.new(conf) -end - -return multicast diff --git a/meta/3rd/skynet/library/skynet/netpack.lua b/meta/3rd/skynet/library/skynet/netpack.lua deleted file mode 100644 index fb0455fe..00000000 --- a/meta/3rd/skynet/library/skynet/netpack.lua +++ /dev/null @@ -1,43 +0,0 @@ ----@meta ----*网络数据打包解包模块 ----*每个包就是 2 个字节 + 数据内容。这两个字节是 Big-Endian 编码的一个数字。数据内容可以是任意字节。 ----@class netpack -local netpack = {} - ----进行分包处理事件判断 ----* netpack的使用者可以通过filter返回的type来分别进行事件处理。 ----* 会返回 data, more, error, open, close, warning 表示事件类型及每个事件需要的参数 ----* 对于SOCKET_DATA事件,filter会进行数据分包,如果分包后刚好有一条完整消息,filter返回的type为”data”,其后跟fd msg size。 如果不止一条消息,那么数据将被依次压入queue参数中,并且仅返回一个type为”more”。 queue是一个userdata,可以通过netpack.pop 弹出queue中的一条消息。 ----* 其余type类型”open”,”error”, “close”分别SOCKET_ACCEPT, SOCKET_ERROR, SOCKET_CLOSE事件。 ----* netpack会尽可能多地分包,交给上层。并且通过一个哈希表保存每个套接字ID对应的粘包,在下次数据到达时,取出上次留下的粘包数据,重新分包. ----@param queue userdata @一个存放消息的队列 ----@param msg lightuserdata @收到的数据 ----@param sz number @收到的数据长度 ----@return string -function netpack.filter(queue, msg, sz) -end ----从队列中弹出一条消息 ----@param queue userdata ----@return fd, msg, sz -function netpack.pop(queue) -end ----* 把一个字符串(或一个 C 指针加一个长度)打包成带 2 字节包头的数据块。 ----* 这和我们我们用 string.pack('>I2') 打包字符串长度,再连上字符串是一样的,不过,这样打包后是在,string pack 是在 Lua 管理,而不是 C 管理 ----* 这个 api 返回一个lightuserdata 和一个 number 。你可以直接送到 socket.write 发送(socket.write 负责最终释放内存)。 ----@param msg string | lightuserdata @当是 lightuserdata 的时候,需要指定 sz ----@param sz number | nil @当是一个字符串的时候,不需要这个参数 ----@return lightuserdata,number -function netpack.pack(msg, sz) -end ----清除一个队列 ----@param queue any -function netpack.clear(queue) -end ----把 handler.message 方法收到的 msg,sz 转换成一个 lua string,并释放 msg 占用的 C 内存。 ----@param msg any ----@param sz any ----@return string -function netpack.tostring(msg, sz) -end - -return netpack diff --git a/meta/3rd/skynet/library/skynet/profile.lua b/meta/3rd/skynet/library/skynet/profile.lua deleted file mode 100644 index 24fa06b7..00000000 --- a/meta/3rd/skynet/library/skynet/profile.lua +++ /dev/null @@ -1,31 +0,0 @@ ----@meta ---- profile 模块可以帮助统计一个消息处理使用的系统时间 ---- 使用 skynet 内置的 profile 记时而不用系统带的 os.time 是因为 profile 可以剔除阻塞调用的时间,准确统计出当前 coroutine 真正的开销。 ---- > profile.start() 和 profile.stop() 必须在 skynet 线程中调用(记录当前线程),如果在 skynet [[Coroutine]] 中调用的话,请传入指定的 skynet 线程对象,通常可通过 skynet.coroutine.thread() 获得。 ---- 若是需要多服务的跟踪,请使用 ---- skynet.trace() 在一个消息处理流程中,如果调用了这个 api ,将开启消息跟踪日志。每次调用都会生成一个唯一 tag ,所有当前执行流,和调用到的其它服务,都会计入日志中。具体解释,可以参考 -local profile = {} - ----开始,返回的时间单位是 秒 ----@return number time -function profile.start() - -end ----结束,返回的时间单位是秒 ----@return number time -function profile.stop() - -end -function profile.resume() - -end -function profile.resume_co() - -end -function profile.yield() - -end -function profile.yield_co() - -end -return profile diff --git a/meta/3rd/skynet/library/skynet/sharedata.lua b/meta/3rd/skynet/library/skynet/sharedata.lua deleted file mode 100644 index 47417950..00000000 --- a/meta/3rd/skynet/library/skynet/sharedata.lua +++ /dev/null @@ -1,39 +0,0 @@ ----@meta -local sharedata = {} ----* 不可进行频繁的数据共享 ----* 在当前节点内创建一个共享数据对象。 ----* value 可以是一张 lua table ,但不可以有环。且 key 必须是字符串或 32bit 正整数。 ----* value 还可以是一段 lua 文本代码,而 sharedata 模块将解析这段代码,把它封装到一个沙盒中运行,最终取得它返回的 table。如果它不返回 table ,则采用它的沙盒全局环境。 ----* 如果 value 是一个以 @ 开头的字符串,这个字符串会被解释为一个文件名。sharedata 模块将加载该文件名指定的文件。 ----@param name string ----@param value table | string -function sharedata.new(name, value) -end ----* 更新当前节点的共享数据对象。 ----* 所有持有这个对象的服务都会自动去数据源头更新数据。但由于这是一个并行的过程,更新并不保证立刻生效。但使用共享数据的读取方一定能在同一个时间片(单次 skynet 消息处理过程)访问到同一版本的共享数据。 ----* 更新过程是惰性的,如果你持有一个代理对象,但在更新数据后没有访问里面的数据,那么该代理对象会一直持有老版本的数据直到第一次访问。这个行为的副作用是:老版本的 C 对象会一直占用内存。如果你需要频繁更新数据,那么,为了加快内存回收,可以通知持有代理对象的服务在更新后,主动调用 sharedata.flush() 。 ----@param name string ----@param value table | string -function sharedata.update(name, value) -end - ----通知代理对象来更新数据 ----一般在 update 后 -function sharedata.flush() -end - ----* 删除当前节点的共享数据对象。 ----@param name string -function sharedata.delete(name) -end ----深拷贝 ----@param name string ----@vararg string x.y.z -function sharedata.deepcopy(name, ...) -end - ----获取当前节点的共享数据对象。 -function sharedata.query(name) -end - -return sharedata diff --git a/meta/3rd/skynet/library/skynet/sharemap.lua b/meta/3rd/skynet/library/skynet/sharemap.lua deleted file mode 100644 index 9be19428..00000000 --- a/meta/3rd/skynet/library/skynet/sharemap.lua +++ /dev/null @@ -1,52 +0,0 @@ ----@meta ----@class sharemapwriter -local sharemapwriter = {} ----@class sharemapreader -local sharemapreader = {} ----* 一个使用 stm 模块实现的,用于在服务间共享数据的模块 ----* 这里使用了 sproto 来描述序列化数据 ----* 其内部引用了代表 Lua 的源数据 ----* 和由 stm 构造的 stmobj ----@class sharemap -local sharemap = {} ----* 注册 sproto 协议描述文件 -function sharemap.register(protofile) -end ----* 将 Lua 数据,按 sproto 描述中的 某一类型进行序列化后,构造 stm 对象 ----@param typename string ----@param obj any ----@return sharemapwriter -function sharemap.writer(typename, obj) -end ----* writer 实际上是将一分 Lua 数据,经过 sproto 序列化后,重新放到内存中 -function sharemap:commit() -end ----* writer 使用,生成一个指针,用来传递到其他服务 -function sharemap:copy() -end ----* reader 使用,若stm对象有更新,将内存重新序列化出来。 -function sharemap:update() -end ----* 为一 stm 对象构造一个 reader ----@param typename any ----@param stmcpy any ----@return sharemapreader -function sharemap.reader(typename, stmcpy) -end - ----@type stmobj -sharemapwriter.__obj = nil -sharemapwriter.__data = nil ----@type string -sharemapwriter.__typename = nil -sharemapwriter.copy = sharemap.copy -sharemapwriter.commit = sharemap.commit - -sharemapreader.__typename = nil ----@type stmobj -sharemapreader.__obj = nil ----反序列化后的数据 -sharemapreader.__data = nil ----* 调用此方法,会将内存中的数据重新序列化 -sharemapreader.__update = sharemap.update -return sharemap diff --git a/meta/3rd/skynet/library/skynet/sharetable.lua b/meta/3rd/skynet/library/skynet/sharetable.lua deleted file mode 100644 index b65a28f2..00000000 --- a/meta/3rd/skynet/library/skynet/sharetable.lua +++ /dev/null @@ -1,37 +0,0 @@ ----@meta ---- 一张表一旦被 query 一次,其数据的生命期将一直维持调用 query 的该服务退出。目前没有手段主动消除对一张共享表的引用。 ----@class sharetable -local sharetable = {} ----* 从一个源文件读取一个共享表,这个文件需要返回一个 table ,这个 table 可以被多个不同的服务读取。... 是传给这个文件的参数。 ----* 可以多次 load 同一个 filename 的表,这样的话,对应的 table 会被更新。使用这张表的服务需要调用 update 更新。 ----@param filename string ----@vararg any 传递的参数 ----@return table -function sharetable.loadfile(filename, ...) -end ----* 和 loadfile 类似,但是是从一个字符串读取。 ----* 推荐使用 sharetable.loadfile 创建这个共享表。 ----* 因为使用 sharetable.loadtable 会经过一次序列化和拷贝,对于太大的表,这个过程非常的耗时。 ----@param filename string ----@param source string ----@vararg any ----@return table -function sharetable.loadstring(filename, source, ...) -end ----* 直接将一个 table 共享。 ----@param filename string ----@param tbl table ----@return table -function sharetable.loadtable(filename, tbl) -end ----* 以 filename 为 key 查找一个被共享的 table 。 ----@param filename string ----@return table -function sharetable.query(filename) -end ----* 更新一个或多个 key 。 ----@vararg ... keys -function sharetable.update(...) -end - -return sharetable diff --git a/meta/3rd/skynet/library/skynet/socket.lua b/meta/3rd/skynet/library/skynet/socket.lua deleted file mode 100644 index 9f26c72e..00000000 --- a/meta/3rd/skynet/library/skynet/socket.lua +++ /dev/null @@ -1,141 +0,0 @@ ----@meta ----* 所谓阻塞模式,实际上是利用了 lua 的 coroutine 机制。当你调用 socket api 时,服务有可能被挂起(时间片被让给其他业务处理),待结果通过 socket 消息返回,coroutine 将延续执行。 ----* socketdrver 的 Lua 层表示 ----* 注意与 gateserver 的区别, 他们都会接管 socket 类型的消息 ----@class socket -local socket = {} ----* 作为客户端,连接到一个 IP和端口 ----* 会返回一个代表了 skynet 内部和系统套接字文件描述符相关的结构索引 ----@param addr string @可以是一个IPV4地址,也可以是 'ip:port' 这样的形式,这种形式下,就可以不指定 Port ----@param port number @端口 ----@return number @skynet对套接字描述符的表示 -function socket.open(addr, port) -end - ----* 绑定系统文件描述符 ----@param os_fd number ----@return number @skynet对套接字描述符的表示 -function socket.bind(os_fd) -end - ----* 等价于 socket.bind(0),绑定到标准输出 ----@return number @skynet对套接字描述符的表示 -function socket.stdin() -end - ----* accept 是一个函数。每当一个监听的 id 对应的 socket 上有连接接入的时候,都会调用 accept 函数。这个函数会得到接入连接的 id 以及 ip 地址。你可以做后续操作。 ----* 开始收发套接字数据,并设置一个回调 ----* 这个函数会将套接字索引与一个 Lua 的结构封装起来,并在协程内挂起 (skynet.wait) ----* 当有数据事件到达时,就会 skynet.wakeup 协程来 ----@param id number @skynet套接字索引 ----@param accept? fun(...) @事件回调函数,监听字才需要这个 ----@return number | nil, error -function socket.start(id, accept) -end - ----* 暂停收发一个套接字上的数据 ----@param id number @skynet套接字索引 -function socket.pause(id) -end - ----* 强行关闭一个连接。和 close 不同的是,它不会等待可能存在的其它 coroutine 的读操作。 ----* 一般不建议使用这个 API ,但如果你需要在 __gc 元方法中关闭连接的话,shutdown 是一个比 close 更好的选择(因为在 gc 过程中无法切换 coroutine) ----@param id number @skynet套接字索引 -function socket.shutdown(id) -end - ----* 在极其罕见的情况下,需要粗暴的直接关闭某个连接,而避免 socket.close 的阻塞等待流程,可以使用它。 ----@param id number @skynet套接字索引 -function socket.close_fd(id) -end - ----* 关闭一个连接,这个 API 有可能阻塞住执行流。因为如果有其它 coroutine 正在阻塞读这个 id 对应的连接,会先驱使读操作结束,close 操作才返回。 ----@param id number @skynet套接字索引 -function socket.close(id) -end - ----从一个 socket 上读 sz 指定的字节数。如果读到了指定长度的字符串,它把这个字符串返回。如果连接断开导致字节数不够,将返回一个 false 加上读到的字符串。如果 sz 为 nil ,则返回尽可能多的字节数,但至少读一个字节(若无新数据,会阻塞)。 ----@param id number @skynet套接字索引 ----@param sz number | nil @要读取的字节数,nil 尽可能多的读 ----@return string | nil, string -function socket.read(id, sz) -end - ----* 从一个 socket 上读所有的数据,直到 socket 主动断开,或在其它 coroutine 用 socket.close 关闭它。 ----@param id number @skynet套接字索引 ----@return buffer | nil, buffer -function socket.readall(id) -end - ----* 从一个 socket 上读一行数据。sep 指行分割符。默认的 sep 为 "\n"。读到的字符串是不包含这个分割符的。 ----@param id number @skynet套接字索引 ----@return buffer | nil, buffer -function socket.readline(id, sep) -end - ----* 等待一个 socket 可读 ----@param id number @skynet套接字索引 -function socket.block(id) -end - ----* 是否合法套接字 ----@param id number @skynet套接字索引 ----@return boolean -function socket.invalid(id) -end - ----* 是否已断开 ----@param id number @skynet套接字索引 ----@return boolean -function socket.disconnected(id) -end - ----* 监听一个端口,返回一个 id ,供 start 使用。 ----@param host string @地址,可以是 ip:port ----@param port? number @端口,可为 nil,此时从 host 内获取端口信息 ----@param backlog? number @队列长度 ----@return number @skynet套接字索引 -function socket.listen(host, port, backlog) -end - ----* 清除 socket id 在本服务内的数据结构,但并不关闭这个 socket 。这可以用于你把 id 发送给其它服务,以转交 socket 的控制权。 -function socket.abandon(id) -end - ----* 设置缓冲区大小 ----@param id number @skynet套接字索引 ----@param limit number @缓冲区大小 -function socket.limit(id, limit) -end - -function socket.udp(callback, host, port) -end - -function socket.udp_connect(id, addr, port, callback) -end - -function socket.warning(id, callback) -end - -function socket.onclose(id, callback) -end - ----* 把一个字符串置入正常的写队列,skynet 框架会在 socket 可写时发送它。 ----* 这和 socketdriver.send 是一个 ----@see socketdriver#send ----@param id number @skynet套接字索引 ----@param msg string @数据 ----@param sz? number @大小,如果是字符串则不需要 -function socket.write(id, msg, sz) -end - ----* 把字符串写入低优先级队列。如果正常的写队列还有写操作未完成时,低优先级队列上的数据永远不会被发出。只有在正常写队列为空时,才会处理低优先级队列。但是,每次写的字符串都可以看成原子操作。不会只发送一半,然后转去发送正常写队列的数据。 ----@param id number @skynet套接字索引 ----@param msg string @数据 -function socket.lwrite() -end - -function socket.header() -end - -return socket diff --git a/meta/3rd/skynet/library/skynet/socketchannel.lua b/meta/3rd/skynet/library/skynet/socketchannel.lua deleted file mode 100644 index d01ff4bb..00000000 --- a/meta/3rd/skynet/library/skynet/socketchannel.lua +++ /dev/null @@ -1,69 +0,0 @@ ----@meta ----socket channel 在创建时,并不会立即建立连接。如果你什么都不做,那么连接建立会推迟到第一次 request 请求时。这种被动建立连接的过程会不断的尝试,即使第一次没有连接上,也会重试。 ----@class socketchannel -local socket_channel = {} - ----创建一个新的套接字频道 ----返回结构: ----* { ----* __host = assert(desc.host), ----* __port = assert(desc.port), ----* __backup = desc.backup, ----* __auth = desc.auth, ----* __response = desc.response, -- It's for session mode ----* __request = {}, -- request seq { response func or session } -- It's for order mode ----* __thread = {}, -- coroutine seq or session->coroutine map ----* __result = {}, -- response result { coroutine -> result } ----* __result_data = {}, ----* __connecting = {}, ----* __sock = false, ----* __closed = false, ----* __authcoroutine = false, ----* __nodelay = desc.nodelay, ----* __overload_notify = desc.overload, ----* __overload = false, ----* } ----@param desc table {host, port, backup, auth, response, nodelay, overload} ----@return socketchannel -function socket_channel.channel(desc) - -end - ----连接频道 ----@param once boolean tryConnectOnceOrMulti -function socket_channel:connect(once) - -end - ----返回值 true 表示协议解析成功,如果为 false 表示协议出错,这会导致连接断开且让 request 的调用者也获得一个 error ----在 response 函数内的任何异常以及 sock:read 或 sock:readline 读取出错,都会以 error 的形式抛给 request 的调用者。 ----@alias ResponseFunction fun(sock:table): boolean, string - ----发送请求 ----@param request string binary 请求内容,若不填写 resonse,那么只发送而不接收 ----@param response? ResponseFunction 返回值 true 表示协议解析成功,如果为 false 表示协议出错,这会导致连接断开且让 request 的调用者也获得一个 error ----@param padding? table ----@return string # 是由 response 函数返回的回应包的内容(可以是任意类型) -function socket_channel:request(request, response, padding) -end - ----用来单向接收一个包。 ----`local resp = channel:response(dispatch)` 与 `local resp = channel:request(req, dispatch)` 等价 ----@param dispatch any -function socket_channel:response(dispatch) -end ----关闭频道 -function socket_channel:close() - -end ----改变目标主机[端口],打开状态会关闭 ----@param host string ----@param port? number -function socket_channel:changehost(host, port) -end ----改变备用 ----@param backup table -function socket_channel:changebackup(backup) -end -return socket_channel - diff --git a/meta/3rd/skynet/library/skynet/socketdriver.lua b/meta/3rd/skynet/library/skynet/socketdriver.lua deleted file mode 100644 index 0719136e..00000000 --- a/meta/3rd/skynet/library/skynet/socketdriver.lua +++ /dev/null @@ -1,158 +0,0 @@ ----@meta ----@class socketdriver -local socketdriver = {} ----* 作为客户端,连接到一个 IP和端口 ----* 会返回一个代表了 skynet 内部和系统套接字文件描述符相关的结构索引 ----@param addr string @可以是一个IPV4地址,也可以是 'ip:port' 这样的形式,这种形式下,就可以不指定 Port ----@param port number @端口 ----@return number @skynet对套接字描述符的表示 -function socketdriver.connect(addr, port) -end ----关闭连接 ----* close/shutdown 实际上都会构造指令发给 skynet 引擎,执行同一套逻辑 ----* 不同的是,如果是 shutdown 调用会强制关闭套接字 ----* 而 close 只会在没有更多需要发送的数据才会关闭 ----* 两个函数都会调用操作系统的系统调用 close ----@param id number @skynet对套接字描述符的表示 -function socketdriver.close(id) -end ----关闭连接 ----* close/shutdown 实际上都会构造指令发给 skynet 引擎,执行同一套逻辑 ----* 不同的是,如果是 shutdown 调用会强制关闭套接字 ----* 而 close 只会在没有更多需要发送的数据才会关闭 ----* 两个函数都会调用操作系统的系统调用 close ----@param id number @skynet对套接字描述符的表示 -function socketdriver.shutdown(id) -end ----监听套接字 ----@param host string ----@param port number ----@param backlog number ----@return number @skynet对套接字描述符的表示 -function socketdriver.listen(host, port, backlog) -end ----发送数据,这个函数会将我们要发送的数据放到一个 socket_sendbuffer 内,再丢给 skynet,由网络线程进行发送 ----* socket_sendbuffer 需要一个缓冲区指针、缓冲区类型、长度来表示 ----* 发送的数据,可以是 userdata/lightuserdata/string ----* 当传递的是 userdata 的时候,可以指定 sz ,否则由 lua_rawlen 来计算,由 VM 来释放 ----* 当传递的是 lightuserdata,若不指定 sz,会被当成 SOCKET_BUFFER_OBJECT,由 socket 相关的函数来释放,若指定,则当成SOCKET_BUFFER_MEMORY ,由 free 释放 ----* 当传递的是 table,那么会自动计算长度,SOCKET_BUFFER_MEMORY ----* 默认情况下是当成 string,自动计算长度 ----@param id number @skynet对套接字描述符的表示 ----@param msg table | lightuserdata | userdata | string @要传输的数据 ----@param sz number | nil @长度 -function socketdriver.send(id, msg, sz) -end ----低优先发送数据 ----* 当传递的是 userdata 的时候,可以指定 sz ,否则由 lua_rawlen 来计算,由 VM 来释放 ----* 当传递的是 lightuserdata,若不指定 sz,会被当成 SOCKET_BUFFER_OBJECT,由 socket 相关的函数来释放,若指定,则当成SOCKET_BUFFER_MEMORY ,由 free 释放 ----* 当传递的是 table,那么会自动计算长度 ----* 默认情况下是当成 string,自动计算长度 ----@param id number @skynet对套接字描述符的表示 ----@param msg table | lightuserdata | userdata | string @要传输的数据 ----@param sz number | nil @长度 -function socketdriver.lsend() -end ----绑定系统套接字到一个skynet的索引 ----@param fd number ----@return number @skynet索引 -function socketdriver.bind(fd) -end ----启动收发数据 ----@param id number @skynet对套接字描述符的表示 -function socketdriver.start(id) -end ----暂停收发数据 ----@param id number @skynet对套接字描述符的表示 -function socketdriver.pause(id) -end ----设置 TCP 套接字的 TCP_NODELAY 标志,尽可能快的将数据发出去,而不是等待缓冲区满或到达最大分组才发送 ----@param id number @skynet对套接字描述符的表示 -function socketdriver.nodelay(id) -end ----开启 udp 服务 ----@param addr string ----@param port number | nil -function socketdriver.udp(addr, port) -end ----连接 udp 服务 ----@param id any ----@param addr string ----@param port number | nil -function socketdriver.udp_connect(id, addr, port) -end -function socketdriver.udp_send(id, addr, msg) -end -function socketdriver.udp_address() -end ----解析主机IP ----@param host string -function socketdriver.resolve(host) -end ----新开一个 socket_buffer ,作为 userdata 返回回来 ----* socket_buffer 是一个 buffer_node 链表 -function socketdriver.buffer() -end ----数据放到缓冲区 ----* 表 pool 记录了所有的缓冲区块,位于索引 1 的是一个 lightuserdata: free_node ----* 我们总是可以使用将这个指针当成 buffer_node。 ----* 接下来的索引处都是 userdata,缓冲区块(buffer_node),只有在 VM 关闭的时候才会释放他们。 ----* 索引 2 处的第一块长度是 16 * buffer_node,第二块是 32*buffer_node。 ----* 这个函数会从 pool 处获取一个空闲的 buffer_node,然后将 msg/sz 放到里面。 ----* pop 会将 buffer_node 返回给 pool ----@param buffer userdata ----@param pool table ----@param msg lightuserdata ----@param sz number ----@return number -function socketdriver.push(buffer, pool, msg, sz) -end ----* pop 会将 buffer_node 返回给 pool ----@param buffer userdata ----@param pool table ----@param sz number -function socketdriver.pop(buffer, pool, sz) -end ----丢弃消息 ----@param msg userdata ----@param sz number ----@return string @返回的是 binary string -function socketdriver.drop(msg, sz) -end ----将数据全部读到Lua缓冲区 ----@param buffer userdata ----@param pool table ----@return string @返回的是 binary string -function socketdriver.readall(buffer, pool) -end ----清除缓冲区 ----@param buffer userdata ----@param pool table -function socketdriver.clear(buffer, pool) -end ----读取 sep 分隔符分隔的行 ----@param buffer userdata ----@param pool table ----@param sep string -function socketdriver.readline(buffer, pool, sep) -end ----字符串转 lightuserdata ----@param msg string ----@return lightuserdata,number -function socketdriver.str2p(msg) -end ----获取字符串的长度 ----@param str string ----@return number -function socketdriver.header(str) -end -function socketdriver.info() -end ----解包数据 ----@param msg lightuserdata ----@param sz number ----@return number,number,number, lightuserdata|string -function socketdriver.unpack(msg, sz) -end - -return socketdriver diff --git a/meta/3rd/skynet/library/skynet/stm.lua b/meta/3rd/skynet/library/skynet/stm.lua deleted file mode 100644 index 9ebe3f96..00000000 --- a/meta/3rd/skynet/library/skynet/stm.lua +++ /dev/null @@ -1,36 +0,0 @@ ----@meta ---- stm 构造的内存对象 ----@class stmobj :userdata ----@deprecated -local stmobj = {} -setmetatable(stmobj, stmobj) ----* 更新对象,实际上就是重新替换一个序列化对象 -stmobj.__call = function(pointer, sz) -end - ----@class stm -local stm = {} ----* 将一个指针,用来构造一个 stm 对象 ----* 任何 Lua 数据想要用 stm 共享,必须先序列化,如 sharemap 使用 sproto 来进行 ----* 我们也可以直接使用 skynet.pack skynet.unpack 来序列化 ----@param pointer userdata | string ----@param sz number ----@return stmobj ----@deprecated -function stm.new(pointer, sz) -end ----* 可以从一个共享对象中生成一份读拷贝。它返回一个 stmcopy ,是一个 lightuserdata 。 ----* 通常一定要把这个 lightuserdata 传到需要读取这份数据的服务。随意丢弃这个指针会导致内存泄露。 ----* 注:一个拷贝只能供一个读取者使用,你不可以把这个指针传递给多个服务。如果你有多个读取者,为每个人调用 copy 生成一份读拷贝。 ----@param stmobj stmobj ----@return lightuserdata -function stm.copy(stmobj) -end ----* 把一个 C 指针转换为一份读拷贝。只有经过转换,stm 才能正确的管理它的生命期。 ----* 一般来说,其他服务就传递这个指针到另外服务,收到了这个指针后,需要调用此 API 转换成一个 内存对象 ----* 再经过反序列化函数才能得到 Lua 的表示 ----@param stmcopy lightuserdata ----@return userdata -function stm.newcopy(stmcopy) -end -return stm -- cgit v1.2.3 From c8ff82b386a4d0f9c67ead994a216e0cb5292dea Mon Sep 17 00:00:00 2001 From: carsakiller Date: Fri, 27 Oct 2023 20:42:09 -0400 Subject: refactor: replace ffi-reflect with LuaCATS submodule --- meta/3rd/ffi-reflect | 1 + meta/3rd/ffi-reflect/config.json | 3 - meta/3rd/ffi-reflect/library/reflect.lua | 128 ------------------------------- 3 files changed, 1 insertion(+), 131 deletions(-) create mode 160000 meta/3rd/ffi-reflect delete mode 100644 meta/3rd/ffi-reflect/config.json delete mode 100644 meta/3rd/ffi-reflect/library/reflect.lua (limited to 'meta') diff --git a/meta/3rd/ffi-reflect b/meta/3rd/ffi-reflect new file mode 160000 index 00000000..e9037efc --- /dev/null +++ b/meta/3rd/ffi-reflect @@ -0,0 +1 @@ +Subproject commit e9037efca4021a15552b281f5e91418afd370d8f diff --git a/meta/3rd/ffi-reflect/config.json b/meta/3rd/ffi-reflect/config.json deleted file mode 100644 index 544b7b4d..00000000 --- a/meta/3rd/ffi-reflect/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - -} \ No newline at end of file diff --git a/meta/3rd/ffi-reflect/library/reflect.lua b/meta/3rd/ffi-reflect/library/reflect.lua deleted file mode 100644 index 8a9b759c..00000000 --- a/meta/3rd/ffi-reflect/library/reflect.lua +++ /dev/null @@ -1,128 +0,0 @@ ----@meta - ----@alias ffi.typeinfo.what "int" ----|"void" ----|"float" ----|"enum" ----|"constant" ----|"ptr" ----|"ref" ----|"array" ----|"struct" ----|"union" ----|"func" ----|"field" ----|"bitfield" ----|"typedef" - ----@class ffi.typeinfo ----@field what ffi.typeinfo.what - ----@class ffi.enuminfo : ffi.typeinfo ----@field name string? ----@field size number|string ----@field alignment number ----@field type ffi.typeinfo -local enuminfo = {} - ----@return ffi.constantinfo[] -function enuminfo:values() -end - ----@return ffi.constantinfo -function enuminfo:value(name_or_index) -end - ----@class ffi.funcinfo : ffi.typeinfo ----@field name string? ----@field sym_name string? ----@field return_type ffi.funcinfo ----@field nargs integer ----@field vararg boolean ----@field sse_reg_params boolean ----@field convention "cdecl"|"thiscall"|"fastcall"|"stdcall" -local funcinfo = {} - ----@return ffi.fieldinfo[] -function funcinfo:arguments() -end - ----@return ffi.fieldinfo -function funcinfo:argument(name_or_index) -end - ----@class ffi.unioninfo : ffi.typeinfo ----@field name string? ----@field size integer ----@field alignment number ----@field const boolean ----@field volatile boolean ----@field transparent boolean -local unioninfo = {} - ----@return ffi.typeinfo[] -function unioninfo:members() -end - ----@return ffi.typeinfo -function unioninfo:member(name_or_index) -end - ----@class ffi.structinfo : ffi.unioninfo ----@field vla boolean - ----@class ffi.floatinfo : ffi.typeinfo ----@field size integer ----@field alignment number ----@field const boolean ----@field volatile boolean - ----@alias ffi.voidinfo ffi.floatinfo - ----@class ffi.intinfo : ffi.floatinfo ----@field bool boolean ----@field unsigned boolean ----@field long boolean - ----@class ffi.constantinfo : ffi.typeinfo ----@field name string? ----@field type ffi.typeinfo ----@field value integer - ----@class ffi.ptrinfo : ffi.typeinfo ----@field size integer ----@field alignment number ----@field const boolean ----@field volatile boolean ----@field element_type ffi.typeinfo - ----@alias ffi.refinfo ffi.ptrinfo - ----@class ffi.arrayinfo : ffi.ptrinfo ----@field vla boolean ----@field vector boolean ----@field complex boolean - ----@class ffi.fieldinfo : ffi.typeinfo ----@field name string? ----@field offset number ----@field type ffi.typeinfo - ----@class ffi.bitfield : ffi.fieldinfo ----@field size integer|string - -local reflect = {} - ----reflection cdata c defined ----@param v ffi.cdata* ----@return ffi.typeinfo -function reflect.typeof(v) -end - ----try get cdata metatable ----@param v ffi.cdata* ----@return table -function reflect.getmetatable(v) -end - -return reflect \ No newline at end of file -- cgit v1.2.3 From fb9253f807a99e43d9956a6e7b59da4435e4fbd7 Mon Sep 17 00:00:00 2001 From: carsakiller Date: Fri, 27 Oct 2023 20:42:09 -0400 Subject: refactor: replace luv with LuaCATS submodule --- meta/3rd/luv | 1 + meta/3rd/luv/config.json | 8 - meta/3rd/luv/library/errors.lua | 261 --- meta/3rd/luv/library/luv_dir_t.lua | 34 - meta/3rd/luv/library/luv_thread_t.lua | 20 - meta/3rd/luv/library/luv_work_ctx_t.lua | 17 - meta/3rd/luv/library/types.lua | 526 ------ meta/3rd/luv/library/uv.lua | 3075 ------------------------------- meta/3rd/luv/library/uv_async_t.lua | 35 - meta/3rd/luv/library/uv_check_t.lua | 29 - meta/3rd/luv/library/uv_fs_event_t.lua | 33 - meta/3rd/luv/library/uv_fs_poll_t.lua | 35 - meta/3rd/luv/library/uv_handle_t.lua | 132 -- meta/3rd/luv/library/uv_idle_t.lua | 38 - meta/3rd/luv/library/uv_pipe_t.lua | 103 -- meta/3rd/luv/library/uv_poll_t.lua | 57 - meta/3rd/luv/library/uv_prepare_t.lua | 30 - meta/3rd/luv/library/uv_process_t.lua | 22 - meta/3rd/luv/library/uv_req_t.lua | 25 - meta/3rd/luv/library/uv_signal_t.lua | 69 - meta/3rd/luv/library/uv_stream_t.lua | 173 -- meta/3rd/luv/library/uv_tcp_t.lua | 112 -- meta/3rd/luv/library/uv_timer_t.lua | 55 - meta/3rd/luv/library/uv_tty_t.lua | 44 - meta/3rd/luv/library/uv_udp_t.lua | 175 -- 25 files changed, 1 insertion(+), 5108 deletions(-) create mode 160000 meta/3rd/luv delete mode 100644 meta/3rd/luv/config.json delete mode 100644 meta/3rd/luv/library/errors.lua delete mode 100644 meta/3rd/luv/library/luv_dir_t.lua delete mode 100644 meta/3rd/luv/library/luv_thread_t.lua delete mode 100644 meta/3rd/luv/library/luv_work_ctx_t.lua delete mode 100644 meta/3rd/luv/library/types.lua delete mode 100644 meta/3rd/luv/library/uv.lua delete mode 100644 meta/3rd/luv/library/uv_async_t.lua delete mode 100644 meta/3rd/luv/library/uv_check_t.lua delete mode 100644 meta/3rd/luv/library/uv_fs_event_t.lua delete mode 100644 meta/3rd/luv/library/uv_fs_poll_t.lua delete mode 100644 meta/3rd/luv/library/uv_handle_t.lua delete mode 100644 meta/3rd/luv/library/uv_idle_t.lua delete mode 100644 meta/3rd/luv/library/uv_pipe_t.lua delete mode 100644 meta/3rd/luv/library/uv_poll_t.lua delete mode 100644 meta/3rd/luv/library/uv_prepare_t.lua delete mode 100644 meta/3rd/luv/library/uv_process_t.lua delete mode 100644 meta/3rd/luv/library/uv_req_t.lua delete mode 100644 meta/3rd/luv/library/uv_signal_t.lua delete mode 100644 meta/3rd/luv/library/uv_stream_t.lua delete mode 100644 meta/3rd/luv/library/uv_tcp_t.lua delete mode 100644 meta/3rd/luv/library/uv_timer_t.lua delete mode 100644 meta/3rd/luv/library/uv_tty_t.lua delete mode 100644 meta/3rd/luv/library/uv_udp_t.lua (limited to 'meta') diff --git a/meta/3rd/luv b/meta/3rd/luv new file mode 160000 index 00000000..3615eb12 --- /dev/null +++ b/meta/3rd/luv @@ -0,0 +1 @@ +Subproject commit 3615eb12c94a7cfa7184b8488cf908abb5e94c9c diff --git a/meta/3rd/luv/config.json b/meta/3rd/luv/config.json deleted file mode 100644 index 70080322..00000000 --- a/meta/3rd/luv/config.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "files" : [], - "words" : [ - "require.*'luv'.*", - "require.*\"luv\".*" - ], - "settings" : {} -} diff --git a/meta/3rd/luv/library/errors.lua b/meta/3rd/luv/library/errors.lua deleted file mode 100644 index 93184b87..00000000 --- a/meta/3rd/luv/library/errors.lua +++ /dev/null @@ -1,261 +0,0 @@ ----@meta - ----@alias uv.errno.E2BIG "E2BIG" # argument list too long. ----@alias uv.errno.EACCES "EACCES" # permission denied. ----@alias uv.errno.EADDRINUSE "EADDRINUSE" # address already in use. ----@alias uv.errno.EADDRNOTAVAIL "EADDRNOTAVAIL" # address not available. ----@alias uv.errno.EAFNOSUPPORT "EAFNOSUPPORT" # address family not supported. ----@alias uv.errno.EAGAIN "EAGAIN" # resource temporarily unavailable. ----@alias uv.errno.EAI_ADDRFAMILY "EAI_ADDRFAMILY" # address family not supported. ----@alias uv.errno.EAI_AGAIN "EAI_AGAIN" # temporary failure. ----@alias uv.errno.EAI_BADFLAGS "EAI_BADFLAGS" # bad ai_flags value. ----@alias uv.errno.EAI_BADHINTS "EAI_BADHINTS" # invalid value for hints. ----@alias uv.errno.EAI_CANCELED "EAI_CANCELED" # request canceled. ----@alias uv.errno.EAI_FAIL "EAI_FAIL" # permanent failure. ----@alias uv.errno.EAI_FAMILY "EAI_FAMILY" # ai_family not supported. ----@alias uv.errno.EAI_MEMORY "EAI_MEMORY" # out of memory. ----@alias uv.errno.EAI_NODATA "EAI_NODATA" # no address. ----@alias uv.errno.EAI_NONAME "EAI_NONAME" # unknown node or service. ----@alias uv.errno.EAI_OVERFLOW "EAI_OVERFLOW" # argument buffer overflow. ----@alias uv.errno.EAI_PROTOCOL "EAI_PROTOCOL" # resolved protocol is unknown. ----@alias uv.errno.EAI_SERVICE "EAI_SERVICE" # service not available for socket type. ----@alias uv.errno.EAI_SOCKTYPE "EAI_SOCKTYPE" # socket type not supported. ----@alias uv.errno.EALREADY "EALREADY" # connection already in progress. ----@alias uv.errno.EBADF "EBADF" # bad file descriptor. ----@alias uv.errno.EBUSY "EBUSY" # resource busy or locked. ----@alias uv.errno.ECANCELED "ECANCELED" # operation canceled. ----@alias uv.errno.ECHARSET "ECHARSET" # invalid Unicode character. ----@alias uv.errno.ECONNABORTED "ECONNABORTED" # software caused connection abort. ----@alias uv.errno.ECONNREFUSED "ECONNREFUSED" # connection refused. ----@alias uv.errno.ECONNRESET "ECONNRESET" # connection reset by peer. ----@alias uv.errno.EDESTADDRREQ "EDESTADDRREQ" # destination address required. ----@alias uv.errno.EEXIST "EEXIST" # file already exists. ----@alias uv.errno.EFAULT "EFAULT" # bad address in system call argument. ----@alias uv.errno.EFBIG "EFBIG" # file too large. ----@alias uv.errno.EFTYPE "EFTYPE" # inappropriate file type or format. ----@alias uv.errno.EHOSTUNREACH "EHOSTUNREACH" # host is unreachable. ----@alias uv.errno.EILSEQ "EILSEQ" # illegal byte sequence. ----@alias uv.errno.EINTR "EINTR" # interrupted system call. ----@alias uv.errno.EINVAL "EINVAL" # invalid argument. ----@alias uv.errno.EIO "EIO" # i/o error. ----@alias uv.errno.EISCONN "EISCONN" # socket is already connected. ----@alias uv.errno.EISDIR "EISDIR" # illegal operation on a directory. ----@alias uv.errno.ELOOP "ELOOP" # too many symbolic links encountered. ----@alias uv.errno.EMFILE "EMFILE" # too many open files. ----@alias uv.errno.EMLINK "EMLINK" # too many links. ----@alias uv.errno.EMSGSIZE "EMSGSIZE" # message too long. ----@alias uv.errno.ENAMETOOLONG "ENAMETOOLONG" # name too long. ----@alias uv.errno.ENETDOWN "ENETDOWN" # network is down. ----@alias uv.errno.ENETUNREACH "ENETUNREACH" # network is unreachable. ----@alias uv.errno.ENFILE "ENFILE" # file table overflow. ----@alias uv.errno.ENOBUFS "ENOBUFS" # no buffer space available. ----@alias uv.errno.ENODEV "ENODEV" # no such device. ----@alias uv.errno.ENOENT "ENOENT" # no such file or directory. ----@alias uv.errno.ENOMEM "ENOMEM" # not enough memory. ----@alias uv.errno.ENONET "ENONET" # machine is not on the network. ----@alias uv.errno.ENOPROTOOPT "ENOPROTOOPT" # protocol not available. ----@alias uv.errno.ENOSPC "ENOSPC" # no space left on device. ----@alias uv.errno.ENOSYS "ENOSYS" # function not implemented. ----@alias uv.errno.ENOTCONN "ENOTCONN" # socket is not connected. ----@alias uv.errno.ENOTDIR "ENOTDIR" # not a directory. ----@alias uv.errno.ENOTEMPTY "ENOTEMPTY" # directory not empty. ----@alias uv.errno.ENOTSOCK "ENOTSOCK" # socket operation on non-socket. ----@alias uv.errno.ENOTSUP "ENOTSUP" # operation not supported on socket. ----@alias uv.errno.ENOTTY "ENOTTY" # inappropriate ioctl for device. ----@alias uv.errno.ENXIO "ENXIO" # no such device or address. ----@alias uv.errno.EOF "EOF" # end of file. ----@alias uv.errno.EOVERFLOW "EOVERFLOW" # value too large for defined data type. ----@alias uv.errno.EPERM "EPERM" # operation not permitted. ----@alias uv.errno.EPIPE "EPIPE" # broken pipe. ----@alias uv.errno.EPROTO "EPROTO" # protocol error. ----@alias uv.errno.EPROTONOSUPPORT "EPROTONOSUPPORT" # protocol not supported. ----@alias uv.errno.EPROTOTYPE "EPROTOTYPE" # protocol wrong type for socket. ----@alias uv.errno.ERANGE "ERANGE" # result too large. ----@alias uv.errno.EROFS "EROFS" # read-only file system. ----@alias uv.errno.ESHUTDOWN "ESHUTDOWN" # cannot send after transport endpoint shutdown. ----@alias uv.errno.ESOCKTNOSUPPORT "ESOCKTNOSUPPORT" # socket type not supported. ----@alias uv.errno.ESPIPE "ESPIPE" # invalid seek. ----@alias uv.errno.ESRCH "ESRCH" # no such process. ----@alias uv.errno.ETIMEDOUT "ETIMEDOUT" # connection timed out. ----@alias uv.errno.ETXTBSY "ETXTBSY" # text file is busy. ----@alias uv.errno.EXDEV "EXDEV" # cross-device link not permitted. ----@alias uv.errno.UNKNOWN "UNKNOWN" # unknown error. - - ---- An error string with the format {name}: {message} ---- ---- * {name} is the error name provided internally by uv_err_name (e.g. "ENOENT") ---- * {message} is a human-readable message provided internally by uv_strerror ---- ----@alias uv.error.message string - - ---- An error name string ---- ----@alias uv.error.name ----| "E2BIG" # argument list too long ----| "EACCES" # permission denied ----| "EADDRINUSE" # address already in use ----| "EADDRNOTAVAIL" # address not available ----| "EAFNOSUPPORT" # address family not supported ----| "EAGAIN" # resource temporarily unavailable ----| "EAI_ADDRFAMILY" # address family not supported ----| "EAI_AGAIN" # temporary failure ----| "EAI_BADFLAGS" # bad ai_flags value ----| "EAI_BADHINTS" # invalid value for hints ----| "EAI_CANCELED" # request canceled ----| "EAI_FAIL" # permanent failure ----| "EAI_FAMILY" # ai_family not supported ----| "EAI_MEMORY" # out of memory ----| "EAI_NODATA" # no address ----| "EAI_NONAME" # unknown node or service ----| "EAI_OVERFLOW" # argument buffer overflow ----| "EAI_PROTOCOL" # resolved protocol is unknown ----| "EAI_SERVICE" # service not available for socket type ----| "EAI_SOCKTYPE" # socket type not supported ----| "EALREADY" # connection already in progress ----| "EBADF" # bad file descriptor ----| "EBUSY" # resource busy or locked ----| "ECANCELED" # operation canceled ----| "ECHARSET" # invalid Unicode character ----| "ECONNABORTED" # software caused connection abort ----| "ECONNREFUSED" # connection refused ----| "ECONNRESET" # connection reset by peer ----| "EDESTADDRREQ" # destination address required ----| "EEXIST" # file already exists ----| "EFAULT" # bad address in system call argument ----| "EFBIG" # file too large ----| "EFTYPE" # inappropriate file type or format ----| "EHOSTUNREACH" # host is unreachable ----| "EILSEQ" # illegal byte sequence ----| "EINTR" # interrupted system call ----| "EINVAL" # invalid argument ----| "EIO" # i/o error ----| "EISCONN" # socket is already connected ----| "EISDIR" # illegal operation on a directory ----| "ELOOP" # too many symbolic links encountered ----| "EMFILE" # too many open files ----| "EMLINK" # too many links ----| "EMSGSIZE" # message too long ----| "ENAMETOOLONG" # name too long ----| "ENETDOWN" # network is down ----| "ENETUNREACH" # network is unreachable ----| "ENFILE" # file table overflow ----| "ENOBUFS" # no buffer space available ----| "ENODEV" # no such device ----| "ENOENT" # no such file or directory ----| "ENOMEM" # not enough memory ----| "ENONET" # machine is not on the network ----| "ENOPROTOOPT" # protocol not available ----| "ENOSPC" # no space left on device ----| "ENOSYS" # function not implemented ----| "ENOTCONN" # socket is not connected ----| "ENOTDIR" # not a directory ----| "ENOTEMPTY" # directory not empty ----| "ENOTSOCK" # socket operation on non-socket ----| "ENOTSUP" # operation not supported on socket ----| "ENOTTY" # inappropriate ioctl for device ----| "ENXIO" # no such device or address ----| "EOF" # end of file ----| "EOVERFLOW" # value too large for defined data type ----| "EPERM" # operation not permitted ----| "EPIPE" # broken pipe ----| "EPROTO" # protocol error ----| "EPROTONOSUPPORT" # protocol not supported ----| "EPROTOTYPE" # protocol wrong type for socket ----| "ERANGE" # result too large ----| "EROFS" # read-only file system ----| "ESHUTDOWN" # cannot send after transport endpoint shutdown ----| "ESOCKTNOSUPPORT" # socket type not supported ----| "ESPIPE" # invalid seek ----| "ESRCH" # no such process ----| "ETIMEDOUT" # connection timed out ----| "ETXTBSY" # text file is busy ----| "EXDEV" # cross-device link not permitted ----| "UNKNOWN" # unknown error - - ---- A table value which exposes error constants as a map, where the key is the error name (without the UV_ prefix) and its value is a negative number. ---- ----@class uv.errno : table ---- ----@field E2BIG integer # argument list too long. ----@field EACCES integer # permission denied. ----@field EADDRINUSE integer # address already in use. ----@field EADDRNOTAVAIL integer # address not available. ----@field EAFNOSUPPORT integer # address family not supported. ----@field EAGAIN integer # resource temporarily unavailable. ----@field EAI_ADDRFAMILY integer # address family not supported. ----@field EAI_AGAIN integer # temporary failure. ----@field EAI_BADFLAGS integer # bad ai_flags value. ----@field EAI_BADHINTS integer # invalid value for hints. ----@field EAI_CANCELED integer # request canceled. ----@field EAI_FAIL integer # permanent failure. ----@field EAI_FAMILY integer # ai_family not supported. ----@field EAI_MEMORY integer # out of memory. ----@field EAI_NODATA integer # no address. ----@field EAI_NONAME integer # unknown node or service. ----@field EAI_OVERFLOW integer # argument buffer overflow. ----@field EAI_PROTOCOL integer # resolved protocol is unknown. ----@field EAI_SERVICE integer # service not available for socket type. ----@field EAI_SOCKTYPE integer # socket type not supported. ----@field EALREADY integer # connection already in progress. ----@field EBADF integer # bad file descriptor. ----@field EBUSY integer # resource busy or locked. ----@field ECANCELED integer # operation canceled. ----@field ECHARSET integer # invalid Unicode character. ----@field ECONNABORTED integer # software caused connection abort. ----@field ECONNREFUSED integer # connection refused. ----@field ECONNRESET integer # connection reset by peer. ----@field EDESTADDRREQ integer # destination address required. ----@field EEXIST integer # file already exists. ----@field EFAULT integer # bad address in system call argument. ----@field EFBIG integer # file too large. ----@field EFTYPE integer # inappropriate file type or format. ----@field EHOSTUNREACH integer # host is unreachable. ----@field EILSEQ integer # illegal byte sequence. ----@field EINTR integer # interrupted system call. ----@field EINVAL integer # invalid argument. ----@field EIO integer # i/o error. ----@field EISCONN integer # socket is already connected. ----@field EISDIR integer # illegal operation on a directory. ----@field ELOOP integer # too many symbolic links encountered. ----@field EMFILE integer # too many open files. ----@field EMLINK integer # too many links. ----@field EMSGSIZE integer # message too long. ----@field ENAMETOOLONG integer # name too long. ----@field ENETDOWN integer # network is down. ----@field ENETUNREACH integer # network is unreachable. ----@field ENFILE integer # file table overflow. ----@field ENOBUFS integer # no buffer space available. ----@field ENODEV integer # no such device. ----@field ENOENT integer # no such file or directory. ----@field ENOMEM integer # not enough memory. ----@field ENONET integer # machine is not on the network. ----@field ENOPROTOOPT integer # protocol not available. ----@field ENOSPC integer # no space left on device. ----@field ENOSYS integer # function not implemented. ----@field ENOTCONN integer # socket is not connected. ----@field ENOTDIR integer # not a directory. ----@field ENOTEMPTY integer # directory not empty. ----@field ENOTSOCK integer # socket operation on non-socket. ----@field ENOTSUP integer # operation not supported on socket. ----@field ENOTTY integer # inappropriate ioctl for device. ----@field ENXIO integer # no such device or address. ----@field EOF integer # end of file. ----@field EOVERFLOW integer # value too large for defined data type. ----@field EPERM integer # operation not permitted. ----@field EPIPE integer # broken pipe. ----@field EPROTO integer # protocol error. ----@field EPROTONOSUPPORT integer # protocol not supported. ----@field EPROTOTYPE integer # protocol wrong type for socket. ----@field ERANGE integer # result too large. ----@field EROFS integer # read-only file system. ----@field ESHUTDOWN integer # cannot send after transport endpoint shutdown. ----@field ESOCKTNOSUPPORT integer # socket type not supported. ----@field ESPIPE integer # invalid seek. ----@field ESRCH integer # no such process. ----@field ETIMEDOUT integer # connection timed out. ----@field ETXTBSY integer # text file is busy. ----@field EXDEV integer # cross-device link not permitted. ----@field UNKNOWN integer # unknown error. diff --git a/meta/3rd/luv/library/luv_dir_t.lua b/meta/3rd/luv/library/luv_dir_t.lua deleted file mode 100644 index 34417802..00000000 --- a/meta/3rd/luv/library/luv_dir_t.lua +++ /dev/null @@ -1,34 +0,0 @@ ----@meta - ---- luv_dir_t ---- ----@class uv.luv_dir_t : userdata -local dir - ---- Closes a directory stream returned by a successful `uv.fs_opendir()` call. ---- ----@return boolean|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(self:uv.luv_dir_t, callback:uv.fs_closedir.callback):uv.uv_fs_t -function dir:closedir() end - ---- Iterates over the directory stream `luv_dir_t` returned by a successful ---- `uv.fs_opendir()` call. A table of data tables is returned where the number ---- of entries `n` is equal to or less than the `entries` parameter used in ---- the associated `uv.fs_opendir()` call. ---- ---- **Returns (sync version):** `table` or `fail` ---- - `[1, 2, 3, ..., n]` : `table` ---- - `name` : `string` ---- - `type` : `string` ---- ---- **Returns (async version):** `uv_fs_t userdata` ---- ----@return uv.fs_readdir.entry[]|nil entries ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(self:uv.luv_dir_t, callback:uv.fs_readdir.callback):uv.uv_fs_t -function dir:readdir() end \ No newline at end of file diff --git a/meta/3rd/luv/library/luv_thread_t.lua b/meta/3rd/luv/library/luv_thread_t.lua deleted file mode 100644 index 3d199657..00000000 --- a/meta/3rd/luv/library/luv_thread_t.lua +++ /dev/null @@ -1,20 +0,0 @@ ----@meta - ---- luv_thread_t ---- ----@class uv.luv_thread_t : userdata -local thread - ---- Returns a boolean indicating whether two threads are the same. This function is ---- equivalent to the `__eq` metamethod. ---- ----@param other_thread uv.luv_thread_t ----@return boolean -function thread:equal(other_thread) end - ---- Waits for the `thread` to finish executing its entry function. ---- ----@return boolean|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function thread:join() end \ No newline at end of file diff --git a/meta/3rd/luv/library/luv_work_ctx_t.lua b/meta/3rd/luv/library/luv_work_ctx_t.lua deleted file mode 100644 index 790db995..00000000 --- a/meta/3rd/luv/library/luv_work_ctx_t.lua +++ /dev/null @@ -1,17 +0,0 @@ ----@meta - ---- luv_work_ctx_t ---- ----@class uv.luv_work_ctx_t : userdata -local work_ctx - ---- Queues a work request which will run `work_callback` in a new Lua state in a ---- thread from the threadpool with any additional arguments from `...`. Values ---- returned from `work_callback` are passed to `after_work_callback`, which is ---- called in the main loop thread. ---- ----@param ... uv.threadargs ----@return boolean|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function work_ctx:queue(...) end \ No newline at end of file diff --git a/meta/3rd/luv/library/types.lua b/meta/3rd/luv/library/types.lua deleted file mode 100644 index 57bce70c..00000000 --- a/meta/3rd/luv/library/types.lua +++ /dev/null @@ -1,526 +0,0 @@ ----@meta - ----@class uv.getrusage.result.time_t ----@field sec integer ----@field usec integer - ----@class uv.getrusage.result ---- ----@field utime uv.getrusage.result.time_t # user CPU time used ----@field stime uv.getrusage.result.time_t # system CPU time used ----@field maxrss integer # maximum resident set size ----@field ixrss integer # integral shared memory size ----@field idrss integer # integral unshared data size ----@field isrss integer # integral unshared stack size ----@field minflt integer # page reclaims (soft page faults) ----@field majflt integer # page faults (hard page faults) ----@field nswap integer # swaps ----@field inblock integer # block input operations ----@field oublock integer # block output operations ----@field msgsnd integer # IPC messages sent ----@field msgrcv integer # IPC messages received ----@field nsignals integer # signals received ----@field nvcsw integer # voluntary context switches ----@field nivcsw integer # involuntary context switches - - ----@alias uv.spawn.options.stdio.fd integer - ----@alias uv.spawn.options.stdio.stream uv.uv_stream_t - - ---- The `options.stdio` entries can take many shapes. ---- ---- - If they are numbers, then the child process inherits that same zero-indexed fd from the parent process. ---- - If `uv_stream_t` handles are passed in, those are used as a read-write pipe or inherited stream depending if the stream has a valid fd. ---- - Including `nil` placeholders means to ignore that fd in the child process. ---- ----@alias uv.spawn.options.stdio ----| integer ----| uv.uv_stream_t ----| nil - - ----@class uv.spawn.options : table ---- ---- Command line arguments as a list of strings. The first string should be the path to the program. On Windows, this uses CreateProcess which concatenates the arguments into a string. This can cause some strange errors. (See `options.verbatim` below for Windows.) ----@field args string[] ---- ---- Set environment variables for the new process. ----@field env table ---- ---- Set the current working directory for the sub-process. ----@field cwd string ---- ---- Set the child process' user id. ----@field uid string ---- ---- Set the child process' group id. ----@field gid string ---- ---- If true, do not wrap any arguments in quotes, or perform any other escaping, when converting the argument list into a command line string. This option is only meaningful on Windows systems. On Unix it is silently ignored. ----@field verbatim boolean ---- ---- If true, spawn the child process in a detached state - this will make it a process group leader, and will effectively enable the child to keep running after the parent exits. Note that the child process will still keep the parent's event loop alive unless the parent process calls `uv.unref()` on the child's process handle. ----@field detached boolean ---- ---- If true, hide the subprocess console window that would normally be created. This option is only meaningful on Windows systems. On Unix it is silently ignored. ----@field hide boolean ---- ---- Set the file descriptors that will be made available to the child process. The convention is that the first entries are stdin, stdout, and stderr. (**Note**: On Windows, file descriptors after the third are available to the child process only if the child processes uses the MSVCRT runtime.) ----@field stdio { [1]: uv.spawn.options.stdio, [2]: uv.spawn.options.stdio, [3]: uv.spawn.options.stdio } - - ----@class uv.fs_stat.result.time ----@field sec integer ----@field nsec integer - ----@class uv.fs_stat.result ---- ----@field dev integer ----@field mode integer ----@field nlink integer ----@field uid integer ----@field gid integer ----@field rdev integer ----@field ino integer ----@field size integer ----@field blksize integer ----@field blocks integer ----@field flags integer ----@field gen integer ----@field atime uv.fs_stat.result.time ----@field mtime uv.fs_stat.result.time ----@field ctime uv.fs_stat.result.time ----@field birthtime uv.fs_stat.result.time ----@field type string - - ----@class uv.fs_statfs.result ---- ----@field type integer ----@field bsize integer ----@field blocks integer ----@field bfree integer ----@field bavail integer ----@field files integer ----@field ffree integer - - - ----@class uv.getaddrinfo.hints : table ----@field family string|integer|uv.socket.family ----@field socktype string|integer|uv.socket.type ----@field protocol string|integer|uv.socket.protocol ----@field addrconfig boolean ----@field v4mapped boolean ----@field all boolean ----@field numerichost boolean ----@field passive boolean ----@field numericserv boolean ----@field canonname boolean - - ---- uv.getnameinfo.address ---- ----@class uv.getnameinfo.address : table ----@field ip string ----@field port integer ----@field family string|integer - - ---- uv.new_thread.options ---- ----@class uv.new_thread.options : table ----@field stack_size integer - - ---- uv.pipe.read_flags ---- ----@class uv.pipe.read_flags : table ----@field nonblock boolean|false - - ---- uv.pipe.write_flags ---- ----@class uv.pipe.write_flags : table ----@field nonblock boolean|false - ----@alias uv.socketpair.fds { [1]: integer, [2]: integer } - ---- uv.socketpair.flags ---- ----@class uv.socketpair.flags : table ---- ---- Opens the specified socket handle for `OVERLAPPED` or `FIONBIO`/`O_NONBLOCK` I/O usage. This is recommended for handles that will be used by libuv, and not usually recommended otherwise. ----@field nonblock true|false - ----@alias uv.socket.protocol ----| string ----| "ip" ----| "icmp" ----| "tcp" ----| "udp" - ----@alias uv.socket.type ----| "stream" ----| "dgram" ----| "raw" ----| "rdm" ----| "seqpacket" - ---- When `protocol` is set to 0 or nil, it will be automatically chosen based on the socket's domain and type. ---- ---- When `protocol` is specified as a string, it will be looked up using the `getprotobyname(3)` function (examples: `"ip"`, `"icmp"`, `"tcp"`, `"udp"`, etc). ---- ----@alias uv.socketpair.protocol ----| 0 # automatically choose based on socket domain/type ----| nil # automatically choose based on socket domain/type ----| uv.socket.protocol - ----@alias uv.socketpair.socktype ----| uv.socket.type ----| integer ----| nil - ---- uv.tcp_bind.flags ---- ----@class uv.tcp_bind.flags : table ----@field ipv6only boolean - - ---- uv.udp_bind.flags ---- ---- ----@class uv.udp_bind.flags : table ----@field ipv6only boolean ----@field reuseaddr boolean - ---- TTY mode is a C enum with the following values: ---- ----@alias uv.tty.mode ----| 0 # UV_TTY_MODE_NORMAL: Initial/normal terminal mode ----| 1 # UV_TTY_MODE_RAW: Raw input mode (On Windows, ENABLE_WINDOW_INPUT is also enabled) ----| 2 # UV_TTY_MODE_IO: Binary-safe I/O mode for IPC (Unix-only) - - ---- uv.run() modes: ---- ---- - `"default"`: Runs the event loop until there are no more active and ---- referenced handles or requests. Returns `true` if `uv.stop()` was called and ---- there are still active handles or requests. Returns `false` in all other ---- cases. ---- ---- - `"once"`: Poll for I/O once. Note that this function blocks if there are no ---- pending callbacks. Returns `false` when done (no active handles or requests ---- left), or `true` if more callbacks are expected (meaning you should run the ---- event loop again sometime in the future). ---- ---- - `"nowait"`: Poll for I/O once but don't block if there are no pending ---- callbacks. Returns `false` if done (no active handles or requests left), ---- or `true` if more callbacks are expected (meaning you should run the event ---- loop again sometime in the future). ---- ----@alias uv.run.mode ----| "default" # Runs the event loop until there are no more active and referenced handles or requests. ----| "once" # Poll for I/O once. ----| "nowait" # Poll for I/O once but don't block if there are no pending callbacks. - - ----@class uv.interface_addresses.addr ---- ----@field ip string ----@field family string ----@field netmask string ----@field internal boolean ----@field mac string - ----@class uv.new_udp.flags ---- ---- When specified, `mmsgs` determines the number of messages able to be received at one time via `recvmmsg(2)` (the allocated buffer will be sized to be able to fit the specified number of max size dgrams). Only has an effect on platforms that support `recvmmsg(2)`. ----@field mmsgs integer|nil # default `1` ---- ----@field family uv.new_udp.flags.family|nil - ----@alias uv.new_udp.flags.family uv.socket.family - ----@alias uv.socket.family ----| "unix" ----| "inet" ----| "inet6" ----| "ipx" ----| "netlink" ----| "x25" ----| "ax25" ----| "atmpvc" ----| "appletalk" ----| "packet" - - ----@class uv.os_get_passwd.info ----@field username string ----@field uid integer ----@field gid integer ----@field shell string ----@field homedir string - ----@class uv.os_uname.info ----@field sysname string ----@field release string ----@field version string ----@field machine string - ----@alias uv.pipe_chmod.flags ----| "r" ----| "rw" ----| "w" ----| "wr" - ---- `r` is `READABLE` ---- `w` is `WRITABLE` ---- `d` is `DISCONNECT` ---- `p` is `PRIORITIZED` ---- ----@alias uv.poll.eventspec ----| "r" ----| "rd" ----| "rw" ----| "rp" ----| "rdp" ----| "rwd" ----| "rwp" ----| "rwdp" ----| "d" ----| "dp" ----| "w" ----| "wd" ----| "wp" ----| "wdp" ----| "p" - - - ---- socket info ---- ----@class uv.socketinfo : table ----@field ip string ----@field family string|uv.socket.family ----@field port integer - - ---- uv.udp.sockname ---- ----@alias uv.udp.sockname uv.socketinfo - - ----@class uv.uv_fs_t : uv.uv_req_t ----@class uv.uv_write_t : uv.uv_req_t ----@class uv.uv_connect_t : uv.uv_req_t ----@class uv.uv_shutdown_t : uv.uv_req_t ----@class uv.uv_udp_send_t : uv.uv_req_t ----@class uv.uv_getaddrinfo_t : uv.uv_req_t ----@class uv.uv_getnameinfo_t : uv.uv_req_t ----@class uv.uv_work_t : uv.uv_req_t - ----@class uv.pipe.fds ----@field read integer ----@field write integer - ----@class uv.fs_copyfile.flags_t : table ----@field excl boolean ----@field ficlone boolean ----@field ficlone_force boolean - ----@alias uv.fs_copyfile.flags ----| uv.fs_copyfile.flags_t ----| integer - - ----@class uv.fs_event_start.flags : table ----@field watch_entry boolean|nil # default: false ----@field stat boolean|nil # default: false ----@field recursive boolean|nil # default: false - ----@class uv.fs_event_start.callback.events : table ----@field change boolean|nil ----@field rename boolean|nil - ---- Event loop ---- ---- The event loop is the central part of libuv's functionality. It takes care of ---- polling for I/O and scheduling callbacks to be run based on different sources of ---- events. ---- ---- In luv, there is an implicit uv loop for every Lua state that loads the library. ---- You can use this library in an multi-threaded environment as long as each thread ---- has it's own Lua state with its corresponding own uv loop. This loop is not ---- directly exposed to users in the Lua module. ---- ----@class uv.uv_loop_t : table - ----@alias uv.threadargs any - ---- Luv APIS that accept a "buffer" type will accept either a string or an array-like table of strings ----@alias uv.buffer string|string[] - ----@alias uv.fs_mkdtemp.callback fun(err: uv.callback.err, path?:string) ----@alias uv.fs_access.callback fun(err: uv.callback.err, permission?:boolean) ----@alias uv.fs_event_start.callback fun(err: uv.callback.err, filename:string, events:uv.fs_event_start.callback.events) ----@alias uv.fs_poll_start.callback fun(err: uv.callback.err, prev:uv.fs_stat.result|nil, curr:uv.fs_stat.result|nil) ----@alias uv.fs_fstat.callback fun(err: uv.callback.err, stat:uv.fs_stat.result|nil) ----@alias uv.fs_lstat.callback fun(err: uv.callback.err, stat:uv.fs_stat.result|nil) ----@alias uv.fs_mkstemp.callback fun(err: uv.callback.err, fd?:integer, path?:string) ----@alias uv.fs_opendir.callback fun(err: uv.callback.err, dir?:uv.luv_dir_t) ----@alias uv.fs_open.callback fun(err: uv.callback.err, fd?:integer) ----@alias uv.fs_read.callback fun(err: uv.callback.err, data?:string) ----@alias uv.fs_scandir.callback fun(err: uv.callback.err, success?:uv.uv_fs_t) ----@alias uv.fs_sendfile.callback fun(err: uv.callback.err, bytes?:integer) ----@alias uv.fs_stat.callback fun(err: uv.callback.err, stat: uv.fs_stat.result|nil) ----@alias uv.getaddrinfo.callback fun(err: uv.callback.err, addresses:uv.getaddrinfo.result[]|nil) ----@alias uv.getnameinfo.callback fun(err: uv.callback.err, host?:string, service?:string) ----@alias uv.fs_write.callback fun(err: uv.callback.err, bytes?:integer) ----@alias uv.new_async.callback fun(...:uv.threadargs) ----@alias uv.new_work.after_work_callback fun(...:uv.threadargs) ----@alias uv.new_work.work_callback fun(...:uv.threadargs) ----@alias uv.poll_start.callback fun(err: uv.callback.err, events?:string) ----@alias uv.random.callback fun(err: uv.callback.err, bytes?:string) ----@alias uv.read_start.callback fun(err: uv.callback.err, data?:string) ----@alias uv.signal_start.callback fun(signum:string) ----@alias uv.signal_start_oneshot.callback fun(signum:string) ----@alias uv.spawn.on_exit fun(code:integer, signal:integer) ----@alias uv.fs_readlink.callback fun(err: uv.callback.err, path?:string) ----@alias uv.fs_realpath.callback fun(err: uv.callback.err, path?:string) ----@alias uv.fs_readdir.callback fun(err: uv.callback.err, entries: uv.fs_readdir.entry[]|nil) - - ----@class uv.fs_readdir.entry : table ----@field name string ----@field type string - - ----@class uv.udp_recv_start.callback.addr : table ----@field ip string ----@field port integer ----@field family uv.socket.family|string - ----@class uv.udp_recv_start.callback.flags : table ----@field partial boolean|nil ----@field mmsg_chunk boolean|nil - ----@alias uv.udp_recv_start.callback fun(err:string|nil, data:string|nil, addr:uv.udp_recv_start.callback.addr|nil, flags:uv.udp_recv_start.callback.flags) - ----@alias uv.walk.callback fun(handle:uv.uv_handle_t) - ----@alias uv.fs_statfs.callback fun(err: uv.callback.err, stat: uv.fs_statfs.result|nil) - ----@alias uv.pipe_connect.callback uv.callback ----@alias uv.shutdown.callback uv.callback ----@alias uv.tcp_connect.callback uv.callback ----@alias uv.udp_send.callback uv.callback ----@alias uv.write.callback uv.callback ----@alias uv.write2.callback uv.callback ----@alias uv.listen.callback uv.callback - ----@alias uv.fs_closedir.callback uv.callback_with_success ----@alias uv.fs_copyfile.callback uv.callback_with_success ----@alias uv.fs_symlink.callback uv.callback_with_success ----@alias uv.fs_unlink.callback uv.callback_with_success ----@alias uv.fs_utime.callback uv.callback_with_success ----@alias uv.fs_chmod.callback uv.callback_with_success ----@alias uv.fs_chown.callback uv.callback_with_success ----@alias uv.fs_close.callback uv.callback_with_success ----@alias uv.fs_fchmod.callback uv.callback_with_success ----@alias uv.fs_fchown.callback uv.callback_with_success ----@alias uv.fs_fdatasync.callback uv.callback_with_success ----@alias uv.fs_fsync.callback uv.callback_with_success ----@alias uv.fs_ftruncate.callback uv.callback_with_success ----@alias uv.fs_futime.callback uv.callback_with_success ----@alias uv.fs_lchown.callback uv.callback_with_success ----@alias uv.fs_link.callback uv.callback_with_success ----@alias uv.fs_lutime.callback uv.callback_with_success ----@alias uv.fs_mkdir.callback uv.callback_with_success ----@alias uv.fs_rename.callback uv.callback_with_success ----@alias uv.fs_rmdir.callback uv.callback_with_success - ----@class uv.fs_symlink.flags : table ----@field dir boolean ----@field junction boolean - ----@class uv.getaddrinfo.result : table ---- ----@field addr string ----@field family uv.socket.family|string ----@field port integer|nil ----@field socktype string ----@field protocol string ----@field canonname string|nil - ----@alias uv.callback.err string|nil - ----@alias uv.callback.success boolean|nil - ----@alias uv.callback fun(err: uv.callback.err) - ----@alias uv.callback_with_success fun(err: uv.callback.err, success: uv.callback.success) - - ----@alias uv.fs_open.flags string ----| "r" ----| "rs" ----| "sr" ----| "r+" ----| "rs+" ----| "sr+" ----| "w" ----| "wx" ----| "xw" ----| "w+" ----| "wx+" ----| "xw+" ----| "a" ----| "ax" ----| "xa" ----| "a+" ----| "ax+" ----| "xa+" ----| integer - - ----@class uv.cpu_info.cpu : table ----@field model string ----@field speed number ----@field times uv.cpu_info.cpu.times - ----@class uv.cpu_info.cpu.times : table ----@field user number ----@field nice number ----@field sys number ----@field idle number ----@field irq number - - ---- The name of the struct for a given request (e.g. `"fs"` for `uv_fs_t`) ---- and the libuv enum integer for the request's type (`uv_req_type`). ---- ----@alias uv.req_type.name ----| "async" ----| "check" ----| "fs_event" ----| "fs_poll" ----| "handle" ----| "idle" ----| "pipe" ----| "poll" ----| "prepare" ----| "process" ----| "req" ----| "signal" ----| "stream" ----| "tcp" ----| "timer" ----| "tty" ----| "udp" - - ---- The libuv enum integer for the request's type (`uv_req_type`). ----@alias uv.req_type.enum integer diff --git a/meta/3rd/luv/library/uv.lua b/meta/3rd/luv/library/uv.lua deleted file mode 100644 index bce0c22f..00000000 --- a/meta/3rd/luv/library/uv.lua +++ /dev/null @@ -1,3075 +0,0 @@ ----@meta - ---- The luv project provides access to the multi-platform support library ---- libuv in Lua code. It was primarily developed for the luvit project as ---- the built-in `uv` module, but can be used in other Lua environments. ---- ---- More information about the core libuv library can be found at the original ---- libuv documentation page. ---- ---- ---- Here is a small example showing a TCP echo server: ---- ---- ```lua ---- local uv = require("luv") -- "luv" when stand-alone, "uv" in luvi apps ---- ---- local server = uv.new_tcp() ---- server:bind("127.0.0.1", 1337) ---- server:listen(128, function (err) ---- assert(not err, err) ---- local client = uv.new_tcp() ---- server:accept(client) ---- client:read_start(function (err, chunk) ---- assert(not err, err) ---- if chunk then ---- client:write(chunk) ---- else ---- client:shutdown() ---- client:close() ---- end ---- end) ---- end) ---- print("TCP server listening at 127.0.0.1 port 1337") ---- uv.run() -- an explicit run call is necessary outside of luvit ---- ``` ---- ---- ---- The luv library contains a single Lua module referred to hereafter as `uv` for ---- simplicity. This module consists mostly of functions with names corresponding to ---- their original libuv versions. For example, the libuv function `uv_tcp_bind` has ---- a luv version at `uv.tcp_bind`. Currently, only one non-function field exists: ---- `uv.constants`, which is a table. ---- ---- ---- In addition to having simple functions, luv provides an optional method-style ---- API. For example, `uv.tcp_bind(server, host, port)` can alternatively be called ---- as `server:bind(host, port)`. Note that the first argument `server` becomes the ---- object and `tcp_` is removed from the function name. Method forms are ---- documented below where they exist. ---- ---- ---- Functions that accept a callback are asynchronous. These functions may ---- immediately return results to the caller to indicate their initial status, but ---- their final execution is deferred until at least the next libuv loop iteration. ---- After completion, their callbacks are executed with any results passed to it. ---- ---- Functions that do not accept a callback are synchronous. These functions ---- immediately return their results to the caller. ---- ---- Some (generally FS and DNS) functions can behave either synchronously or ---- asynchronously. If a callback is provided to these functions, they behave ---- asynchronously; if no callback is provided, they behave synchronously. ---- ---- ---- Some unique types are defined. These are not actual types in Lua, but they are ---- used here to facilitate documenting consistent behavior: ---- - `fail`: an assertable `nil, string, string` tuple (see Error handling) ---- - `callable`: a `function`; or a `table` or `userdata` with a `__call` ---- metamethod ---- - `buffer`: a `string` or a sequential `table` of `string`s ---- - `threadargs`: variable arguments (`...`) of type `nil`, `boolean`, `number`, ---- `string`, or `userdata` ---- ---- ---- This documentation is mostly a retelling of the libuv API documentation ---- within the context of luv's Lua API. Low-level implementation details and ---- unexposed C functions and types are not documented here except for when they ---- are relevant to behavior seen in the Lua module. ---- ---- [Error handling]: #error-handling ---- ---- In libuv, errors are negative numbered constants; however, these errors and the ---- functions used to handle them are not exposed to luv users. Instead, if an ---- internal error is encountered, the luv function will return to the caller an ---- assertable `nil, err, name` tuple. ---- ---- - `nil` idiomatically indicates failure ---- - `err` is a string with the format `{name}: {message}` ---- - `{name}` is the error name provided internally by `uv_err_name` ---- - `{message}` is a human-readable message provided internally by `uv_strerror` ---- - `name` is the same string used to construct `err` ---- ---- This tuple is referred to below as the `fail` pseudo-type. ---- ---- When a function is called successfully, it will return either a value that is ---- relevant to the operation of the function, or the integer `0` to indicate ---- success, or sometimes nothing at all. These cases are documented below. ---- ---- ---- [reference counting]: #reference-counting ---- ---- The libuv event loop (if run in the default mode) will run until there are no ---- active and referenced handles left. The user can force the loop to exit early by ---- unreferencing handles which are active, for example by calling `uv.unref()` ---- after calling `uv.timer_start()`. ---- ---- A handle can be referenced or unreferenced, the refcounting scheme doesn't use a ---- counter, so both operations are idempotent. ---- ---- All handles are referenced when active by default, see `uv.is_active()` for a ---- more detailed explanation on what being active involves. ---- ---- ---- [File system operations]: #file-system-operations ---- ---- Most file system functions can operate synchronously or asynchronously. When a synchronous version is called (by omitting a callback), the function will ---- immediately return the results of the FS call. When an asynchronous version is ---- called (by providing a callback), the function will immediately return a ---- `uv_fs_t userdata` and asynchronously execute its callback; if an error is encountered, the first and only argument passed to the callback will be the `err` error string; if the operation completes successfully, the first argument will be `nil` and the remaining arguments will be the results of the FS call. ---- ---- Synchronous and asynchronous versions of `readFile` (with naive error handling) ---- are implemented below as an example: ---- ---- ```lua ---- local function readFileSync(path) ---- local fd = assert(uv.fs_open(path, "r", 438)) ---- local stat = assert(uv.fs_fstat(fd)) ---- local data = assert(uv.fs_read(fd, stat.size, 0)) ---- assert(uv.fs_close(fd)) ---- return data ---- end ---- ---- local data = readFileSync("main.lua") ---- print("synchronous read", data) ---- ``` ---- ---- ```lua ---- local function readFile(path, callback) ---- uv.fs_open(path, "r", 438, function(err, fd) ---- assert(not err, err) ---- uv.fs_fstat(fd, function(err, stat) ---- assert(not err, err) ---- uv.fs_read(fd, stat.size, 0, function(err, data) ---- assert(not err, err) ---- uv.fs_close(fd, function(err) ---- assert(not err, err) ---- return callback(data) ---- end) ---- end) ---- end) ---- end) ---- end ---- ---- readFile("main.lua", function(data) ---- print("asynchronous read", data) ---- end) ---- ``` ---- ---- ---- [Thread pool work scheduling]: #thread-pool-work-scheduling ---- ---- Libuv provides a threadpool which can be used to run user code and get notified ---- in the loop thread. This threadpool is internally used to run all file system ---- operations, as well as `getaddrinfo` and `getnameinfo` requests. ---- ---- ```lua ---- local function work_callback(a, b) ---- return a + b ---- end ---- ---- local function after_work_callback(c) ---- print("The result is: " .. c) ---- end ---- ---- local work = uv.new_work(work_callback, after_work_callback) ---- ---- work:queue(1, 2) ---- ---- -- output: "The result is: 3" ---- ``` ---- ---- ---- [DNS utility functions]: #dns-utility-functions ---- ---- ---- [Threading and synchronization utilities]: #threading-and-synchronization-utilities ---- ---- Libuv provides cross-platform implementations for multiple threading an ---- synchronization primitives. The API largely follows the pthreads API. ---- ---- ---- [Miscellaneous utilities]: #miscellaneous-utilities ---- ---- ---- [Metrics operations]: #metrics-operations ---- ----@class uv ---- ----@field errno uv.errno ---- -local uv - - ---- This call is used in conjunction with `uv.listen()` to accept incoming ---- connections. Call this function after receiving a callback to accept the ---- connection. ---- ---- When the connection callback is called it is guaranteed that this function ---- will complete successfully the first time. If you attempt to use it more than ---- once, it may fail. It is suggested to only call this function once per ---- connection call. ---- ---- ```lua ---- server:listen(128, function (err) ---- local client = uv.new_tcp() ---- server:accept(client) ---- end) ---- ``` ---- ----@param stream uv.uv_stream_t ----@param client_stream uv.uv_stream_t ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.accept(stream, client_stream) end - - ---- Wakeup the event loop and call the async handle's callback. ---- ---- **Note**: It's safe to call this function from any thread. The callback will be ---- called on the loop thread. ---- ---- **Warning**: libuv will coalesce calls to `uv.async_send(async)`, that is, not ---- every call to it will yield an execution of the callback. For example: if ---- `uv.async_send()` is called 5 times in a row before the callback is called, the ---- callback will only be called once. If `uv.async_send()` is called again after ---- the callback was called, it will be called again. ---- ----@param async uv.uv_async_t ----@param ... uv.threadargs ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.async_send(async, ...) end - - - ---- Returns an estimate of the default amount of parallelism a program should use. Always returns a non-zero value. ---- ---- On Linux, inspects the calling thread’s CPU affinity mask to determine if it has been pinned to specific CPUs. ---- ---- On Windows, the available parallelism may be underreported on systems with more than 64 logical CPUs. ---- ---- On other platforms, reports the number of CPUs that the operating system considers to be online. ---- ----@return integer -function uv.available_parallelism() end - - - ---- Get backend file descriptor. Only kqueue, epoll, and event ports are supported. ---- ---- This can be used in conjunction with `uv.run("nowait")` to poll in one thread ---- and run the event loop's callbacks in another ---- ---- **Note**: Embedding a kqueue fd in another kqueue pollset doesn't work on all ---- platforms. It's not an error to add the fd but it never generates events. ---- ----@return integer|nil fd -function uv.backend_fd() end - - - ---- Get the poll timeout. The return value is in milliseconds, or -1 for no timeout. ---- ----@return integer -function uv.backend_timeout() end - - ---- Cancel a pending request. Fails if the request is executing or has finished ---- executing. Only cancellation of `uv_fs_t`, `uv_getaddrinfo_t`, ---- `uv_getnameinfo_t` and `uv_work_t` requests is currently supported. ---- ----@param req uv.uv_req_t ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.cancel(req) end - - - ---- Sets the current working directory with the string `cwd`. ---- ----@param cwd string ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.chdir(cwd) end - - ---- Start the handle with the given callback. ---- ----@param check uv.uv_check_t ----@param callback function ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.check_start(check, callback) end - - ---- Stop the handle, the callback will no longer be called. ---- ----@param check uv.uv_check_t ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.check_stop(check) end - - ---- Request handle to be closed. `callback` will be called asynchronously after this ---- call. This MUST be called on each handle before memory is released. ---- ---- Handles that wrap file descriptors are closed immediately but `callback` will ---- still be deferred to the next iteration of the event loop. It gives you a chance ---- to free up any resources associated with the handle. ---- ---- In-progress requests, like `uv_connect_t` or `uv_write_t`, are cancelled and ---- have their callbacks called asynchronously with `ECANCELED`. ---- ----@param handle uv.uv_handle_t ----@param callback? function -function uv.close(handle, callback) end - - - ---- Returns information about the CPU(s) on the system as a table of tables for each ---- CPU found. ---- ---- **Returns:** `table` or `fail` ---- - `[1, 2, 3, ..., n]` : `table` ---- - `model` : `string` ---- - `speed` : `number` ---- - `times` : `table` ---- - `user` : `number` ---- - `nice` : `number` ---- - `sys` : `number` ---- - `idle` : `number` ---- - `irq` : `number` ---- ----@return uv.cpu_info.cpu[]|nil info ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.cpu_info() end - - - ---- Returns the current working directory. ---- ----@return string|nil cwd ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.cwd() end - - - ---- Disables inheritance for file descriptors / handles that this process inherited ---- from its parent. The effect is that child processes spawned by this process ---- don't accidentally inherit these handles. ---- ---- It is recommended to call this function as early in your program as possible, ---- before the inherited file descriptors can be closed or duplicated. ---- ---- **Note:** This function works on a best-effort basis: there is no guarantee that ---- libuv can discover all file descriptors that were inherited. In general it does ---- a better job on Windows than it does on Unix. -function uv.disable_stdio_inheritance() end - - - ---- Returns the executable path. ---- ----@return string|nil exepath ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.exepath() end - - ---- Gets the platform dependent file descriptor equivalent. ---- ---- The following handles are supported: TCP, pipes, TTY, UDP and poll. Passing any ---- other handle type will fail with `EINVAL`. ---- ---- If a handle doesn't have an attached file descriptor yet or the handle itself ---- has been closed, this function will return `EBADF`. ---- ---- **Warning**: Be very careful when using this function. libuv assumes it's in ---- control of the file descriptor so any change to it may lead to malfunction. ---- ----@param handle uv.uv_handle_t ----@return integer|nil fileno ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.fileno(handle) end - - - ---- Equivalent to `access(2)` on Unix. Windows uses `GetFileAttributesW()`. Access ---- `mode` can be an integer or a string containing `"R"` or `"W"` or `"X"`. ---- Returns `true` or `false` indicating access permission. ---- ----@param path string ----@param mode integer|string ----@return boolean|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(path:string, mode:integer|string, callback:uv.fs_access.callback):uv.uv_fs_t -function uv.fs_access(path, mode) end - - - ---- Equivalent to `chmod(2)`. ---- ----@param path string ----@param mode integer ----@return boolean|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(path:string, mode:integer, callback:uv.fs_chmod.callback):uv.uv_fs_t -function uv.fs_chmod(path, mode) end - - - ---- Equivalent to `chown(2)`. ---- ----@param path string ----@param uid integer ----@param gid integer ----@return boolean|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(path:string, uid:integer, gid:integer, callback:uv.fs_chown.callback):uv.uv_fs_t -function uv.fs_chown(path, uid, gid) end - - - ---- Equivalent to `close(2)`. ---- ----@param fd integer ----@return boolean|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(fd:integer, callback:uv.fs_close.callback):uv.uv_fs_t -function uv.fs_close(fd) end - - ---- Closes a directory stream returned by a successful `uv.fs_opendir()` call. ---- ----@param dir uv.luv_dir_t ----@return boolean|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(dir:uv.luv_dir_t, callback:uv.fs_closedir.callback):uv.uv_fs_t -function uv.fs_closedir(dir) end - - - ---- Copies a file from path to new_path. If the `flags` parameter is omitted, then the 3rd parameter will be treated as the `callback`. ---- ---- **Returns (sync version):** `boolean` or `fail` ---- ---- **Returns (async version):** `uv_fs_t userdata` ---- ----@param path string ----@param new_path string ----@param flags? uv.fs_copyfile.flags ----@return boolean|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(path:string, new_path:string, flags?:uv.fs_copyfile.flags, callback:uv.fs_copyfile.callback):uv.uv_fs_t ----@overload fun(path:string, new_path:string, callback:uv.fs_copyfile.callback):uv.uv_fs_t -function uv.fs_copyfile(path, new_path, flags) end - - ---- Get the path being monitored by the handle. ---- ----@param fs_event uv.uv_fs_event_t ----@return string|nil path ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.fs_event_getpath(fs_event) end - - ---- Start the handle with the given callback, which will watch the specified path ---- for changes. ---- ----@param fs_event uv.uv_fs_event_t ----@param path string ----@param flags uv.fs_event_start.flags ----@param callback uv.fs_event_start.callback ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.fs_event_start(fs_event, path, flags, callback) end - - ---- Stop the handle, the callback will no longer be called. ---- ----@param fs_event uv.uv_fs_event_t ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.fs_event_stop(fs_event) end - - - ---- Equivalent to `fchmod(2)`. ---- ----@param fd integer ----@param mode integer ----@return boolean|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(fd:integer, mode:integer, callback:uv.fs_fchmod.callback):uv.uv_fs_t -function uv.fs_fchmod(fd, mode) end - - - ---- Equivalent to `fchown(2)`. ---- ----@param fd integer ----@param uid integer ----@param gid integer ----@return boolean|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(fd:integer, uid:integer, gid:integer, callback:uv.fs_fchown.callback):uv.uv_fs_t -function uv.fs_fchown(fd, uid, gid) end - - - ---- Equivalent to `fdatasync(2)`. ---- ----@param fd integer ----@return boolean|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(fd:integer, callback:uv.fs_fdatasync.callback):uv.uv_fs_t -function uv.fs_fdatasync(fd) end - - - ---- Equivalent to `fstat(2)`. ---- ---- **Returns (sync version):** `table` or `fail` (see `uv.fs_stat`) ---- ---- **Returns (async version):** `uv_fs_t userdata` ---- ----@param fd integer ----@return uv.fs_stat.result|nil stat ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(fd:integer, callback:uv.fs_fstat.callback):uv.uv_fs_t -function uv.fs_fstat(fd) end - - - ---- Equivalent to `fsync(2)`. ---- ----@param fd integer ----@return boolean|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(fd:integer, callback:uv.fs_fsync.callback):uv.uv_fs_t -function uv.fs_fsync(fd) end - - - ---- Equivalent to `ftruncate(2)`. ---- ----@param fd integer ----@param offset integer ----@return boolean|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(fd:integer, offset:integer, callback:uv.fs_ftruncate.callback):uv.uv_fs_t -function uv.fs_ftruncate(fd, offset) end - - - ---- Equivalent to `futime(2)`. ---- ----@param fd integer ----@param atime number ----@param mtime number ----@return boolean|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(fd:integer, atime:number, mtime:number, callback:uv.fs_futime.callback):uv.uv_fs_t -function uv.fs_futime(fd, atime, mtime) end - - - ---- Equivalent to `lchown(2)`. ---- ----@param fd integer ----@param uid integer ----@param gid integer ----@return boolean|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(fd:integer, uid:integer, gid:integer, callback:uv.fs_lchown.callback):uv.uv_fs_t -function uv.fs_lchown(fd, uid, gid) end - - - ---- Equivalent to `link(2)`. ---- ---- **Returns (sync version):** `boolean` or `fail` ---- ---- **Returns (async version):** `uv_fs_t userdata` ---- ----@param path string ----@param new_path string ----@return boolean|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(path:string, new_path:string, callback:uv.fs_link.callback):uv.uv_fs_t -function uv.fs_link(path, new_path) end - - - ---- Equivalent to `lstat(2)`. ---- ---- **Returns (sync version):** `table` or `fail` (see `uv.fs_stat`) ---- ---- **Returns (async version):** `uv_fs_t userdata` ---- ----@param path integer ----@return uv.fs_stat.result|nil stat ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(path:integer, callback:uv.fs_lstat.callback):uv.uv_fs_t -function uv.fs_lstat(path) end - - - ---- Equivalent to `lutime(2)`. ---- ----@param path string ----@param atime number ----@param mtime number ----@return boolean|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(path:string, atime:number, mtime:number, callback:uv.fs_lutime.callback):uv.uv_fs_t -function uv.fs_lutime(path, atime, mtime) end - - - ---- Equivalent to `mkdir(2)`. ---- ----@param path string ----@param mode integer ----@return boolean|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(path:string, mode:integer, callback:uv.fs_mkdir.callback):uv.uv_fs_t -function uv.fs_mkdir(path, mode) end - - - ---- Equivalent to `mkdtemp(3)`. ---- ----@param template string ----@return string|nil path ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(template:string, callback:uv.fs_mkdtemp.callback):uv.uv_fs_t -function uv.fs_mkdtemp(template) end - - - ---- Equivalent to `mkstemp(3)`. Returns a temporary file handle and filename. ---- ----@param template string ----@return integer|nil fd ----@return string path_or_errmsg ----@return uv.error.name|nil err_name ---- ----@overload fun(template:string, callback:uv.fs_mkstemp.callback):uv.uv_fs_t -function uv.fs_mkstemp(template) end - - - ---- Equivalent to `open(2)`. Access `flags` may be an integer or one of: `"r"`, ---- `"rs"`, `"sr"`, `"r+"`, `"rs+"`, `"sr+"`, `"w"`, `"wx"`, `"xw"`, `"w+"`, ---- `"wx+"`, `"xw+"`, `"a"`, `"ax"`, `"xa"`, `"a+"`, `"ax+"`, or "`xa+`". ---- ---- **Returns (sync version):** `integer` or `fail` ---- ---- **Returns (async version):** `uv_fs_t userdata` ---- ---- **Note:** On Windows, libuv uses `CreateFileW` and thus the file is always ---- opened in binary mode. Because of this, the `O_BINARY` and `O_TEXT` flags are ---- not supported. ---- ----@param path string ----@param flags uv.fs_open.flags ----@param mode integer ----@return integer|nil fd ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(path:string, flags:uv.fs_open.flags, mode:integer, callback:uv.fs_open.callback):uv.uv_fs_t -function uv.fs_open(path, flags, mode) end - - - ---- Opens path as a directory stream. Returns a handle that the user can pass to ---- `uv.fs_readdir()`. The `entries` parameter defines the maximum number of entries ---- that should be returned by each call to `uv.fs_readdir()`. ---- ---- **Returns (sync version):** `luv_dir_t userdata` or `fail` ---- ---- **Returns (async version):** `uv_fs_t userdata` ---- ----@param path string ----@return uv.luv_dir_t|nil dir ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(path: string, callback: uv.fs_opendir.callback, entries?: integer):uv.uv_fs_t -function uv.fs_opendir(path) end - - ---- Get the path being monitored by the handle. ---- ----@param fs_poll uv.uv_fs_poll_t ----@return string|nil path ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.fs_poll_getpath(fs_poll) end - - ---- Check the file at `path` for changes every `interval` milliseconds. ---- ---- **Note:** For maximum portability, use multi-second intervals. Sub-second ---- intervals will not detect all changes on many file systems. ---- ----@param fs_poll uv.uv_fs_poll_t ----@param path string ----@param interval integer ----@param callback uv.fs_poll_start.callback ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.fs_poll_start(fs_poll, path, interval, callback) end - - ---- Stop the handle, the callback will no longer be called. ---- ----@param fs_poll uv.uv_fs_poll_t ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.fs_poll_stop(fs_poll) end - - - ---- Equivalent to `preadv(2)`. Returns any data. An empty string indicates EOF. ---- ---- If `offset` is nil or omitted, it will default to `-1`, which indicates 'use and update the current file offset.' ---- ---- **Note:** When `offset` is >= 0, the current file offset will not be updated by the read. ---- ----@param fd integer ----@param size integer ----@param offset? integer ----@return string|nil data ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(fd:integer, size:integer, offset?:integer, callback:uv.fs_read.callback):uv.uv_fs_t -function uv.fs_read(fd, size, offset) end - - ---- Iterates over the directory stream `luv_dir_t` returned by a successful ---- `uv.fs_opendir()` call. A table of data tables is returned where the number ---- of entries `n` is equal to or less than the `entries` parameter used in ---- the associated `uv.fs_opendir()` call. ---- ----@param dir uv.luv_dir_t ----@return uv.fs_readdir.entry[]|nil entries ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(dir:uv.luv_dir_t, callback:uv.fs_readdir.callback):uv.uv_fs_t -function uv.fs_readdir(dir) end - - - ---- Equivalent to `readlink(2)`. ---- ----@param path string ----@return string|nil path ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(path:string, callback:uv.fs_readlink.callback):uv.uv_fs_t -function uv.fs_readlink(path) end - - - ---- Equivalent to `realpath(3)`. ---- ----@param path string ----@return string|nil realpath ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(path:string, callback:uv.fs_realpath.callback):uv.uv_fs_t -function uv.fs_realpath(path) end - - - ---- Equivalent to `rename(2)`. ---- ----@param path string ----@param new_path string ----@return boolean|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(path:string, new_path:string, callback:uv.fs_rename.callback):uv.uv_fs_t -function uv.fs_rename(path, new_path) end - - - ---- Equivalent to `rmdir(2)`. ---- ----@param path string ----@return boolean|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(path:string, callback:uv.fs_rmdir.callback):uv.uv_fs_t -function uv.fs_rmdir(path) end - - - ---- Equivalent to `scandir(3)`, with a slightly different API. Returns a handle that ---- the user can pass to `uv.fs_scandir_next()`. ---- ---- **Note:** This function can be used synchronously or asynchronously. The request ---- userdata is always synchronously returned regardless of whether a callback is ---- provided and the same userdata is passed to the callback if it is provided. ---- ----@param path string ----@param callback? uv.fs_scandir.callback ----@return uv.uv_fs_t|nil fs ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.fs_scandir(path, callback) end - - - ---- Called on a `uv_fs_t` returned by `uv.fs_scandir()` to get the next directory ---- entry data as a `name, type` pair. When there are no more entries, `nil` is ---- returned. ---- ---- **Note:** This function only has a synchronous version. See `uv.fs_opendir` and ---- its related functions for an asynchronous version. ---- ----@param fs uv.uv_fs_t ----@return string|nil name ----@return string type_or_errmsg ----@return uv.error.name|nil err_name -function uv.fs_scandir_next(fs) end - - - ---- Limited equivalent to `sendfile(2)`. Returns the number of bytes written. ---- ----@param out_fd integer ----@param in_fd integer ----@param in_offset integer ----@param size integer ----@return integer|nil bytes ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(out_fd:integer, in_fd:integer, in_offset:integer, size:integer, callback:uv.fs_sendfile.callback):uv.uv_fs_t -function uv.fs_sendfile(out_fd, in_fd, in_offset, size) end - - - ---- Equivalent to `stat(2)`. ---- ---- **Returns (sync version):** `table` or `fail` ---- - `dev` : `integer` ---- - `mode` : `integer` ---- - `nlink` : `integer` ---- - `uid` : `integer` ---- - `gid` : `integer` ---- - `rdev` : `integer` ---- - `ino` : `integer` ---- - `size` : `integer` ---- - `blksize` : `integer` ---- - `blocks` : `integer` ---- - `flags` : `integer` ---- - `gen` : `integer` ---- - `atime` : `table` ---- - `sec` : `integer` ---- - `nsec` : `integer` ---- - `mtime` : `table` ---- - `sec` : `integer` ---- - `nsec` : `integer` ---- - `ctime` : `table` ---- - `sec` : `integer` ---- - `nsec` : `integer` ---- - `birthtime` : `table` ---- - `sec` : `integer` ---- - `nsec` : `integer` ---- - `type` : `string` ---- ---- **Returns (async version):** `uv_fs_t userdata` ---- ----@param path string ----@return uv.fs_stat.result|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(path:string, callback:uv.fs_stat.callback):uv.uv_fs_t -function uv.fs_stat(path) end - - ---- Equivalent to `statfs(2)`. ---- ---- **Returns** `table` or `nil` ---- - `type` : `integer` ---- - `bsize` : `integer` ---- - `blocks` : `integer` ---- - `bfree` : `integer` ---- - `bavail` : `integer` ---- - `files` : `integer` ---- - `ffree` : `integer` ---- ----@param path string ----@return uv.fs_statfs.result|nil stat ---- ----@overload fun(path: string, callback: uv.fs_statfs.callback) -function uv.fs_statfs(path) end - - - ---- Equivalent to `symlink(2)`. If the `flags` parameter is omitted, then the 3rd parameter will be treated as the `callback`. ---- ---- ----@param path string ----@param new_path string ----@param flags? uv.fs_symlink.flags|integer ----@return boolean|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(path:string, new_path:string, flags?:uv.fs_symlink.flags|integer, callback:uv.fs_symlink.callback):uv.uv_fs_t ----@overload fun(path:string, new_path:string, callback:uv.fs_symlink.callback):uv.uv_fs_t -function uv.fs_symlink(path, new_path, flags) end - - - ---- Equivalent to `unlink(2)`. ---- ----@param path string ----@return boolean|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(path:string, callback:uv.fs_unlink.callback):uv.uv_fs_t -function uv.fs_unlink(path) end - - - ---- Equivalent to `utime(2)`. ---- ----@param path string ----@param atime number ----@param mtime number ----@return boolean|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(path:string, atime:number, mtime:number, callback:uv.fs_utime.callback):uv.uv_fs_t -function uv.fs_utime(path, atime, mtime) end - - - ---- Equivalent to `pwritev(2)`. Returns the number of bytes written. ---- ---- If `offset` is nil or omitted, it will default to `-1`, which indicates 'use and update the current file offset.' ---- ---- **Note:** When `offset` is >= 0, the current file offset will not be updated by the write. ---- ----@param fd integer ----@param data uv.buffer ----@param offset? integer ----@return integer|nil bytes ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(fd:integer, data:uv.buffer, offset?:integer, callback:uv.fs_write.callback):uv.uv_fs_t -function uv.fs_write(fd, data, offset) end - - - ---- Gets the amount of memory available to the process in bytes based on limits ---- imposed by the OS. If there is no such constraint, or the constraint is unknown, ---- 0 is returned. Note that it is not unusual for this value to be less than or ---- greater than the total system memory. ---- ----@return number -function uv.get_constrained_memory() end - - - ---- Returns the current free system memory in bytes. ---- ----@return number -function uv.get_free_memory() end - - - ---- Returns the title of the current process. ---- ----@return string|nil title ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.get_process_title() end - - - ---- Returns the current total system memory in bytes. ---- ---- **Returns:** `number` ---- ----@return number -function uv.get_total_memory() end - - - ---- Equivalent to `getaddrinfo(3)`. Either `node` or `service` may be `nil` but not ---- both. ---- ---- Valid hint strings for the keys that take a string: ---- - `family`: `"unix"`, `"inet"`, `"inet6"`, `"ipx"`, ---- `"netlink"`, `"x25"`, `"ax25"`, `"atmpvc"`, `"appletalk"`, or `"packet"` ---- - `socktype`: `"stream"`, `"dgram"`, `"raw"`, ---- `"rdm"`, or `"seqpacket"` ---- - `protocol`: will be looked up using the `getprotobyname(3)` function (examples: `"ip"`, `"icmp"`, `"tcp"`, `"udp"`, etc) ---- ---- **Returns (sync version):** `table` or `fail` ---- - `[1, 2, 3, ..., n]` : `table` ---- - `addr` : `string` ---- - `family` : `string` ---- - `port` : `integer` or `nil` ---- - `socktype` : `string` ---- - `protocol` : `string` ---- - `canonname` : `string` or `nil` ---- ---- **Returns (async version):** `uv_getaddrinfo_t userdata` or `fail` ---- ----@param host string ----@param service string ----@param hints? uv.getaddrinfo.hints ----@return uv.getaddrinfo.result[]|nil info ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(host:string, service:string, hints?:uv.getaddrinfo.hints, callback:uv.getaddrinfo.callback):uv.uv_getaddrinfo_t userdata|nil, string?, string? -function uv.getaddrinfo(host, service, hints) end - - - ---- Returns the group ID of the process. ---- ---- **Note:** This is not a libuv function and is not supported on Windows. ---- ----@return integer -function uv.getgid() end - - - ---- Equivalent to `getnameinfo(3)`. ---- ---- When specified, `family` must be one of `"unix"`, `"inet"`, `"inet6"`, `"ipx"`, ---- `"netlink"`, `"x25"`, `"ax25"`, `"atmpvc"`, `"appletalk"`, or `"packet"`. ---- ---- **Returns (sync version):** `string, string` or `fail` ---- ---- **Returns (async version):** `uv_getnameinfo_t userdata` or `fail` ---- ----@param address uv.getnameinfo.address ----@return string|nil host ----@return string service_or_errmsg ----@return uv.error.name|nil err_name ---- ----@overload fun(address:uv.getnameinfo.address, callback:uv.getnameinfo.callback):uv.uv_getnameinfo_t|nil, string|nil, string|nil -function uv.getnameinfo(address) end - - - ---- **Deprecated:** Please use `uv.os_getpid()` instead. ---- -function uv.getpid() end - - - ---- Returns the resource usage. ---- ---- **Returns:** `table` or `fail` ---- - `utime` : `table` (user CPU time used) ---- - `sec` : `integer` ---- - `usec` : `integer` ---- - `stime` : `table` (system CPU time used) ---- - `sec` : `integer` ---- - `usec` : `integer` ---- - `maxrss` : `integer` (maximum resident set size) ---- - `ixrss` : `integer` (integral shared memory size) ---- - `idrss` : `integer` (integral unshared data size) ---- - `isrss` : `integer` (integral unshared stack size) ---- - `minflt` : `integer` (page reclaims (soft page faults)) ---- - `majflt` : `integer` (page faults (hard page faults)) ---- - `nswap` : `integer` (swaps) ---- - `inblock` : `integer` (block input operations) ---- - `oublock` : `integer` (block output operations) ---- - `msgsnd` : `integer` (IPC messages sent) ---- - `msgrcv` : `integer` (IPC messages received) ---- - `nsignals` : `integer` (signals received) ---- - `nvcsw` : `integer` (voluntary context switches) ---- - `nivcsw` : `integer` (involuntary context switches) ---- ----@return uv.getrusage.result|nil usage ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.getrusage() end - - - ---- Cross-platform implementation of `gettimeofday(2)`. Returns the seconds and ---- microseconds of a unix time as a pair. ---- ----@return integer|nil seconds ----@return integer|string usecs_or_errmsg ----@return uv.error.name|nil err_name -function uv.gettimeofday() end - - - ---- Returns the user ID of the process. ---- ---- **Note:** This is not a libuv function and is not supported on Windows. ---- ----@return integer -function uv.getuid() end - - - ---- Used to detect what type of stream should be used with a given file ---- descriptor `fd`. Usually this will be used during initialization to guess the ---- type of the stdio streams. ---- ----@param fd integer ----@return string -function uv.guess_handle(fd) end - - ---- Returns the name of the struct for a given handle (e.g. `"pipe"` for `uv_pipe_t`) ---- and the libuv enum integer for the handle's type (`uv_handle_type`). ---- ----@param handle uv.uv_handle_t ----@return string type ----@return integer enum -function uv.handle_get_type(handle) end - - ---- Returns `true` if the handle referenced, `false` if not. ---- ---- See [Reference counting][]. ---- ----@param handle uv.uv_handle_t ----@return boolean|nil has_ref ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.has_ref(handle) end - - - ---- Returns a current high-resolution time in nanoseconds as a number. This is ---- relative to an arbitrary time in the past. It is not related to the time of day ---- and therefore not subject to clock drift. The primary use is for measuring ---- time between intervals. ---- ---- **Returns:** `number` ---- ----@return number -function uv.hrtime() end - - ---- Start the handle with the given callback. ---- ----@param idle uv.uv_idle_t ----@param callback function ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.idle_start(idle, callback) end - - ---- Stop the handle, the callback will no longer be called. ---- ----@param idle uv.uv_idle_t ----@param check any ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.idle_stop(idle, check) end - - - ---- Retrieves a network interface identifier suitable for use in an IPv6 scoped ---- address. On Windows, returns the numeric `ifindex` as a string. On all other ---- platforms, `uv.if_indextoname()` is used. ---- ----@param ifindex integer ----@return string|nil id ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.if_indextoiid(ifindex) end - - - ---- IPv6-capable implementation of `if_indextoname(3)`. ---- ----@param ifindex integer ----@return string|nil name ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.if_indextoname(ifindex) end - - ---- Returns address information about the network interfaces on the system in a ---- table. Each table key is the name of the interface while each associated value ---- is an array of address information where fields are `ip`, `family`, `netmask`, ---- `internal`, and `mac`. ---- ----@return table -function uv.interface_addresses() end - - ---- Returns `true` if the handle is active, `false` if it's inactive. What "active” ---- means depends on the type of handle: ---- ---- - A [`uv_async_t`][] handle is always active and cannot be deactivated, except ---- by closing it with `uv.close()`. ---- ---- - A [`uv_pipe_t`][], [`uv_tcp_t`][], [`uv_udp_t`][], etc. handle - basically ---- any handle that deals with I/O - is active when it is doing something that ---- involves I/O, like reading, writing, connecting, accepting new connections, ---- etc. ---- ---- - A [`uv_check_t`][], [`uv_idle_t`][], [`uv_timer_t`][], etc. handle is active ---- when it has been started with a call to `uv.check_start()`, `uv.idle_start()`, ---- `uv.timer_start()` etc. until it has been stopped with a call to its ---- respective stop function. ---- ----@param handle uv.uv_handle_t ----@return boolean|nil active ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.is_active(handle) end - - ---- Returns `true` if the handle is closing or closed, `false` otherwise. ---- ---- **Note**: This function should only be used between the initialization of the ---- handle and the arrival of the close callback. ---- ----@param handle uv.uv_handle_t ----@return boolean|nil closing ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.is_closing(handle) end - - ---- Returns `true` if the stream is readable, `false` otherwise. ---- ----@param stream uv.uv_stream_t ----@return boolean -function uv.is_readable(stream) end - - ---- Returns `true` if the stream is writable, `false` otherwise. ---- ----@param stream uv.uv_stream_t ----@return boolean -function uv.is_writable(stream) end - - ---- Sends the specified signal to the given PID. Check the documentation on ---- `uv_signal_t` for signal support, specially on Windows. ---- ----@param pid integer ----@param signum integer|string ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.kill(pid, signum) end - - ---- Start listening for incoming connections. `backlog` indicates the number of ---- connections the kernel might queue, same as `listen(2)`. When a new incoming ---- connection is received the callback is called. ---- ---- **Returns:** `0` or `fail` ---- ----@param stream uv.uv_stream_t ----@param backlog integer ----@param callback uv.listen.callback ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.listen(stream, backlog, callback) end - - ---- Returns the load average as a triad. Not supported on Windows. ---- ----@return number ----@return number ----@return number -function uv.loadavg() end - - - ---- Returns `true` if there are referenced active handles, active requests, or ---- closing handles in the loop; otherwise, `false`. ---- ----@return boolean|nil alive ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.loop_alive() end - - - ---- Closes all internal loop resources. In normal execution, the loop will ---- automatically be closed when it is garbage collected by Lua, so it is not ---- necessary to explicitly call `loop_close()`. Call this function only after the ---- loop has finished executing and all open handles and requests have been closed, ---- or it will return `EBUSY`. ---- ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.loop_close() end - - - ---- Set additional loop options. You should normally call this before the first call ---- to uv_run() unless mentioned otherwise. ---- ---- Supported options: ---- ---- - `"block_signal"`: Block a signal when polling for new events. The second argument ---- to loop_configure() is the signal name (as a lowercase string) or the signal number. ---- This operation is currently only implemented for `"sigprof"` signals, to suppress ---- unnecessary wakeups when using a sampling profiler. Requesting other signals will ---- fail with `EINVAL`. ---- - `"metrics_idle_time"`: Accumulate the amount of idle time the event loop spends ---- in the event provider. This option is necessary to use `metrics_idle_time()`. ---- ---- An example of a valid call to this function is: ---- ---- ```lua ---- uv.loop_configure("block_signal", "sigprof") ---- ``` ---- ---- **Note:** Be prepared to handle the `ENOSYS` error; it means the loop option is ---- not supported by the platform. ---- ----@param option "block_signal" ----@param value "sigprof" ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(option: "metrics_idle_time"):(success:0|nil, err:uv.error.message|nil, err_name:uv.error.name|nil) -function uv.loop_configure(option, value) end - - ---- If the loop is running, returns a string indicating the mode in use. If the loop ---- is not running, `nil` is returned instead. ---- ----@return string|nil -function uv.loop_mode() end - - ---- Retrieve the amount of time the event loop has been idle in the kernel’s event ---- provider (e.g. `epoll_wait`). The call is thread safe. ---- ---- The return value is the accumulated time spent idle in the kernel’s event ---- provider starting from when the [`uv_loop_t`][] was configured to collect the idle time. ---- ---- **Note:** The event loop will not begin accumulating the event provider’s idle ---- time until calling `loop_configure` with `"metrics_idle_time"`. ---- ---- **Returns:** `number` ---- ---- --- ---- ---- [luv]: https://github.com/luvit/luv ---- [luvit]: https://github.com/luvit/luvit ---- [libuv]: https://github.com/libuv/libuv ---- [libuv documentation page]: http://docs.libuv.org/ ---- [libuv API documentation]: http://docs.libuv.org/en/v1.x/api.html ---- ----@return number -function uv.metrics_idle_time() end - - ---- Creates and initializes a new `uv_async_t`. Returns the Lua userdata wrapping ---- it. A `nil` callback is allowed. ---- ---- **Note**: Unlike other handle initialization functions, this immediately starts ---- the handle. ---- ----@param callback? uv.new_async.callback ----@return uv.uv_async_t|nil async ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.new_async(callback) end - - ---- Creates and initializes a new `uv_check_t`. Returns the Lua userdata wrapping ---- it. ---- ----@return uv.uv_check_t|nil check ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.new_check() end - - ---- Creates and initializes a new `uv_fs_event_t`. Returns the Lua userdata wrapping ---- it. ---- ----@return uv.uv_fs_event_t|nil fs_event ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.new_fs_event() end - - ---- Creates and initializes a new `uv_fs_poll_t`. Returns the Lua userdata wrapping ---- it. ---- ----@return uv.uv_fs_poll_t|nil fs_poll ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.new_fs_poll() end - - ---- Creates and initializes a new `uv_idle_t`. Returns the Lua userdata wrapping ---- it. ---- ----@return uv.uv_idle_t|nil idle ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.new_idle() end - - ---- Creates and initializes a new `uv_pipe_t`. Returns the Lua userdata wrapping ---- it. The `ipc` argument is a boolean to indicate if this pipe will be used for ---- handle passing between processes. ---- ----@param ipc? boolean|false ----@return uv.uv_pipe_t|nil pipe ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.new_pipe(ipc) end - - ---- Initialize the handle using a file descriptor. ---- ---- The file descriptor is set to non-blocking mode. ---- ----@param fd integer ----@return uv.uv_poll_t|nil poll ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.new_poll(fd) end - - ---- Creates and initializes a new `uv_prepare_t`. Returns the Lua userdata wrapping ---- it. ---- ----@return uv.uv_prepare_t|nil prepare ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.new_prepare() end - - ---- Creates and initializes a new `uv_signal_t`. Returns the Lua userdata wrapping ---- it. ---- ----@return uv.uv_signal_t|nil signal ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.new_signal() end - - ---- Initialize the handle using a socket descriptor. On Unix this is identical to ---- `uv.new_poll()`. On windows it takes a SOCKET handle. ---- ---- The socket is set to non-blocking mode. ---- ----@param fd integer ----@return uv.uv_poll_t|nil poll ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.new_socket_poll(fd) end - - ---- Creates and initializes a new `uv_tcp_t`. Returns the Lua userdata wrapping it. ---- Flags may be a family string: `"unix"`, `"inet"`, `"inet6"`, `"ipx"`, ---- `"netlink"`, `"x25"`, `"ax25"`, `"atmpvc"`, `"appletalk"`, or `"packet"`. ---- ----@param flags? uv.socket.family ----@return uv.uv_tcp_t|nil tcp ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.new_tcp(flags) end - - - ---- Creates and initializes a `luv_thread_t` (not `uv_thread_t`). Returns the Lua ---- userdata wrapping it and asynchronously executes `entry`, which can be either ---- a Lua function or a Lua function dumped to a string. Additional arguments `...` ---- are passed to the `entry` function and an optional `options` table may be ---- provided. Currently accepted `option` fields are `stack_size`. ---- ----@param options? uv.new_thread.options ----@param entry function ----@param ... uv.threadargs ----@return uv.luv_thread_t|nil thread ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.new_thread(options, entry, ...) end - - - ---- Creates and initializes a new `uv_timer_t`. Returns the Lua userdata wrapping ---- it. ---- ---- ```lua ---- -- Creating a simple setTimeout wrapper ---- local function setTimeout(timeout, callback) ---- local timer = uv.new_timer() ---- timer:start(timeout, 0, function () ---- timer:stop() ---- timer:close() ---- callback() ---- end) ---- return timer ---- end ---- ---- -- Creating a simple setInterval wrapper ---- local function setInterval(interval, callback) ---- local timer = uv.new_timer() ---- timer:start(interval, interval, function () ---- callback() ---- end) ---- return timer ---- end ---- ---- -- And clearInterval ---- local function clearInterval(timer) ---- timer:stop() ---- timer:close() ---- end ---- ``` ---- ----@return uv.uv_timer_t|nil timer ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.new_timer() end - - - ---- Initialize a new TTY stream with the given file descriptor. Usually the file ---- descriptor will be: ---- ---- - 0 - stdin ---- - 1 - stdout ---- - 2 - stderr ---- ---- On Unix this function will determine the path of the fd of the terminal using ---- ttyname_r(3), open it, and use it if the passed file descriptor refers to a TTY. ---- This lets libuv put the tty in non-blocking mode without affecting other ---- processes that share the tty. ---- ---- This function is not thread safe on systems that don’t support ioctl TIOCGPTN or TIOCPTYGNAME, for instance OpenBSD and Solaris. ---- ---- **Note:** If reopening the TTY fails, libuv falls back to blocking writes. ---- ----@param fd integer ----@param readable boolean ----@return uv.uv_tty_t|nil tty ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.new_tty(fd, readable) end - - - ---- Creates and initializes a new `uv_udp_t`. Returns the Lua userdata wrapping ---- it. The actual socket is created lazily. ---- ---- When specified, `family` must be one of `"unix"`, `"inet"`, `"inet6"`, ---- `"ipx"`, `"netlink"`, `"x25"`, `"ax25"`, `"atmpvc"`, `"appletalk"`, or ---- `"packet"`. ---- ---- When specified, `mmsgs` determines the number of messages able to be received ---- at one time via `recvmmsg(2)` (the allocated buffer will be sized to be able ---- to fit the specified number of max size dgrams). Only has an effect on ---- platforms that support `recvmmsg(2)`. ---- ---- **Note:** For backwards compatibility reasons, `flags` can also be a string or ---- integer. When it is a string, it will be treated like the `family` key above. ---- When it is an integer, it will be used directly as the `flags` parameter when ---- calling `uv_udp_init_ex`. ---- ---- **Returns:** `uv_udp_t userdata` or `fail` ---- ----@param flags? uv.new_udp.flags|uv.new_udp.flags.family|integer ----@return uv.uv_udp_t|nil udp ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.new_udp(flags) end - - - ---- Creates and initializes a new `luv_work_ctx_t` (not `uv_work_t`). Returns the ---- Lua userdata wrapping it. ---- ---- **Parameters:** ---- - `work_callback`: `function` ---- - `...`: `threadargs` passed to/from `uv.queue_work(work_ctx, ...)` ---- - `after_work_callback`: `function` ---- - `...`: `threadargs` returned from `work_callback` ---- ----@param work_callback uv.new_work.work_callback ----@param after_work_callback uv.new_work.after_work_callback ----@return uv.luv_work_ctx_t -function uv.new_work(work_callback, after_work_callback) end - - - ---- Returns the current timestamp in milliseconds. The timestamp is cached at the ---- start of the event loop tick, see `uv.update_time()` for details and rationale. ---- ---- The timestamp increases monotonically from some arbitrary point in time. Don't ---- make assumptions about the starting point, you will only get disappointed. ---- ---- **Note**: Use `uv.hrtime()` if you need sub-millisecond granularity. ---- ----@return integer -function uv.now() end - - - ---- Returns all environmental variables as a dynamic table of names associated with ---- their corresponding values. ---- ---- **Warning:** This function is not thread safe. ---- ----@return table -function uv.os_environ() end - - - ---- Returns password file information. ---- ----@return uv.os_get_passwd.info -function uv.os_get_passwd() end - - - ---- Returns the environment variable specified by `name` as string. The internal ---- buffer size can be set by defining `size`. If omitted, `LUAL_BUFFERSIZE` is ---- used. If the environment variable exceeds the storage available in the internal ---- buffer, `ENOBUFS` is returned. If no matching environment variable exists, ---- `ENOENT` is returned. ---- ---- **Warning:** This function is not thread safe. ---- ----@param name string ----@param size? integer # (default = `LUAL_BUFFERSIZE`) ----@return string|nil value ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.os_getenv(name, size) end - - - ---- Returns the hostname. ---- ----@return string -function uv.os_gethostname() end - - - ---- Returns the current process ID. ---- ----@return number -function uv.os_getpid() end - - - ---- Returns the parent process ID. ---- ----@return number -function uv.os_getppid() end - - - ---- Returns the scheduling priority of the process specified by `pid`. ---- ----@param pid integer ----@return number|nil priority ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.os_getpriority(pid) end - - - ---- **Warning:** This function is not thread safe. ---- ----@return string|nil homedir ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.os_homedir() end - - ---- Sets the environmental variable specified by `name` with the string `value`. ---- ---- **Warning:** This function is not thread safe. ---- ----@param name string ----@param value string ----@return boolean|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.os_setenv(name, value) end - - ---- Sets the scheduling priority of the process specified by `pid`. The `priority` ---- range is between -20 (high priority) and 19 (low priority). ---- ----@param pid integer ----@param priority integer ----@return boolean|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.os_setpriority(pid, priority) end - - ---- **Warning:** This function is not thread safe. ---- ----@return string|nil tmpdir ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.os_tmpdir() end - - - ---- Returns system information. ---- ----@return uv.os_uname.info -function uv.os_uname() end - - - ---- **Warning:** This function is not thread safe. ---- ----@return boolean|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.os_unsetenv() end - - - ---- Create a pair of connected pipe handles. Data may be written to the `write` fd and read from the `read` fd. The resulting handles can be passed to `pipe_open`, used with `spawn`, or for any other purpose. ---- ---- Flags: ---- - `nonblock`: Opens the specified socket handle for `OVERLAPPED` or `FIONBIO`/`O_NONBLOCK` I/O usage. This is recommended for handles that will be used by libuv, and not usually recommended otherwise. ---- ---- Equivalent to `pipe(2)` with the `O_CLOEXEC` flag set. ---- ---- **Returns:** `table` or `fail` ---- - `read` : `integer` (file descriptor) ---- - `write` : `integer` (file descriptor) ---- ---- ```lua ---- -- Simple read/write with pipe_open ---- local fds = uv.pipe({nonblock=true}, {nonblock=true}) ---- ---- local read_pipe = uv.new_pipe() ---- read_pipe:open(fds.read) ---- ---- local write_pipe = uv.new_pipe() ---- write_pipe:open(fds.write) ---- ---- write_pipe:write("hello") ---- read_pipe:read_start(function(err, chunk) ---- assert(not err, err) ---- print(chunk) ---- end) ---- ``` ---- ----@param read_flags uv.pipe.read_flags ----@param write_flags uv.pipe.write_flags ----@return uv.pipe.fds|nil fds ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.pipe(read_flags, write_flags) end - - ---- Bind the pipe to a file path (Unix) or a name (Windows). ---- ---- **Note**: Paths on Unix get truncated to sizeof(sockaddr_un.sun_path) bytes, ---- typically between 92 and 108 bytes. ---- ----@param pipe uv.uv_pipe_t ----@param name string ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.pipe_bind(pipe, name) end - - ---- Alters pipe permissions, allowing it to be accessed from processes run by different users. ---- Makes the pipe writable or readable by all users. `flags` are: `"r"`, `"w"`, `"rw"`, or `"wr"` ---- where `r` is `READABLE` and `w` is `WRITABLE`. This function is blocking. ---- ----@param pipe uv.uv_pipe_t ----@param flags uv.pipe_chmod.flags ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.pipe_chmod(pipe, flags) end - - ---- Connect to the Unix domain socket or the named pipe. ---- ---- **Note**: Paths on Unix get truncated to sizeof(sockaddr_un.sun_path) bytes, ---- typically between 92 and 108 bytes. ---- ----@param pipe uv.uv_pipe_t ----@param name string ----@param callback? uv.pipe_connect.callback ----@return uv.uv_connect_t|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.pipe_connect(pipe, name, callback) end - - ---- Get the name of the Unix domain socket or the named pipe to which the handle is ---- connected. ---- ----@param pipe uv.uv_pipe_t ----@return string|nil peername ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.pipe_getpeername(pipe) end - - ---- Get the name of the Unix domain socket or the named pipe. ---- ----@param pipe uv.uv_pipe_t ----@return string|nil sockname ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.pipe_getsockname(pipe) end - - ---- Open an existing file descriptor or [`uv_handle_t`][] as a pipe. ---- ---- **Note**: The file descriptor is set to non-blocking mode. ---- ----@param pipe uv.uv_pipe_t ----@param fd integer ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.pipe_open(pipe, fd) end - - ---- Returns the pending pipe count for the named pipe. ---- ----@param pipe uv.uv_pipe_t ----@return integer -function uv.pipe_pending_count(pipe) end - - ---- Set the number of pending pipe instance handles when the pipe server is waiting ---- for connections. ---- ---- **Note**: This setting applies to Windows only. ---- ----@param pipe uv.uv_pipe_t ----@param count integer -function uv.pipe_pending_instances(pipe, count) end - - ---- Used to receive handles over IPC pipes. ---- ---- First - call `uv.pipe_pending_count()`, if it's > 0 then initialize a handle of ---- the given type, returned by `uv.pipe_pending_type()` and call ---- `uv.accept(pipe, handle)`. ---- ----@param pipe uv.uv_pipe_t ----@return string -function uv.pipe_pending_type(pipe) end - - ---- Starts polling the file descriptor. ---- ---- `events` are: `"r"`, `"w"`, `"rw"`, `"d"`, ---- `"rd"`, `"wd"`, `"rwd"`, `"p"`, `"rp"`, `"wp"`, `"rwp"`, `"dp"`, `"rdp"`, ---- `"wdp"`, or `"rwdp"` where `r` is `READABLE`, `w` is `WRITABLE`, `d` is ---- `DISCONNECT`, and `p` is `PRIORITIZED`. As soon as an event is detected ---- the callback will be called with status set to 0, and the detected events set on ---- the events field. ---- ---- The user should not close the socket while the handle is active. If the user ---- does that anyway, the callback may be called reporting an error status, but this ---- is not guaranteed. ---- ---- **Note** Calling `uv.poll_start()` on a handle that is already active is fine. ---- Doing so will update the events mask that is being watched for. ---- ----@param poll uv.uv_poll_t ----@param events uv.poll.eventspec ----@param callback uv.poll_start.callback ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.poll_start(poll, events, callback) end - - ---- Stop polling the file descriptor, the callback will no longer be called. ---- ----@param poll uv.uv_poll_t ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.poll_stop(poll) end - - ---- Start the handle with the given callback. ---- ----@param prepare uv.uv_prepare_t ----@param callback function ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.prepare_start(prepare, callback) end - - ---- Stop the handle, the callback will no longer be called. ---- ----@param prepare uv.uv_prepare_t ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.prepare_stop(prepare) end - - ---- The same as `uv.print_all_handles()` except only active handles are printed. ---- ---- **Note:** This is not available on Windows. ---- ---- **Warning:** This function is meant for ad hoc debugging, there are no API/ABI ---- stability guarantees. -function uv.print_active_handles() end - - ---- Prints all handles associated with the main loop to stderr. The format is ---- `[flags] handle-type handle-address`. Flags are `R` for referenced, `A` for ---- active and `I` for internal. ---- ---- **Note:** This is not available on Windows. ---- ---- **Warning:** This function is meant for ad hoc debugging, there are no API/ABI ---- stability guarantees. -function uv.print_all_handles() end - - ---- Returns the handle's pid. ---- ----@param process uv.uv_process_t ----@return integer pid -function uv.process_get_pid(process) end - - ---- Sends the specified signal to the given process handle. Check the documentation ---- on `uv_signal_t` for signal support, specially on Windows. ---- ----@param process uv.uv_process_t ----@param signum integer|string ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.process_kill(process, signum) end - - ---- Queues a work request which will run `work_callback` in a new Lua state in a ---- thread from the threadpool with any additional arguments from `...`. Values ---- returned from `work_callback` are passed to `after_work_callback`, which is ---- called in the main loop thread. ---- ----@param work_ctx uv.luv_work_ctx_t ----@param ... uv.threadargs ----@return boolean|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.queue_work(work_ctx, ...) end - - ---- Fills a string of length `len` with cryptographically strong random bytes ---- acquired from the system CSPRNG. `flags` is reserved for future extension ---- and must currently be `nil` or `0` or `{}`. ---- ---- Short reads are not possible. When less than `len` random bytes are available, ---- a non-zero error value is returned or passed to the callback. If the callback ---- is omitted, this function is completed synchronously. ---- ---- The synchronous version may block indefinitely when not enough entropy is ---- available. The asynchronous version may not ever finish when the system is ---- low on entropy. ---- ---- **Returns (sync version):** `string` or `fail` ---- ---- **Returns (async version):** `0` or `fail` ---- ----@param len integer ----@param flags? nil|0|{} ----@return string|nil bytes ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(len:integer, flags?:nil, callback:uv.random.callback):0|nil, string?, string? -function uv.random(len, flags) end - - ---- Read data from an incoming stream. The callback will be made several times until ---- there is no more data to read or `uv.read_stop()` is called. When we've reached ---- EOF, `data` will be `nil`. ---- ---- ```lua ---- stream:read_start(function (err, chunk) ---- if err then ---- -- handle read error ---- elseif chunk then ---- -- handle data ---- else ---- -- handle disconnect ---- end ---- end) ---- ``` ---- ----@param stream uv.uv_stream_t ----@param callback uv.read_start.callback ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.read_start(stream, callback) end - - ---- Stop reading data from the stream. The read callback will no longer be called. ---- ---- This function is idempotent and may be safely called on a stopped stream. ---- ----@param stream uv.uv_stream_t ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.read_stop(stream) end - - ---- Gets or sets the size of the receive buffer that the operating system uses for ---- the socket. ---- ---- If `size` is omitted (or `0`), this will return the current send buffer size; otherwise, this will use `size` to set the new send buffer size. ---- ---- This function works for TCP, pipe and UDP handles on Unix and for TCP and UDP ---- handles on Windows. ---- ---- **Note**: Linux will set double the size and return double the size of the ---- original set value. ---- ----@param handle uv.uv_handle_t ----@param size? integer # default is `0` ----@return integer|nil size_or_ok ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.recv_buffer_size(handle, size) end - - ---- Reference the given handle. References are idempotent, that is, if a handle is ---- already referenced calling this function again will have no effect. ---- ---- See [Reference counting][]. ---- ----@param handle uv.uv_handle_t -function uv.ref(handle) end - - ---- Returns the name of the struct for a given request (e.g. `"fs"` for `uv_fs_t`) ---- and the libuv enum integer for the request's type (`uv_req_type`). ---- ----@param req uv.uv_req_t ----@return uv.req_type.name type ----@return uv.req_type.enum enum -function uv.req_get_type(req) end - - ---- Returns the resident set size (RSS) for the current process. ---- ----@return integer|nil rss ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.resident_set_memory() end - - ---- This function runs the event loop. It will act differently depending on the ---- specified mode: ---- ---- - `"default"`: Runs the event loop until there are no more active and ---- referenced handles or requests. Returns `true` if `uv.stop()` was called and ---- there are still active handles or requests. Returns `false` in all other ---- cases. ---- ---- - `"once"`: Poll for I/O once. Note that this function blocks if there are no ---- pending callbacks. Returns `false` when done (no active handles or requests ---- left), or `true` if more callbacks are expected (meaning you should run the ---- event loop again sometime in the future). ---- ---- - `"nowait"`: Poll for I/O once but don't block if there are no pending ---- callbacks. Returns `false` if done (no active handles or requests left), ---- or `true` if more callbacks are expected (meaning you should run the event ---- loop again sometime in the future). ---- ---- **Note:** Luvit will implicitly call `uv.run()` after loading user code, but if ---- you use the luv bindings directly, you need to call this after registering ---- your initial set of event callbacks to start the event loop. ---- ----@param mode? uv.run.mode ----@return boolean -function uv.run(mode) end - - ---- Gets or sets the size of the send buffer that the operating system uses for the ---- socket. ---- ---- If `size` is omitted (or `0`), this will return the current send buffer size; otherwise, this will use `size` to set the new send buffer size. ---- ---- This function works for TCP, pipe and UDP handles on Unix and for TCP and UDP ---- handles on Windows. ---- ---- **Returns:** ---- - `integer` or `fail` (if `size` is `nil` or `0`) ---- - `0` or `fail` (if `size` is not `nil` and not `0`) ---- ---- **Note**: Linux will set double the size and return double the size of the ---- original set value. ---- ----@param handle uv.uv_handle_t ----@param size? integer|0 ----@return integer|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(handle: uv.uv_handle_t):(size:integer|nil, err:uv.error.message|nil, err_name:uv.error.name|nil) ----@overload fun(handle: uv.uv_handle_t, size:0):(size:integer|nil, err:uv.error.message|nil, err_name:uv.error.name|nil) -function uv.send_buffer_size(handle, size) end - - ---- Sets the title of the current process with the string `title`. ---- ----@param title string ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.set_process_title(title) end - - ---- Sets the group ID of the process with the integer `id`. ---- ---- **Note:** This is not a libuv function and is not supported on Windows. ---- ----@param id integer -function uv.setgid(id) end - - ---- Sets the user ID of the process with the integer `id`. ---- ---- **Note:** This is not a libuv function and is not supported on Windows. ---- ----@param id integer -function uv.setuid(id) end - - ---- Shutdown the outgoing (write) side of a duplex stream. It waits for pending ---- write requests to complete. The callback is called after shutdown is complete. ---- ----@param stream uv.uv_stream_t ----@param callback? uv.shutdown.callback ----@return uv.uv_shutdown_t|nil shutdown ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.shutdown(stream, callback) end - - ---- Start the handle with the given callback, watching for the given signal. ---- ----@param signal uv.uv_signal_t ----@param signum integer|string ----@param callback uv.signal_start.callback ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.signal_start(signal, signum, callback) end - - ---- Same functionality as `uv.signal_start()` but the signal handler is reset the moment the signal is received. ---- ----@param signal uv.uv_signal_t ----@param signum integer|string ----@param callback uv.signal_start_oneshot.callback ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.signal_start_oneshot(signal, signum, callback) end - - ---- Stop the handle, the callback will no longer be called. ----@param signal uv.uv_signal_t ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.signal_stop(signal) end - - ---- Pauses the thread in which this is called for a number of milliseconds. ----@param msec integer -function uv.sleep(msec) end - - ---- Create a pair of connected sockets with the specified properties. The resulting handles can be passed to `uv.tcp_open`, used with `uv.spawn`, or for any other purpose. ---- ---- When specified as a string, `socktype` must be one of `"stream"`, `"dgram"`, `"raw"`, ---- `"rdm"`, or `"seqpacket"`. ---- ---- When `protocol` is set to 0 or nil, it will be automatically chosen based on the socket's domain and type. When `protocol` is specified as a string, it will be looked up using the `getprotobyname(3)` function (examples: `"ip"`, `"icmp"`, `"tcp"`, `"udp"`, etc). ---- ---- Flags: ---- - `nonblock`: Opens the specified socket handle for `OVERLAPPED` or `FIONBIO`/`O_NONBLOCK` I/O usage. This is recommended for handles that will be used by libuv, and not usually recommended otherwise. ---- ---- Equivalent to `socketpair(2)` with a domain of `AF_UNIX`. ---- ---- **Returns:** `table` or `fail` ---- - `[1, 2]` : `integer` (file descriptor) ---- ---- ```lua ---- -- Simple read/write with tcp ---- local fds = uv.socketpair(nil, nil, {nonblock=true}, {nonblock=true}) ---- ---- local sock1 = uv.new_tcp() ---- sock1:open(fds[1]) ---- ---- local sock2 = uv.new_tcp() ---- sock2:open(fds[2]) ---- ---- sock1:write("hello") ---- sock2:read_start(function(err, chunk) ---- assert(not err, err) ---- print(chunk) ---- end) ---- ``` ---- ----@param socktype? uv.socketpair.socktype ----@param protocol? uv.socketpair.protocol ----@param flags1? uv.socketpair.flags ----@param flags2? uv.socketpair.flags ----@return uv.socketpair.fds|nil fds ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.socketpair(socktype, protocol, flags1, flags2) end - - ---- Initializes the process handle and starts the process. If the process is ---- successfully spawned, this function will return the handle and pid of the child ---- process. ---- ---- Possible reasons for failing to spawn would include (but not be limited to) the ---- file to execute not existing, not having permissions to use the setuid or setgid ---- specified, or not having enough memory to allocate for the new process. ---- ---- ```lua ---- local stdin = uv.new_pipe() ---- local stdout = uv.new_pipe() ---- local stderr = uv.new_pipe() ---- ---- print("stdin", stdin) ---- print("stdout", stdout) ---- print("stderr", stderr) ---- ---- local handle, pid = uv.spawn("cat", { ---- stdio = {stdin, stdout, stderr} ---- }, function(code, signal) -- on exit ---- print("exit code", code) ---- print("exit signal", signal) ---- end) ---- ---- print("process opened", handle, pid) ---- ---- uv.read_start(stdout, function(err, data) ---- assert(not err, err) ---- if data then ---- print("stdout chunk", stdout, data) ---- else ---- print("stdout end", stdout) ---- end ---- end) ---- ---- uv.read_start(stderr, function(err, data) ---- assert(not err, err) ---- if data then ---- print("stderr chunk", stderr, data) ---- else ---- print("stderr end", stderr) ---- end ---- end) ---- ---- uv.write(stdin, "Hello World") ---- ---- uv.shutdown(stdin, function() ---- print("stdin shutdown", stdin) ---- uv.close(handle, function() ---- print("process closed", handle, pid) ---- end) ---- end) ---- ``` ---- ---- The `options` table accepts the following fields: ---- ---- - `options.args` - Command line arguments as a list of string. The first ---- string should be the path to the program. On Windows, this uses CreateProcess ---- which concatenates the arguments into a string. This can cause some strange ---- errors. (See `options.verbatim` below for Windows.) ---- - `options.stdio` - Set the file descriptors that will be made available to ---- the child process. The convention is that the first entries are stdin, stdout, ---- and stderr. (**Note**: On Windows, file descriptors after the third are ---- available to the child process only if the child processes uses the MSVCRT ---- runtime.) ---- - `options.env` - Set environment variables for the new process. ---- - `options.cwd` - Set the current working directory for the sub-process. ---- - `options.uid` - Set the child process' user id. ---- - `options.gid` - Set the child process' group id. ---- - `options.verbatim` - If true, do not wrap any arguments in quotes, or ---- perform any other escaping, when converting the argument list into a command ---- line string. This option is only meaningful on Windows systems. On Unix it is ---- silently ignored. ---- - `options.detached` - If true, spawn the child process in a detached state - ---- this will make it a process group leader, and will effectively enable the ---- child to keep running after the parent exits. Note that the child process ---- will still keep the parent's event loop alive unless the parent process calls ---- `uv.unref()` on the child's process handle. ---- - `options.hide` - If true, hide the subprocess console window that would ---- normally be created. This option is only meaningful on Windows systems. On ---- Unix it is silently ignored. ---- ---- The `options.stdio` entries can take many shapes. ---- ---- - If they are numbers, then the child process inherits that same zero-indexed ---- fd from the parent process. ---- - If `uv_stream_t` handles are passed in, those are used as a read-write pipe ---- or inherited stream depending if the stream has a valid fd. ---- - Including `nil` placeholders means to ignore that fd in the child process. ---- ---- When the child process exits, `on_exit` is called with an exit code and signal. ---- ----@param path string ----@param options uv.spawn.options ----@param on_exit uv.spawn.on_exit ----@return uv.uv_process_t proc ----@return integer pid -function uv.spawn(path, options, on_exit) end - - ---- Stop the event loop, causing `uv.run()` to end as soon as possible. This ---- will happen not sooner than the next loop iteration. If this function was called ---- before blocking for I/O, the loop won't block for I/O on this iteration. -function uv.stop() end - - ---- Returns the stream's write queue size. ---- ----@param stream uv.uv_stream_t ----@return integer -function uv.stream_get_write_queue_size(stream) end - - ---- Enable or disable blocking mode for a stream. ---- ---- When blocking mode is enabled all writes complete synchronously. The interface ---- remains unchanged otherwise, e.g. completion or failure of the operation will ---- still be reported through a callback which is made asynchronously. ---- ---- **Warning**: Relying too much on this API is not recommended. It is likely to ---- change significantly in the future. Currently this only works on Windows and ---- only for `uv_pipe_t` handles. Also libuv currently makes no ordering guarantee ---- when the blocking mode is changed after write requests have already been ---- submitted. Therefore it is recommended to set the blocking mode immediately ---- after opening or creating the stream. ---- ----@param stream uv.uv_stream_t ----@param blocking boolean ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.stream_set_blocking(stream, blocking) end - - ---- Bind the handle to an host and port. `host` should be an IP address and ---- not a domain name. Any `flags` are set with a table with field `ipv6only` ---- equal to `true` or `false`. ---- ---- When the port is already taken, you can expect to see an `EADDRINUSE` error ---- from either `uv.tcp_bind()`, `uv.listen()` or `uv.tcp_connect()`. That is, a ---- successful call to this function does not guarantee that the call to `uv.listen()` ---- or `uv.tcp_connect()` will succeed as well. ---- ---- Use a port of `0` to let the OS assign an ephemeral port. You can look it up ---- later using `uv.tcp_getsockname()`. ---- ----@param tcp uv.uv_tcp_t ----@param host string ----@param port integer ----@param flags? uv.tcp_bind.flags ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.tcp_bind(tcp, host, port, flags) end - - ---- Resets a TCP connection by sending a RST packet. This is accomplished by setting ---- the SO_LINGER socket option with a linger interval of zero and then calling ---- `uv.close()`. Due to some platform inconsistencies, mixing of `uv.shutdown()` ---- and `uv.tcp_close_reset()` calls is not allowed. ---- ----@param tcp uv.uv_tcp_t ----@param callback? function ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.tcp_close_reset(tcp, callback) end - - ---- Establish an IPv4 or IPv6 TCP connection. ---- ---- ```lua ---- local client = uv.new_tcp() ---- client:connect("127.0.0.1", 8080, function (err) ---- -- check error and carry on. ---- end) ---- ``` ---- ----@param tcp uv.uv_tcp_t ----@param host string ----@param port integer ----@param callback uv.tcp_connect.callback ----@return uv.uv_connect_t|nil conn ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.tcp_connect(tcp, host, port, callback) end - - ---- Get the address of the peer connected to the handle. ---- ----@param tcp uv.uv_tcp_t ----@return uv.socketinfo|nil sockname ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.tcp_getpeername(tcp) end - - ---- Get the current address to which the handle is bound. ---- ----@param tcp uv.uv_tcp_t ----@return uv.socketinfo|nil sockname ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.tcp_getsockname(tcp) end - - ---- Enable / disable TCP keep-alive. `delay` is the initial delay in seconds, ---- ignored when enable is `false`. ---- ----@param tcp uv.uv_tcp_t ----@param enable boolean ----@param delay? integer ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.tcp_keepalive(tcp, enable, delay) end - - ---- Enable / disable Nagle's algorithm. ---- ----@param tcp uv.uv_tcp_t ----@param enable boolean ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.tcp_nodelay(tcp, enable) end - - ---- Open an existing file descriptor or SOCKET as a TCP handle. ---- ---- **Note:** The passed file descriptor or SOCKET is not checked for its type, but it's required that it represents a valid stream socket. ---- ----@param tcp uv.uv_tcp_t ----@param sock integer ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.tcp_open(tcp, sock) end - - ---- Enable / disable simultaneous asynchronous accept requests that are queued by ---- the operating system when listening for new TCP connections. ---- ---- This setting is used to tune a TCP server for the desired performance. Having ---- simultaneous accepts can significantly improve the rate of accepting connections ---- (which is why it is enabled by default) but may lead to uneven load distribution ---- in multi-process setups. ---- ----@param tcp uv.uv_tcp_t ----@param enable boolean ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.tcp_simultaneous_accepts(tcp, enable) end - - ---- **Deprecated:** Please use `uv.stream_get_write_queue_size()` instead. ---- ----@param tcp uv.uv_tcp_t -function uv.tcp_write_queue_size(tcp) end - - ---- Returns a boolean indicating whether two threads are the same. This function is ---- equivalent to the `__eq` metamethod. ---- ----@param thread uv.luv_thread_t ----@param other_thread uv.luv_thread_t ----@return boolean equal -function uv.thread_equal(thread, other_thread) end - - ---- Waits for the `thread` to finish executing its entry function. ---- ----@param thread uv.luv_thread_t ----@return boolean|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.thread_join(thread) end - - ---- Returns the handle for the thread in which this is called. ---- ----@return uv.luv_thread_t -function uv.thread_self() end - - ---- Stop the timer, and if it is repeating restart it using the repeat value as the ---- timeout. If the timer has never been started before it raises `EINVAL`. ---- ----@param timer uv.uv_timer_t ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.timer_again(timer) end - - ---- Get the timer due value or 0 if it has expired. The time is relative to `uv.now()`. ---- ---- **Note**: New in libuv version 1.40.0. ---- ----@param timer uv.uv_timer_t ----@return integer -function uv.timer_get_due_in(timer) end - - ---- Get the timer repeat value. ---- ----@param timer uv.uv_timer_t ----@return integer -function uv.timer_get_repeat(timer) end - - ---- Set the repeat interval value in milliseconds. The timer will be scheduled to ---- run on the given interval, regardless of the callback execution duration, and ---- will follow normal timer semantics in the case of a time-slice overrun. ---- ---- For example, if a 50 ms repeating timer first runs for 17 ms, it will be ---- scheduled to run again 33 ms later. If other tasks consume more than the 33 ms ---- following the first timer callback, then the callback will run as soon as ---- possible. ---- ----@param timer uv.uv_timer_t ----@param repeat_ integer -function uv.timer_set_repeat(timer, repeat_) end - - ---- Start the timer. `timeout` and `repeat` are in milliseconds. ---- ---- If `timeout` is zero, the callback fires on the next event loop iteration. If ---- `repeat` is non-zero, the callback fires first after `timeout` milliseconds and ---- then repeatedly after `repeat` milliseconds. ---- ----@param timer uv.uv_timer_t ----@param timeout integer ----@param repeat_ integer ----@param callback function ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.timer_start(timer, timeout, repeat_, callback) end - - ---- Stop the timer, the callback will not be called anymore. ---- ----@param timer uv.uv_timer_t ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.timer_stop(timer) end - - ---- Returns the libuv error message and error name (both in string form, see [`err` and `name` in Error Handling](#error-handling)) equivalent to the given platform dependent error code: POSIX error codes on Unix (the ones stored in errno), and Win32 error codes on Windows (those returned by GetLastError() or WSAGetLastError()). ---- ----@param errcode integer ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.translate_sys_error(errcode) end - - ---- Same as `uv.write()`, but won't queue a write request if it can't be completed ---- immediately. ---- ---- Will return number of bytes written (can be less than the supplied buffer size). ---- ----@param stream uv.uv_stream_t ----@param data uv.buffer ----@return integer|nil bytes ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.try_write(stream, data) end - - ---- Like `uv.write2()`, but with the properties of `uv.try_write()`. Not supported on Windows, where it returns `UV_EAGAIN`. ---- ---- Will return number of bytes written (can be less than the supplied buffer size). ---- ---- **Returns:** `integer` or `fail` ---- ----@param stream uv.uv_stream_t ----@param data uv.buffer ----@param send_handle uv.uv_stream_t ----@return integer|nil bytes ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.try_write2(stream, data, send_handle) end - - ---- Get the current state of whether console virtual terminal sequences are handled ---- by libuv or the console. The return value is `"supported"` or `"unsupported"`. ---- ---- This function is not implemented on Unix, where it returns `ENOTSUP`. ---- ----@return "supported"|"unsupported"|nil state ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.tty_get_vterm_state() end - - ---- Gets the current Window width and height. ---- ---- **Returns:** `integer, integer` or `fail` ---- ----@param tty uv.uv_tty_t ----@return integer|nil width ----@return integer|string height_or_errmsg ----@return uv.error.name|nil err_name -function uv.tty_get_winsize(tty) end - - ---- To be called when the program exits. Resets TTY settings to default values for ---- the next process to take over. ---- ---- This function is async signal-safe on Unix platforms but can fail with error ---- code `EBUSY` if you call it when execution is inside `uv.tty_set_mode()`. ---- ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.tty_reset_mode() end - - ---- Set the TTY using the specified terminal mode. ---- ---- Parameter `mode` is a C enum with the following values: ---- ---- - 0 - UV_TTY_MODE_NORMAL: Initial/normal terminal mode ---- - 1 - UV_TTY_MODE_RAW: Raw input mode (On Windows, ENABLE_WINDOW_INPUT is ---- also enabled) ---- - 2 - UV_TTY_MODE_IO: Binary-safe I/O mode for IPC (Unix-only) ---- ----@param tty uv.uv_tty_t ----@param mode uv.tty.mode ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.tty_set_mode(tty, mode) end - - ---- Controls whether console virtual terminal sequences are processed by libuv or ---- console. Useful in particular for enabling ConEmu support of ANSI X3.64 and ---- Xterm 256 colors. Otherwise Windows10 consoles are usually detected ---- automatically. State should be one of: `"supported"` or `"unsupported"`. ---- ---- This function is only meaningful on Windows systems. On Unix it is silently ---- ignored. ---- ----@param state "supported"|"unsupported" -function uv.tty_set_vterm_state(state) end - - ---- Bind the UDP handle to an IP address and port. Any `flags` are set with a table ---- with fields `reuseaddr` or `ipv6only` equal to `true` or `false`. ---- ----@param udp uv.uv_udp_t ----@param host string ----@param port integer ----@param flags? uv.udp_bind.flags ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.udp_bind(udp, host, port, flags) end - - ---- Associate the UDP handle to a remote address and port, so every message sent by ---- this handle is automatically sent to that destination. Calling this function ---- with a NULL addr disconnects the handle. Trying to call `uv.udp_connect()` on an ---- already connected handle will result in an `EISCONN` error. Trying to disconnect ---- a handle that is not connected will return an `ENOTCONN` error. ---- ----@param udp uv.uv_udp_t ----@param host string ----@param port integer ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.udp_connect(udp, host, port) end - - ---- Returns the handle's send queue count. ---- ----@param udp uv.uv_udp_t ----@return integer count -function uv.udp_get_send_queue_count(udp) end - - ---- Returns the handle's send queue size. ---- ----@param udp uv.uv_udp_t ----@return integer size -function uv.udp_get_send_queue_size(udp) end - - ---- Get the remote IP and port of the UDP handle on connected UDP handles. ---- ----@param udp uv.uv_udp_t ----@return uv.udp.sockname|nil peername ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.udp_getpeername(udp) end - - ---- Get the local IP and port of the UDP handle. ---- ----@param udp uv.uv_udp_t ----@return uv.udp.sockname|nil sockname ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.udp_getsockname(udp) end - - ---- Opens an existing file descriptor or Windows SOCKET as a UDP handle. ---- ---- Unix only: The only requirement of the sock argument is that it follows the ---- datagram contract (works in unconnected mode, supports sendmsg()/recvmsg(), ---- etc). In other words, other datagram-type sockets like raw sockets or netlink ---- sockets can also be passed to this function. ---- ---- The file descriptor is set to non-blocking mode. ---- ---- Note: The passed file descriptor or SOCKET is not checked for its type, but ---- it's required that it represents a valid datagram socket. ---- ----@param udp uv.uv_udp_t ----@param fd integer ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.udp_open(udp, fd) end - - ---- Prepare for receiving data. If the socket has not previously been bound with ---- `uv.udp_bind()` it is bound to `0.0.0.0` (the "all interfaces" IPv4 address) ---- and a random port number. ---- ----@param udp uv.uv_udp_t ----@param callback uv.udp_recv_start.callback ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.udp_recv_start(udp, callback) end - - ---- Stop listening for incoming datagrams. ---- ----@param udp uv.uv_udp_t ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.udp_recv_stop(udp) end - - ---- Send data over the UDP socket. If the socket has not previously been bound ---- with `uv.udp_bind()` it will be bound to `0.0.0.0` (the "all interfaces" IPv4 ---- address) and a random port number. ---- ----@param udp uv.uv_udp_t ----@param data uv.buffer ----@param host string ----@param port integer ----@param callback uv.udp_send.callback ----@return uv.uv_udp_send_t|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.udp_send(udp, data, host, port, callback) end - - ---- Set broadcast on or off. ---- ----@param udp uv.uv_udp_t ----@param on boolean ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.udp_set_broadcast(udp, on) end - - ---- Set membership for a multicast address. `multicast_addr` is multicast address to ---- set membership for. `interface_addr` is interface address. `membership` can be ---- the string `"leave"` or `"join"`. ---- ----@param udp uv.uv_udp_t ----@param multicast_addr string ----@param interface_addr string ----@param membership "leave"|"join" ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.udp_set_membership(udp, multicast_addr, interface_addr, membership) end - - ---- Set the multicast interface to send or receive data on. ---- ----@param udp uv.uv_udp_t ----@param interface_addr string ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.udp_set_multicast_interface(udp, interface_addr) end - - ---- Set IP multicast loop flag. Makes multicast packets loop back to local ---- sockets. ---- ----@param udp uv.uv_udp_t ----@param on boolean ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.udp_set_multicast_loop(udp, on) end - - ---- Set the multicast ttl. ---- ---- `ttl` is an integer 1 through 255. ---- ----@param udp uv.uv_udp_t ----@param ttl integer ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.udp_set_multicast_ttl(udp, ttl) end - - ---- Set membership for a source-specific multicast group. `multicast_addr` is multicast ---- address to set membership for. `interface_addr` is interface address. `source_addr` ---- is source address. `membership` can be the string `"leave"` or `"join"`. ---- ----@param udp uv.uv_udp_t ----@param multicast_addr string ----@param interface_addr string|nil ----@param source_addr string ----@param membership "leave"|"join" ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.udp_set_source_membership(udp, multicast_addr, interface_addr, source_addr, membership) end - - ---- Set the time to live. ---- ---- `ttl` is an integer 1 through 255. ---- ----@param udp uv.uv_udp_t ----@param ttl integer ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.udp_set_ttl(udp, ttl) end - - ---- Same as `uv.udp_send()`, but won't queue a send request if it can't be ---- completed immediately. ---- ----@param udp uv.uv_udp_t ----@param data uv.buffer ----@param host string ----@param port integer ----@return integer|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.udp_try_send(udp, data, host, port) end - - ---- Un-reference the given handle. References are idempotent, that is, if a handle ---- is not referenced calling this function again will have no effect. ---- ---- See [Reference counting][]. ---- ----@param handle uv.uv_handle_t -function uv.unref(handle) end - - ---- Update the event loop's concept of "now". Libuv caches the current time at the ---- start of the event loop tick in order to reduce the number of time-related ---- system calls. ---- ---- You won't normally need to call this function unless you have callbacks that ---- block the event loop for longer periods of time, where "longer" is somewhat ---- subjective but probably on the order of a millisecond or more. -function uv.update_time() end - - ---- Returns the current system uptime in seconds. ---- ----@return number|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.uptime() end - - ---- Returns the libuv version packed into a single integer. 8 bits are used for each ---- component, with the patch number stored in the 8 least significant bits. For ---- example, this would be 0x010203 in libuv 1.2.3. ---- ----@return integer -function uv.version() end - - ---- Returns the libuv version number as a string. For example, this would be "1.2.3" ---- in libuv 1.2.3. For non-release versions, the version suffix is included. ---- ----@return string -function uv.version_string() end - - ---- Walk the list of handles: `callback` will be executed with each handle. ---- ---- ```lua ---- -- Example usage of uv.walk to close all handles that aren't already closing. ---- uv.walk(function (handle) ---- if not handle:is_closing() then ---- handle:close() ---- end ---- end) ---- ``` ---- ----@param callback uv.walk.callback -function uv.walk(callback) end - - ---- Write data to stream. ---- ---- `data` can either be a Lua string or a table of strings. If a table is passed ---- in, the C backend will use writev to send all strings in a single system call. ---- ---- The optional `callback` is for knowing when the write is complete. ---- ----@param stream uv.uv_stream_t ----@param data uv.buffer ----@param callback? uv.write.callback ----@return uv.uv_write_t|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.write(stream, data, callback) end - ---- Extended write function for sending handles over a pipe. The pipe must be ---- initialized with `ipc` option `true`. ---- ---- **Note:** `send_handle` must be a TCP socket or pipe, which is a server or a ---- connection (listening or connected state). Bound sockets or pipes will be ---- assumed to be servers. ---- ----@param stream uv.uv_stream_t ----@param data uv.buffer ----@param send_handle uv.uv_stream_t ----@param callback? uv.write2.callback ----@return uv.uv_write_t|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function uv.write2(stream, data, send_handle, callback) end \ No newline at end of file diff --git a/meta/3rd/luv/library/uv_async_t.lua b/meta/3rd/luv/library/uv_async_t.lua deleted file mode 100644 index 73f17e38..00000000 --- a/meta/3rd/luv/library/uv_async_t.lua +++ /dev/null @@ -1,35 +0,0 @@ ----@meta - ---- Async handles allow the user to "wakeup" the event loop and get a callback ---- called from another thread. ---- ---- ```lua ---- local async ---- async = uv.new_async(function() ---- print("async operation ran") ---- async:close() ---- end) ---- ---- async:send() ---- ``` ---- ----@class uv.uv_async_t : uv.uv_handle_t ---- -local async - ---- Wakeup the event loop and call the async handle's callback. ---- ---- **Note**: It's safe to call this function from any thread. The callback will be ---- called on the loop thread. ---- ---- **Warning**: libuv will coalesce calls to `uv.async_send(async)`, that is, not ---- every call to it will yield an execution of the callback. For example: if ---- `uv.async_send()` is called 5 times in a row before the callback is called, the ---- callback will only be called once. If `uv.async_send()` is called again after ---- the callback was called, it will be called again. ---- ----@param ... uv.threadargs ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function async:send(...) end \ No newline at end of file diff --git a/meta/3rd/luv/library/uv_check_t.lua b/meta/3rd/luv/library/uv_check_t.lua deleted file mode 100644 index 3c131ba9..00000000 --- a/meta/3rd/luv/library/uv_check_t.lua +++ /dev/null @@ -1,29 +0,0 @@ ----@meta - ---- Check handles will run the given callback once per loop iteration, right after ---- polling for I/O. ---- ---- ```lua ---- local check = uv.new_check() ---- check:start(function() ---- print("After I/O polling") ---- end) ---- ``` ---- ----@class uv.uv_check_t : uv.uv_handle_t -local check - ---- Start the handle with the given callback. ---- ----@param callback function ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function check:start(callback) end - ---- Stop the handle, the callback will no longer be called. ---- ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function check:stop() end \ No newline at end of file diff --git a/meta/3rd/luv/library/uv_fs_event_t.lua b/meta/3rd/luv/library/uv_fs_event_t.lua deleted file mode 100644 index 87fab6b2..00000000 --- a/meta/3rd/luv/library/uv_fs_event_t.lua +++ /dev/null @@ -1,33 +0,0 @@ ----@meta - ---- FS Event handles allow the user to monitor a given path for changes, for ---- example, if the file was renamed or there was a generic change in it. This ---- handle uses the best backend for the job on each platform. ---- ----@class uv.uv_fs_event_t : uv.uv_handle_t -local fs_event - ---- Get the path being monitored by the handle. ---- ----@return string|nil path ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function fs_event:getpath() end - ---- Start the handle with the given callback, which will watch the specified path ---- for changes. ---- ----@param path string ----@param flags uv.fs_event_start.flags ----@param callback uv.fs_event_start.callback ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function fs_event:start(path, flags, callback) end - ---- Stop the handle, the callback will no longer be called. ---- ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function fs_event:stop() end \ No newline at end of file diff --git a/meta/3rd/luv/library/uv_fs_poll_t.lua b/meta/3rd/luv/library/uv_fs_poll_t.lua deleted file mode 100644 index 2e65cc42..00000000 --- a/meta/3rd/luv/library/uv_fs_poll_t.lua +++ /dev/null @@ -1,35 +0,0 @@ ----@meta - ---- FS Poll handles allow the user to monitor a given path for changes. Unlike ---- `uv_fs_event_t`, fs poll handles use `stat` to detect when a file has changed so ---- they can work on file systems where fs event handles can't. ---- ----@class uv.uv_fs_poll_t : uv.uv_handle_t -local fs_poll - ---- Get the path being monitored by the handle. ---- ----@return string|nil path ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function fs_poll:getpath() end - ---- Check the file at `path` for changes every `interval` milliseconds. ---- ---- **Note:** For maximum portability, use multi-second intervals. Sub-second ---- intervals will not detect all changes on many file systems. ---- ----@param path string ----@param interval integer ----@param callback uv.fs_poll_start.callback ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function fs_poll:start(path, interval, callback) end - ---- Stop the handle, the callback will no longer be called. ---- ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function fs_poll:stop() end \ No newline at end of file diff --git a/meta/3rd/luv/library/uv_handle_t.lua b/meta/3rd/luv/library/uv_handle_t.lua deleted file mode 100644 index b0d25bc1..00000000 --- a/meta/3rd/luv/library/uv_handle_t.lua +++ /dev/null @@ -1,132 +0,0 @@ ----@meta - ---- Base handle ---- ---- `uv_handle_t` is the base type for all libuv handle types. All API functions ---- defined here work with any handle type. ---- ----@class uv.uv_handle_t : table ---- -local handle - ---- Request handle to be closed. ---- ---- The `callback` will be called asynchronously after this call. ---- ---- This MUST be called on each handle before memory is released. ---- ---- Handles that wrap file descriptors are closed immediately but `callback` will ---- still be deferred to the next iteration of the event loop. It gives you a chance ---- to free up any resources associated with the handle. ---- ---- In-progress requests, like `uv_connect_t` or `uv_write_t`, are cancelled and ---- have their callbacks called asynchronously with `ECANCELED`. ---- ----@param callback? function -function handle:close(callback) end - ---- Gets the platform dependent file descriptor equivalent. ---- ---- The following handles are supported: TCP, pipes, TTY, UDP and poll. Calling ---- this method on other handle type will fail with `EINVAL`. ---- ---- If a handle doesn't have an attached file descriptor yet or the handle itself ---- has been closed, this function will return `EBADF`. ---- ---- **Warning**: Be very careful when using this function. libuv assumes it's in ---- control of the file descriptor so any change to it may lead to malfunction. ---- ----@return integer|nil fileno ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function handle:fileno() end - ---- Returns the name of the struct for a given handle (e.g. `"pipe"` for `uv_pipe_t`) ---- and the libuv enum integer for the handle's type (`uv_handle_type`). ---- ----@return string type ----@return integer enum -function handle:get_type() end - ---- Returns `true` if the handle referenced, `false` if not. ---- ----@return boolean|nil has_ref ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function handle:has_ref() end - ---- Returns `true` if the handle is active, `false` if it's inactive. ---- ---- What "active” means depends on the type of handle: ---- ---- - A `uv_async_t` handle is always active and cannot be deactivated, except by closing it with `uv.close()`. ---- ---- - A `uv_pipe_t`, `uv_tcp_t`, `uv_udp_t`, etc. handle - basically any handle that deals with I/O - is active when it is doing something that involves I/O, like reading, writing, connecting, accepting new connections, etc. ---- ---- - A `uv_check_t`, `uv_idle_t`, `uv_timer_t`, etc. handle is active when it has been started with a call to `uv.check_start()`, `uv.idle_start()`, `uv.timer_start()` etc. until it has been stopped with a call to its respective stop function. ---- ----@return boolean|nil active ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function handle:is_active() end - ---- Returns `true` if the handle is closing or closed, `false` otherwise. ---- ---- **Note**: This function should only be used between the initialization of the ---- handle and the arrival of the close callback. ---- ----@return boolean|nil closing ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function handle:is_closing() end - ---- Gets or sets the size of the receive buffer that the operating system uses for ---- the socket. ---- ---- If `size` is omitted (or `0`), this will return the current send buffer size; otherwise, this will use `size` to set the new send buffer size. ---- ---- This function works for TCP, pipe and UDP handles on Unix and for TCP and UDP ---- handles on Windows. ---- ---- **Note**: Linux will set double the size and return double the size of the ---- original set value. ---- ----@param size integer ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(self):(current_size:integer|nil, err:uv.error.message|nil, err_name:uv.error.name|nil) ----@overload fun(self, size: 0):(current_size:integer|nil, err:uv.error.message|nil, err_name:uv.error.name|nil) -function handle:recv_buffer_size(size) end - ---- Reference the given handle. ---- ---- References are idempotent, that is, if a handle is already referenced calling this function again will have no effect. -function handle:ref() end - - ---- Gets or sets the size of the send buffer that the operating system uses for the ---- socket. ---- ---- If `size` is omitted (or `0`), this will return the current send buffer size; otherwise, this will use `size` to set the new send buffer size. ---- ---- This function works for TCP, pipe and UDP handles on Unix and for TCP and UDP ---- handles on Windows. ---- ---- **Note**: Linux will set double the size and return double the size of the ---- original set value. ---- ----@param size integer ----@return integer|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name ---- ----@overload fun(self):(current_size:integer|nil, err:uv.error.message|nil, err_name:uv.error.name|nil) ----@overload fun(self, size: 0):(current_size:integer|nil, err:uv.error.message|nil, err_name:uv.error.name|nil) -function handle:send_buffer_size(size) end - - ---- Un-reference the given handle. References are idempotent, that is, if a handle ---- is not referenced calling this function again will have no effect. -function handle:unref() end \ No newline at end of file diff --git a/meta/3rd/luv/library/uv_idle_t.lua b/meta/3rd/luv/library/uv_idle_t.lua deleted file mode 100644 index 22368193..00000000 --- a/meta/3rd/luv/library/uv_idle_t.lua +++ /dev/null @@ -1,38 +0,0 @@ ----@meta - ---- Idle handles will run the given callback once per loop iteration, right before ---- the `uv_prepare_t` handles. ---- ---- **Note**: The notable difference with prepare handles is that when there are ---- active idle handles, the loop will perform a zero timeout poll instead of ---- blocking for I/O. ---- ---- **Warning**: Despite the name, idle handles will get their callbacks called on ---- every loop iteration, not when the loop is actually "idle". ---- ---- ```lua ---- local idle = uv.new_idle() ---- idle:start(function() ---- print("Before I/O polling, no blocking") ---- end) ---- ``` ---- ----@class uv.uv_idle_t : uv.uv_handle_t ---- -local idle - ---- Start the handle with the given callback. ---- ----@param callback function ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function idle:start(callback) end - ---- Stop the handle, the callback will no longer be called. ---- ----@param check any ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function idle:stop(check) end \ No newline at end of file diff --git a/meta/3rd/luv/library/uv_pipe_t.lua b/meta/3rd/luv/library/uv_pipe_t.lua deleted file mode 100644 index 0efbb04f..00000000 --- a/meta/3rd/luv/library/uv_pipe_t.lua +++ /dev/null @@ -1,103 +0,0 @@ ----@meta - ---- Pipe handles provide an abstraction over local domain sockets on Unix and named pipes on Windows. ---- ---- ```lua ---- local pipe = uv.new_pipe(false) ---- ---- pipe:bind('/tmp/sock.test') ---- ---- pipe:listen(128, function() ---- local client = uv.new_pipe(false) ---- pipe:accept(client) ---- client:write("hello!\n") ---- client:close() ---- end) ---- ``` ---- ----@class uv.uv_pipe_t : uv.uv_stream_t ---- -local pipe - ---- Bind the pipe to a file path (Unix) or a name (Windows). ---- ---- **Note**: Paths on Unix get truncated to sizeof(sockaddr_un.sun_path) bytes, ---- typically between 92 and 108 bytes. ---- ----@param name string ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function pipe:bind(name) end - ---- Alters pipe permissions, allowing it to be accessed from processes run by different users. ---- ---- Makes the pipe writable or readable by all users. `flags` are: `"r"`, `"w"`, `"rw"`, or `"wr"` ---- where `r` is `READABLE` and `w` is `WRITABLE`. ---- ---- This function is blocking. ---- ----@param flags uv.pipe_chmod.flags ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function pipe:chmod(flags) end - ---- Connect to the Unix domain socket or the named pipe. ---- ---- **Note**: Paths on Unix get truncated to sizeof(sockaddr_un.sun_path) bytes, ---- typically between 92 and 108 bytes. ---- ----@param name string ----@param callback? uv.pipe_connect.callback ----@return uv.uv_connect_t|nil conn ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function pipe:connect(name, callback) end - ---- Get the name of the Unix domain socket or the named pipe to which the handle is ---- connected. ---- ----@return string|nil peername ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function pipe:getpeername() end - ---- Get the name of the Unix domain socket or the named pipe. ---- ----@return string|nil sockname ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function pipe:getsockname() end - ---- Open an existing file descriptor or `uv_handle_t` as a pipe. ---- ---- **Note**: The file descriptor is set to non-blocking mode. ---- ----@param fd integer ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function pipe:open(fd) end - ---- Returns the pending pipe count for the named pipe. ---- ----@return integer count -function pipe:pending_count() end - ---- Set the number of pending pipe instance handles when the pipe server is waiting ---- for connections. ---- ---- **Note**: This setting applies to Windows only. ---- ----@param count integer -function pipe:pending_instances(count) end - ---- Used to receive handles over IPC pipes. ---- ---- First - call `uv.pipe_pending_count()`, if it's > 0 then initialize a handle of ---- the given type, returned by `uv.pipe_pending_type()` and call ---- `uv.accept(pipe, handle)`. ---- ----@return string -function pipe:pending_type() end \ No newline at end of file diff --git a/meta/3rd/luv/library/uv_poll_t.lua b/meta/3rd/luv/library/uv_poll_t.lua deleted file mode 100644 index 31336152..00000000 --- a/meta/3rd/luv/library/uv_poll_t.lua +++ /dev/null @@ -1,57 +0,0 @@ ----@meta - ---- Poll handles are used to watch file descriptors for readability and writability, ---- similar to the purpose of [poll(2)](http://linux.die.net/man/2/poll). ---- ---- The purpose of poll handles is to enable integrating external libraries that ---- rely on the event loop to signal it about the socket status changes, like c-ares ---- or libssh2. Using `uv_poll_t` for any other purpose is not recommended; ---- `uv_tcp_t`, `uv_udp_t`, etc. provide an implementation that is faster and more ---- scalable than what can be achieved with `uv_poll_t`, especially on Windows. ---- ---- It is possible that poll handles occasionally signal that a file descriptor is ---- readable or writable even when it isn't. The user should therefore always be ---- prepared to handle EAGAIN or equivalent when it attempts to read from or write ---- to the fd. ---- ---- It is not okay to have multiple active poll handles for the same socket, this ---- can cause libuv to busyloop or otherwise malfunction. ---- ---- The user should not close a file descriptor while it is being polled by an ---- active poll handle. This can cause the handle to report an error, but it might ---- also start polling another socket. However the fd can be safely closed ---- immediately after a call to `poll:stop()` or `uv.close()`. ---- ---- **Note**: On windows only sockets can be polled with poll handles. On Unix any ---- file descriptor that would be accepted by poll(2) can be used. ---- ----@class uv.uv_poll_t : uv.uv_handle_t -local poll - ---- Starts polling the file descriptor. ---- ---- `events` are: `"r"`, `"w"`, `"rw"`, `"d"`, `"rd"`, `"wd"`, `"rwd"`, `"p"`, `"rp"`, `"wp"`, `"rwp"`, `"dp"`, `"rdp"`, `"wdp"`, or `"rwdp"` where `r` is `READABLE`, `w` is `WRITABLE`, `d` is `DISCONNECT`, and `p` is `PRIORITIZED`. ---- ---- As soon as an event is detected the callback will be called with status set to 0, and the detected events set on the events field. ---- ---- The user should not close the socket while the handle is active. If the user ---- does that anyway, the callback may be called reporting an error status, but this ---- is not guaranteed. ---- ---- **Note** Calling `poll:start()` on a handle that is already active is fine. ---- Doing so will update the events mask that is being watched for. ---- ----@param events uv.poll.eventspec ----@param callback uv.poll_start.callback ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function poll:start(events, callback) end - - ---- Stop polling the file descriptor, the callback will no longer be called. ---- ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function poll:stop() end \ No newline at end of file diff --git a/meta/3rd/luv/library/uv_prepare_t.lua b/meta/3rd/luv/library/uv_prepare_t.lua deleted file mode 100644 index 91e3231b..00000000 --- a/meta/3rd/luv/library/uv_prepare_t.lua +++ /dev/null @@ -1,30 +0,0 @@ ----@meta - ---- Prepare handles will run the given callback once per loop iteration, right ---- before polling for I/O. ---- ---- ```lua ---- local prepare = uv.new_prepare() ---- prepare:start(function() ---- print("Before I/O polling") ---- end) ---- ``` ---- ----@class uv.uv_prepare_t : uv.uv_handle_t ---- -local prepare - ---- Start the handle with the given callback. ---- ----@param callback function ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function prepare:start(callback) end - ---- Stop the handle, the callback will no longer be called. ---- ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function prepare:stop() end \ No newline at end of file diff --git a/meta/3rd/luv/library/uv_process_t.lua b/meta/3rd/luv/library/uv_process_t.lua deleted file mode 100644 index 7329df3c..00000000 --- a/meta/3rd/luv/library/uv_process_t.lua +++ /dev/null @@ -1,22 +0,0 @@ ----@meta - ---- Process handles will spawn a new process and allow the user to control it and ---- establish communication channels with it using streams. ---- ----@class uv.uv_process_t : uv.uv_handle_t -local process - ---- Returns the handle's pid. ---- ----@return integer pid -function process:get_pid() end - ---- Sends the specified signal to the given process handle. ---- ---- Check the documentation on `uv_signal_t` for signal support, specially on Windows. ---- ----@param signum integer|string ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function process:kill(signum) end \ No newline at end of file diff --git a/meta/3rd/luv/library/uv_req_t.lua b/meta/3rd/luv/library/uv_req_t.lua deleted file mode 100644 index b39dc317..00000000 --- a/meta/3rd/luv/library/uv_req_t.lua +++ /dev/null @@ -1,25 +0,0 @@ ----@meta - ---- Base request ---- ---- `uv_req_t` is the base type for all libuv request types. ---- ----@class uv.uv_req_t : table ---- -local req - ---- Cancel a pending request. Fails if the request is executing or has finished ---- executing. Only cancellation of `uv_fs_t`, `uv_getaddrinfo_t`, ---- `uv_getnameinfo_t` and `uv_work_t` requests is currently supported. ---- ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function req:cancel() end - ---- Returns the name of the struct for a given request (e.g. `"fs"` for `uv_fs_t`) ---- and the libuv enum integer for the request's type (`uv_req_type`). ---- ----@return string type ----@return integer enum -function req:get_type() end \ No newline at end of file diff --git a/meta/3rd/luv/library/uv_signal_t.lua b/meta/3rd/luv/library/uv_signal_t.lua deleted file mode 100644 index 69be819e..00000000 --- a/meta/3rd/luv/library/uv_signal_t.lua +++ /dev/null @@ -1,69 +0,0 @@ ----@meta - ---- Signal handles implement Unix style signal handling on a per-event loop bases. ---- ---- **Unix Notes:** ---- ---- - SIGKILL and SIGSTOP are impossible to catch. ---- ---- - Handling SIGBUS, SIGFPE, SIGILL or SIGSEGV via libuv results into undefined behavior. ---- ---- - SIGABRT will not be caught by libuv if generated by abort(), e.g. through assert(). ---- ---- - On Linux SIGRT0 and SIGRT1 (signals 32 and 33) are used by the NPTL pthreads library to manage threads. Installing watchers for those signals will lead to unpredictable behavior and is strongly discouraged. Future versions of libuv may simply reject them. ---- ---- **Windows Notes:** ---- ---- Reception of some signals is emulated on Windows: ---- - SIGINT is normally delivered when the user presses CTRL+C. However, like on Unix, it is not generated when terminal raw mode is enabled. ---- ---- - SIGBREAK is delivered when the user pressed CTRL + BREAK. ---- ---- - SIGHUP is generated when the user closes the console window. On SIGHUP the program is given approximately 10 seconds to perform cleanup. After that Windows will unconditionally terminate it. ---- ---- - SIGWINCH is raised whenever libuv detects that the console has been resized. SIGWINCH is emulated by libuv when the program uses a uv_tty_t handle to write to the console. SIGWINCH may not always be delivered in a timely manner; libuv will only detect size changes when the cursor is being moved. When a readable `uv_tty_t` handle is used in raw mode, resizing the console buffer will also trigger a SIGWINCH signal. ---- ---- - Watchers for other signals can be successfully created, but these signals are never received. These signals are: SIGILL, SIGABRT, SIGFPE, SIGSEGV, SIGTERM and SIGKILL. ---- ---- - Calls to raise() or abort() to programmatically raise a signal are not detected by libuv; these will not trigger a signal watcher. ---- ---- ---- ```lua ---- -- Create a new signal handler ---- local signal = uv.new_signal() ---- -- Define a handler function ---- uv.signal_start(signal, "sigint", function(signal) ---- print("got " .. signal .. ", shutting down") ---- os.exit(1) ---- end) ---- ``` ---- ----@class uv.uv_signal_t : uv.uv_handle_t ---- -local signal - ---- Start the handle with the given callback, watching for the given signal. ---- ----@param signum integer|string ----@param callback uv.signal_start.callback ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function signal:start(signum, callback) end - ---- Same functionality as `signal:start()` but the signal handler is reset the moment the signal is received. ---- ----@param signum integer|string ----@param callback uv.signal_start_oneshot.callback ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function signal:start_oneshot(signum, callback) end - - ---- Stop the handle, the callback will no longer be called. ---- ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function signal:stop() end \ No newline at end of file diff --git a/meta/3rd/luv/library/uv_stream_t.lua b/meta/3rd/luv/library/uv_stream_t.lua deleted file mode 100644 index 2de883b7..00000000 --- a/meta/3rd/luv/library/uv_stream_t.lua +++ /dev/null @@ -1,173 +0,0 @@ ----@meta - ---- Stream handles provide an abstraction of a duplex communication channel. ---- `uv_stream_t` is an abstract type, libuv provides 3 stream implementations ---- in the form of `uv_tcp_t`, `uv_pipe_t` and `uv_tty_t`. ---- ----@class uv.uv_stream_t : uv.uv_handle_t ---- -local stream - ---- This call is used in conjunction with `uv.listen()` to accept incoming ---- connections. Call this function after receiving a callback to accept the ---- connection. ---- ---- When the connection callback is called it is guaranteed that this function ---- will complete successfully the first time. If you attempt to use it more than ---- once, it may fail. It is suggested to only call this function once per ---- connection call. ---- ---- ```lua ---- server:listen(128, function (err) ---- local client = uv.new_tcp() ---- server:accept(client) ---- end) ---- ``` ---- ----@param client_stream uv.uv_stream_t ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function stream:accept(client_stream) end - ---- Returns the stream's write queue size. ---- ----@return integer size -function stream:get_write_queue_size() end - ---- Returns `true` if the stream is readable, `false` otherwise. ---- ----@return boolean readable -function stream:is_readable() end - ---- Returns `true` if the stream is writable, `false` otherwise. ---- ----@return boolean writable -function stream:is_writable() end - ---- Start listening for incoming connections. ---- ---- `backlog` indicates the number of connections the kernel might queue, same as `listen(2)`. ---- ---- When a new incoming connection is received the callback is called. ---- ----@param backlog integer ----@param callback uv.listen.callback ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function stream:listen(backlog, callback) end - ---- Read data from an incoming stream. ---- ---- The callback will be made several times until there is no more data to read or `stream:read_stop()` is called. ---- ---- When we've reached EOF, `data` will be `nil`. ---- ---- ```lua ---- stream:read_start(function (err, chunk) ---- if err then ---- -- handle read error ---- elseif chunk then ---- -- handle data ---- else ---- -- handle disconnect ---- end ---- end) ---- ``` ---- ----@param callback uv.read_start.callback ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function stream:read_start(callback) end - ---- Stop reading data from the stream. ---- ---- The read callback will no longer be called. ---- ---- This function is idempotent and may be safely called on a stopped stream. ---- ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function stream:read_stop() end - ---- Enable or disable blocking mode for a stream. ---- ---- When blocking mode is enabled all writes complete synchronously. The interface ---- remains unchanged otherwise, e.g. completion or failure of the operation will ---- still be reported through a callback which is made asynchronously. ---- ---- **Warning**: Relying too much on this API is not recommended. It is likely to ---- change significantly in the future. Currently this only works on Windows and ---- only for `uv_pipe_t` handles. Also libuv currently makes no ordering guarantee ---- when the blocking mode is changed after write requests have already been ---- submitted. Therefore it is recommended to set the blocking mode immediately ---- after opening or creating the stream. ---- ----@param blocking boolean ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function stream:set_blocking(blocking) end - ---- Shutdown the outgoing (write) side of a duplex stream. It waits for pending ---- write requests to complete. The callback is called after shutdown is complete. ---- ----@param callback? uv.shutdown.callback ----@return uv.uv_shutdown_t|nil shutdown ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function stream:shutdown(callback) end - ---- Same as `stream:write()`, but won't queue a write request if it can't be completed ---- immediately. ---- ---- Will return number of bytes written (can be less than the supplied buffer size). ---- ----@param data uv.buffer ----@return integer|nil bytes ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function stream:try_write(data) end - ---- Like `stream:write2()`, but with the properties of `stream:try_write()`. Not supported on Windows, where it returns `UV_EAGAIN`. ---- ---- Will return number of bytes written (can be less than the supplied buffer size). ---- ----@param data uv.buffer ----@param send_handle uv.uv_stream_t ----@return integer|nil bytes ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function stream:try_write2(data, send_handle) end - ---- Write data to stream. ---- ---- `data` can either be a Lua string or a table of strings. If a table is passed ---- in, the C backend will use writev to send all strings in a single system call. ---- ---- The optional `callback` is for knowing when the write is complete. ---- ----@param data uv.buffer ----@param callback? uv.write.callback ----@return uv.uv_write_t|nil bytes ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function stream:write(data, callback) end - ---- Extended write function for sending handles over a pipe. The pipe must be ---- initialized with `ipc` option `true`. ---- ---- **Note:** `send_handle` must be a TCP socket or pipe, which is a server or a ---- connection (listening or connected state). Bound sockets or pipes will be ---- assumed to be servers. ---- ----@param data uv.buffer ----@param send_handle uv.uv_stream_t ----@param callback? uv.write2.callback ----@return uv.uv_write_t|nil write ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function stream:write2(data, send_handle, callback) end \ No newline at end of file diff --git a/meta/3rd/luv/library/uv_tcp_t.lua b/meta/3rd/luv/library/uv_tcp_t.lua deleted file mode 100644 index 8dee919f..00000000 --- a/meta/3rd/luv/library/uv_tcp_t.lua +++ /dev/null @@ -1,112 +0,0 @@ ----@meta - ---- TCP handles are used to represent both TCP streams and servers. ---- ----@class uv.uv_tcp_t : uv.uv_stream_t -local tcp - ---- Bind the handle to an host and port. ---- ---- Any `flags` are set with a table with field `ipv6only` equal to `true` or `false`. ---- ---- When the port is already taken, you can expect to see an `EADDRINUSE` error ---- from either `tcp:bind()`, `uv.listen()` or `tcp:connect()`. That is, a ---- successful call to this function does not guarantee that the call to `uv.listen()` ---- or `tcp:connect()` will succeed as well. ---- ---- Use a port of `0` to let the OS assign an ephemeral port. You can look it up ---- later using `tcp:getsockname()`. ---- ----@param addr string # must be an IP address and not a hostname ----@param port integer # set to `0` to allow the OS to assign an ephemeral port ----@param flags? uv.tcp_bind.flags ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function tcp:bind(addr, port, flags) end - ---- Resets a TCP connection by sending a RST packet. This is accomplished by setting ---- the SO_LINGER socket option with a linger interval of zero and then calling ---- `uv.close()`. Due to some platform inconsistencies, mixing of `uv.shutdown()` ---- and `tcp:close_reset()` calls is not allowed. ---- ----@param callback? function ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function tcp:close_reset(callback) end - ---- Establish an IPv4 or IPv6 TCP connection. ---- ---- ```lua ---- local client = uv.new_tcp() ---- client:connect("127.0.0.1", 8080, function (err) ---- -- check error and carry on. ---- end) ---- ``` ---- ----@param host string ----@param port integer ----@param callback uv.tcp_connect.callback ----@return uv.uv_connect_t|nil conn ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function tcp:connect(host, port, callback) end - ---- Get the address of the peer connected to the handle. ---- ----@return uv.socketinfo|nil peername ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function tcp:getpeername() end - ---- Get the current address to which the handle is bound. ---- ----@return uv.socketinfo|nil sockname ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function tcp:getsockname() end - ---- Enable / disable TCP keep-alive. ---- ----@param enable boolean ----@param delay? integer # initial delay, in seconds ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function tcp:keepalive(enable, delay) end - ---- Enable / disable Nagle's algorithm. ---- ----@param enable boolean ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function tcp:nodelay(enable) end - ---- Open an existing file descriptor or SOCKET as a TCP handle. ---- ---- **Note:** The passed file descriptor or SOCKET is not checked for its type, but it's required that it represents a valid stream socket. ---- ----@param sock integer ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function tcp:open(sock) end - ---- Enable / disable simultaneous asynchronous accept requests that are queued by ---- the operating system when listening for new TCP connections. ---- ---- This setting is used to tune a TCP server for the desired performance. Having ---- simultaneous accepts can significantly improve the rate of accepting connections ---- (which is why it is enabled by default) but may lead to uneven load distribution ---- in multi-process setups. ---- ----@param enable boolean ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function tcp:simultaneous_accepts(enable) end - ---- **Deprecated:** Please use `uv.stream_get_write_queue_size()` instead. -function tcp:write_queue_size() end \ No newline at end of file diff --git a/meta/3rd/luv/library/uv_timer_t.lua b/meta/3rd/luv/library/uv_timer_t.lua deleted file mode 100644 index 64a70418..00000000 --- a/meta/3rd/luv/library/uv_timer_t.lua +++ /dev/null @@ -1,55 +0,0 @@ ----@meta - ---- Timer handles are used to schedule callbacks to be called in the future. ---- ----@class uv.uv_timer_t : uv.uv_handle_t -local timer - ---- Stop the timer, and if it is repeating restart it using the repeat value as the ---- timeout. If the timer has never been started before it raises `EINVAL`. ---- ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function timer:again() end - ---- Get the timer due value or 0 if it has expired. The time is relative to `uv.now()`. ---- ---- **Note**: New in libuv version 1.40.0. ---- ----@return integer -function timer:get_due_in() end - ---- Get the timer repeat value. ---- ----@return integer -function timer:get_repeat() end - ---- Set the repeat interval value in milliseconds. The timer will be scheduled to ---- run on the given interval, regardless of the callback execution duration, and ---- will follow normal timer semantics in the case of a time-slice overrun. ---- ---- For example, if a 50 ms repeating timer first runs for 17 ms, it will be ---- scheduled to run again 33 ms later. If other tasks consume more than the 33 ms ---- following the first timer callback, then the callback will run as soon as ---- possible. ---- ----@param repeat_ integer -function timer:set_repeat(repeat_) end - ---- Start the timer. `timeout` and `repeat_` are in milliseconds. ---- ----@param timeout integer # Timeout, in milliseconds. If timeout is zero, the callback fires on the next event loop iteration. ----@param repeat_ integer # Repeat interval, in milliseconds. If non-zero, the callback fires after `timeout` milliseconds and then repeatedly after `repeat_` milliseconds. ----@param callback function ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function timer:start(timeout, repeat_, callback) end - ---- Stop the timer, the callback will not be called anymore. ---- ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function timer:stop() end \ No newline at end of file diff --git a/meta/3rd/luv/library/uv_tty_t.lua b/meta/3rd/luv/library/uv_tty_t.lua deleted file mode 100644 index 15e6fe46..00000000 --- a/meta/3rd/luv/library/uv_tty_t.lua +++ /dev/null @@ -1,44 +0,0 @@ ----@meta - ---- TTY handles represent a stream for the console. ---- ---- ```lua ---- -- Simple echo program ---- local stdin = uv.new_tty(0, true) ---- local stdout = uv.new_tty(1, false) ---- ---- stdin:read_start(function (err, data) ---- assert(not err, err) ---- if data then ---- stdout:write(data) ---- else ---- stdin:close() ---- stdout:close() ---- end ---- end) ---- ``` ---- ----@class uv.uv_tty_t : uv.uv_stream_t -local tty - ---- Gets the current Window width and height. ---- ----@return integer|nil width ----@return integer|uv.error.message height_or_err ----@return uv.error.name|nil err_name -function tty:get_winsize() end - ---- Set the TTY using the specified terminal mode. ---- ---- Parameter `mode` is a C enum with the following values: ---- ---- - 0 - UV_TTY_MODE_NORMAL: Initial/normal terminal mode ---- - 1 - UV_TTY_MODE_RAW: Raw input mode (On Windows, ENABLE_WINDOW_INPUT is ---- also enabled) ---- - 2 - UV_TTY_MODE_IO: Binary-safe I/O mode for IPC (Unix-only) ---- ----@param mode uv.tty.mode ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function tty:set_mode(mode) end \ No newline at end of file diff --git a/meta/3rd/luv/library/uv_udp_t.lua b/meta/3rd/luv/library/uv_udp_t.lua deleted file mode 100644 index a2dfd676..00000000 --- a/meta/3rd/luv/library/uv_udp_t.lua +++ /dev/null @@ -1,175 +0,0 @@ ----@meta - ---- UDP handles encapsulate UDP communication for both clients and servers. ---- ----@class uv.uv_udp_t : uv.uv_handle_t -local udp - ---- Bind the UDP handle to an IP address and port. Any `flags` are set with a table ---- with fields `reuseaddr` or `ipv6only` equal to `true` or `false`. ---- ----@param host string ----@param port integer ----@param flags? uv.udp_bind.flags ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function udp:bind(host, port, flags) end - - ---- Associate the UDP handle to a remote address and port, so every message sent by ---- this handle is automatically sent to that destination. --- ---- Calling this function with a NULL addr disconnects the handle. Trying to call `udp:connect()` on an already connected handle will result in an `EISCONN` error. Trying to disconnect a handle that is not connected will return an `ENOTCONN` error. ---- ----@param host string ----@param port integer ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function udp:connect(host, port) end - ---- Returns the handle's send queue count. ---- ----@return integer count -function udp:get_send_queue_count() end - ---- Returns the handle's send queue size. ---- ----@return integer size -function udp:get_send_queue_size() end - ---- Get the remote IP and port of the UDP handle on connected UDP handles. ---- ----@return uv.udp.sockname|nil peername ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function udp:getpeername() end - ---- Get the local IP and port of the UDP handle. ---- ----@return uv.udp.sockname|nil sockname ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function udp:getsockname() end - ---- Opens an existing file descriptor or Windows SOCKET as a UDP handle. ---- ---- Unix only: The only requirement of the sock argument is that it follows the ---- datagram contract (works in unconnected mode, supports sendmsg()/recvmsg(), ---- etc). In other words, other datagram-type sockets like raw sockets or netlink ---- sockets can also be passed to this function. ---- ---- The file descriptor is set to non-blocking mode. ---- ---- Note: The passed file descriptor or SOCKET is not checked for its type, but ---- it's required that it represents a valid datagram socket. ---- ----@param fd integer ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function udp:open(fd) end - ---- Prepare for receiving data. ---- ---- If the socket has not previously been bound with `udp:bind()` it is bound to `0.0.0.0` (the "all interfaces" IPv4 address) and a random port number. ---- ----@param callback uv.udp_recv_start.callback ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function udp:recv_start(callback) end - ---- Stop listening for incoming datagrams. ---- ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function udp:recv_stop() end - ---- Send data over the UDP socket. ---- ---- If the socket has not previously been bound with `udp:bind()` it will be bound to `0.0.0.0` (the "all interfaces" IPv4 address) and a random port number. ---- ----@param data uv.buffer ----@param host string ----@param port integer ----@param callback uv.udp_send.callback ----@return uv.uv_udp_send_t|nil bytes ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function udp:send(data, host, port, callback) end - ---- Set broadcast on or off. ---- ----@param on boolean ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function udp:set_broadcast(on) end - ---- Set membership for a multicast address. ---- ----@param multicast_addr string # multicast address to set membership for ----@param interface_addr string # interface address ----@param membership "leave"|"join" # membership intent ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function udp:set_membership(multicast_addr, interface_addr, membership) end - ---- Set the multicast interface to send or receive data on. ---- ----@param interface_addr string ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function udp:set_multicast_interface(interface_addr) end - ---- Set IP multicast loop flag. Makes multicast packets loop back to local ---- sockets. ---- ----@param on boolean ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function udp:set_multicast_loop(on) end - ---- Set the multicast ttl. ---- ----@param ttl integer # an integer 1 through 255 ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function udp:set_multicast_ttl(ttl) end - ---- Set membership for a source-specific multicast group. ---- ----@param multicast_addr string # multicast address to set membership for ----@param interface_addr? string # interface address ----@param source_addr string # source address ----@param membership "leave"|"join" # membership intent ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function udp:set_source_membership(multicast_addr, interface_addr, source_addr, membership) end - ---- Set the time to live. ---- ----@param ttl integer # integer 1 through 255 ----@return 0|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function udp:set_ttl(ttl) end - ---- Same as `udp:send()`, but won't queue a send request if it can't be ---- completed immediately. ---- ----@param data uv.buffer ----@param host string ----@param port integer ----@return integer|nil success ----@return uv.error.message|nil err ----@return uv.error.name|nil err_name -function udp:try_send(data, host, port) end \ No newline at end of file -- cgit v1.2.3 From a67bb8d895f8771b6fd7e35244d04f398d3a3a2a Mon Sep 17 00:00:00 2001 From: Bilal Bassam Date: Tue, 26 Dec 2023 22:42:02 +0300 Subject: bit meta: tohex returns a string --- meta/template/bit.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta') diff --git a/meta/template/bit.lua b/meta/template/bit.lua index c9563f42..e30d8c91 100644 --- a/meta/template/bit.lua +++ b/meta/template/bit.lua @@ -12,7 +12,7 @@ function bit.tobit(x) end ---@param x integer ---@param n? integer ----@return integer y +---@return string y ---@nodiscard function bit.tohex(x, n) end -- cgit v1.2.3 From d4f2a538c30b28a4181930c458ba8c64a62d05fc Mon Sep 17 00:00:00 2001 From: zandr <7629614+deathlyfrantic@users.noreply.github.com> Date: Wed, 24 Jan 2024 01:52:51 -0500 Subject: Add `table.move()` to LuaJIT compatibility LuaJIT supports `table.move()`: https://luajit.org/extensions.html#lua53 --- meta/template/table.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta') diff --git a/meta/template/table.lua b/meta/template/table.lua index a2e9580b..84eb3659 100644 --- a/meta/template/table.lua +++ b/meta/template/table.lua @@ -27,7 +27,7 @@ function table.insert(list, pos, value) end ---@nodiscard function table.maxn(table) end ----@version >5.3 +---@version >5.3, JIT ---#DES 'table.move' ---@param a1 table ---@param f integer -- cgit v1.2.3