xbmc / visualization.shadertoy

Shadertoy visualizer for Kodi
GNU General Public License v2.0
34 stars 41 forks source link

[Nexus] feature to use JSON file about usable presets and allow to change by user #75

Closed AlwinEsch closed 3 years ago

AlwinEsch commented 3 years ago

This is a nice feature to allow an user to create own preset file and his own textures(images about. As I like the request https://github.com/xbmc/visualization.shadertoy/pull/41 and there not updated, thought to make byself :smile:.

Here how the file can be used outside of addon (also used for test):

{ "presets":[
[ "Waves Remix",  "./WavesRemix.glsl", "audio", "", "", "" ],
[ "The Disco Tunnel", "./TheDiscoTunnel.frag.glsl",  "./tex02.png", "./tex10.png", "audio", "" ]
]}

Here addon his own where his previous parts are moved from code to there:

{ "presets":[
[ "2D LED Spectrum by un1versal",             "2Dspectrum.frag.glsl",             "audio",     "",          "",      "" ],
[ "Audio Eclipse by airtight",                "audioeclipse.frag.glsl",           "audio",     "",          "",      "" ],
[ "Audio Reaktive by choard1895",             "audioreaktive.frag.glsl",          "audio",     "",          "",      "" ],
[ "AudioVisual by Passion",                   "audiovisual.frag.glsl",            "audio",     "",          "",      "" ],
[ "Beating Circles by Phoenix72",             "beatingcircles.frag.glsl",         "audio",     "",          "",      "" ],
[ "BPM by iq",                                "bpm.frag.glsl",                    "audio",     "",          "",      "" ],
[ "Circle Wave by TekF",                      "circlewave.frag.glsl",             "audio",     "",          "",      "" ],
[ "Circuits by Kali",                         "circuits.frag.glsl",               "audio",     "tex07.png", "",      "", "gl_only" ],
[ "Colored Bars by novalis",                  "coloredbars.frag.glsl",            "audio",     "",          "",      "", "gl_only" ],
[ "Cubescape by iq",                          "cubescape.frag.glsl",              "audio",     "tex05.png", "",      "", "gl_only" ],
[ "Dancing Metalights by Danguafare",         "dancingmetalights.frag.glsl",      "audio",     "",          "",      "" ],
[ "The Disco Tunnel by poljere",              "discotunnel.frag.glsl",            "tex02.png", "tex15.png", "audio", "" ],
[ "Electric pulse by un1versal",              "electricpulse.frag.glsl",          "audio",     "",          "",      "" ],
[ "Fractal Land by Kali",                     "fractalland.frag.glsl",            "tex02.png", "tex15.png", "audio", "", "gl_only" ],
[ "Gameboy by iq",                            "gameboy.frag.glsl",                "audio",     "",          "",      "" ],
[ "Input Sound by iq",                        "input.frag.glsl",                  "audio",     "",          "",      "" ],
[ "I/O by movAX13h",                          "io.frag.glsl",                     "audio",     "",          "",      "", "gl_only" ],
[ "Kaleidoscope Visualizer by Qqwy",          "kaleidoscopevisualizer.frag.glsl", "audio",     "tex14.png", "",      "" ],
[ "LED spectrum by simesgreen",               "ledspectrum.frag.glsl",            "audio",     "",          "",      "" ],
[ "Polar Beats by sauj123",                   "polarbeats.frag.glsl",             "audio",     "",          "",      "" ],
[ "Simplicity Galaxy by CBS",                 "simplicitygalaxy.frag.glsl",       "audio",     "",          "",      "" ],
[ "Sound Flower by iq",                       "soundflower.frag.glsl",            "audio",     "",          "",      "" ],
[ "Sound sinus wave by Eitraz",               "soundsinuswave.frag.glsl",         "audio",     "",          "",      "" ],
[ "Spectrometer by jaba",                     "spectrometer.frag.glsl",           "audio",     "",          "",      "" ],
[ "symmetrical sound visualiser by thelinked","symmetricalsound.frag.glsl",       "audio",     "",          "",      "" ],
[ "Twisted Rings by poljere",                 "twistedrings.frag.glsl",           "audio",     "",          "",      "" ],
[ "Undulant Spectre by mafik",                "undulantspectre.frag.glsl",        "audio",     "",          "",      "" ],
[ "Demo - Volumetric Lines by iq",            "volumetriclines.frag.glsl",        "audio",     "",          "",      "", "gl_only" ],
[ "Waves Remix by ADOB",                      "wavesremix.frag.glsl",             "audio",     "",          "",      "" ]
]}

Also added a additional python script to allow show of help text, so that a user not need to search somewhere how works. Think a english speaking guy can be look to make it better in grammar :sweat_smile: .

Here windows how them now looks: Bildschirmfoto vom 2021-09-06 00-42-40 Bildschirmfoto vom 2021-09-06 00-35-29 Bildschirmfoto vom 2021-09-06 00-46-42

And can be opened with: Bildschirmfoto vom 2021-09-06 00-34-19

Thought to make shortly a complete normal programming, instead of the update round to change all addons to Nexus :smirk::rofl: , where becomes now continued.

AlwinEsch commented 3 years ago

Has forgot, in case of a wrong JSON, missing files and problems becomes a notification shown (and detailed on log) to know why not work. Bildschirmfoto von 2021-09-06 01-33-48

eigendude commented 3 years ago

I think I caught most of the grammar improvements

AlwinEsch commented 3 years ago

Then think about bringing it in and creating a backport for it.