54 lines
2.6 KiB
JavaScript
54 lines
2.6 KiB
JavaScript
import { Slider } from "./slider.js"
|
|
import { Select } from "./select.js"
|
|
import { RowHeader } from "./row-header.js"
|
|
import { TextInput } from "./text-input.js"
|
|
import { ColorInput } from "./color-input.js"
|
|
|
|
function makeSliders()
|
|
{
|
|
const sliders = {
|
|
subpixelOptions: new RowHeader("global options"),
|
|
mode: new Select("mode", ["supersampling", "subpixel"]),
|
|
scale: new Slider("scale", 0.0, 0.05),
|
|
translateX: new Slider("translate x", -1, 1),
|
|
translateY: new Slider("translate y", -1, 1),
|
|
multisampleCount: new Slider("multisampleCount", 1, 4, 1),
|
|
|
|
distanceThreshold: new Slider("distance threshold", 0.25, 0.75),
|
|
distanceScale: new Slider("distance scale", 0.0, 20.0),
|
|
aliasingEnable: new Slider("aliasing enable", 0, 1, 1),
|
|
|
|
text: new TextInput("text"),
|
|
insideColor: new ColorInput("inside color", "#ffffff"),
|
|
outlineColor: new ColorInput("outline color", "#000000"),
|
|
|
|
subpixelOptions: new RowHeader("subpixel mode options"),
|
|
subpixelEnable: new Slider("subpixel enable", 0, 1, 1),
|
|
subpixelStrength: new Slider("subpixel strength", 0.0, 1.0),
|
|
subpixelOffset: new Slider("subpixel offset", 0.0, 10.0),
|
|
|
|
supersamplingOptions: new RowHeader("supersampling mode options"),
|
|
supersampleCount: new Slider("supersample count", 1.0, 15.0, 7),
|
|
supersampleOffset: new Slider("supersample offset", 0.0, 10.0),
|
|
outlineThreshold: new Slider("outline threshold", 0.0, 1.0),
|
|
outlineScale: new Slider("outline scale", 0.0, 20.0),
|
|
|
|
//colorMix: new Slider("color mix", 0.0, 1.0),
|
|
//colorScale: new Slider("color scale", 0.0, 10.0),
|
|
//colorOffset: new Slider("color offset", 0.0, 3.1415),
|
|
};
|
|
|
|
const defaults = {"undefined":"0","subpixel offset":"62","text":"supersampling","bone length":"32","outline scale":"208","ramp min":"0","dist. threshold":"513","velocity acc.":"385","gamma":"494","aliasing enable":"1","outline threshold":"335","outline color":"#000000","threshold offset":"265","outline. threshold":"512","outline offset":"0","inside color":"#ffffff","color mix":"0","scale":"89","supersample count":"1","distance threshold":"494","supersamples":"0","distance offset":"513","translate y":"381","ramp max":"1024","multisampleCount":"1","supersample offset":"248","subpixel enable":"1","translate x":"581","color offset":"118","velocity damp.":"796","distance scale":"49","threshold scale":"739","bone count":"40","color scale":"148","subpixel strength":"348"};
|
|
/*
|
|
for (let slider of Object.values(sliders)) {
|
|
if (slider.label in defaults) {
|
|
slider.input.value = defaults[slider.label];
|
|
}
|
|
}
|
|
*/
|
|
|
|
return sliders;
|
|
}
|
|
|
|
export { makeSliders };
|