将 lua 表作为字符串,并使用 javascript 将其转换为 javascript 数组。在lua中没有编程。
所以一个lua表只是一个不同格式的关联数组。
--LUA TABLE EXAMPLE
{
["glow"] = true,
["xOffset"] = -287.99981689453,
["yOffset"] = -227.55575561523,
["anchorPoint"] = "CENTER",
["cooldownSwipe"] = true,
["customTextUpdate"] = "update",
["cooldownEdge"] = false,
["icon"] = true,
["useglowColor"] = false,
["internalVersion"] = 24,
["keepAspectRatio"] = false,
["animation"] = {
["start"] = {
["duration_type"] = "seconds",
["type"] = "none",
},
["main"] = {
["duration_type"] = "seconds",
["type"] = "none",
},
["finish"] = {
["duration_type"] = "seconds",
["type"] = "none",
},
}
我已经四处寻找一些 javascript 函数或库来执行此操作,尽管我只遇到了一些 lua 库来将 json 转换为 lua 表。lua 表总是在一个字符串中。有没有办法做到这一点?
慕后森
猛跑小猪
慕无忌1623718
相关分类