loadValues : Json.Decode.Value -> GenUI a -> GenUI a
Load values from the Json.Decode.Value
and apply them to the given UI.
Example of the JSON values definition:
{
"product": "RubyMine",
"resolution": "1920x1080",
"resolutionFactor": 1,
"scale": 2.0,
"rotation": 20,
"offsetX": 0,
"offsetY": 0,
"callGradientTool": "[[action]]",
"neuro": {
"seed": 5,
"depth": 5,
"width": 5,
"variance": 2000,
"mode": "fan_in",
"distribution": "truncated_normal",
"architecture": "densenet",
"activation": "sigmoid",
"outActivation": "sigmoid",
"fMode": "disabled"
},
"evolve": {
"alpha": 0.5,
"beta": 0.5,
"gamma": 0.5
},
"mutation": {
"randomMid": "[[action]]",
"randomMax": "[[action]]"
},
"lab": {
"flatColors": false,
"flatLinesNum": 5,
"ditherStrength": 0
},
"logoShown": true,
"undo": "[[action]]",
"save": "[[action]]",
"export_": "[[action]]",
"video": {
"animFunc": "Random spline animation",
"videoFps": "60",
"videoLength": "30",
"maskFilename": "",
"videoInvertMask": false,
"videoCodec": "h264_8bit",
"videoIntensity": 3,
"requestVideo": "[[action]]"
}
}
Loads values using Json.Decode.at
knowing the paths from given UI and skipping the values if they are failed to parse.