diff --git a/js/filters.js b/js/filters.js index 6afcf12..aee0145 100644 --- a/js/filters.js +++ b/js/filters.js @@ -7,6 +7,7 @@ const filters = { // TODO(#62): when you have too many params the UI gets really cluttered "params": { "interval": { + "label": "Interval", "type": "float", "init": 0.85, "min": 0.01, @@ -14,6 +15,7 @@ const filters = { "step": 0.01, }, "ground": { + "label": "Ground", "type": "float", "init": 0.5, "min": -1.0, @@ -21,6 +23,7 @@ const filters = { "step": 0.01, }, "scale": { + "label": "Scale", "type": "float", "init": 0.40, "min": 0.0, @@ -30,6 +33,7 @@ const filters = { // TODO(#63): jump_height in the "Hop" filter does not make any sense // If it's bigger the emote should jump higher. Right now it is the other way around. "jump_height": { + "label": "Jump Height", "type": "float", "init": 4.0, "min": 1.0, @@ -37,6 +41,7 @@ const filters = { "step": 0.01, }, "hops": { + "label": "Hops Count", "type": "float", "init": 2.0, "min": 1.0, diff --git a/js/index.js b/js/index.js index 79fea5b..646c9e6 100644 --- a/js/index.js +++ b/js/index.js @@ -118,8 +118,13 @@ function loadFilterProgram(gl, filter, vertexAttribs) { paramsPanel.dispatchEvent(new CustomEvent("paramsChanged")); }; + let label = paramName; + if (filter.params[paramName].label) { + label = filter.params[paramName].label; + } + paramsPanel.appendChild(div( - span(`${paramName}: `), valuePreview, + span(`${label}: `), valuePreview, div(valueInput), )); } break;