Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed one.color.Interpolator, it's way too specific to have a place…

… here.
  • Loading branch information...
commit 2b7bba7f350f9fdff895dea9110d957919ff9dde 1 parent 75ee7ef
@papandreou papandreou authored
Showing with 0 additions and 23 deletions.
  1. +0 −23 lib/color/Interpolator.js
View
23 lib/color/Interpolator.js
@@ -1,23 +0,0 @@
-/*global one*/
-one.include('lib:color.js');
-
-ONECOLOR.Interpolator = function (startColor, endColor, minValue, maxValue) {
- startColor = ONECOLOR(startColor).rgb();
- endColor = ONECOLOR(endColor).rgb();
- if (maxValue === minValue) {
- return function () {
- return startColor;
- };
- }
- var deltaR = endColor._red - startColor._red,
- deltaG = endColor._green - startColor._green,
- deltaB = endColor._blue - startColor._blue;
- return function (value) {
- var intensity = (value - minValue) / (maxValue - minValue);
- return new ONECOLOR.RGB(
- startColor._red + deltaR * intensity,
- startColor._green + deltaG * intensity,
- startColor._blue + deltaB * intensity
- );
- };
-};
Please sign in to comment.
Something went wrong with that request. Please try again.