diff options
Diffstat (limited to 'shader-combo.html')
| -rw-r--r-- | shader-combo.html | 66 |
1 files changed, 47 insertions, 19 deletions
diff --git a/shader-combo.html b/shader-combo.html index 2ef8ed1..312f52f 100644 --- a/shader-combo.html +++ b/shader-combo.html @@ -3,7 +3,7 @@ <head> <title>Shaderblaster</title> <style type="text/css"> -body { background: #f8f8f8; font-size: 14px; } +body { background: #fbfbfb; font-size: 14px; } div { float: left; padding: 10px;} form { display: inline-block; } a { color: #00f; } @@ -18,20 +18,23 @@ a { color: #00f; } #uploaded-url { display: none; width: 400px; } #uploaded-url + br { display: none; } -#header { clear: right; width:100%; padding: 0; font-size: 12px; } -#shader-gallery,#gallery-images { display: block; height: 152px; overflow-y: auto; width: 100%; padding: 0; border-bottom: 1px solid #ccc; } +#header { width:calc(100% - 10px); padding: 0; font-size: 12px; position: fixed; bottom:0; left: 0; padding: 5px; background: rgba(255,255,255,0.9); box-shadow: 0 0 10px #888; z-index: 2;} +.gallery { display: block; height: 152px; overflow-y: auto; width: 100%; padding: 0; border-bottom: 1px solid #ccc; } +.gallery::-webkit-scrollbar { -webkit-appearance: none; width: 7px; } +.gallery::-webkit-scrollbar-thumb { border-radius: 4px; background-color: rgba(0,0,0,.5); box-shadow: 0 0 1px rgba(255,255,255,.5); } #shader-gallery img,#shader-gallery canvas,#gallery-images img, #gallery-images canvas { max-width: 200px; height: 100px; margin: 5px; cursor: pointer; clear: right; } .shader { width: 100px; } .shader span { display: block } -#help { float: right; } .dragging { cursor: -webkit-grabbing !important; } .ui-sortable-helper { cursor: -webkit-grabbing !important; } -#instructions { position: absolute;top:20px;right:20px; width:190px;height:465px; box-shadow:5px 5px 10px rgba(0,0,0,0.3); background:rgba(255,255,255,0.8); display: none; cursor: -webkit-grab; } -#instructions iframe {width: 100%;height:100%;margin:0;padding:0;border:0;} -#instructions.dragging iframe { pointer-events: none; } -#instructions .close { position: absolute; top: 5px; right: 5px; color: #f00; padding: 3px; border: 0;background: white; font-size: 10px; line-height: 10px; } +#commands { top:40px;right:20px; width:190px;height:calc(95% - 230px); } +#tutorial { top:40px;right:30px; width:290px;height:325px; display: block;} +.iframe { position: absolute; box-shadow:5px 5px 10px rgba(0,0,0,0.3); background:rgba(255,255,255,0.8); display: none; cursor: -webkit-grab; } +.iframe iframe {width: 100%;height:100%;margin:0;padding:0;border:0;} +.iframe.dragging iframe { pointer-events: none; } +.iframe .close { position: absolute; top: 5px; right: 5px; color: #f00; padding: 3px; border: 0;background: white; font-size: 10px; line-height: 10px; } #frame-controls { display: none; } #frames { display: block; width: 404px; max-height: 150px; overflow: auto; border: 1px solid #ddd; line-height: 0; } @@ -52,21 +55,26 @@ a { color: #00f; } #render,#save,#upload,#save-shader { font-weight: bold; } #save[disabled],#upload[disabled] { font-weight: normal; } -#logo { position: fixed; bottom: 10px; right: 10px; font-size: 38px; font-weight: bold; font-style: italic; margin-top: 0px; margin: 0 5px; color: #000; } +#logo { display: inline; position: relative; top: 2px; font-size: 18px; font-family: georgia; font-weight: bold; font-style: italic; margin: 0px; color: #243; } +#corner { position: fixed; top: -5px; right: 0px; } + </style> </head> <body> -<h1 id="logo">shaderblaster</h1> +<div id="corner"> + <h1 id="logo">shaderblaster</h1> + <button id="show-tutorial">help</button> + <button id="show-commands">commands</button> + <select id="examples"> + <option>examples</option> + </select> +</div> <div id="header"> - <button id="help">help</button> <button class="toggle-off">x</button> - <button id="new-shader"><b>new shader</b></button> <!-- - <select id="examples"> - <option>examples</option> - </select> + <button id="new-shader"><b>new shader</b></button> --> <!-- <input type="text" id="shader-id" disabled><button id="fetch-info" disabled>info</button> @@ -87,15 +95,15 @@ a { color: #00f; } <select id="pick-user"> <option>fetching users..</option> </select> - <div id="shader-gallery"></div> + <div id="shader-gallery" class="gallery"></div> </span> <span id="gallery-form" class="form"> <button id="gallery-random">asdf random</button> <form id="gallery-search"> - <input type="text" id="dumpfm-search-query" value="duck bill"> + <input type="text" id="dumpfm-search-query" value="webcam"> <button id="gallery-search">search dump</button> </form> - <div id="gallery-images"></div> + <div id="gallery-images" class="gallery"></div> </span> </div> @@ -147,7 +155,8 @@ a { color: #00f; } <div id="workspace"></div> -<div id="instructions"><iframe src="instructions.html"></iframe><button class="close">×</button></div> +<div class="iframe" id="tutorial"><iframe src="tutorial.html"></iframe><button class="close">×</button></div> +<div class="iframe" id="commands"><iframe src="commands.html"></iframe><button class="close">×</button></div> <script type="text/javascript" src="js/vendor/acorn.js"></script> <script type="text/javascript" src="js/vendor/gif.js"></script> <script type="text/javascript" src="js/vendor/gif-encode.min.js"></script> @@ -267,5 +276,24 @@ function init(){ } </script> +<script type="text/javascript-shader" data-name="basic"> +// The most basic shaders determine pixel color and nothing else. +// This shader makes the image red. + +r = r +g = 0 +b = 0 +a = 255 +</script> +<script type="text/javascript-shader" data-name="basic"> +// The most basic shaders determine pixel color and nothing else. +// This shader makes the image red. + +r = r +g = 0 +b = 0 +a = 255 +</script> + </body> </html> |
