diff options
| -rw-r--r-- | js/demo.js | 11 | ||||
| -rw-r--r-- | shader-picker.html | 12 |
2 files changed, 12 insertions, 11 deletions
diff --git a/js/demo.js b/js/demo.js new file mode 100644 index 0000000..919a169 --- /dev/null +++ b/js/demo.js @@ -0,0 +1,11 @@ +// <button id="demo">demo</button> +var demo = function(){ + $("#demo").click(function(){ run("#first") }) + run('#first') + function run(el){ + $el = $(el) + s = $el.html() + $("#shader").html(s) + shader_build() + } +}) diff --git a/shader-picker.html b/shader-picker.html index 8449935..cfd880d 100644 --- a/shader-picker.html +++ b/shader-picker.html @@ -81,9 +81,6 @@ a { color: #00f; } <br> <br> <button id="help">help</button> -<!-- - <button id="demo">demo</button> - --> <button id="test-js">test js</button> <span id="shaders"></span> <button id="add-shader">+</button> @@ -143,7 +140,6 @@ function init(){ $("#pause").click(pause) $("#step-forward").click(step_forward) $("#add-frame").click(add_frame) -// $("#demo").click(function(){ demo("#first") }) $("#frames").sortable({ start: drag_start, stop: drag_stop @@ -179,7 +175,6 @@ function init(){ }) $("#instructions").disableSelection(); -// demo('#first') load() $(window).on("scroll", function(){ scrolling = true }) @@ -191,6 +186,7 @@ function init(){ if (user.username.length) { console.log("signed in as ", user.username) } + $(user.shaders.buttons["colorcycle"]).trigger("click") $("#test-js").click(function(){ var script = $("#shader").val() @@ -221,12 +217,6 @@ function load(){ var imageURL = $("#url").val() loadImage(imageURL, ready) } -// function demo(el){ -// $el = $(el) -// s = $el.html() -// $("#shader").html(s) -// shader_build() -// } function drag_start(){ dragging = true; $(this).addClass("dragging") } function drag_stop(){ dragging = false; $(".dragging").removeClass("dragging") } |
