diff options
Diffstat (limited to 'js')
| -rw-r--r-- | js/ui/controls.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/js/ui/controls.js b/js/ui/controls.js index 982871a..fa2a240 100644 --- a/js/ui/controls.js +++ b/js/ui/controls.js @@ -90,6 +90,22 @@ var controls = (function(){ controls.clear.use = function(){ canvas.erase() } + + controls.webcam = new Tool (webcam_el) + controls.webcam.load = function(){ + webcam_close.addEventListener("click", function(){ controls.webcam.blur() }) + } + controls.webcam.use = function(){ + if (! this.loaded) { + this.load() + } + webcam_iframe.src = "webcam.html" + webcam_rapper.style.display = "block" + } + controls.webcam.done = function(){ + webcam_iframe.src = "" + webcam_rapper.style.display = "none" + } controls.grid = new Checkbox (grid_el) controls.grid.use = function(){ @@ -196,6 +212,7 @@ var controls = (function(){ controls.select, controls.clear, controls.grid, + controls.webcam, controls.fg, controls.bg, controls.char, |
