diff options
| author | jules <jules@okfoc.us> | 2014-02-02 02:25:07 -0500 |
|---|---|---|
| committer | jules <jules@okfoc.us> | 2014-02-02 02:25:07 -0500 |
| commit | ff36ed287ec8747fe25e429bc5fa11961274bbd3 (patch) | |
| tree | cae45435286369ed6f658729eca0c09a80a5effe /js/api | |
| parent | 76a4f773a56eaf59953f2f7ebe027d8b0a4b3ee7 (diff) | |
add examples from json
Diffstat (limited to 'js/api')
| -rw-r--r-- | js/api/gallery.js | 7 | ||||
| -rw-r--r-- | js/api/localstorage.js | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/js/api/gallery.js b/js/api/gallery.js index c83d5f6..0e6614b 100644 --- a/js/api/gallery.js +++ b/js/api/gallery.js @@ -39,14 +39,15 @@ shader_gallery.bind = function(){ }) } -function new_shader(){ +function new_shader(opt){ + opt = opt || {} shader_id_root = null run_shader({ id: "", shader_id: "", image_url: $("#url").val(), - script: "", - name: "" + script: opt.shader || "", + name: opt.name || "" }) } function run_shader(shader_object){ diff --git a/js/api/localstorage.js b/js/api/localstorage.js index eeae658..309d49d 100644 --- a/js/api/localstorage.js +++ b/js/api/localstorage.js @@ -5,7 +5,7 @@ local_shaders.init = function(){ } local_shaders.bind = function(){ local_shaders.buttons = {} - if ('SHADERS' in window) { + if ('EXAMPLE_SHADERS' in window) { local_shaders.bindButtons( window.SHADERS ) } local_shaders.bindButtons( local_shaders.getShaders() ) |
