Skip to content
This repository has been archived by the owner on Jul 11, 2019. It is now read-only.

updated Additive.Blending.pde with setup() function and updated Particle... #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions NOC_4_09_AdditiveBlending/NOC_4_09_AdditiveBlending.pde
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@ ParticleSystem ps;
PImage img;

void setup() {
size(800, 200, P2D);

// Create an alpha masked image to be applied as the particle's texture
img = loadImage("texture.png");

ps = new ParticleSystem(0, new PVector(width/2, 50));
smooth();
}

void draw() {

}

11 changes: 4 additions & 7 deletions NOC_4_09_AdditiveBlending/Particle.pde
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,24 @@ class Particle {

// Another constructor (the one we are using here)
Particle(PVector l) {

}

void run() {

}

// Method to update location
void update() {

vel.add(acc);
loc.add(vel);
lifespan -= 2.0;
}

// Method to display
void render() {

}

// Is the particle still useful?
boolean dead() {
return true; // Not necessarily correct
}
}