diff options
Diffstat (limited to 'shader-api.html')
| -rw-r--r-- | shader-api.html | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/shader-api.html b/shader-api.html index 9020136..0aed936 100644 --- a/shader-api.html +++ b/shader-api.html @@ -8,7 +8,7 @@ div { float: left; padding: 10px;} form { display: inline-block; } #shader-api,#gallery { clear: right; width:100%; padding: 0; } -#shader-gallery,#gallery-images { display: block; max-height: 210px; overflow-y: auto; width: 100%; } +#shader-gallery,#gallery-images { display: block; min-height: 152px; max-height: 210px; overflow-y: auto; width: 100%; } #shader-gallery img,#shader-gallery canvas,#gallery-images img, #gallery-images canvas { max-width: 200px; height: 100px; margin: 5px; cursor: pointer; } .shader { width: 100px; @@ -83,6 +83,7 @@ a { color: #00f; } var cc = cq(0,0).appendTo("#workspace") var w, h +var firsttime = true $(init) @@ -116,6 +117,10 @@ function init(){ $el.append( $shader ) } + if (firsttime) { + firsttime = false + run(shaders[0]) + } } ShaderAPI.list_users(function(err, users){ @@ -136,10 +141,10 @@ function init(){ run( $(this).data("shader") ) }) - load() + // load() document.getElementById('shader').addEventListener('input', shader_build); - shader_build() + // shader_build() requestAnimationFrame(animate) } |
