diff --git a/mods/stripe_paint.js b/mods/stripe_paint.js
index f8af6f0c..12b27dfd 100644
--- a/mods/stripe_paint.js
+++ b/mods/stripe_paint.js
@@ -5,12 +5,35 @@ function averageColors(color1,color2,outputType="rgb",weight1=0.5) {
return convertColorFormats(theColor,outputType);
};
-function stripeFunction(pixel,sineParamFunction) {
- if(pixel.oldColor == undefined || pixel.oldColor == null) {
- pixel.oldColor = pixel.color;
+stripeFixedDefaultProperties = {
+ color2: "rgb(0,0,0)",
+ phase: 0,
+ scale: 1,
+ angle: 0
+};
+
+stripeSpreadingProperties = {
+ color1: "It doesn't matter what I put here; I'm just sick of writing for loops.",
+ color2: "stan loona",
+};
+
+/*stripeSpreadingProperties2 = {
+ phase: 0,
+ scale: 1, :eggTF:
+ angle: 0
+};*/
+
+function stripeFunction(pixel) {
+ if(pixel.color1 == undefined || pixel.color1 == null) {
+ pixel.color1 = pixel.color;
+ };
+ for(prop in stripeFixedDefaultProperties) {
+ if(pixel[prop] == undefined || pixel[prop] == null) {
+ pixel[prop] = stripeFixedDefaultProperties[prop];
+ };
};
- //oldColor self staining
+ //color1 and color2 self staining
for (var i = 0; i < adjacentCoords.length; i++) {
var x = pixel.x+adjacentCoords[i][0];
var y = pixel.y+adjacentCoords[i][1];
@@ -18,36 +41,50 @@ function stripeFunction(pixel,sineParamFunction) {
continue;
};
var otherPixel = pixelMap[x][y];
- if(otherPixel.element == pixel.element && pixel.oldColor && otherPixel.oldColor) {
- otherPixel.oldColor = averageColors(pixel.oldColor,otherPixel.oldColor);
+ for(prop in stripeSpreadingProperties) {
+ if(otherPixel.element == pixel.element && pixel[prop] && otherPixel[prop]) {
+ otherPixel[prop] = averageColors(pixel[prop],otherPixel[prop]);
+ };
};
+ /*for(prop in stripeSpreadingProperties2) {
+ if(otherPixel.element == pixel.element && pixel[prop] !== undefined && otherPixel[prop] !== undefined) {
+ otherPixel[prop] = pixel[prop]/2 + otherPixel[prop]/2;
+ }; :eggTF:
+ };*/
};
- var sineWeight = (1+Math.sin(sineParamFunction(pixel)))/2;
- var preColor = averageColors(pixel.oldColor,"rgb(0,0,0)","json",sineWeight);
+ var radians = pixel.angle * (Math.PI / 180);
+
+ var colorNumber = (pixel.x*Math.cos(radians))+(pixel.y*Math.sin(radians));
+
+ var sineWeight = (1+Math.sin(pixel.phase + colorNumber / pixel.scale))/2;
+
+ var preColor = averageColors(pixel.color1,pixel.color2,"json",sineWeight);
for(colorlet in preColor) {
preColor[colorlet] = Math.round(preColor[colorlet]);
};
pixel.color = convertColorFormats(preColor,"rgb");
};
-function horizontalSpf(pixel) {
- return pixel.y;
-};
+stripePaintDesc = `Exactly what it says on the button.
+
+Properties: