From 455d0253efbc2f8bb02975c7dd1f185263590536 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Wed, 5 Oct 2016 12:13:48 +0200 Subject: [PATCH] Gestion du 'getter' dynamique pour le 'image-loader' + Gestion de 'dat.GUI' + Ajout de 'tracking.js' [public_html/js/lib/image-loader.js & ../action-script & ../pictures/index.php] --- public_html/css/expanded/layout.css | 6 +- public_html/css/expanded/layout.css.map | 4 +- public_html/css/layout.scss | 4 +- public_html/css/min/layout.css | 4 +- public_html/css/min/layout.css.map | 4 +- public_html/index.php | 11 +- public_html/js/action-script.js | 29 +- public_html/js/lib/dat.gui.js | 2 + public_html/js/lib/image-loader.js | 64 +- public_html/js/lib/local.js | 8 +- public_html/js/lib/min/dat.gui.js | 97 + public_html/js/lib/min/image-loader.js | 5 +- public_html/js/lib/min/local.js | 2 +- public_html/js/min/action-script.js | 2 +- public_html/js/tracking.js/.bowerrc | 3 + public_html/js/tracking.js/.editorconfig | 14 + public_html/js/tracking.js/.gitignore | 3 + public_html/js/tracking.js/.jshintrc | 30 + public_html/js/tracking.js/.travis.yml | 4 + public_html/js/tracking.js/LICENSE.md | 30 + public_html/js/tracking.js/README.md | 90 + public_html/js/tracking.js/bower.json | 22 + .../js/tracking.js/build/data/eye-min.js | 8 + public_html/js/tracking.js/build/data/eye.js | 8 + .../js/tracking.js/build/data/face-min.js | 8 + public_html/js/tracking.js/build/data/face.js | 8 + .../js/tracking.js/build/data/mouth-min.js | 8 + .../js/tracking.js/build/data/mouth.js | 8 + .../js/tracking.js/build/tracking-min.js | 8 + public_html/js/tracking.js/build/tracking.js | 2445 +++++++++++++++++ public_html/js/tracking.js/gulpfile.js | 115 + public_html/js/tracking.js/package.json | 43 + .../tracking.js/src/detection/ViolaJones.js | 280 ++ .../src/detection/training/haar/eye.js | 1 + .../src/detection/training/haar/face.js | 1 + .../src/detection/training/haar/mouth.js | 1 + .../js/tracking.js/src/features/Brief.js | 198 ++ .../js/tracking.js/src/features/Fast.js | 250 ++ public_html/js/tracking.js/src/math/Math.js | 82 + public_html/js/tracking.js/src/math/Matrix.js | 34 + public_html/js/tracking.js/src/pose/EPnP.js | 10 + .../tracking.js/src/trackers/ColorTracker.js | 425 +++ .../tracking.js/src/trackers/ObjectTracker.js | 169 ++ .../js/tracking.js/src/trackers/Tracker.js | 21 + .../tracking.js/src/trackers/TrackerTask.js | 103 + public_html/js/tracking.js/src/tracking.js | 283 ++ .../js/tracking.js/src/utils/Canvas.js | 37 + .../js/tracking.js/src/utils/DisjointSet.js | 60 + .../js/tracking.js/src/utils/EventEmitter.js | 149 + public_html/js/tracking.js/src/utils/Image.js | 323 +++ public_html/js/tracking.js/test/Benchmark.js | 14 + public_html/js/tracking.js/test/Brief.js | 76 + .../js/tracking.js/test/ColorTracker.js | 194 ++ public_html/js/tracking.js/test/Fast.js | 69 + .../js/tracking.js/test/ObjectTracker.js | 77 + .../js/tracking.js/test/assets/box1.png | Bin 0 -> 40586 bytes .../js/tracking.js/test/assets/box2.png | Bin 0 -> 41443 bytes .../js/tracking.js/test/assets/faces.png | Bin 0 -> 396431 bytes .../js/tracking.js/test/assets/psmove.png | Bin 0 -> 185314 bytes public_html/js/tracking.js/test/perf/Brief.js | 37 + .../js/tracking.js/test/perf/ColorTracker.js | 20 + public_html/js/tracking.js/test/perf/Fast.js | 22 + .../js/tracking.js/test/perf/ObjectTracker.js | 33 + .../js/tracking.js/test/utils/benchmark.js | 208 ++ .../js/tracking.js/test/utils/sandbox.js | 18 + public_html/pictures/index.php | 4 +- 66 files changed, 6247 insertions(+), 49 deletions(-) create mode 100644 public_html/js/lib/dat.gui.js create mode 100644 public_html/js/lib/min/dat.gui.js create mode 100644 public_html/js/tracking.js/.bowerrc create mode 100644 public_html/js/tracking.js/.editorconfig create mode 100644 public_html/js/tracking.js/.gitignore create mode 100644 public_html/js/tracking.js/.jshintrc create mode 100644 public_html/js/tracking.js/.travis.yml create mode 100644 public_html/js/tracking.js/LICENSE.md create mode 100644 public_html/js/tracking.js/README.md create mode 100644 public_html/js/tracking.js/bower.json create mode 100644 public_html/js/tracking.js/build/data/eye-min.js create mode 100644 public_html/js/tracking.js/build/data/eye.js create mode 100644 public_html/js/tracking.js/build/data/face-min.js create mode 100644 public_html/js/tracking.js/build/data/face.js create mode 100644 public_html/js/tracking.js/build/data/mouth-min.js create mode 100644 public_html/js/tracking.js/build/data/mouth.js create mode 100644 public_html/js/tracking.js/build/tracking-min.js create mode 100644 public_html/js/tracking.js/build/tracking.js create mode 100644 public_html/js/tracking.js/gulpfile.js create mode 100644 public_html/js/tracking.js/package.json create mode 100644 public_html/js/tracking.js/src/detection/ViolaJones.js create mode 100644 public_html/js/tracking.js/src/detection/training/haar/eye.js create mode 100644 public_html/js/tracking.js/src/detection/training/haar/face.js create mode 100644 public_html/js/tracking.js/src/detection/training/haar/mouth.js create mode 100644 public_html/js/tracking.js/src/features/Brief.js create mode 100644 public_html/js/tracking.js/src/features/Fast.js create mode 100644 public_html/js/tracking.js/src/math/Math.js create mode 100644 public_html/js/tracking.js/src/math/Matrix.js create mode 100644 public_html/js/tracking.js/src/pose/EPnP.js create mode 100644 public_html/js/tracking.js/src/trackers/ColorTracker.js create mode 100644 public_html/js/tracking.js/src/trackers/ObjectTracker.js create mode 100644 public_html/js/tracking.js/src/trackers/Tracker.js create mode 100644 public_html/js/tracking.js/src/trackers/TrackerTask.js create mode 100644 public_html/js/tracking.js/src/tracking.js create mode 100644 public_html/js/tracking.js/src/utils/Canvas.js create mode 100644 public_html/js/tracking.js/src/utils/DisjointSet.js create mode 100644 public_html/js/tracking.js/src/utils/EventEmitter.js create mode 100644 public_html/js/tracking.js/src/utils/Image.js create mode 100644 public_html/js/tracking.js/test/Benchmark.js create mode 100644 public_html/js/tracking.js/test/Brief.js create mode 100644 public_html/js/tracking.js/test/ColorTracker.js create mode 100644 public_html/js/tracking.js/test/Fast.js create mode 100644 public_html/js/tracking.js/test/ObjectTracker.js create mode 100644 public_html/js/tracking.js/test/assets/box1.png create mode 100644 public_html/js/tracking.js/test/assets/box2.png create mode 100644 public_html/js/tracking.js/test/assets/faces.png create mode 100644 public_html/js/tracking.js/test/assets/psmove.png create mode 100644 public_html/js/tracking.js/test/perf/Brief.js create mode 100644 public_html/js/tracking.js/test/perf/ColorTracker.js create mode 100644 public_html/js/tracking.js/test/perf/Fast.js create mode 100644 public_html/js/tracking.js/test/perf/ObjectTracker.js create mode 100644 public_html/js/tracking.js/test/utils/benchmark.js create mode 100644 public_html/js/tracking.js/test/utils/sandbox.js diff --git a/public_html/css/expanded/layout.css b/public_html/css/expanded/layout.css index 802f65b..64272f0 100644 --- a/public_html/css/expanded/layout.css +++ b/public_html/css/expanded/layout.css @@ -1,7 +1,7 @@ body { background-color: #ccc; - font-family: 'Open Sans'; - font-size: 15px; + font-family: 'Courier'; + font-size: 12px; } #image { @@ -26,4 +26,4 @@ body { display: block; } -/*# sourceMappingURL=data:application/json;base64,ewoJInZlcnNpb24iOiAzLAoJImZpbGUiOiAibGF5b3V0LmNzcyIsCgkic291cmNlcyI6IFsKCQkiLi4vbGF5b3V0LnNjc3MiCgldLAoJInNvdXJjZXNDb250ZW50IjogWwoJCSIkaW1hZ2Utc2l6ZTogMzAwcHg7XG5cblxuYm9keXtcblx0YmFja2dyb3VuZC1jb2xvcjogI2NjYztcblxuXHRmb250LWZhbWlseTogJ09wZW4gU2Fucyc7XG5cdGZvbnQtc2l6ZTogMTVweDtcbn1cblxuXG5cbiNpbWFnZXtcblx0ZGlzcGxheTogYmxvY2s7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0XHR3aWR0aDogY2FsYyggI3skaW1hZ2Utc2l6ZX0gLSAyKjJweCApO1xuXHRcdGhlaWdodDogY2FsYyggI3skaW1hZ2Utc2l6ZX0gLSAyKjJweCApO1xuXG5cdG1hcmdpbjogMjBweDtcblxuXHRib3JkZXI6IDJweCBzb2xpZCAjMDAwO1xufVxuXG5cbiNsb2d7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdFx0d2lkdGg6IGNhbGMoICN7JGltYWdlLXNpemV9IC0gMioycHggLSAyKjEwcHggKTtcblxuXHRtYXJnaW46IDEwcHggMjBweDtcblx0cGFkZGluZzogMTBweDtcblxuXHRib3JkZXI6IDJweCBzb2xpZCAjNTU1O1xuXG5cdHNwYW57XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdH1cblxufVxuIgoJXSwKCSJtYXBwaW5ncyI6ICJBQUdBLEFBQUEsSUFBSSxDQUFBO0VBQ0gsZ0JBQWdCLEVBQUUsSUFBSztFQUV2QixXQUFXLEVBQUUsV0FBWTtFQUN6QixTQUFTLEVBQUUsSUFBSztDQUNoQjs7QUFJRCxBQUFBLE1BQU0sQ0FBQTtFQUNMLE9BQU8sRUFBRSxLQUFNO0VBQ2YsUUFBUSxFQUFFLFFBQVM7RUFDbEIsS0FBSyxFQUFFLG9CQUFJO0VBQ1gsTUFBTSxFQUFFLG9CQUFJO0VBRWIsTUFBTSxFQUFFLElBQUs7RUFFYixNQUFNLEVBQUUsY0FBZTtDQUN2Qjs7QUFHRCxBQUFBLElBQUksQ0FBQTtFQUNILE9BQU8sRUFBRSxLQUFNO0VBQ2YsUUFBUSxFQUFFLFFBQVM7RUFDbEIsS0FBSyxFQUFFLDZCQUFJO0VBRVosTUFBTSxFQUFFLFNBQVU7RUFDbEIsT0FBTyxFQUFFLElBQUs7RUFFZCxNQUFNLEVBQUUsY0FBZTtDQU12Qjs7QUFkRCxBQVVDLElBVkcsQ0FVSCxJQUFJLENBQUE7RUFDSCxPQUFPLEVBQUUsS0FBTTtDQUNmIiwKCSJuYW1lcyI6IFtdCn0= */ \ No newline at end of file +/*# sourceMappingURL=data:application/json;base64,ewoJInZlcnNpb24iOiAzLAoJImZpbGUiOiAibGF5b3V0LmNzcyIsCgkic291cmNlcyI6IFsKCQkiLi4vbGF5b3V0LnNjc3MiCgldLAoJInNvdXJjZXNDb250ZW50IjogWwoJCSIkaW1hZ2Utc2l6ZTogMzAwcHg7XG5cblxuYm9keXtcblx0YmFja2dyb3VuZC1jb2xvcjogI2NjYztcblxuXHRmb250LWZhbWlseTogJ0NvdXJpZXInO1xuXHRmb250LXNpemU6IDEycHg7XG59XG5cblxuXG4jaW1hZ2V7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdFx0d2lkdGg6IGNhbGMoICN7JGltYWdlLXNpemV9IC0gMioycHggKTtcblx0XHRoZWlnaHQ6IGNhbGMoICN7JGltYWdlLXNpemV9IC0gMioycHggKTtcblxuXHRtYXJnaW46IDIwcHg7XG5cblx0Ym9yZGVyOiAycHggc29saWQgIzAwMDtcbn1cblxuXG4jbG9ne1xuXHRkaXNwbGF5OiBibG9jaztcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHRcdHdpZHRoOiBjYWxjKCAjeyRpbWFnZS1zaXplfSAtIDIqMnB4IC0gMioxMHB4ICk7XG5cblx0bWFyZ2luOiAxMHB4IDIwcHg7XG5cdHBhZGRpbmc6IDEwcHg7XG5cblx0Ym9yZGVyOiAycHggc29saWQgIzU1NTtcblxuXHRzcGFue1xuXHRcdGRpc3BsYXk6IGJsb2NrO1xuXHR9XG5cbn1cbiIKCV0sCgkibWFwcGluZ3MiOiAiQUFHQSxBQUFBLElBQUksQ0FBQTtFQUNILGdCQUFnQixFQUFFLElBQUs7RUFFdkIsV0FBVyxFQUFFLFNBQVU7RUFDdkIsU0FBUyxFQUFFLElBQUs7Q0FDaEI7O0FBSUQsQUFBQSxNQUFNLENBQUE7RUFDTCxPQUFPLEVBQUUsS0FBTTtFQUNmLFFBQVEsRUFBRSxRQUFTO0VBQ2xCLEtBQUssRUFBRSxvQkFBSTtFQUNYLE1BQU0sRUFBRSxvQkFBSTtFQUViLE1BQU0sRUFBRSxJQUFLO0VBRWIsTUFBTSxFQUFFLGNBQWU7Q0FDdkI7O0FBR0QsQUFBQSxJQUFJLENBQUE7RUFDSCxPQUFPLEVBQUUsS0FBTTtFQUNmLFFBQVEsRUFBRSxRQUFTO0VBQ2xCLEtBQUssRUFBRSw2QkFBSTtFQUVaLE1BQU0sRUFBRSxTQUFVO0VBQ2xCLE9BQU8sRUFBRSxJQUFLO0VBRWQsTUFBTSxFQUFFLGNBQWU7Q0FNdkI7O0FBZEQsQUFVQyxJQVZHLENBVUgsSUFBSSxDQUFBO0VBQ0gsT0FBTyxFQUFFLEtBQU07Q0FDZiIsCgkibmFtZXMiOiBbXQp9 */ \ No newline at end of file diff --git a/public_html/css/expanded/layout.css.map b/public_html/css/expanded/layout.css.map index 404a9ee..e1ca910 100644 --- a/public_html/css/expanded/layout.css.map +++ b/public_html/css/expanded/layout.css.map @@ -5,8 +5,8 @@ "../layout.scss" ], "sourcesContent": [ - "$image-size: 300px;\n\n\nbody{\n\tbackground-color: #ccc;\n\n\tfont-family: 'Open Sans';\n\tfont-size: 15px;\n}\n\n\n\n#image{\n\tdisplay: block;\n\tposition: relative;\n\t\twidth: calc( #{$image-size} - 2*2px );\n\t\theight: calc( #{$image-size} - 2*2px );\n\n\tmargin: 20px;\n\n\tborder: 2px solid #000;\n}\n\n\n#log{\n\tdisplay: block;\n\tposition: relative;\n\t\twidth: calc( #{$image-size} - 2*2px - 2*10px );\n\n\tmargin: 10px 20px;\n\tpadding: 10px;\n\n\tborder: 2px solid #555;\n\n\tspan{\n\t\tdisplay: block;\n\t}\n\n}\n" + "$image-size: 300px;\n\n\nbody{\n\tbackground-color: #ccc;\n\n\tfont-family: 'Courier';\n\tfont-size: 12px;\n}\n\n\n\n#image{\n\tdisplay: block;\n\tposition: relative;\n\t\twidth: calc( #{$image-size} - 2*2px );\n\t\theight: calc( #{$image-size} - 2*2px );\n\n\tmargin: 20px;\n\n\tborder: 2px solid #000;\n}\n\n\n#log{\n\tdisplay: block;\n\tposition: relative;\n\t\twidth: calc( #{$image-size} - 2*2px - 2*10px );\n\n\tmargin: 10px 20px;\n\tpadding: 10px;\n\n\tborder: 2px solid #555;\n\n\tspan{\n\t\tdisplay: block;\n\t}\n\n}\n" ], - "mappings": "AAGA,AAAA,IAAI,CAAA;EACH,gBAAgB,EAAE,IAAK;EAEvB,WAAW,EAAE,WAAY;EACzB,SAAS,EAAE,IAAK;CAChB;;AAID,AAAA,MAAM,CAAA;EACL,OAAO,EAAE,KAAM;EACf,QAAQ,EAAE,QAAS;EAClB,KAAK,EAAE,oBAAI;EACX,MAAM,EAAE,oBAAI;EAEb,MAAM,EAAE,IAAK;EAEb,MAAM,EAAE,cAAe;CACvB;;AAGD,AAAA,IAAI,CAAA;EACH,OAAO,EAAE,KAAM;EACf,QAAQ,EAAE,QAAS;EAClB,KAAK,EAAE,6BAAI;EAEZ,MAAM,EAAE,SAAU;EAClB,OAAO,EAAE,IAAK;EAEd,MAAM,EAAE,cAAe;CAMvB;;AAdD,AAUC,IAVG,CAUH,IAAI,CAAA;EACH,OAAO,EAAE,KAAM;CACf", + "mappings": "AAGA,AAAA,IAAI,CAAA;EACH,gBAAgB,EAAE,IAAK;EAEvB,WAAW,EAAE,SAAU;EACvB,SAAS,EAAE,IAAK;CAChB;;AAID,AAAA,MAAM,CAAA;EACL,OAAO,EAAE,KAAM;EACf,QAAQ,EAAE,QAAS;EAClB,KAAK,EAAE,oBAAI;EACX,MAAM,EAAE,oBAAI;EAEb,MAAM,EAAE,IAAK;EAEb,MAAM,EAAE,cAAe;CACvB;;AAGD,AAAA,IAAI,CAAA;EACH,OAAO,EAAE,KAAM;EACf,QAAQ,EAAE,QAAS;EAClB,KAAK,EAAE,6BAAI;EAEZ,MAAM,EAAE,SAAU;EAClB,OAAO,EAAE,IAAK;EAEd,MAAM,EAAE,cAAe;CAMvB;;AAdD,AAUC,IAVG,CAUH,IAAI,CAAA;EACH,OAAO,EAAE,KAAM;CACf", "names": [] } \ No newline at end of file diff --git a/public_html/css/layout.scss b/public_html/css/layout.scss index 7424b43..21c51c4 100644 --- a/public_html/css/layout.scss +++ b/public_html/css/layout.scss @@ -4,8 +4,8 @@ $image-size: 300px; body{ background-color: #ccc; - font-family: 'Open Sans'; - font-size: 15px; + font-family: 'Courier'; + font-size: 12px; } diff --git a/public_html/css/min/layout.css b/public_html/css/min/layout.css index d0c3bb4..3a644fc 100644 --- a/public_html/css/min/layout.css +++ b/public_html/css/min/layout.css @@ -1,3 +1,3 @@ -body{background-color:#ccc;font-family:'Open Sans';font-size:15px}#image{display:block;position:relative;width:calc( 300px - 2*2px);height:calc( 300px - 2*2px);margin:20px;border:2px solid #000}#log{display:block;position:relative;width:calc( 300px - 2*2px - 2*10px);margin:10px 20px;padding:10px;border:2px solid #555}#log span{display:block} +body{background-color:#ccc;font-family:'Courier';font-size:12px}#image{display:block;position:relative;width:calc( 300px - 2*2px);height:calc( 300px - 2*2px);margin:20px;border:2px solid #000}#log{display:block;position:relative;width:calc( 300px - 2*2px - 2*10px);margin:10px 20px;padding:10px;border:2px solid #555}#log span{display:block} -/*# sourceMappingURL=data:application/json;base64,ewoJInZlcnNpb24iOiAzLAoJImZpbGUiOiAibGF5b3V0LmNzcyIsCgkic291cmNlcyI6IFsKCQkiLi4vbGF5b3V0LnNjc3MiCgldLAoJInNvdXJjZXNDb250ZW50IjogWwoJCSIkaW1hZ2Utc2l6ZTogMzAwcHg7XG5cblxuYm9keXtcblx0YmFja2dyb3VuZC1jb2xvcjogI2NjYztcblxuXHRmb250LWZhbWlseTogJ09wZW4gU2Fucyc7XG5cdGZvbnQtc2l6ZTogMTVweDtcbn1cblxuXG5cbiNpbWFnZXtcblx0ZGlzcGxheTogYmxvY2s7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0XHR3aWR0aDogY2FsYyggI3skaW1hZ2Utc2l6ZX0gLSAyKjJweCApO1xuXHRcdGhlaWdodDogY2FsYyggI3skaW1hZ2Utc2l6ZX0gLSAyKjJweCApO1xuXG5cdG1hcmdpbjogMjBweDtcblxuXHRib3JkZXI6IDJweCBzb2xpZCAjMDAwO1xufVxuXG5cbiNsb2d7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdFx0d2lkdGg6IGNhbGMoICN7JGltYWdlLXNpemV9IC0gMioycHggLSAyKjEwcHggKTtcblxuXHRtYXJnaW46IDEwcHggMjBweDtcblx0cGFkZGluZzogMTBweDtcblxuXHRib3JkZXI6IDJweCBzb2xpZCAjNTU1O1xuXG5cdHNwYW57XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdH1cblxufVxuIgoJXSwKCSJtYXBwaW5ncyI6ICJBQUdBLEFBQUEsSUFBSSxBQUFBLENBQ0gsZ0JBQWdCLENBQUUsSUFBSyxDQUV2QixXQUFXLENBQUUsV0FBWSxDQUN6QixTQUFTLENBQUUsSUFBSyxDQUNoQixBQUlELEFBQUEsTUFBTSxBQUFBLENBQ0wsT0FBTyxDQUFFLEtBQU0sQ0FDZixRQUFRLENBQUUsUUFBUyxDQUNsQixLQUFLLENBQUUsb0JBQUksQ0FDWCxNQUFNLENBQUUsb0JBQUksQ0FFYixNQUFNLENBQUUsSUFBSyxDQUViLE1BQU0sQ0FBRSxjQUFlLENBQ3ZCLEFBR0QsQUFBQSxJQUFJLEFBQUEsQ0FDSCxPQUFPLENBQUUsS0FBTSxDQUNmLFFBQVEsQ0FBRSxRQUFTLENBQ2xCLEtBQUssQ0FBRSw2QkFBSSxDQUVaLE1BQU0sQ0FBRSxTQUFVLENBQ2xCLE9BQU8sQ0FBRSxJQUFLLENBRWQsTUFBTSxDQUFFLGNBQWUsQ0FNdkIsQUFkRCxBQVVDLElBVkcsQ0FVSCxJQUFJLEFBQUEsQ0FDSCxPQUFPLENBQUUsS0FBTSxDQUNmIiwKCSJuYW1lcyI6IFtdCn0= */ \ No newline at end of file +/*# sourceMappingURL=data:application/json;base64,ewoJInZlcnNpb24iOiAzLAoJImZpbGUiOiAibGF5b3V0LmNzcyIsCgkic291cmNlcyI6IFsKCQkiLi4vbGF5b3V0LnNjc3MiCgldLAoJInNvdXJjZXNDb250ZW50IjogWwoJCSIkaW1hZ2Utc2l6ZTogMzAwcHg7XG5cblxuYm9keXtcblx0YmFja2dyb3VuZC1jb2xvcjogI2NjYztcblxuXHRmb250LWZhbWlseTogJ0NvdXJpZXInO1xuXHRmb250LXNpemU6IDEycHg7XG59XG5cblxuXG4jaW1hZ2V7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdFx0d2lkdGg6IGNhbGMoICN7JGltYWdlLXNpemV9IC0gMioycHggKTtcblx0XHRoZWlnaHQ6IGNhbGMoICN7JGltYWdlLXNpemV9IC0gMioycHggKTtcblxuXHRtYXJnaW46IDIwcHg7XG5cblx0Ym9yZGVyOiAycHggc29saWQgIzAwMDtcbn1cblxuXG4jbG9ne1xuXHRkaXNwbGF5OiBibG9jaztcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHRcdHdpZHRoOiBjYWxjKCAjeyRpbWFnZS1zaXplfSAtIDIqMnB4IC0gMioxMHB4ICk7XG5cblx0bWFyZ2luOiAxMHB4IDIwcHg7XG5cdHBhZGRpbmc6IDEwcHg7XG5cblx0Ym9yZGVyOiAycHggc29saWQgIzU1NTtcblxuXHRzcGFue1xuXHRcdGRpc3BsYXk6IGJsb2NrO1xuXHR9XG5cbn1cbiIKCV0sCgkibWFwcGluZ3MiOiAiQUFHQSxBQUFBLElBQUksQUFBQSxDQUNILGdCQUFnQixDQUFFLElBQUssQ0FFdkIsV0FBVyxDQUFFLFNBQVUsQ0FDdkIsU0FBUyxDQUFFLElBQUssQ0FDaEIsQUFJRCxBQUFBLE1BQU0sQUFBQSxDQUNMLE9BQU8sQ0FBRSxLQUFNLENBQ2YsUUFBUSxDQUFFLFFBQVMsQ0FDbEIsS0FBSyxDQUFFLG9CQUFJLENBQ1gsTUFBTSxDQUFFLG9CQUFJLENBRWIsTUFBTSxDQUFFLElBQUssQ0FFYixNQUFNLENBQUUsY0FBZSxDQUN2QixBQUdELEFBQUEsSUFBSSxBQUFBLENBQ0gsT0FBTyxDQUFFLEtBQU0sQ0FDZixRQUFRLENBQUUsUUFBUyxDQUNsQixLQUFLLENBQUUsNkJBQUksQ0FFWixNQUFNLENBQUUsU0FBVSxDQUNsQixPQUFPLENBQUUsSUFBSyxDQUVkLE1BQU0sQ0FBRSxjQUFlLENBTXZCLEFBZEQsQUFVQyxJQVZHLENBVUgsSUFBSSxBQUFBLENBQ0gsT0FBTyxDQUFFLEtBQU0sQ0FDZiIsCgkibmFtZXMiOiBbXQp9 */ \ No newline at end of file diff --git a/public_html/css/min/layout.css.map b/public_html/css/min/layout.css.map index 2f62859..e7ea900 100644 --- a/public_html/css/min/layout.css.map +++ b/public_html/css/min/layout.css.map @@ -5,8 +5,8 @@ "../layout.scss" ], "sourcesContent": [ - "$image-size: 300px;\n\n\nbody{\n\tbackground-color: #ccc;\n\n\tfont-family: 'Open Sans';\n\tfont-size: 15px;\n}\n\n\n\n#image{\n\tdisplay: block;\n\tposition: relative;\n\t\twidth: calc( #{$image-size} - 2*2px );\n\t\theight: calc( #{$image-size} - 2*2px );\n\n\tmargin: 20px;\n\n\tborder: 2px solid #000;\n}\n\n\n#log{\n\tdisplay: block;\n\tposition: relative;\n\t\twidth: calc( #{$image-size} - 2*2px - 2*10px );\n\n\tmargin: 10px 20px;\n\tpadding: 10px;\n\n\tborder: 2px solid #555;\n\n\tspan{\n\t\tdisplay: block;\n\t}\n\n}\n" + "$image-size: 300px;\n\n\nbody{\n\tbackground-color: #ccc;\n\n\tfont-family: 'Courier';\n\tfont-size: 12px;\n}\n\n\n\n#image{\n\tdisplay: block;\n\tposition: relative;\n\t\twidth: calc( #{$image-size} - 2*2px );\n\t\theight: calc( #{$image-size} - 2*2px );\n\n\tmargin: 20px;\n\n\tborder: 2px solid #000;\n}\n\n\n#log{\n\tdisplay: block;\n\tposition: relative;\n\t\twidth: calc( #{$image-size} - 2*2px - 2*10px );\n\n\tmargin: 10px 20px;\n\tpadding: 10px;\n\n\tborder: 2px solid #555;\n\n\tspan{\n\t\tdisplay: block;\n\t}\n\n}\n" ], - "mappings": "AAGA,AAAA,IAAI,AAAA,CACH,gBAAgB,CAAE,IAAK,CAEvB,WAAW,CAAE,WAAY,CACzB,SAAS,CAAE,IAAK,CAChB,AAID,AAAA,MAAM,AAAA,CACL,OAAO,CAAE,KAAM,CACf,QAAQ,CAAE,QAAS,CAClB,KAAK,CAAE,oBAAI,CACX,MAAM,CAAE,oBAAI,CAEb,MAAM,CAAE,IAAK,CAEb,MAAM,CAAE,cAAe,CACvB,AAGD,AAAA,IAAI,AAAA,CACH,OAAO,CAAE,KAAM,CACf,QAAQ,CAAE,QAAS,CAClB,KAAK,CAAE,6BAAI,CAEZ,MAAM,CAAE,SAAU,CAClB,OAAO,CAAE,IAAK,CAEd,MAAM,CAAE,cAAe,CAMvB,AAdD,AAUC,IAVG,CAUH,IAAI,AAAA,CACH,OAAO,CAAE,KAAM,CACf", + "mappings": "AAGA,AAAA,IAAI,AAAA,CACH,gBAAgB,CAAE,IAAK,CAEvB,WAAW,CAAE,SAAU,CACvB,SAAS,CAAE,IAAK,CAChB,AAID,AAAA,MAAM,AAAA,CACL,OAAO,CAAE,KAAM,CACf,QAAQ,CAAE,QAAS,CAClB,KAAK,CAAE,oBAAI,CACX,MAAM,CAAE,oBAAI,CAEb,MAAM,CAAE,IAAK,CAEb,MAAM,CAAE,cAAe,CACvB,AAGD,AAAA,IAAI,AAAA,CACH,OAAO,CAAE,KAAM,CACf,QAAQ,CAAE,QAAS,CAClB,KAAK,CAAE,6BAAI,CAEZ,MAAM,CAAE,SAAU,CAClB,OAAO,CAAE,IAAK,CAEd,MAAM,CAAE,cAAe,CAMvB,AAdD,AAUC,IAVG,CAUH,IAAI,AAAA,CACH,OAAO,CAAE,KAAM,CACf", "names": [] } \ No newline at end of file diff --git a/public_html/index.php b/public_html/index.php index 5b104c7..bebf10b 100644 --- a/public_html/index.php +++ b/public_html/index.php @@ -16,8 +16,17 @@ - + + + + + + + + + + diff --git a/public_html/js/action-script.js b/public_html/js/action-script.js index 22f06ec..bc78872 100644 --- a/public_html/js/action-script.js +++ b/public_html/js/action-script.js @@ -1,19 +1,34 @@ var DOM = { - body: $('body') + body: $('body'), + img: $('img') +}; + +var Controller = new dat.GUI(); + + + +/* [1] Initialisation +=========================================================*/ +var init = function(){ + this.src = 'front:male:1.jpg'; + + Controller.add(this, 'src', this._images); + }; - +/* [2] Routine principale +=========================================================*/ var process = function(){ + console.warn('PROCESS'); + + // TODO: Code here log('Image loaded'); + }; /* [x] Chargement image =========================================================*/ -var iL = new ImageLoader( $('img'), function(){ - - this.load('front:male:1.jpg', process.bind(this)); - -}); +var iL = new ImageLoader( DOM.img, init, process ); diff --git a/public_html/js/lib/dat.gui.js b/public_html/js/lib/dat.gui.js new file mode 100644 index 0000000..f82b0c7 --- /dev/null +++ b/public_html/js/lib/dat.gui.js @@ -0,0 +1,2 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.dat=t():e.dat=t()}(this,function(){return function(e){function t(o){if(n[o])return n[o].exports;var i=n[o]={exports:{},id:o,loaded:!1};return e[o].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}var i=n(1),r=o(i);e.exports=r["default"]},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var i=n(2),r=o(i),a=n(6),l=o(a),s=n(3),u=o(s),d=n(7),c=o(d),f=n(8),_=o(f),p=n(10),h=o(p),m=n(11),b=o(m),g=n(12),y=o(g),v=n(13),w=o(v),x=n(14),E=o(x),C=n(15),A=o(C),S=n(16),k=o(S),O=n(9),T=o(O),L=n(17),N=o(L);t["default"]={color:{Color:r["default"],math:l["default"],interpret:u["default"]},controllers:{Controller:c["default"],BooleanController:_["default"],OptionController:h["default"],StringController:b["default"],NumberController:y["default"],NumberControllerBox:w["default"],NumberControllerSlider:E["default"],FunctionController:A["default"],ColorController:k["default"]},dom:{dom:T["default"]},gui:{GUI:N["default"]},GUI:N["default"]}},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n){Object.defineProperty(e,t,{get:function(){return"RGB"===this.__state.space?this.__state[t]:(h.recalculateRGB(this,t,n),this.__state[t])},set:function(e){"RGB"!==this.__state.space&&(h.recalculateRGB(this,t,n),this.__state.space="RGB"),this.__state[t]=e}})}function a(e,t){Object.defineProperty(e,t,{get:function(){return"HSV"===this.__state.space?this.__state[t]:(h.recalculateHSV(this),this.__state[t])},set:function(e){"HSV"!==this.__state.space&&(h.recalculateHSV(this),this.__state.space="HSV"),this.__state[t]=e}})}t.__esModule=!0;var l=n(3),s=o(l),u=n(6),d=o(u),c=n(4),f=o(c),_=n(5),p=o(_),h=function(){function e(){if(i(this,e),this.__state=s["default"].apply(this,arguments),this.__state===!1)throw new Error("Failed to interpret color arguments");this.__state.a=this.__state.a||1}return e.prototype.toString=function(){return(0,f["default"])(this)},e.prototype.toOriginal=function(){return this.__state.conversion.write(this)},e}();h.recalculateRGB=function(e,t,n){if("HEX"===e.__state.space)e.__state[t]=d["default"].component_from_hex(e.__state.hex,n);else{if("HSV"!==e.__state.space)throw new Error("Corrupted color state");p["default"].extend(e.__state,d["default"].hsv_to_rgb(e.__state.h,e.__state.s,e.__state.v))}},h.recalculateHSV=function(e){var t=d["default"].rgb_to_hsv(e.r,e.g,e.b);p["default"].extend(e.__state,{s:t.s,v:t.v}),p["default"].isNaN(t.h)?p["default"].isUndefined(e.__state.h)&&(e.__state.h=0):e.__state.h=t.h},h.COMPONENTS=["r","g","b","h","s","v","hex","a"],r(h.prototype,"r",2),r(h.prototype,"g",1),r(h.prototype,"b",0),a(h.prototype,"h"),a(h.prototype,"s"),a(h.prototype,"v"),Object.defineProperty(h.prototype,"a",{get:function(){return this.__state.a},set:function(e){this.__state.a=e}}),Object.defineProperty(h.prototype,"hex",{get:function(){return"HEX"!==!this.__state.space&&(this.__state.hex=d["default"].rgb_to_hex(this.r,this.g,this.b)),this.__state.hex},set:function(e){this.__state.space="HEX",this.__state.hex=e}}),t["default"]=h},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var i=n(4),r=o(i),a=n(5),l=o(a),s=[{litmus:l["default"].isString,conversions:{THREE_CHAR_HEX:{read:function(e){var t=e.match(/^#([A-F0-9])([A-F0-9])([A-F0-9])$/i);return null!==t&&{space:"HEX",hex:parseInt("0x"+t[1].toString()+t[1].toString()+t[2].toString()+t[2].toString()+t[3].toString()+t[3].toString(),0)}},write:r["default"]},SIX_CHAR_HEX:{read:function(e){var t=e.match(/^#([A-F0-9]{6})$/i);return null!==t&&{space:"HEX",hex:parseInt("0x"+t[1].toString(),0)}},write:r["default"]},CSS_RGB:{read:function(e){var t=e.match(/^rgb\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);return null!==t&&{space:"RGB",r:parseFloat(t[1]),g:parseFloat(t[2]),b:parseFloat(t[3])}},write:r["default"]},CSS_RGBA:{read:function(e){var t=e.match(/^rgba\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);return null!==t&&{space:"RGB",r:parseFloat(t[1]),g:parseFloat(t[2]),b:parseFloat(t[3]),a:parseFloat(t[4])}},write:r["default"]}}},{litmus:l["default"].isNumber,conversions:{HEX:{read:function(e){return{space:"HEX",hex:e,conversionName:"HEX"}},write:function(e){return e.hex}}}},{litmus:l["default"].isArray,conversions:{RGB_ARRAY:{read:function(e){return 3===e.length&&{space:"RGB",r:e[0],g:e[1],b:e[2]}},write:function(e){return[e.r,e.g,e.b]}},RGBA_ARRAY:{read:function(e){return 4===e.length&&{space:"RGB",r:e[0],g:e[1],b:e[2],a:e[3]}},write:function(e){return[e.r,e.g,e.b,e.a]}}}},{litmus:l["default"].isObject,conversions:{RGBA_OBJ:{read:function(e){return!!(l["default"].isNumber(e.r)&&l["default"].isNumber(e.g)&&l["default"].isNumber(e.b)&&l["default"].isNumber(e.a))&&{space:"RGB",r:e.r,g:e.g,b:e.b,a:e.a}},write:function(e){return{r:e.r,g:e.g,b:e.b,a:e.a}}},RGB_OBJ:{read:function(e){return!!(l["default"].isNumber(e.r)&&l["default"].isNumber(e.g)&&l["default"].isNumber(e.b))&&{space:"RGB",r:e.r,g:e.g,b:e.b}},write:function(e){return{r:e.r,g:e.g,b:e.b}}},HSVA_OBJ:{read:function(e){return!!(l["default"].isNumber(e.h)&&l["default"].isNumber(e.s)&&l["default"].isNumber(e.v)&&l["default"].isNumber(e.a))&&{space:"HSV",h:e.h,s:e.s,v:e.v,a:e.a}},write:function(e){return{h:e.h,s:e.s,v:e.v,a:e.a}}},HSV_OBJ:{read:function(e){return!!(l["default"].isNumber(e.h)&&l["default"].isNumber(e.s)&&l["default"].isNumber(e.v))&&{space:"HSV",h:e.h,s:e.s,v:e.v}},write:function(e){return{h:e.h,s:e.s,v:e.v}}}}}],u=void 0,d=void 0,c=function(){d=!1;var e=arguments.length>1?l["default"].toArray(arguments):arguments[0];return l["default"].each(s,function(t){if(t.litmus(e))return l["default"].each(t.conversions,function(t,n){if(u=t.read(e),d===!1&&u!==!1)return d=u,u.conversionName=n,u.conversion=t,l["default"].BREAK}),l["default"].BREAK}),d};t["default"]=c},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0,t["default"]=function(e){if(1===e.a||r["default"].isUndefined(e.a)){for(var t=e.hex.toString(16);t.length<6;)t="0"+t;return"#"+t}return"rgba("+Math.round(e.r)+","+Math.round(e.g)+","+Math.round(e.b)+","+e.a+")"};var i=n(5),r=o(i)},function(e,t){"use strict";t.__esModule=!0;var n=Array.prototype.forEach,o=Array.prototype.slice,i={BREAK:{},extend:function(e){return this.each(o.call(arguments,1),function(t){var n=this.isObject(t)?Object.keys(t):[];n.forEach(function(n){this.isUndefined(t[n])||(e[n]=t[n])}.bind(this))},this),e},defaults:function(e){return this.each(o.call(arguments,1),function(t){var n=this.isObject(t)?Object.keys(t):[];n.forEach(function(n){this.isUndefined(e[n])&&(e[n]=t[n])}.bind(this))},this),e},compose:function(){var e=o.call(arguments);return function(){for(var t=o.call(arguments),n=e.length-1;n>=0;n--)t=[e[n].apply(this,t)];return t[0]}},each:function(e,t,o){if(e)if(n&&e.forEach&&e.forEach===n)e.forEach(t,o);else if(e.length===e.length+0){var i=void 0,r=void 0;for(i=0,r=e.length;i>8*t&255},hex_with_component:function(e,t,o){return o<<(n=8*t)|e&~(255<-1?t.length-t.indexOf(".")-1:0}t.__esModule=!0;var s=n(7),u=o(s),d=n(5),c=o(d),f=function(e){function t(n,o,a){i(this,t);var s=r(this,e.call(this,n,o)),u=a||{};return s.__min=u.min,s.__max=u.max,s.__step=u.step,c["default"].isUndefined(s.__step)?0===s.initialValue?s.__impliedStep=1:s.__impliedStep=Math.pow(10,Math.floor(Math.log(Math.abs(s.initialValue))/Math.LN10))/10:s.__impliedStep=s.__step,s.__precision=l(s.__impliedStep),s}return a(t,e),t.prototype.setValue=function(t){var n=t;return void 0!==this.__min&&nthis.__max&&(n=this.__max),void 0!==this.__step&&n%this.__step!==0&&(n=Math.round(n/this.__step)*this.__step),e.prototype.setValue.call(this,n)},t.prototype.min=function(e){return this.__min=e,this},t.prototype.max=function(e){return this.__max=e,this},t.prototype.step=function(e){return this.__step=e,this.__impliedStep=e,this.__precision=l(e),this},t}(u["default"]);t["default"]=f},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e,t){var n=Math.pow(10,t);return Math.round(e*n)/n}t.__esModule=!0;var s=n(12),u=o(s),d=n(9),c=o(d),f=n(5),_=o(f),p=function(e){function t(n,o,a){function l(){var e=parseFloat(h.__input.value);_["default"].isNaN(e)||h.setValue(e)}function s(){l(),h.__onFinishChange&&h.__onFinishChange.call(h,h.getValue())}function u(e){document.activeElement.blur();var t=m-e.clientY;h.setValue(h.getValue()+t*h.__impliedStep),m=e.clientY}function d(){c["default"].unbind(window,"mousemove",u),c["default"].unbind(window,"mouseup",d)}function f(e){c["default"].bind(window,"mousemove",u),c["default"].bind(window,"mouseup",d),m=e.clientY}i(this,t);var p=r(this,e.call(this,n,o,a));p.__truncationSuspended=!1;var h=p,m=void 0;return p.__input=document.createElement("input"),p.__input.setAttribute("type","text"),c["default"].bind(p.__input,"change",l),c["default"].bind(p.__input,"blur",s),c["default"].bind(p.__input,"mousedown",f),c["default"].bind(p.__input,"keydown",function(e){13===e.keyCode&&(h.__truncationSuspended=!0,this.blur(),h.__truncationSuspended=!1)}),p.updateDisplay(),p.domElement.appendChild(p.__input),p}return a(t,e),t.prototype.updateDisplay=function(){return c["default"].isActive(this.__input)?this:(this.__input.value=this.__truncationSuspended?this.getValue():l(this.getValue(),this.__precision),e.prototype.updateDisplay.call(this))},t}(u["default"]);t["default"]=p},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e,t,n,o,i){return o+(i-o)*((e-t)/(n-t))}t.__esModule=!0;var s=n(12),u=o(s),d=n(9),c=o(d),f=function(e){function t(n,o,a,s,u){function d(e){document.activeElement.blur(),c["default"].bind(window,"mousemove",f),c["default"].bind(window,"mouseup",_),f(e)}function f(e){e.preventDefault();var t=c["default"].getOffset(h.__background),n=c["default"].getWidth(h.__background);return h.setValue(l(e.clientX,t.left,t.left+n,h.__min,h.__max)),!1}function _(){c["default"].unbind(window,"mousemove",f),c["default"].unbind(window,"mouseup",_),h.__onFinishChange&&h.__onFinishChange.call(h,h.getValue())}i(this,t);var p=r(this,e.call(this,n,o,{min:a,max:s,step:u})),h=p;return p.__background=document.createElement("div"),p.__foreground=document.createElement("div"),c["default"].bind(p.__background,"mousedown",d),c["default"].addClass(p.__background,"slider"),c["default"].addClass(p.__foreground,"slider-fg"),p.updateDisplay(),p.__background.appendChild(p.__foreground),p.domElement.appendChild(p.__background),p}return a(t,e),t.prototype.updateDisplay=function(){var t=(this.getValue()-this.__min)/(this.__max-this.__min);return this.__foreground.style.width=100*t+"%",e.prototype.updateDisplay.call(this)},t}(u["default"]);t["default"]=f},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var l=n(7),s=o(l),u=n(9),d=o(u),c=function(e){function t(n,o,a){i(this,t);var l=r(this,e.call(this,n,o)),s=l;return l.__button=document.createElement("div"),l.__button.innerHTML=void 0===a?"Fire":a,d["default"].bind(l.__button,"click",function(e){return e.preventDefault(),s.fire(),!1}),d["default"].addClass(l.__button,"button"),l.domElement.appendChild(l.__button),l}return a(t,e),t.prototype.fire=function(){this.__onChange&&this.__onChange.call(this),this.getValue().call(this.object),this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue())},t}(s["default"]);t["default"]=c},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e,t,n,o){e.style.background="",g["default"].each(v,function(i){e.style.cssText+="background: "+i+"linear-gradient("+t+", "+n+" 0%, "+o+" 100%); "})}function s(e){e.style.background="",e.style.cssText+="background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);",e.style.cssText+="background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);"}t.__esModule=!0;var u=n(7),d=o(u),c=n(9),f=o(c),_=n(2),p=o(_),h=n(3),m=o(h),b=n(5),g=o(b),y=function(e){function t(n,o){function a(e){h(e),f["default"].bind(window,"mousemove",h),f["default"].bind(window,"mouseup",u)}function u(){f["default"].unbind(window,"mousemove",h),f["default"].unbind(window,"mouseup",u),_()}function d(){var e=(0,m["default"])(this.value);e!==!1?(v.__color.__state=e,v.setValue(v.__color.toOriginal())):this.value=v.__color.toString()}function c(){f["default"].unbind(window,"mousemove",b),f["default"].unbind(window,"mouseup",c),_()}function _(){v.__onFinishChange&&v.__onFinishChange.call(v,v.__color.toString())}function h(e){e.preventDefault();var t=f["default"].getWidth(v.__saturation_field),n=f["default"].getOffset(v.__saturation_field),o=(e.clientX-n.left+document.body.scrollLeft)/t,i=1-(e.clientY-n.top+document.body.scrollTop)/t;return i>1?i=1:i<0&&(i=0),o>1?o=1:o<0&&(o=0),v.__color.v=i,v.__color.s=o,v.setValue(v.__color.toOriginal()),!1}function b(e){e.preventDefault();var t=f["default"].getHeight(v.__hue_field),n=f["default"].getOffset(v.__hue_field),o=1-(e.clientY-n.top+document.body.scrollTop)/t;return o>1?o=1:o<0&&(o=0),v.__color.h=360*o,v.setValue(v.__color.toOriginal()),!1}i(this,t);var y=r(this,e.call(this,n,o));y.__color=new p["default"](y.getValue()),y.__temp=new p["default"](0);var v=y;y.domElement=document.createElement("div"),f["default"].makeSelectable(y.domElement,!1),y.__selector=document.createElement("div"),y.__selector.className="selector",y.__saturation_field=document.createElement("div"),y.__saturation_field.className="saturation-field",y.__field_knob=document.createElement("div"),y.__field_knob.className="field-knob",y.__field_knob_border="2px solid ",y.__hue_knob=document.createElement("div"),y.__hue_knob.className="hue-knob",y.__hue_field=document.createElement("div"),y.__hue_field.className="hue-field",y.__input=document.createElement("input"),y.__input.type="text",y.__input_textShadow="0 1px 1px ",f["default"].bind(y.__input,"keydown",function(e){13===e.keyCode&&d.call(this)}),f["default"].bind(y.__input,"blur",d),f["default"].bind(y.__selector,"mousedown",function(){f["default"].addClass(this,"drag").bind(window,"mouseup",function(){f["default"].removeClass(v.__selector,"drag")})});var w=document.createElement("div");return g["default"].extend(y.__selector.style,{width:"122px",height:"102px",padding:"3px",backgroundColor:"#222",boxShadow:"0px 1px 3px rgba(0,0,0,0.3)"}),g["default"].extend(y.__field_knob.style,{position:"absolute",width:"12px",height:"12px",border:y.__field_knob_border+(y.__color.v<.5?"#fff":"#000"),boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",borderRadius:"12px",zIndex:1}),g["default"].extend(y.__hue_knob.style,{position:"absolute",width:"15px",height:"2px",borderRight:"4px solid #fff",zIndex:1}),g["default"].extend(y.__saturation_field.style,{width:"100px",height:"100px",border:"1px solid #555",marginRight:"3px",display:"inline-block",cursor:"pointer"}),g["default"].extend(w.style,{width:"100%",height:"100%",background:"none"}),l(w,"top","rgba(0,0,0,0)","#000"),g["default"].extend(y.__hue_field.style,{width:"15px",height:"100px",border:"1px solid #555",cursor:"ns-resize",position:"absolute",top:"3px",right:"3px"}),s(y.__hue_field),g["default"].extend(y.__input.style,{outline:"none",textAlign:"center",color:"#fff",border:0,fontWeight:"bold",textShadow:y.__input_textShadow+"rgba(0,0,0,0.7)"}),f["default"].bind(y.__saturation_field,"mousedown",a),f["default"].bind(y.__field_knob,"mousedown",a),f["default"].bind(y.__hue_field,"mousedown",function(e){b(e),f["default"].bind(window,"mousemove",b),f["default"].bind(window,"mouseup",c)}),y.__saturation_field.appendChild(w),y.__selector.appendChild(y.__field_knob),y.__selector.appendChild(y.__saturation_field),y.__selector.appendChild(y.__hue_field),y.__hue_field.appendChild(y.__hue_knob),y.domElement.appendChild(y.__input),y.domElement.appendChild(y.__selector),y.updateDisplay(),y}return a(t,e),t.prototype.updateDisplay=function(){var e=(0,m["default"])(this.getValue());if(e!==!1){var t=!1;g["default"].each(p["default"].COMPONENTS,function(n){if(!g["default"].isUndefined(e[n])&&!g["default"].isUndefined(this.__color.__state[n])&&e[n]!==this.__color.__state[n])return t=!0,{}},this),t&&g["default"].extend(this.__color.__state,e)}g["default"].extend(this.__temp.__state,this.__color.__state),this.__temp.a=1;var n=this.__color.v<.5||this.__color.s>.5?255:0,o=255-n;g["default"].extend(this.__field_knob.style,{marginLeft:100*this.__color.s-7+"px",marginTop:100*(1-this.__color.v)-7+"px",backgroundColor:this.__temp.toString(),border:this.__field_knob_border+"rgb("+n+","+n+","+n+")"}),this.__hue_knob.style.marginTop=100*(1-this.__color.h/360)+"px",this.__temp.s=1,this.__temp.v=1,l(this.__saturation_field,"left","#fff",this.__temp.toString()),g["default"].extend(this.__input.style,{backgroundColor:this.__input.value=this.__color.toString(),color:"rgb("+n+","+n+","+n+")",textShadow:this.__input_textShadow+"rgba("+o+","+o+","+o+",.7)"})},t}(d["default"]),v=["-moz-","-o-","-webkit-","-ms-",""];t["default"]=y},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,n){var o=document.createElement("li");return t&&o.appendChild(t),n?e.__ul.insertBefore(o,n):e.__ul.appendChild(o),e.onResize(),o}function r(e,t){var n=e.__preset_select[e.__preset_select.selectedIndex];t?n.innerHTML=n.value+"*":n.innerHTML=n.value}function a(e,t,n){if(n.__li=t,n.__gui=e,G["default"].extend(n,{options:function(t){if(arguments.length>1){var o=n.__li.nextElementSibling;return n.remove(),s(e,n.object,n.property,{before:o,factoryArgs:[G["default"].toArray(arguments)]})}if(G["default"].isArray(t)||G["default"].isObject(t)){var i=n.__li.nextElementSibling;return n.remove(),s(e,n.object,n.property,{before:i,factoryArgs:[t]})}},name:function(e){return n.__li.firstElementChild.firstElementChild.innerHTML=e,n},listen:function(){return n.__gui.listen(n),n},remove:function(){return n.__gui.remove(n),n}}),n instanceof j["default"])!function(){var e=new R["default"](n.object,n.property,{min:n.__min,max:n.__max,step:n.__step});G["default"].each(["updateDisplay","onChange","onFinishChange","step"],function(t){var o=n[t],i=e[t];n[t]=e[t]=function(){var t=Array.prototype.slice.call(arguments); +return i.apply(e,t),o.apply(n,t)}}),z["default"].addClass(t,"has-slider"),n.domElement.insertBefore(e.domElement,n.domElement.firstElementChild)}();else if(n instanceof R["default"]){var o=function(t){return G["default"].isNumber(n.__min)&&G["default"].isNumber(n.__max)?(n.remove(),s(e,n.object,n.property,{before:n.__li.nextElementSibling,factoryArgs:[n.__min,n.__max,n.__step]})):t};n.min=G["default"].compose(o,n.min),n.max=G["default"].compose(o,n.max)}else n instanceof O["default"]?(z["default"].bind(t,"click",function(){z["default"].fakeEvent(n.__checkbox,"click")}),z["default"].bind(n.__checkbox,"click",function(e){e.stopPropagation()})):n instanceof L["default"]?(z["default"].bind(t,"click",function(){z["default"].fakeEvent(n.__button,"click")}),z["default"].bind(t,"mouseover",function(){z["default"].addClass(n.__button,"hover")}),z["default"].bind(t,"mouseout",function(){z["default"].removeClass(n.__button,"hover")})):n instanceof H["default"]&&(z["default"].addClass(t,"color"),n.updateDisplay=G["default"].compose(function(e){return t.style.borderLeftColor=n.__color.toString(),e},n.updateDisplay),n.updateDisplay());n.setValue=G["default"].compose(function(t){return e.getRoot().__preset_select&&n.isModified()&&r(e.getRoot(),!0),t},n.setValue)}function l(e,t){var n=e.getRoot(),o=n.__rememberedObjects.indexOf(t.object);if(o!==-1){var i=n.__rememberedObjectIndecesToControllers[o];if(void 0===i&&(i={},n.__rememberedObjectIndecesToControllers[o]=i),i[t.property]=t,n.load&&n.load.remembered){var r=n.load.remembered,a=void 0;if(r[e.preset])a=r[e.preset];else{if(!r[J])return;a=r[J]}if(a[o]&&void 0!==a[o][t.property]){var l=a[o][t.property];t.initialValue=l,t.setValue(l)}}}}function s(e,t,n,o){if(void 0===t[n])throw new Error('Object "'+t+'" has no property "'+n+'"');var r=void 0;if(o.color)r=new H["default"](t,n);else{var s=[t,n].concat(o.factoryArgs);r=C["default"].apply(e,s)}o.before instanceof S["default"]&&(o.before=o.before.__li),l(e,r),z["default"].addClass(r.domElement,"c");var u=document.createElement("span");z["default"].addClass(u,"property-name"),u.innerHTML=r.property;var d=document.createElement("div");d.appendChild(u),d.appendChild(r.domElement);var c=i(e,d,o.before);return z["default"].addClass(c,oe.CLASS_CONTROLLER_ROW),r instanceof H["default"]?z["default"].addClass(c,"color"):z["default"].addClass(c,g(r.getValue())),a(e,c,r),e.__controllers.push(r),r}function u(e,t){return document.location.href+"."+t}function d(e,t,n){var o=document.createElement("option");o.innerHTML=t,o.value=t,e.__preset_select.appendChild(o),n&&(e.__preset_select.selectedIndex=e.__preset_select.length-1)}function c(e,t){t.style.display=e.useLocalStorage?"block":"none"}function f(e){var t=e.__save_row=document.createElement("li");z["default"].addClass(e.domElement,"has-save"),e.__ul.insertBefore(t,e.__ul.firstChild),z["default"].addClass(t,"save-row");var n=document.createElement("span");n.innerHTML=" ",z["default"].addClass(n,"button gears");var o=document.createElement("span");o.innerHTML="Save",z["default"].addClass(o,"button"),z["default"].addClass(o,"save");var i=document.createElement("span");i.innerHTML="New",z["default"].addClass(i,"button"),z["default"].addClass(i,"save-as");var r=document.createElement("span");r.innerHTML="Revert",z["default"].addClass(r,"button"),z["default"].addClass(r,"revert");var a=e.__preset_select=document.createElement("select");e.load&&e.load.remembered?G["default"].each(e.load.remembered,function(t,n){d(e,n,n===e.preset)}):d(e,J,!1),z["default"].bind(a,"change",function(){for(var t=0;t0&&(e.preset=this.preset,e.remembered||(e.remembered={}),e.remembered[this.preset]=h(this)),e.folders={},G["default"].each(this.__folders,function(t,n){e.folders[n]=t.getSaveObject()}),e},save:function(){this.load.remembered||(this.load.remembered={}),this.load.remembered[this.preset]=h(this),r(this,!1),this.saveToLocalStorageIfPossible()},saveAs:function(e){this.load.remembered||(this.load.remembered={},this.load.remembered[J]=h(this,!0)),this.load.remembered[e]=h(this),this.preset=e,d(this,e,!0),this.saveToLocalStorageIfPossible()},revert:function(e){G["default"].each(this.__controllers,function(t){this.getRoot().load.remembered?l(e||this.getRoot(),t):t.setValue(t.initialValue),t.__onFinishChange&&t.__onFinishChange.call(t,t.getValue())},this),G["default"].each(this.__folders,function(e){e.revert(e)}),e||r(this.getRoot(),!1)},listen:function(e){var t=0===this.__listening.length;this.__listening.push(e),t&&b(this.__listening)},updateDisplay:function(){G["default"].each(this.__controllers,function(e){e.updateDisplay()}),G["default"].each(this.__folders,function(e){e.updateDisplay()})}}),e.exports=oe},function(e,t){"use strict";e.exports={load:function(e,t){var n=t||document,o=n.createElement("link");o.type="text/css",o.rel="stylesheet",o.href=e,n.getElementsByTagName("head")[0].appendChild(o)},inject:function(e,t){var n=t||document,o=document.createElement("style");o.type="text/css",o.innerHTML=e;var i=n.getElementsByTagName("head")[0];try{i.appendChild(o)}catch(r){}}}},function(e,t){e.exports="
Here's the new load parameter for your GUI's constructor:
Automatically save values to localStorage on exit.
The values saved to localStorage will override those passed to dat.GUI's constructor. This makes it easier to work incrementally, but localStorage is fragile, and your friends may not see the same values you do.
"},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var i=n(10),r=o(i),a=n(13),l=o(a),s=n(14),u=o(s),d=n(11),c=o(d),f=n(15),_=o(f),p=n(8),h=o(p),m=n(5),b=o(m),g=function(e,t){var n=e[t];return b["default"].isArray(arguments[2])||b["default"].isObject(arguments[2])?new r["default"](e,t,arguments[2]):b["default"].isNumber(n)?b["default"].isNumber(arguments[2])&&b["default"].isNumber(arguments[3])?b["default"].isNumber(arguments[4])?new u["default"](e,t,arguments[2],arguments[3],arguments[4]):new u["default"](e,t,arguments[2],arguments[3]):b["default"].isNumber(arguments[4])?new l["default"](e,t,{min:arguments[2],max:arguments[3],step:arguments[4]}):new l["default"](e,t,{min:arguments[2],max:arguments[3]}):b["default"].isString(n)?new c["default"](e,t):b["default"].isFunction(n)?new _["default"](e,t,""):b["default"].isBoolean(n)?new h["default"](e,t):null};t["default"]=g},function(e,t){"use strict";function n(e){setTimeout(e,1e3/60)}t.__esModule=!0,t["default"]=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||n},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=n(9),a=o(r),l=n(5),s=o(l),u=function(){function e(){i(this,e),this.backgroundElement=document.createElement("div"),s["default"].extend(this.backgroundElement.style,{backgroundColor:"rgba(0,0,0,0.8)",top:0,left:0,display:"none",zIndex:"1000",opacity:0,WebkitTransition:"opacity 0.2s linear",transition:"opacity 0.2s linear"}),a["default"].makeFullscreen(this.backgroundElement),this.backgroundElement.style.position="fixed",this.domElement=document.createElement("div"),s["default"].extend(this.domElement.style,{position:"fixed",display:"none",zIndex:"1001",opacity:0,WebkitTransition:"-webkit-transform 0.2s ease-out, opacity 0.2s linear",transition:"transform 0.2s ease-out, opacity 0.2s linear"}),document.body.appendChild(this.backgroundElement),document.body.appendChild(this.domElement);var t=this;a["default"].bind(this.backgroundElement,"click",function(){t.hide()})}return e.prototype.show=function(){var e=this;this.backgroundElement.style.display="block",this.domElement.style.display="block",this.domElement.style.opacity=0,this.domElement.style.webkitTransform="scale(1.1)",this.layout(),s["default"].defer(function(){e.backgroundElement.style.opacity=1,e.domElement.style.opacity=1,e.domElement.style.webkitTransform="scale(1)"})},e.prototype.hide=function t(){var e=this,t=function n(){e.domElement.style.display="none",e.backgroundElement.style.display="none",a["default"].unbind(e.domElement,"webkitTransitionEnd",n),a["default"].unbind(e.domElement,"transitionend",n),a["default"].unbind(e.domElement,"oTransitionEnd",n)};a["default"].bind(this.domElement,"webkitTransitionEnd",t),a["default"].bind(this.domElement,"transitionend",t),a["default"].bind(this.domElement,"oTransitionEnd",t),this.backgroundElement.style.opacity=0,this.domElement.style.opacity=0,this.domElement.style.webkitTransform="scale(1.1)"},e.prototype.layout=function(){this.domElement.style.left=window.innerWidth/2-a["default"].getWidth(this.domElement)/2+"px",this.domElement.style.top=window.innerHeight/2-a["default"].getHeight(this.domElement)/2+"px"},e}();t["default"]=u},function(e,t,n){t=e.exports=n(24)(),t.push([e.id,".dg ul{list-style:none;margin:0;padding:0;width:100%;clear:both}.dg.ac{position:fixed;top:0;left:0;right:0;height:0;z-index:0}.dg:not(.ac) .main{overflow:hidden}.dg.main{-webkit-transition:opacity .1s linear;transition:opacity .1s linear}.dg.main.taller-than-window{overflow-y:auto}.dg.main.taller-than-window .close-button{opacity:1;margin-top:-1px;border-top:1px solid #2c2c2c}.dg.main ul.closed .close-button{opacity:1!important}.dg.main .close-button.drag,.dg.main:hover .close-button{opacity:1}.dg.main .close-button{-webkit-transition:opacity .1s linear;transition:opacity .1s linear;border:0;position:absolute;line-height:19px;height:20px;cursor:pointer;text-align:center;background-color:#000}.dg.main .close-button:hover{background-color:#111}.dg.a{float:right;margin-right:15px;overflow-x:hidden}.dg.a.has-save>ul{margin-top:27px}.dg.a.has-save>ul.closed{margin-top:0}.dg.a .save-row{position:fixed;top:0;z-index:1002}.dg li{-webkit-transition:height .1s ease-out;transition:height .1s ease-out}.dg li:not(.folder){cursor:auto;height:27px;line-height:27px;overflow:hidden;padding:0 4px 0 5px}.dg li.folder{padding:0;border-left:4px solid transparent}.dg li.title{cursor:pointer;margin-left:-4px}.dg .closed li:not(.title),.dg .closed ul li,.dg .closed ul li>*{height:0;overflow:hidden;border:0}.dg .cr{clear:both;padding-left:3px;height:27px}.dg .property-name{cursor:default;float:left;clear:left;width:40%;overflow:hidden;text-overflow:ellipsis}.dg .c{float:left;width:60%}.dg .c input[type=text]{border:0;margin-top:4px;padding:3px;width:100%;float:right}.dg .has-slider input[type=text]{width:30%;margin-left:0}.dg .slider{float:left;width:66%;margin-left:-5px;margin-right:0;height:19px;margin-top:4px}.dg .slider-fg{height:100%}.dg .c input[type=checkbox]{margin-top:9px}.dg .c select{margin-top:5px}.dg .cr.boolean,.dg .cr.boolean *,.dg .cr.function,.dg .cr.function *,.dg .cr.function .property-name{cursor:pointer}.dg .selector{display:none;position:absolute;margin-left:-9px;margin-top:23px;z-index:10}.dg .c:hover .selector,.dg .selector.drag{display:block}.dg li.save-row{padding:0}.dg li.save-row .button{display:inline-block;padding:0 6px}.dg.dialogue{background-color:#222;width:460px;padding:15px;font-size:13px;line-height:15px}#dg-new-constructor{padding:10px;color:#222;font-family:Monaco,monospace;font-size:10px;border:0;resize:none;box-shadow:inset 1px 1px 1px #888;word-wrap:break-word;margin:12px 0;display:block;width:440px;overflow-y:scroll;height:100px;position:relative}#dg-local-explain{display:none;font-size:11px;line-height:17px;border-radius:3px;background-color:#333;padding:8px;margin-top:10px}#dg-local-explain code{font-size:10px}#dat-gui-save-locally{display:none}.dg{color:#eee;font:11px Lucida Grande,sans-serif;text-shadow:0 -1px 0 #111}.dg.main::-webkit-scrollbar{width:5px;background:#1a1a1a}.dg.main::-webkit-scrollbar-corner{height:0;display:none}.dg.main::-webkit-scrollbar-thumb{border-radius:5px;background:#676767}.dg li:not(.folder){background:#1a1a1a;border-bottom:1px solid #2c2c2c}.dg li.save-row{line-height:25px;background:#dad5cb;border:0}.dg li.save-row select{margin-left:5px;width:108px}.dg li.save-row .button{margin-left:5px;margin-top:1px;border-radius:2px;font-size:9px;line-height:7px;padding:4px 4px 5px;background:#c5bdad;color:#fff;text-shadow:0 1px 0 #b0a58f;box-shadow:0 -1px 0 #b0a58f;cursor:pointer}.dg li.save-row .button.gears{background:#c5bdad url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAANCAYAAAB/9ZQ7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQJJREFUeNpiYKAU/P//PwGIC/ApCABiBSAW+I8AClAcgKxQ4T9hoMAEUrxx2QSGN6+egDX+/vWT4e7N82AMYoPAx/evwWoYoSYbACX2s7KxCxzcsezDh3evFoDEBYTEEqycggWAzA9AuUSQQgeYPa9fPv6/YWm/Acx5IPb7ty/fw+QZblw67vDs8R0YHyQhgObx+yAJkBqmG5dPPDh1aPOGR/eugW0G4vlIoTIfyFcA+QekhhHJhPdQxbiAIguMBTQZrPD7108M6roWYDFQiIAAv6Aow/1bFwXgis+f2LUAynwoIaNcz8XNx3Dl7MEJUDGQpx9gtQ8YCueB+D26OECAAQDadt7e46D42QAAAABJRU5ErkJggg==) 2px 1px no-repeat;height:7px;width:8px}.dg li.save-row .button:hover{background-color:#bab19e;box-shadow:0 -1px 0 #b0a58f}.dg li.folder{border-bottom:0}.dg li.title{padding-left:16px;background:#000 url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlI+hKgFxoCgAOw==) 6px 10px no-repeat;cursor:pointer;border-bottom:1px solid hsla(0,0%,100%,.2)}.dg .closed li.title{background-image:url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlGIWqMCbWAEAOw==)}.dg .cr.boolean{border-left:3px solid #806787}.dg .cr.color{border-left:3px solid}.dg .cr.function{border-left:3px solid #e61d5f}.dg .cr.number{border-left:3px solid #2fa1d6}.dg .cr.number input[type=text]{color:#2fa1d6}.dg .cr.string{border-left:3px solid #1ed36f}.dg .cr.string input[type=text]{color:#1ed36f}.dg .cr.boolean:hover,.dg .cr.function:hover{background:#111}.dg .c input[type=text]{background:#303030;outline:none}.dg .c input[type=text]:hover{background:#3c3c3c}.dg .c input[type=text]:focus{background:#494949;color:#fff}.dg .c .slider{background:#303030;cursor:ew-resize}.dg .c .slider-fg{background:#2fa1d6;max-width:100%}.dg .c .slider:hover{background:#3c3c3c}.dg .c .slider:hover .slider-fg{background:#44abda}",""])},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t Image cible +* @callback Fonction à appliquer après initialisation +* @src Chemin de la resource +* @process Fonction à appeller après chargement image +* +* */ var ImageLoader = function(imageElement, callback){ /* [0] Initialisation + paramètres =========================================================*/ - this.wrapper = (imageElement instanceof HTMLImageElement) ? imageElement : null; + this._wrapper = (imageElement instanceof HTMLImageElement) ? imageElement : null; + this.src = null; + this._src = null; + this._callback = typeof callback != 'function' ? function(){} : callback; + this._process = typeof process != 'function' ? function(){} : process; + this._loaded = false; - if( !this.wrapper ) + if( !this._wrapper ) throw new Error('Param 1 expected to be an HTMLImageElement (), but '+imageElement.constructor.name+' received'); - /* [1] Chargement de la liste d'images + /* [1] Définition du setter =========================================================*/ - this.loaded = false; + this.__defineSetter__('src', function(v){ + log('src update', '[ImageLoader]'); + this._src = v; + this._load(); + }); + this.__defineGetter__('src', function(){ + return this._src; + }); + + /* [2] Chargement de la liste d'images + =========================================================*/ AJAX.send('./pictures/index.php', (function(response){ - this.images = JSON.parse(response); - this.loaded = true; + this._images = JSON.parse(response); + this._loaded = true; + log('initialized', '[ImageLoader]'); - callback.call(this); + this._callback.call(this); }).bind(this), 'GET'); }; + + /* CHARGEMENT D'IMAGE * -* @path Chemin de l'image -* @callback Callback lancé quand l'image est chargée -* */ -ImageLoader.prototype.load = function(path, callback){ - if( !this.loaded ) +ImageLoader.prototype._load = function(){ + if( !this._loaded ) throw new Error('image tree not loaded yet'); /* [0] Initialisation des paramètres =========================================================*/ - if( typeof path != 'string' ) - throw new Error('Param 1 expected to be a '); + if( typeof this.src != 'string' ) + throw new Error('ImageLoader.src expected to be a '); - path = path.replace(/:/g, '/'); + if( typeof this._callback != 'function' ) + throw new Error('ImageLoader.callback expected to be a '); - if( typeof callback != 'function' ) - throw new Error('Param 2 expected to be a '); - - if( !~this.images.indexOf('/'+path) ){ - console.warn('Resource not found!'); + if( !~this._images.indexOf(this.src) ){ + console.warn('Resource '+this.src+' not found!'); return; } /* [1] On charge l'image + callback =========================================================*/ - this.wrapper.addEventListener('load', callback, false); - this.wrapper.src = './pictures/' + path; + this._wrapper.addEventListener('load', this._process.bind(this), false); + this._wrapper.src = './pictures/' + this.src.replace(/:/g, '/'); return true; }; diff --git a/public_html/js/lib/local.js b/public_html/js/lib/local.js index 17efb3a..8d98dcc 100644 --- a/public_html/js/lib/local.js +++ b/public_html/js/lib/local.js @@ -5,9 +5,13 @@ */ var logs = []; -var log = function(message){ +var log = function(message, title){ + title = title || null; + var index = logs.push( document.createElement('span') ) - 1; - logs[index].innerHTML = message; + logs[index].innerHTML = ''; + logs[index].innerHTML += (title) ? ''+title+' ' : ''; + logs[index].innerHTML += message; $('body > div#log').appendChild( logs[index] ); }; diff --git a/public_html/js/lib/min/dat.gui.js b/public_html/js/lib/min/dat.gui.js new file mode 100644 index 0000000..b1ad86a --- /dev/null +++ b/public_html/js/lib/min/dat.gui.js @@ -0,0 +1,97 @@ +!function(d,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.dat=e():d.dat=e()}(this,function(){return function(d){function e(b){if(c[b])return c[b].exports;var h=c[b]={exports:{},id:b,loaded:!1};return d[b].call(h.exports,h,h.exports,e),h.loaded=!0,h.exports}var c={};return e.m=d,e.c=c,e.p="",e(0)}([function(d,e,c){e=c(1);d.exports=(e&&e.__esModule?e:{"default":e})["default"]},function(d,e, +c){function b(a){return a&&a.__esModule?a:{"default":a}}e.__esModule=!0;d=c(2);d=b(d);var h=c(6),h=b(h),l=c(3),l=b(l),g=c(7),g=b(g),a=c(8),a=b(a),f=c(10),f=b(f),p=c(11),p=b(p),n=c(12),n=b(n),x=c(13),x=b(x),t=c(14),t=b(t),y=c(15),y=b(y),B=c(16),B=b(B),w=c(9),w=b(w);c=c(17);c=b(c);e["default"]={color:{Color:d["default"],math:h["default"],interpret:l["default"]},controllers:{Controller:g["default"],BooleanController:a["default"],OptionController:f["default"],StringController:p["default"],NumberController:n["default"], +NumberControllerBox:x["default"],NumberControllerSlider:t["default"],FunctionController:y["default"],ColorController:B["default"]},dom:{dom:w["default"]},gui:{GUI:c["default"]},GUI:c["default"]}},function(d,e,c){function b(a){return a&&a.__esModule?a:{"default":a}}function h(a,f,b){Object.defineProperty(a,f,{get:function(){return"RGB"===this.__state.space?this.__state[f]:(n.recalculateRGB(this,f,b),this.__state[f])},set:function(a){"RGB"!==this.__state.space&&(n.recalculateRGB(this,f,b),this.__state.space= +"RGB");this.__state[f]=a}})}function l(a,f){Object.defineProperty(a,f,{get:function(){return"HSV"===this.__state.space?this.__state[f]:(n.recalculateHSV(this),this.__state[f])},set:function(a){"HSV"!==this.__state.space&&(n.recalculateHSV(this),this.__state.space="HSV");this.__state[f]=a}})}e.__esModule=!0;d=c(3);var g=b(d);d=c(6);var a=b(d);d=c(4);var f=b(d);c=c(5);var p=b(c),n=function(){function a(){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");if(this.__state= +g["default"].apply(this,arguments),!1===this.__state)throw Error("Failed to interpret color arguments");this.__state.a=this.__state.a||1}return a.prototype.toString=function(){return(0,f["default"])(this)},a.prototype.toOriginal=function(){return this.__state.conversion.write(this)},a}();n.recalculateRGB=function(f,b,c){if("HEX"===f.__state.space)f.__state[b]=a["default"].component_from_hex(f.__state.hex,c);else{if("HSV"!==f.__state.space)throw Error("Corrupted color state");p["default"].extend(f.__state, +a["default"].hsv_to_rgb(f.__state.h,f.__state.s,f.__state.v))}};n.recalculateHSV=function(f){var b=a["default"].rgb_to_hsv(f.r,f.g,f.b);p["default"].extend(f.__state,{s:b.s,v:b.v});p["default"].isNaN(b.h)?p["default"].isUndefined(f.__state.h)&&(f.__state.h=0):f.__state.h=b.h};n.COMPONENTS="r g b h s v hex a".split(" ");h(n.prototype,"r",2);h(n.prototype,"g",1);h(n.prototype,"b",0);l(n.prototype,"h");l(n.prototype,"s");l(n.prototype,"v");Object.defineProperty(n.prototype,"a",{get:function(){return this.__state.a}, +set:function(a){this.__state.a=a}});Object.defineProperty(n.prototype,"hex",{get:function(){return"HEX"!==!this.__state.space&&(this.__state.hex=a["default"].rgb_to_hex(this.r,this.g,this.b)),this.__state.hex},set:function(a){this.__state.space="HEX";this.__state.hex=a}});e["default"]=n},function(d,e,c){e.__esModule=!0;d=(d=c(4))&&d.__esModule?d:{"default":d};var b=(c=c(5))&&c.__esModule?c:{"default":c},h=[{litmus:b["default"].isString,conversions:{THREE_CHAR_HEX:{read:function(a){a=a.match(/^#([A-F0-9])([A-F0-9])([A-F0-9])$/i); +return null!==a&&{space:"HEX",hex:parseInt("0x"+a[1].toString()+a[1].toString()+a[2].toString()+a[2].toString()+a[3].toString()+a[3].toString(),0)}},write:d["default"]},SIX_CHAR_HEX:{read:function(a){a=a.match(/^#([A-F0-9]{6})$/i);return null!==a&&{space:"HEX",hex:parseInt("0x"+a[1].toString(),0)}},write:d["default"]},CSS_RGB:{read:function(a){a=a.match(/^rgb\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);return null!==a&&{space:"RGB",r:parseFloat(a[1]),g:parseFloat(a[2]),b:parseFloat(a[3])}},write:d["default"]}, +CSS_RGBA:{read:function(a){a=a.match(/^rgba\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);return null!==a&&{space:"RGB",r:parseFloat(a[1]),g:parseFloat(a[2]),b:parseFloat(a[3]),a:parseFloat(a[4])}},write:d["default"]}}},{litmus:b["default"].isNumber,conversions:{HEX:{read:function(a){return{space:"HEX",hex:a,conversionName:"HEX"}},write:function(a){return a.hex}}}},{litmus:b["default"].isArray,conversions:{RGB_ARRAY:{read:function(a){return 3===a.length&&{space:"RGB",r:a[0],g:a[1],b:a[2]}},write:function(a){return[a.r, +a.g,a.b]}},RGBA_ARRAY:{read:function(a){return 4===a.length&&{space:"RGB",r:a[0],g:a[1],b:a[2],a:a[3]}},write:function(a){return[a.r,a.g,a.b,a.a]}}}},{litmus:b["default"].isObject,conversions:{RGBA_OBJ:{read:function(a){return!!(b["default"].isNumber(a.r)&&b["default"].isNumber(a.g)&&b["default"].isNumber(a.b)&&b["default"].isNumber(a.a))&&{space:"RGB",r:a.r,g:a.g,b:a.b,a:a.a}},write:function(a){return{r:a.r,g:a.g,b:a.b,a:a.a}}},RGB_OBJ:{read:function(a){return!!(b["default"].isNumber(a.r)&&b["default"].isNumber(a.g)&& +b["default"].isNumber(a.b))&&{space:"RGB",r:a.r,g:a.g,b:a.b}},write:function(a){return{r:a.r,g:a.g,b:a.b}}},HSVA_OBJ:{read:function(a){return!!(b["default"].isNumber(a.h)&&b["default"].isNumber(a.s)&&b["default"].isNumber(a.v)&&b["default"].isNumber(a.a))&&{space:"HSV",h:a.h,s:a.s,v:a.v,a:a.a}},write:function(a){return{h:a.h,s:a.s,v:a.v,a:a.a}}},HSV_OBJ:{read:function(a){return!!(b["default"].isNumber(a.h)&&b["default"].isNumber(a.s)&&b["default"].isNumber(a.v))&&{space:"HSV",h:a.h,s:a.s,v:a.v}}, +write:function(a){return{h:a.h,s:a.s,v:a.v}}}}}],l=void 0,g=void 0;e["default"]=function(){g=!1;var a=1 +c.length;)c="0"+c;return"#"+c}return"rgba("+Math.round(c.r)+","+Math.round(c.g)+","+Math.round(c.b)+","+c.a+")"};var b=(d=c(5))&&d.__esModule?d:{"default":d}},function(d,e){e.__esModule=!0;var c=Array.prototype.forEach,b=Array.prototype.slice,h={BREAK:{},extend:function(c){return this.each(b.call(arguments,1),function(b){(this.isObject(b)?Object.keys(b):[]).forEach(function(a){this.isUndefined(b[a])||(c[a]=b[a])}.bind(this))},this),c},defaults:function(c){return this.each(b.call(arguments,1),function(b){(this.isObject(b)? +Object.keys(b):[]).forEach(function(a){this.isUndefined(c[a])&&(c[a]=b[a])}.bind(this))},this),c},compose:function(){var c=b.call(arguments);return function(){for(var g=b.call(arguments),a=c.length-1;0<=a;a--)g=[c[a].apply(this,g)];return g[0]}},each:function(b,g,a){if(b)if(c&&b.forEach&&b.forEach===c)b.forEach(g,a);else if(b.length===b.length+0)for(var f=void 0,p=void 0,f=0,p=b.length;ff&&(f+=1),{h:360*f,s:p,v:g/255})},rgb_to_hex:function(b,c,d){b=this.hex_with_component(0,2,b);return b=this.hex_with_component(b,1,c),this.hex_with_component(b,0,d)},component_from_hex:function(b,c){return b>>8*c&255},hex_with_component:function(b,d,e){return e<<(c=8*d)|b&~(255<this.__max&&(a=this.__max),void 0!==this.__step&&0!==a%this.__step&&(a=Math.round(a/this.__step)*this.__step),c.prototype.setValue.call(this, +a)},a.prototype.min=function(a){return this.__min=a,this},a.prototype.max=function(a){return this.__max=a,this},a.prototype.step=function(a){return this.__step=a,this.__impliedStep=a,this.__precision=h(a),this},a}(d["default"]);e["default"]=c},function(d,e,c){function b(a){return a&&a.__esModule?a:{"default":a}}function h(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function l(a,b){if("function"!= +typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}e.__esModule=!0;d=c(12);d=b(d);var g=c(9),a=b(g);c=c(5);var f=b(c);c=function(b){function c(d,e,g){function l(){var a=parseFloat(z.__input.value);f["default"].isNaN(a)||z.setValue(a)}function w(a){document.activeElement.blur(); +var b=F-a.clientY;z.setValue(z.getValue()+b*z.__impliedStep);F=a.clientY}function q(){a["default"].unbind(window,"mousemove",w);a["default"].unbind(window,"mouseup",q)}if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");d=h(this,b.call(this,d,e,g));d.__truncationSuspended=!1;var z=d,F=void 0;return d.__input=document.createElement("input"),d.__input.setAttribute("type","text"),a["default"].bind(d.__input,"change",l),a["default"].bind(d.__input,"blur",function(){l();z.__onFinishChange&& +z.__onFinishChange.call(z,z.getValue())}),a["default"].bind(d.__input,"mousedown",function(b){a["default"].bind(window,"mousemove",w);a["default"].bind(window,"mouseup",q);F=b.clientY}),a["default"].bind(d.__input,"keydown",function(a){13===a.keyCode&&(z.__truncationSuspended=!0,this.blur(),z.__truncationSuspended=!1)}),d.updateDisplay(),d.domElement.appendChild(d.__input),d}return l(c,b),c.prototype.updateDisplay=function(){var c;if(a["default"].isActive(this.__input))c=this;else{c=this.__input; +var d;if(this.__truncationSuspended)d=this.getValue();else{d=this.getValue();var f=Math.pow(10,this.__precision);d=Math.round(d*f)/f}c=(c.value=d,b.prototype.updateDisplay.call(this))}return c},c}(d["default"]);e["default"]=c},function(d,e,c){function b(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+ +typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function l(a,b,c,d,e){return d+(a-b)/(c-b)*(e-d)}e.__esModule=!0;d=(d=c(12))&&d.__esModule?d:{"default":d};var g=(c=c(9))&&c.__esModule?c:{"default":c};c=function(a){function c(d,e,h,t,y){function B(a){a.preventDefault();var b=g["default"].getOffset(q.__background),c=g["default"].getWidth(q.__background);return q.setValue(l(a.clientX, +b.left,b.left+c,q.__min,q.__max)),!1}function w(){g["default"].unbind(window,"mousemove",B);g["default"].unbind(window,"mouseup",w);q.__onFinishChange&&q.__onFinishChange.call(q,q.getValue())}if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");var q=d=b(this,a.call(this,d,e,{min:h,max:t,step:y}));return d.__background=document.createElement("div"),d.__foreground=document.createElement("div"),g["default"].bind(d.__background,"mousedown",function(a){document.activeElement.blur(); +g["default"].bind(window,"mousemove",B);g["default"].bind(window,"mouseup",w);B(a)}),g["default"].addClass(d.__background,"slider"),g["default"].addClass(d.__foreground,"slider-fg"),d.updateDisplay(),d.__background.appendChild(d.__foreground),d.domElement.appendChild(d.__background),d}return h(c,a),c.prototype.updateDisplay=function(){var b=(this.getValue()-this.__min)/(this.__max-this.__min);return this.__foreground.style.width=100*b+"%",a.prototype.updateDisplay.call(this)},c}(d["default"]);e["default"]= +c},function(d,e,c){function b(b,a){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!a||"object"!=typeof a&&"function"!=typeof a?b:a}function h(b,a){if("function"!=typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function, not "+typeof a);b.prototype=Object.create(a&&a.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}});a&&(Object.setPrototypeOf?Object.setPrototypeOf(b,a):b.__proto__=a)}e.__esModule= +!0;d=(d=c(7))&&d.__esModule?d:{"default":d};var l=(c=c(9))&&c.__esModule?c:{"default":c};c=function(c){function a(d,e,h){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");var x=b(this,c.call(this,d,e));return x.__button=document.createElement("div"),x.__button.innerHTML=void 0===h?"Fire":h,l["default"].bind(x.__button,"click",function(a){return a.preventDefault(),x.fire(),!1}),l["default"].addClass(x.__button,"button"),x.domElement.appendChild(x.__button),x}return h(a, +c),a.prototype.fire=function(){this.__onChange&&this.__onChange.call(this);this.getValue().call(this.object);this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue())},a}(d["default"]);e["default"]=c},function(d,e,c){function b(a){return a&&a.__esModule?a:{"default":a}}function h(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function l(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+ +typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function g(a,b,c,d){a.style.background="";t["default"].each(y,function(e){a.style.cssText+="background: "+e+"linear-gradient("+b+", "+c+" 0%, "+d+" 100%); "})}function a(a){a.style.background="";a.style.cssText+="background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);"; +a.style.cssText+="background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);";a.style.cssText+="background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);";a.style.cssText+="background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);";a.style.cssText+="background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);"} +e.__esModule=!0;d=c(7);d=b(d);var f=c(9),p=b(f),f=c(2),n=b(f),f=c(3),x=b(f);c=c(5);var t=b(c);c=function(b){function c(d,e){function f(a){G(a);p["default"].bind(window,"mousemove",G);p["default"].bind(window,"mouseup",l)}function l(){p["default"].unbind(window,"mousemove",G);p["default"].unbind(window,"mouseup",l);H()}function y(){var a=(0,x["default"])(this.value);!1!==a?(v.__color.__state=a,v.setValue(v.__color.toOriginal())):this.value=v.__color.toString()}function K(){p["default"].unbind(window, +"mousemove",C);p["default"].unbind(window,"mouseup",K);H()}function H(){v.__onFinishChange&&v.__onFinishChange.call(v,v.__color.toString())}function G(a){a.preventDefault();var b=p["default"].getWidth(v.__saturation_field),c=p["default"].getOffset(v.__saturation_field),d=(a.clientX-c.left+document.body.scrollLeft)/b;a=1-(a.clientY-c.top+document.body.scrollTop)/b;return 1a&&(a=0),1d&&(d=0),v.__color.v=a,v.__color.s=d,v.setValue(v.__color.toOriginal()),!1}function C(a){a.preventDefault(); +var b=p["default"].getHeight(v.__hue_field),c=p["default"].getOffset(v.__hue_field);a=1-(a.clientY-c.top+document.body.scrollTop)/b;return 1a&&(a=0),v.__color.h=360*a,v.setValue(v.__color.toOriginal()),!1}if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");var m=h(this,b.call(this,d,e));m.__color=new n["default"](m.getValue());m.__temp=new n["default"](0);var v=m;m.domElement=document.createElement("div");p["default"].makeSelectable(m.domElement,!1);m.__selector= +document.createElement("div");m.__selector.className="selector";m.__saturation_field=document.createElement("div");m.__saturation_field.className="saturation-field";m.__field_knob=document.createElement("div");m.__field_knob.className="field-knob";m.__field_knob_border="2px solid ";m.__hue_knob=document.createElement("div");m.__hue_knob.className="hue-knob";m.__hue_field=document.createElement("div");m.__hue_field.className="hue-field";m.__input=document.createElement("input");m.__input.type="text"; +m.__input_textShadow="0 1px 1px ";p["default"].bind(m.__input,"keydown",function(a){13===a.keyCode&&y.call(this)});p["default"].bind(m.__input,"blur",y);p["default"].bind(m.__selector,"mousedown",function(){p["default"].addClass(this,"drag").bind(window,"mouseup",function(){p["default"].removeClass(v.__selector,"drag")})});var k=document.createElement("div");return t["default"].extend(m.__selector.style,{width:"122px",height:"102px",padding:"3px",backgroundColor:"#222",boxShadow:"0px 1px 3px rgba(0,0,0,0.3)"}), +t["default"].extend(m.__field_knob.style,{position:"absolute",width:"12px",height:"12px",border:m.__field_knob_border+(.5>m.__color.v?"#fff":"#000"),boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",borderRadius:"12px",zIndex:1}),t["default"].extend(m.__hue_knob.style,{position:"absolute",width:"15px",height:"2px",borderRight:"4px solid #fff",zIndex:1}),t["default"].extend(m.__saturation_field.style,{width:"100px",height:"100px",border:"1px solid #555",marginRight:"3px",display:"inline-block",cursor:"pointer"}), +t["default"].extend(k.style,{width:"100%",height:"100%",background:"none"}),g(k,"top","rgba(0,0,0,0)","#000"),t["default"].extend(m.__hue_field.style,{width:"15px",height:"100px",border:"1px solid #555",cursor:"ns-resize",position:"absolute",top:"3px",right:"3px"}),a(m.__hue_field),t["default"].extend(m.__input.style,{outline:"none",textAlign:"center",color:"#fff",border:0,fontWeight:"bold",textShadow:m.__input_textShadow+"rgba(0,0,0,0.7)"}),p["default"].bind(m.__saturation_field,"mousedown",f),p["default"].bind(m.__field_knob, +"mousedown",f),p["default"].bind(m.__hue_field,"mousedown",function(a){C(a);p["default"].bind(window,"mousemove",C);p["default"].bind(window,"mouseup",K)}),m.__saturation_field.appendChild(k),m.__selector.appendChild(m.__field_knob),m.__selector.appendChild(m.__saturation_field),m.__selector.appendChild(m.__hue_field),m.__hue_field.appendChild(m.__hue_knob),m.domElement.appendChild(m.__input),m.domElement.appendChild(m.__selector),m.updateDisplay(),m}return l(c,b),c.prototype.updateDisplay=function(){var a= +(0,x["default"])(this.getValue());if(!1!==a){var b=!1;t["default"].each(n["default"].COMPONENTS,function(c){if(!t["default"].isUndefined(a[c])&&!t["default"].isUndefined(this.__color.__state[c])&&a[c]!==this.__color.__state[c])return b=!0,{}},this);b&&t["default"].extend(this.__color.__state,a)}t["default"].extend(this.__temp.__state,this.__color.__state);this.__temp.a=1;var c=.5>this.__color.v||.5 Here's the new load parameter for your GUI's constructor:
Automatically save values to localStorage on exit.
The values saved to localStorage will override those passed to dat.GUI's constructor. This makes it easier to work incrementally, but localStorage is fragile, and your friends may not see the same values you do.
"}, +function(d,e,c){function b(a){return a&&a.__esModule?a:{"default":a}}e.__esModule=!0;d=c(10);var h=b(d);d=c(13);var l=b(d);d=c(14);var g=b(d);d=c(11);var a=b(d);d=c(15);var f=b(d);d=c(8);var p=b(d);c=c(5);var n=b(c);e["default"]=function(b,c,d,e,w){var q=b[c];return n["default"].isArray(d)||n["default"].isObject(d)?new h["default"](b,c,d):n["default"].isNumber(q)?n["default"].isNumber(d)&&n["default"].isNumber(e)?n["default"].isNumber(w)?new g["default"](b,c,d,e,w):new g["default"](b,c,d,e):n["default"].isNumber(w)? +new l["default"](b,c,{min:d,max:e,step:w}):new l["default"](b,c,{min:d,max:e}):n["default"].isString(q)?new a["default"](b,c):n["default"].isFunction(q)?new f["default"](b,c,""):n["default"].isBoolean(q)?new p["default"](b,c):null}},function(d,e){function c(b){setTimeout(b,1E3/60)}e.__esModule=!0;e["default"]=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||c},function(d,e,c){e.__esModule= +!0;var b=(d=c(9))&&d.__esModule?d:{"default":d},h=(c=c(5))&&c.__esModule?c:{"default":c};c=function(){function c(){if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");this.backgroundElement=document.createElement("div");h["default"].extend(this.backgroundElement.style,{backgroundColor:"rgba(0,0,0,0.8)",top:0,left:0,display:"none",zIndex:"1000",opacity:0,WebkitTransition:"opacity 0.2s linear",transition:"opacity 0.2s linear"});b["default"].makeFullscreen(this.backgroundElement); +this.backgroundElement.style.position="fixed";this.domElement=document.createElement("div");h["default"].extend(this.domElement.style,{position:"fixed",display:"none",zIndex:"1001",opacity:0,WebkitTransition:"-webkit-transform 0.2s ease-out, opacity 0.2s linear",transition:"transform 0.2s ease-out, opacity 0.2s linear"});document.body.appendChild(this.backgroundElement);document.body.appendChild(this.domElement);var d=this;b["default"].bind(this.backgroundElement,"click",function(){d.hide()})}return c.prototype.show= +function(){var b=this;this.backgroundElement.style.display="block";this.domElement.style.display="block";this.domElement.style.opacity=0;this.domElement.style.webkitTransform="scale(1.1)";this.layout();h["default"].defer(function(){b.backgroundElement.style.opacity=1;b.domElement.style.opacity=1;b.domElement.style.webkitTransform="scale(1)"})},c.prototype.hide=function(){var c=this,a=function p(){c.domElement.style.display="none";c.backgroundElement.style.display="none";b["default"].unbind(c.domElement, +"webkitTransitionEnd",p);b["default"].unbind(c.domElement,"transitionend",p);b["default"].unbind(c.domElement,"oTransitionEnd",p)};b["default"].bind(this.domElement,"webkitTransitionEnd",a);b["default"].bind(this.domElement,"transitionend",a);b["default"].bind(this.domElement,"oTransitionEnd",a);this.backgroundElement.style.opacity=0;this.domElement.style.opacity=0;this.domElement.style.webkitTransform="scale(1.1)"},c.prototype.layout=function(){this.domElement.style.left=window.innerWidth/2-b["default"].getWidth(this.domElement)/ +2+"px";this.domElement.style.top=window.innerHeight/2-b["default"].getHeight(this.domElement)/2+"px"},c}();e["default"]=c},function(d,e,c){e=d.exports=c(24)();e.push([d.id,".dg ul{list-style:none;margin:0;padding:0;width:100%;clear:both}.dg.ac{position:fixed;top:0;left:0;right:0;height:0;z-index:0}.dg:not(.ac) .main{overflow:hidden}.dg.main{-webkit-transition:opacity .1s linear;transition:opacity .1s linear}.dg.main.taller-than-window{overflow-y:auto}.dg.main.taller-than-window .close-button{opacity:1;margin-top:-1px;border-top:1px solid #2c2c2c}.dg.main ul.closed .close-button{opacity:1!important}.dg.main .close-button.drag,.dg.main:hover .close-button{opacity:1}.dg.main .close-button{-webkit-transition:opacity .1s linear;transition:opacity .1s linear;border:0;position:absolute;line-height:19px;height:20px;cursor:pointer;text-align:center;background-color:#000}.dg.main .close-button:hover{background-color:#111}.dg.a{float:right;margin-right:15px;overflow-x:hidden}.dg.a.has-save>ul{margin-top:27px}.dg.a.has-save>ul.closed{margin-top:0}.dg.a .save-row{position:fixed;top:0;z-index:1002}.dg li{-webkit-transition:height .1s ease-out;transition:height .1s ease-out}.dg li:not(.folder){cursor:auto;height:27px;line-height:27px;overflow:hidden;padding:0 4px 0 5px}.dg li.folder{padding:0;border-left:4px solid transparent}.dg li.title{cursor:pointer;margin-left:-4px}.dg .closed li:not(.title),.dg .closed ul li,.dg .closed ul li>*{height:0;overflow:hidden;border:0}.dg .cr{clear:both;padding-left:3px;height:27px}.dg .property-name{cursor:default;float:left;clear:left;width:40%;overflow:hidden;text-overflow:ellipsis}.dg .c{float:left;width:60%}.dg .c input[type=text]{border:0;margin-top:4px;padding:3px;width:100%;float:right}.dg .has-slider input[type=text]{width:30%;margin-left:0}.dg .slider{float:left;width:66%;margin-left:-5px;margin-right:0;height:19px;margin-top:4px}.dg .slider-fg{height:100%}.dg .c input[type=checkbox]{margin-top:9px}.dg .c select{margin-top:5px}.dg .cr.boolean,.dg .cr.boolean *,.dg .cr.function,.dg .cr.function *,.dg .cr.function .property-name{cursor:pointer}.dg .selector{display:none;position:absolute;margin-left:-9px;margin-top:23px;z-index:10}.dg .c:hover .selector,.dg .selector.drag{display:block}.dg li.save-row{padding:0}.dg li.save-row .button{display:inline-block;padding:0 6px}.dg.dialogue{background-color:#222;width:460px;padding:15px;font-size:13px;line-height:15px}#dg-new-constructor{padding:10px;color:#222;font-family:Monaco,monospace;font-size:10px;border:0;resize:none;box-shadow:inset 1px 1px 1px #888;word-wrap:break-word;margin:12px 0;display:block;width:440px;overflow-y:scroll;height:100px;position:relative}#dg-local-explain{display:none;font-size:11px;line-height:17px;border-radius:3px;background-color:#333;padding:8px;margin-top:10px}#dg-local-explain code{font-size:10px}#dat-gui-save-locally{display:none}.dg{color:#eee;font:11px Lucida Grande,sans-serif;text-shadow:0 -1px 0 #111}.dg.main::-webkit-scrollbar{width:5px;background:#1a1a1a}.dg.main::-webkit-scrollbar-corner{height:0;display:none}.dg.main::-webkit-scrollbar-thumb{border-radius:5px;background:#676767}.dg li:not(.folder){background:#1a1a1a;border-bottom:1px solid #2c2c2c}.dg li.save-row{line-height:25px;background:#dad5cb;border:0}.dg li.save-row select{margin-left:5px;width:108px}.dg li.save-row .button{margin-left:5px;margin-top:1px;border-radius:2px;font-size:9px;line-height:7px;padding:4px 4px 5px;background:#c5bdad;color:#fff;text-shadow:0 1px 0 #b0a58f;box-shadow:0 -1px 0 #b0a58f;cursor:pointer}.dg li.save-row .button.gears{background:#c5bdad url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAANCAYAAAB/9ZQ7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQJJREFUeNpiYKAU/P//PwGIC/ApCABiBSAW+I8AClAcgKxQ4T9hoMAEUrxx2QSGN6+egDX+/vWT4e7N82AMYoPAx/evwWoYoSYbACX2s7KxCxzcsezDh3evFoDEBYTEEqycggWAzA9AuUSQQgeYPa9fPv6/YWm/Acx5IPb7ty/fw+QZblw67vDs8R0YHyQhgObx+yAJkBqmG5dPPDh1aPOGR/eugW0G4vlIoTIfyFcA+QekhhHJhPdQxbiAIguMBTQZrPD7108M6roWYDFQiIAAv6Aow/1bFwXgis+f2LUAynwoIaNcz8XNx3Dl7MEJUDGQpx9gtQ8YCueB+D26OECAAQDadt7e46D42QAAAABJRU5ErkJggg==) 2px 1px no-repeat;height:7px;width:8px}.dg li.save-row .button:hover{background-color:#bab19e;box-shadow:0 -1px 0 #b0a58f}.dg li.folder{border-bottom:0}.dg li.title{padding-left:16px;background:#000 url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlI+hKgFxoCgAOw==) 6px 10px no-repeat;cursor:pointer;border-bottom:1px solid hsla(0,0%,100%,.2)}.dg .closed li.title{background-image:url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlGIWqMCbWAEAOw==)}.dg .cr.boolean{border-left:3px solid #806787}.dg .cr.color{border-left:3px solid}.dg .cr.function{border-left:3px solid #e61d5f}.dg .cr.number{border-left:3px solid #2fa1d6}.dg .cr.number input[type=text]{color:#2fa1d6}.dg .cr.string{border-left:3px solid #1ed36f}.dg .cr.string input[type=text]{color:#1ed36f}.dg .cr.boolean:hover,.dg .cr.function:hover{background:#111}.dg .c input[type=text]{background:#303030;outline:none}.dg .c input[type=text]:hover{background:#3c3c3c}.dg .c input[type=text]:focus{background:#494949;color:#fff}.dg .c .slider{background:#303030;cursor:ew-resize}.dg .c .slider-fg{background:#2fa1d6;max-width:100%}.dg .c .slider:hover{background:#3c3c3c}.dg .c .slider:hover .slider-fg{background:#44abda}", +""])},function(d,e){d.exports=function(){var c=[];return c.toString=function(){for(var b=[],c=0;c), but "+a.constructor.name+" received");this.loaded=!1;AJAX.send("./pictures/index.php",function(a){this.images=JSON.parse(a);this.loaded=!0;b.call(this)}.bind(this),"GET")}; -ImageLoader.prototype.load=function(a,b){if(!this.loaded)throw Error("image tree not loaded yet");if("string"!=typeof a)throw Error("Param 1 expected to be a ");a=a.replace(/:/g,"/");if("function"!=typeof b)throw Error("Param 2 expected to be a ");if(~this.images.indexOf("/"+a))return this.wrapper.addEventListener("load",b,!1),this.wrapper.src="./pictures/"+a,!0;console.warn("Resource not found!")}; +var ImageLoader=function(a,b){this._wrapper=a instanceof HTMLImageElement?a:null;this._src=this.src=null;this._callback="function"!=typeof b?function(){}:b;this._process="function"!=typeof process?function(){}:process;this._loaded=!1;if(!this._wrapper)throw Error("Param 1 expected to be an HTMLImageElement (), but "+a.constructor.name+" received");this.__defineSetter__("src",function(a){log("src update","[ImageLoader]");this._src=a;this._load()});this.__defineGetter__("src",function(){return this._src}); +AJAX.send("./pictures/index.php",function(a){this._images=JSON.parse(a);this._loaded=!0;log("initialized","[ImageLoader]");this._callback.call(this)}.bind(this),"GET")}; +ImageLoader.prototype._load=function(){if(!this._loaded)throw Error("image tree not loaded yet");if("string"!=typeof this.src)throw Error("ImageLoader.src expected to be a ");if("function"!=typeof this._callback)throw Error("ImageLoader.callback expected to be a ");if(~this._images.indexOf(this.src))return this._wrapper.addEventListener("load",this._process.bind(this),!1),this._wrapper.src="./pictures/"+this.src.replace(/:/g,"/"),!0;console.warn("Resource "+this.src+" not found!")}; diff --git a/public_html/js/lib/min/local.js b/public_html/js/lib/min/local.js index acbdd1d..38c52f7 100644 --- a/public_html/js/lib/min/local.js +++ b/public_html/js/lib/min/local.js @@ -1 +1 @@ -var logs=[],log=function(b){var a=logs.push(document.createElement("span"))-1;logs[a].innerHTML=b;$("body > div#log").appendChild(logs[a])}; +var logs=[],log=function(c,b){b=b||null;var a=logs.push(document.createElement("span"))-1;logs[a].innerHTML="";logs[a].innerHTML+=b?""+b+" ":"";logs[a].innerHTML+=c;$("body > div#log").appendChild(logs[a])}; diff --git a/public_html/js/min/action-script.js b/public_html/js/min/action-script.js index 895e84e..27bb84b 100644 --- a/public_html/js/min/action-script.js +++ b/public_html/js/min/action-script.js @@ -1 +1 @@ -var DOM={body:$("body")},process=function(){log("Image loaded")},iL=new ImageLoader($("img"),function(){this.load("front:male:1.jpg",process.bind(this))}); +var DOM={body:$("body"),img:$("img")},Controller=new dat.GUI,init=function(){this.src="front:male:1.jpg";Controller.add(this,"src",this._images)},process=function(){console.warn("PROCESS");log("Image loaded")},iL=new ImageLoader(DOM.img,init,process); diff --git a/public_html/js/tracking.js/.bowerrc b/public_html/js/tracking.js/.bowerrc new file mode 100644 index 0000000..603834e --- /dev/null +++ b/public_html/js/tracking.js/.bowerrc @@ -0,0 +1,3 @@ +{ + "directory": "../" +} diff --git a/public_html/js/tracking.js/.editorconfig b/public_html/js/tracking.js/.editorconfig new file mode 100644 index 0000000..27e00a7 --- /dev/null +++ b/public_html/js/tracking.js/.editorconfig @@ -0,0 +1,14 @@ +# editorconfig.org +root = true + +[*] +indent_style = tab +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +indent_style = space +indent_size = 2 + +[*.md] +trim_trailing_whitespace = false diff --git a/public_html/js/tracking.js/.gitignore b/public_html/js/tracking.js/.gitignore new file mode 100644 index 0000000..216d1ee --- /dev/null +++ b/public_html/js/tracking.js/.gitignore @@ -0,0 +1,3 @@ +.DS_Store +node_modules +test/assets/benchmark.json diff --git a/public_html/js/tracking.js/.jshintrc b/public_html/js/tracking.js/.jshintrc new file mode 100644 index 0000000..27fcd40 --- /dev/null +++ b/public_html/js/tracking.js/.jshintrc @@ -0,0 +1,30 @@ +{ + "asi": false, + "bitwise": false, + "curly": true, + "eqeqeq": true, + "esnext": true, + "evil": false, + "forin": false, + "globals": { + "document": true, + "navigator": true, + "tracking": true, + "window": true + }, + "immed": true, + "indent": 2, + "lastsemic": false, + "maxdepth": false, + "multistr": false, + "newcap": true, + "noarg": true, + "node": true, + "onevar": false, + "quotmark": "single", + "regexp": true, + "smarttabs": true, + "trailing": true, + "undef": true, + "unused": true +} diff --git a/public_html/js/tracking.js/.travis.yml b/public_html/js/tracking.js/.travis.yml new file mode 100644 index 0000000..18ae2d8 --- /dev/null +++ b/public_html/js/tracking.js/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.11" + - "0.10" diff --git a/public_html/js/tracking.js/LICENSE.md b/public_html/js/tracking.js/LICENSE.md new file mode 100644 index 0000000..8d14ad3 --- /dev/null +++ b/public_html/js/tracking.js/LICENSE.md @@ -0,0 +1,30 @@ +Software License Agreement (BSD License) + +Copyright (c) 2014, Eduardo A. Lundgren Melo. +All rights reserved. + +Redistribution and use of this software in source and binary forms, with or without modification, are +permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above + copyright notice, this list of conditions and the + following disclaimer. + +* Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the + following disclaimer in the documentation and/or other + materials provided with the distribution. + +* The name of Eduardo A. Lundgren Melo may not be used to endorse or promote products + derived from this software without specific prior + written permission of Eduardo A. Lundgren Melo. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR +TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/public_html/js/tracking.js/README.md b/public_html/js/tracking.js/README.md new file mode 100644 index 0000000..4fa414d --- /dev/null +++ b/public_html/js/tracking.js/README.md @@ -0,0 +1,90 @@ +# tracking.js + +[![Build Status](http://img.shields.io/travis/eduardolundgren/tracking.js.svg?style=flat)](https://travis-ci.org/eduardolundgren/tracking.js) +[![DevDependencies Status](http://img.shields.io/david/dev/eduardolundgren/tracking.js.svg?style=flat)](https://david-dm.org/eduardolundgren/tracking.js#info=devDependencies) + +The tracking.js library brings different computer vision algorithms and techniques into the browser environment. By using modern HTML5 specifications, we enable you to do real-time color tracking, face detection and much more — all that with a lightweight core (~7 KB) and intuitive interface. + +* [Official website](http://trackingjs.com) +* [Documentation](http://trackingjs.com/docs.html) +* [API Docs](http://trackingjs.com/api/) + +## Install + +Install via [Bower](http://bower.io/), [npm](https://www.npmjs.com/), or [download as a zip](https://github.com/eduardolundgren/tracking.js/archive/master.zip): + +``` +bower install tracking +``` + +``` +npm install tracking +``` + +## Examples + +[![Demo 1](https://cloud.githubusercontent.com/assets/398893/3709347/ec72876c-1453-11e4-8450-149d06d487f2.jpg)](http://trackingjs.com/examples/face_tag_friends.html) +[![Demo 2](https://cloud.githubusercontent.com/assets/398893/3709357/1a1c2e16-1454-11e4-804d-e6ada6c65997.jpg)](http://trackingjs.com/examples/face_fish_tank.html) +[![Demo 3](https://cloud.githubusercontent.com/assets/398893/3709361/38f86e8a-1454-11e4-811d-52bd21b37e85.jpg)](http://trackingjs.com/examples/color_hexgl.html) +[![Demo 4](https://cloud.githubusercontent.com/assets/398893/3709464/5447a302-1456-11e4-96b2-d2fae28e2a01.jpg)](http://trackingjs.com/examples/color_draw_something.html) +[![Demo 5](https://cloud.githubusercontent.com/assets/398893/3709469/6a3e859a-1456-11e4-982a-d46a55890e1e.jpg)](http://trackingjs.com/examples/color_fish_tank.html) + +## Features + +* [Trackers](http://trackingjs.com/docs.html#trackers) + * [Color Tracker](http://trackingjs.com/docs.html#color-tracker) + * [Object Tracker](http://trackingjs.com/docs.html#object-tracker) +* [Utilities](http://trackingjs.com/docs.html#utilities) + * [Feature Detection (Fast)](http://trackingjs.com/docs.html#feature-detection) + * [Feature Descriptor (Brief)](http://trackingjs.com/docs.html#feature-descriptor) + * [Convolution](http://trackingjs.com/docs.html#convolution) + * [Gray Scale](http://trackingjs.com/docs.html#gray-scale) + * [Image Blur](http://trackingjs.com/docs.html#image-blur) + * [Integral Image](http://trackingjs.com/docs.html#integral-image) + * [Sobel](http://trackingjs.com/docs.html#sobel) + * [Viola Jones](http://trackingjs.com/docs.html#viola-jones) +* [Web Components](http://trackingjs.com/docs.html#web-components) + * [Color Element](http://trackingjs.com/docs.html#color-element) + * [Object Element](http://trackingjs.com/docs.html#object-element) + +## Browser Support + +You can plug *tracking.js* into some well supported HTML elements such as ``, `