Skip to content

Commit

Permalink
Multiple little tweaks. Resized canvas to keep pixels squared off
Browse files Browse the repository at this point in the history
  • Loading branch information
dcheesman committed Feb 9, 2014
1 parent 22938a7 commit 0f2038d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CircleBurst.pde
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class CircleBurst extends Effect{
color baseColor;

float r = 1;
float weight = 1;
float weight = 2;
float x;
float y;

Expand Down
13 changes: 7 additions & 6 deletions LEDStripController.pde
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import processing.serial.*;
Serial port;

// set the size and configuration of your LEDs (never less that 1 on either)
int cols = 10;
int rows = 5;
int cols = 20;
int rows = 8;
int LEDCount = cols*rows;

// ArrayList to hold the current effects
Expand Down Expand Up @@ -46,6 +46,7 @@ void setup() {
}

void draw() {
background(60);
// update any changes to effects
updateEffects();

Expand All @@ -57,11 +58,11 @@ void draw() {
}
canvas.endDraw();

// clear the previous frame
background(0);

// stretch the canvas image accross the screen
image(canvas, 0,0,width,height);
pushStyle();
imageMode(CENTER);
image(canvas, width/2,height/2,cols*15,rows*15);
popStyle();

colorPicker.display();
fill(selectedColor);
Expand Down
2 changes: 1 addition & 1 deletion Twinkle.pde
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Twinkle extends Effect{
super.update();
for(int i=0; i<noiseID.length; i++){
// get the grayscale amount for the noise
float noiseAmount = noise(noiseID[i], frameCount* noiseSpeed[i]) * 100;
float noiseAmount = noise(noiseID[i], frameCount* noiseSpeed[i]) * 255;
imageBuffer.pixels[i] = color(red(baseColor), green(baseColor), blue(baseColor), noiseAmount);
}

Expand Down

0 comments on commit 0f2038d

Please sign in to comment.