Skip to content

Commit

Permalink
changed to images with sources
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Wallace committed Jun 14, 2011
1 parent de13631 commit 0efd0f6
Show file tree
Hide file tree
Showing 18 changed files with 36 additions and 13 deletions.
6 changes: 4 additions & 2 deletions README.md
@@ -1,5 +1,3 @@
![](https://github.com/evanw/webgl-filter/raw/master/filters.png)

# WebGL Filter # WebGL Filter


### [View Live Demo](http://evanw.github.com/webgl-filter/) ### [View Live Demo](http://evanw.github.com/webgl-filter/)
Expand All @@ -9,3 +7,7 @@ This is an image editor written using WebGL that allows you to transform your im
# Running # Running


While you can just open `www/index.html`, you won't be able to save because of the security protection on `file://` URLs. Instead, run `cd www && python -m SimpleHTTPServer` and visit `http://localhost:8000`. While you can just open `www/index.html`, you won't be able to save because of the security protection on `file://` URLs. Instead, run `cd www && python -m SimpleHTTPServer` and visit `http://localhost:8000`.

# Screenshot

![](https://github.com/evanw/webgl-filter/raw/master/screenshot.png)
Binary file removed filters.png
Binary file not shown.
Binary file added screenshot.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed www/samples/Bryce.jpg
Binary file not shown.
Binary file removed www/samples/Copenhagen.jpg
Binary file not shown.
Binary file removed www/samples/Flowers.jpg
Binary file not shown.
Binary file removed www/samples/Wolf.jpg
Binary file not shown.
Binary file added www/samples/cat.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added www/samples/face.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added www/samples/greyhound.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added www/samples/leaf.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file removed www/samples/orange.jpg
Binary file not shown.
Binary file added www/samples/perspective.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added www/samples/smoke.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added www/samples/sunset.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 20 additions & 9 deletions www/script.js
Expand Up @@ -189,14 +189,25 @@ $(window).load(function() {


// Hook up toolbar buttons // Hook up toolbar buttons
$('#load').click(function() { $('#load').click(function() {
$('#dialog').html('<div class="contents">Pick one of the sample images below or upload an image of your own:<br><br>' + $('#dialog').html('<div class="contents">Pick one of the sample images below or upload an image of your own:<div class="images">' +
'<img class="loader" src="samples/orange.jpg" height="100">' + '<img class="loader" src="samples/mountain.jpg" height="100">' +
'<img class="loader" src="samples/image.jpg" height="100">' + '<img class="loader" src="samples/smoke.jpg" height="100">' +
'<img class="loader" src="samples/Wolf.jpg" height="100">' + '<img class="loader" src="samples/face.jpg" height="100">' +
'<img class="loader" src="samples/Flowers.jpg" height="100">' + '<img class="loader" src="samples/cat.jpg" height="100">' +
'<img class="loader" src="samples/Bryce.jpg" height="100">' + '<img class="loader" src="samples/greyhound.jpg" height="100">' +
'<img class="loader" src="samples/Copenhagen.jpg" height="100">' + '<img class="loader" src="samples/sunset.jpg" height="100">' +
'</div>' + '<img class="loader" src="samples/leaf.jpg" height="100">' +
'<img class="loader" src="samples/perspective.jpg" height="100">' +
'</div><div class="credits">Flickr image credits in order: ' +
'<a href="http://www.flickr.com/photos/matthigh/2125630879/">matthigh</a>, ' +
'<a href="http://www.flickr.com/photos/delosj/5816379127/">delosj</a>, ' +
'<a href="http://www.flickr.com/photos/stuckincustoms/219537913/">stuckincustoms</a>, ' +
'<a href="http://www.flickr.com/photos/pasma/580401331/">pasma</a>, ' +
'<a href="http://www.flickr.com/photos/delosj/5546225759/">delosj</a>, ' +
'<a href="http://www.flickr.com/photos/seriousbri/3736154699/">seriousbri</a>, ' +
'<a href="http://www.flickr.com/photos/melisande-origami/157818928/">melisande-origami</a>, and ' +
'<a href="http://www.flickr.com/photos/stuckincustoms/4669163231/">stuckincustoms</a>' +
'</div></div>' +
'<div class="button"><input type="file" class="upload">Upload File...</div>' + '<div class="button"><input type="file" class="upload">Upload File...</div>' +
'<div class="button closedialog">Cancel</div>'); '<div class="button closedialog">Cancel</div>');
showDialog(); showDialog();
Expand Down Expand Up @@ -227,7 +238,7 @@ $(window).load(function() {
}); });


// Start loading the first image // Start loading the first image
loadImage('samples/image.jpg'); loadImage('samples/mountain.jpg');
}); });


//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
Expand Down
14 changes: 12 additions & 2 deletions www/style.css
Expand Up @@ -225,8 +225,8 @@ body {
position: absolute; position: absolute;
left: 50%; left: 50%;
top: 0; top: 0;
width: 500px; width: 650px;
margin-left: -250px; margin-left: -325px;
padding: 20px; padding: 20px;
background: #32302D; background: #32302D;
border: 1px solid black; border: 1px solid black;
Expand All @@ -239,6 +239,16 @@ body {
line-height: 16px; line-height: 16px;
} }


#dialog .contents .images {
padding: 15px 0 8px 0;
}

#dialog .contents .credits, #dialog .contents .credits a {
font-style: italic;
font-size: 10px;
color: #777;
}

#dialog .contents img { #dialog .contents img {
margin: 0 7px 7px 0; margin: 0 7px 7px 0;
border: 1px solid black; border: 1px solid black;
Expand Down

0 comments on commit 0efd0f6

Please sign in to comment.