Sync some constants, operators, and functions for skin editor. (3)

This commit is contained in:
2023-03-15 15:34:33 +08:00
parent d72216de8b
commit 93fa2f2d7e
3 changed files with 114 additions and 8 deletions

View File

@@ -14,6 +14,8 @@ var blocklists = {
"block.element": ["statement.select", "statement.obj", "statement.comp", "statement.prop"],
"block.root": ["statement.select", "statement.define"],
"block.select": ["statement.select.type", "statement.select.exp", "statement.select.anchor", "statement.select.atanchor"],
"block.exp.op.sep.vec": ["statement.exp.number"],
"block.exp.op.sep.arr": ["statement.exp.string"],
};
var ilid = 0;
@@ -45,6 +47,7 @@ var statementlists = {
"statement.exp.const.true": [],
"statement.exp.const.false": [],
"statement.exp.literal.ident": ["input.ident"],
"statement.exp.literal.identforced": ["input.ident"],
"statement.exp.literal.number": ["input.number"],
"statement.exp.literal.string": ["input.string"],
"statement.exp.op.add": ["exp.number", "exp.number"],
@@ -55,12 +58,15 @@ var statementlists = {
"statement.exp.op.add1": ["exp.number"],
"statement.exp.op.sub1": ["exp.number"],
"statement.exp.op.not": ["exp.number"],
"statement.exp.op.at": ["exp.vector", "exp.number"],
"statement.exp.op.at": ["exp.number_or_vector", "exp.number"],
"statement.exp.op.lt": ["exp.number", "exp.number"],
"statement.exp.op.eq": ["exp.number", "exp.number"],
"statement.exp.op.gt": ["exp.number", "exp.number"],
"statement.exp.op.and": ["exp", "exp"],
"statement.exp.op.or": ["exp", "exp"],
"statement.exp.op.sep.vec": ["block.exp.op.sep.vec"],
"statement.exp.op.sep.arr": ["block.exp.op.sep.arr"],
"statement.exp.func.frame_seq": ["exp.string", "exp.number", "exp.number"],
"statement.exp.func.int": ["exp.number"],
"statement.exp.func.clamp": ["exp.number", "exp.number", "exp.number"],
"statement.exp.func.min": ["exp.number", "exp.number"],
@@ -73,8 +79,15 @@ var statementlists = {
"statement.exp.func.ease_in": ["exp.number"],
"statement.exp.func.ease_out": ["exp.number"],
"statement.exp.func.ease_in_out": ["exp.number"],
"statement.exp.func.attack_timing": ["exp.number", "exp.number"],
"statement.exp.func.enter_timing": ["exp.number"],
"statement.exp.func.release_timing": ["exp.number", "exp.number"],
"statement.exp.func.leave_timing": ["exp.number"],
"statement.exp.func.contact_timing": ["exp.number", "exp.number"],
"statement.exp.func.screen_edge": ["exp.number"],
"statement.exp.func.anim": ["exp.vector", "exp.vector", "exp.number"],
"statement.exp.func.anim": ["exp.number_or_vector", "exp.number_or_vector", "exp.number"],
"statement.exp.number": ["exp.number"],
"statement.exp.string": ["exp.string"],
"statement.obj": ["block.element"],
"statement.prop": ["input.prop", "exp"],
"statement.select": ["block.select", "block.element"],
@@ -85,11 +98,17 @@ var statementlists = {
};
var explists = {
"exp": ["#exp.array", "#exp.identifier", "#exp.number", "#exp.string", "#exp.vector"],
"exp": ["#exp.number", "#exp.vector", "#exp.string", "#exp.array", "#exp.identifier", "#exp.any"],
"exp.number_or_vector": ["#exp.number", "#exp.vector", "#exp.any"],
"exp.any": [
"statement.exp.literal.ident", "statement.exp.literal.identforced",
"statement.exp.op.and", "statement.exp.op.or"
],
"exp.array": [
"statement.exp.op.sep.arr",
"statement.exp.func.frame_seq",
"#exp.any"
],
"exp.identifier": [
"statement.exp.const.null",
"#exp.any"
@@ -100,8 +119,8 @@ var explists = {
"statement.exp.op.add", "statement.exp.op.sub", "statement.exp.op.mul", "statement.exp.op.div", "statement.exp.op.mod",
"statement.exp.op.add1", "statement.exp.op.sub1", "statement.exp.op.not",
"statement.exp.op.at", "statement.exp.op.lt", "statement.exp.op.eq", "statement.exp.op.gt",
"statement.exp.func.int", "statement.exp.func.clamp", "statement.exp.func.min", "statement.exp.func.max", "statement.exp.func.abs",
"statement.exp.func.interval", "statement.exp.func.is",
"statement.exp.func.int", "statement.exp.func.clamp", "statement.exp.func.min", "statement.exp.func.max", "statement.exp.func.abs",
"statement.exp.func.cubic_bezier", "statement.exp.func.ease", "statement.exp.func.ease_in", "statement.exp.func.ease_out", "statement.exp.func.ease_in_out",
"statement.exp.func.attack_timing", "statement.exp.func.enter_timing", "statement.exp.func.release_timing", "statement.exp.func.leave_timing", "statement.exp.func.contact_timing",
"#exp.any"
@@ -111,7 +130,7 @@ var explists = {
"#exp.any"
],
"exp.vector": [
"statement.exp.cast.number2vector",
"statement.exp.op.sep.vec",
"statement.exp.func.screen_edge",
"statement.exp.func.anim",
"#exp.any"

View File

@@ -42,15 +42,26 @@ messages["en_US"] = {
"input.prop.text.size": "text sprite: font size",
"input.prop.text.spacing": "text sprite: character spacing",
"input.prop.text.value": "text sprite: content",
"input.string.default": "abc",
"input.string.default": "string",
"input.type.chart": "chart",
"input.type.default": "element",
"input.type.group": "track group",
"input.type.note": "note",
"input.type.track": "track",
"list.category.exp.any": "Any",
"list.category.exp.array": "Array",
"list.category.exp.const": "Constants",
"list.category.exp.func": "Functions",
"list.category.exp.func.anim": "Animation Functions",
"list.category.exp.func.ctx": "Contextual Functions",
"list.category.exp.func.judge": "Judge Functions",
"list.category.exp.identifier": "Identifier",
"list.category.exp.number": "Number",
"list.category.exp.op": "Operators",
"list.category.exp.string": "String",
"list.category.exp.vector": "Vector",
"list.statement.comp": "Attach component",
"list.statement.define": "Define static variable",
"list.statement.exp.cast.number2vector": "From number",
"list.statement.exp.cast.vector2number": "From vector",
"list.statement.exp.const.false": "False",
"list.statement.exp.const.h": "Screen height",
@@ -60,22 +71,30 @@ messages["en_US"] = {
"list.statement.exp.const.w": "Screen width",
"list.statement.exp.func.abs": "Absolute value",
"list.statement.exp.func.anim": "Animate value",
"list.statement.exp.func.attack_timing": "Attack in timing",
"list.statement.exp.func.clamp": "Clamp",
"list.statement.exp.func.contact_timing": "Contact timing",
"list.statement.exp.func.cubic_bezier": "Cubic Bézier curve",
"list.statement.exp.func.ease": "Ease",
"list.statement.exp.func.ease_in": "Ease in",
"list.statement.exp.func.ease_in_out": "Ease in out",
"list.statement.exp.func.ease_out": "Ease out",
"list.statement.exp.func.enter_timing": "Enter timing",
"list.statement.exp.func.frame_seq": "Frame sequence",
"list.statement.exp.func.int": "Round down",
"list.statement.exp.func.interval": "Interval",
"list.statement.exp.func.is": "Is equivalent",
"list.statement.exp.func.leave_timing": "Leave timing",
"list.statement.exp.func.max": "Maximum",
"list.statement.exp.func.min": "Minimum",
"list.statement.exp.func.release_timing": "Release in timing",
"list.statement.exp.func.screen_edge": "Screen edge",
"list.statement.exp.literal.ident": "Variable",
"list.statement.exp.literal.identforced": "Variable (forced)",
"list.statement.exp.literal.number": "Number",
"list.statement.exp.literal.string": "String",
"list.statement.exp.number": "Add element",
"list.statement.exp.string": "Add element",
"list.statement.exp.op.add": "a + b",
"list.statement.exp.op.add1": "+n",
"list.statement.exp.op.and": "p and q",
@@ -88,6 +107,8 @@ messages["en_US"] = {
"list.statement.exp.op.mul": "a × b",
"list.statement.exp.op.not": "Not",
"list.statement.exp.op.or": "p or q",
"list.statement.exp.op.sep.arr": "Array",
"list.statement.exp.op.sep.vec": "Vector",
"list.statement.exp.op.sub": "a - b",
"list.statement.exp.op.sub1": "-n",
"list.statement.obj": "Create container",
@@ -99,7 +120,6 @@ messages["en_US"] = {
"list.statement.select.type": "Filter element type",
"statement.comp": "with a {0}",
"statement.define": "Define static {0} = {1}",
"statement.exp.cast.number2vector": "number {0}",
"statement.exp.cast.vector2number": "vector {0}",
"statement.exp.const.false": "false",
"statement.exp.const.h": "screen height",
@@ -109,22 +129,31 @@ messages["en_US"] = {
"statement.exp.const.w": "screen width",
"statement.exp.func.abs": "absolute value of {0}",
"statement.exp.func.anim": "animate value from {0} to {1} with {2}",
"statement.exp.func.attack_timing": "attack in timing ({0}, {1})",
"statement.exp.func.clamp": "clamp {1} between {0} and {2}",
"statement.exp.func.contact_timing": "contact timing ({0}, {1})",
"statement.exp.func.cubic_bezier": "cubic Bézier curve defined by the control points ({0}, {1}) and ({2}, {3}) with {4}",
"statement.exp.func.ease": "ease with {0}",
"statement.exp.func.ease_in": "ease in with {0}",
"statement.exp.func.ease_in_out": "ease in out with {0}",
"statement.exp.func.ease_out": "ease out with {0}",
"statement.exp.func.enter_timing": "enter timing ({0}, +∞)",
"statement.exp.func.frame_seq": "frame sequence with prefix {0} from {1} to {2}",
"statement.exp.func.int": "round down {0}",
"statement.exp.func.interval": "interval between {0} and {1}",
"statement.exp.func.is": "{0} is equivalent to {1}",
"statement.exp.func.leave_timing": "leave timing (-∞, {0})",
"statement.exp.func.max": "maximum of {0} and {1}",
"statement.exp.func.min": "minimum of {0} and {1}",
"statement.exp.func.release_timing": "release in timing ({0}, {1})",
"statement.exp.func.screen_edge": "the screen edge #{0}",
"statement.exp.literal.ident": "{0}",
"statement.exp.literal.identforced": "{0} (forced)",
"statement.exp.literal.number": "{0}",
"statement.exp.literal.string": "{0}",
"statement.exp.number": "{0}",
"statement.exp.number_or_vector": "{0}",
"statement.exp.string": "{0}",
"statement.exp.op.add": "{0} + {1}",
"statement.exp.op.add1": "+{0}",
"statement.exp.op.and": "{0} and {1}",
@@ -137,6 +166,8 @@ messages["en_US"] = {
"statement.exp.op.mul": "{0} × {1}",
"statement.exp.op.not": "not {0}",
"statement.exp.op.or": "{0} or {1}",
"statement.exp.op.sep.arr": "Array {0}",
"statement.exp.op.sep.vec": "Vector {0}",
"statement.exp.op.sub": "{0} - {1}",
"statement.exp.op.sub1": "-{0}",
"statement.obj": "Create a container {0}",

View File

@@ -42,27 +42,59 @@ messages["zh_CN"] = {
"input.prop.text.size": "文字图形:字体大小",
"input.prop.text.spacing": "文字图形:字符间距",
"input.prop.text.value": "文字图形:内容",
"input.string.default": "字符串",
"input.type.chart": "谱面",
"input.type.default": "元素",
"input.type.group": "轨道组",
"input.type.note": "按键",
"input.type.track": "轨道",
"list.category.exp.any": "任意",
"list.category.exp.array": "数组",
"list.category.exp.const": "常量",
"list.category.exp.func": "函数",
"list.category.exp.func.anim": "动画函数",
"list.category.exp.func.ctx": "环境函数",
"list.category.exp.func.judge": "判定函数",
"list.category.exp.identifier": "变量",
"list.category.exp.number": "数字",
"list.category.exp.op": "运算符",
"list.category.exp.string": "字符串",
"list.category.exp.vector": "向量",
"list.statement.comp": "附加组件",
"list.statement.define": "定义静态变量",
"list.statement.exp.cast.vector2number": "从向量",
"list.statement.exp.const.false": "假",
"list.statement.exp.const.h": "屏幕高度",
"list.statement.exp.const.inf": "无穷大",
"list.statement.exp.const.null": "空变量",
"list.statement.exp.const.true": "真",
"list.statement.exp.const.w": "屏幕宽度",
"list.statement.exp.func.abs": "绝对值",
"list.statement.exp.func.anim": "动画值",
"list.statement.exp.func.attack_timing": "在时间区间中按下",
"list.statement.exp.func.clamp": "限制值",
"list.statement.exp.func.contact_timing": "接触时间区间",
"list.statement.exp.func.cubic_bezier": "三次贝塞尔曲线",
"list.statement.exp.func.ease": "缓动",
"list.statement.exp.func.ease_in": "缓入",
"list.statement.exp.func.ease_in_out": "缓入缓出",
"list.statement.exp.func.ease_out": "缓出",
"list.statement.exp.func.enter_timing": "进入时间区间",
"list.statement.exp.func.frame_seq": "帧序列",
"list.statement.exp.func.int": "向下取整",
"list.statement.exp.func.interval": "区间",
"list.statement.exp.func.is": "等价",
"list.statement.exp.func.leave_timing": "离开时间区间",
"list.statement.exp.func.max": "最大值",
"list.statement.exp.func.min": "最小值",
"list.statement.exp.func.release_timing": "在时间区间中松开",
"list.statement.exp.func.screen_edge": "屏幕边缘",
"list.statement.exp.literal.ident": "变量",
"list.statement.exp.literal.identforced": "变量(强制)",
"list.statement.exp.literal.number": "数字",
"list.statement.exp.literal.string": "字符串",
"list.statement.exp.number": "添加元素",
"list.statement.exp.string": "添加元素",
"list.statement.exp.op.add": "a + b",
"list.statement.exp.op.add1": "+n",
"list.statement.exp.op.and": "p 且 q",
@@ -75,6 +107,8 @@ messages["zh_CN"] = {
"list.statement.exp.op.mul": "a × b",
"list.statement.exp.op.not": "非",
"list.statement.exp.op.or": "p 或 q",
"list.statement.exp.op.sep.arr": "数组",
"list.statement.exp.op.sep.vec": "向量",
"list.statement.exp.op.sub": "a - b",
"list.statement.exp.op.sub1": "-n",
"list.statement.obj": "创建容器",
@@ -86,20 +120,40 @@ messages["zh_CN"] = {
"list.statement.select.type": "筛选元素类型",
"statement.comp": "创建一个 {0} 组件",
"statement.define": "静态定义 {0} = {1}",
"statement.exp.cast.vector2number": "向量 {0}",
"statement.exp.const.false": "假",
"statement.exp.const.h": "屏幕高度",
"statement.exp.const.inf": "无穷大",
"statement.exp.const.null": "空变量",
"statement.exp.const.true": "真",
"statement.exp.const.w": "屏幕宽度",
"statement.exp.func.abs": "{0} 的绝对值",
"statement.exp.func.anim": "动画值从 {0} 到 {1},使用函数 {2}",
"statement.exp.func.attack_timing": "在时间区间 ({0}, {1}) 中按下",
"statement.exp.func.clamp": "限制 {1} 在 {0} 和 {2} 之间",
"statement.exp.func.contact_timing": "接触时间区间 ({0}, {1})",
"statement.exp.func.cubic_bezier": "由控制点 ({0}, {1}) 和 ({2}, {3}) 定义的三次贝塞尔曲线,复合 {4}",
"statement.exp.func.ease": "缓动,复合 {0}",
"statement.exp.func.ease_in": "缓入,复合 {0}",
"statement.exp.func.ease_in_out": "缓入缓出,复合 {0}",
"statement.exp.func.ease_out": "缓出,复合 {0}",
"statement.exp.func.enter_timing": "进入时间区间 ({0}, +∞)",
"statement.exp.func.frame_seq": "前缀为 {0} 从 {1} 的 {2} 帧序列",
"statement.exp.func.int": "向下取整 {0}",
"statement.exp.func.interval": "{0} 和 {1} 之间的区间",
"statement.exp.func.is": "{0} 等价于 {1}",
"statement.exp.func.leave_timing": "离开时间区间 (-∞, {0})",
"statement.exp.func.max": "{0} 和 {1} 的最大值",
"statement.exp.func.min": "{0} 和 {1} 的最小值",
"statement.exp.func.release_timing": "在时间区间 ({0}, {1}) 中松开",
"statement.exp.func.screen_edge": "屏幕边缘 #{0}",
"statement.exp.literal.ident": "{0}",
"statement.exp.literal.identforced": "{0}(强制)",
"statement.exp.literal.number": "{0}",
"statement.exp.literal.string": "{0}",
"statement.exp.number": "{0}",
"statement.exp.number_or_vector": "{0}",
"statement.exp.string": "{0}",
"statement.exp.op.add": "{0} + {1}",
"statement.exp.op.add1": "+{0}",
"statement.exp.op.and": "{0} 且 {1}",
@@ -112,6 +166,8 @@ messages["zh_CN"] = {
"statement.exp.op.mul": "{0} × {1}",
"statement.exp.op.not": "非 {0}",
"statement.exp.op.or": "{0} 或 {1}",
"statement.exp.op.sep.arr": "数组 {0}",
"statement.exp.op.sep.vec": "向量 {0}",
"statement.exp.op.sub": "{0} - {1}",
"statement.exp.op.sub1": "-{0}",
"statement.obj": "创建一个容器 {0}",