Incremental
This commit is contained in:
parent
9446513091
commit
a467bca5e3
2 changed files with 17 additions and 7 deletions
|
|
@ -6,6 +6,7 @@
|
|||
<link rel="stylesheet" type="text/css" media="screen" href="css/example.css">
|
||||
<script type="text/javascript" src="http://images.webs.com/static/global/js/jquery/jquery-1.3.2.min.js"></script>
|
||||
<script type="text/javascript" src="js/franz.js"></script>
|
||||
<script type="text/javascript" src="http://www.google-analytics.com/ga.js"></script>
|
||||
<script type="text/javascript">
|
||||
var img_input;
|
||||
|
||||
|
|
@ -135,5 +136,9 @@
|
|||
two of the most awesome people you'll ever hear about.
|
||||
</p>
|
||||
|
||||
<script type="text/javascript">
|
||||
try { var pageTracker = _gat._getTracker("UA-9252411-2"); pageTracker._trackPageview(); } catch(err) {}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
19
js/franz.js
19
js/franz.js
|
|
@ -173,11 +173,12 @@ var franz = {
|
|||
|
||||
return false;
|
||||
},
|
||||
|
||||
resetIndex: function() {
|
||||
/* keep track of original index so we don't have to revert
|
||||
back to RGB just to display output */
|
||||
for (var i=0; i < franz.alpha.length; i++) {
|
||||
franz.origIndex[i] = i;
|
||||
franz.origIndex[i] = i;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
|
@ -187,38 +188,42 @@ var franz = {
|
|||
franz.displayColors(franz.origIndex);
|
||||
return false;
|
||||
},
|
||||
displayHue: function() {
|
||||
|
||||
displayHue: function() {
|
||||
franz.resetIndex();
|
||||
franz.qsort(franz.clone(franz.hue), 0, franz.alpha.length);
|
||||
franz.displayColors(franz.origIndex);
|
||||
return false;
|
||||
},
|
||||
displaySat: function() {
|
||||
|
||||
displaySat: function() {
|
||||
franz.resetIndex();
|
||||
franz.qsort(franz.clone(franz.sat), 0, franz.alpha.length);
|
||||
franz.displayColors(franz.origIndex);
|
||||
return false;
|
||||
},
|
||||
displayVal: function() {
|
||||
|
||||
displayVal: function() {
|
||||
franz.resetIndex();
|
||||
franz.qsort(franz.clone(franz.val), 0, franz.alpha.length);
|
||||
franz.displayColors(franz.origIndex);
|
||||
return false;
|
||||
},
|
||||
displaySatL: function() {
|
||||
|
||||
displaySatL: function() {
|
||||
franz.resetIndex();
|
||||
franz.qsort(franz.clone(franz.satL), 0, franz.alpha.length);
|
||||
franz.displayColors(franz.origIndex);
|
||||
return false;
|
||||
},
|
||||
displayLight: function() {
|
||||
|
||||
displayLight: function() {
|
||||
franz.resetIndex();
|
||||
franz.qsort(franz.clone(franz.light), 0, franz.alpha.length);
|
||||
franz.displayColors(franz.origIndex);
|
||||
return false;
|
||||
},
|
||||
|
||||
|
||||
/* quicksort algorithm that also swaps an index array */
|
||||
sort_Partition: function(array, begin, end, pivot) {
|
||||
var piv=array[pivot];
|
||||
|
|
|
|||
Reference in a new issue