-
Notifications
You must be signed in to change notification settings - Fork 3
/
sample07.pde
69 lines (57 loc) · 1.6 KB
/
sample07.pde
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
void sample07()
{
// gradiant from http://www.gradients.io/
color colora = #8c640e;
background(#f1b637);
NoiseGenerator ngen = new NoiseGenerator(0.01, 1.0);
ngen.setNoiseOctaveParam(4, 0.5);
ngen.setZNoise( 0.0,0.01);
runner.sampleName = "sample07";
runner.addLayer( new ParticlesLayer(2000,50, colora, ngen) {
public void draw(Particle p)
{
float r = 1.0 - ((float)p.lifeTime/(float)p.startLifeTime);
r *= 10.0;
stroke(p.c, 50);
//stroke(#000000, 255);
strokeWeight( r );
line(p.prev.x, p.prev.y, p.pos.x, p.pos.y);
}
});
colora = #8c4d0e;
runner.addLayer( new ParticlesLayer(2000,50, colora, ngen) {
public void draw(Particle p)
{
float r = 1.0 - ((float)p.lifeTime/(float)p.startLifeTime);
r *= 10.0;
stroke(p.c, 50);
//stroke(#000000, 255);
strokeWeight( r );
line(p.prev.x, p.prev.y, p.pos.x, p.pos.y);
}
});
colora = #F0F05E;
runner.addLayer( new ParticlesLayer(2000,50, colora, ngen) {
public void draw(Particle p)
{
float r = 1.0 - ((float)p.lifeTime/(float)p.startLifeTime);
r *= 10.0;
stroke(p.c, 50);
//stroke(#000000, 255);
strokeWeight( r );
line(p.prev.x, p.prev.y, p.pos.x, p.pos.y);
}
});
colora = #8BA80E;
runner.addLayer( new ParticlesLayer(2000,50, colora, ngen) {
public void draw(Particle p)
{
float r = 1.0 - ((float)p.lifeTime/(float)p.startLifeTime);
r *= 10.0;
stroke(p.c, 50);
//stroke(#000000, 255);
strokeWeight( r );
line(p.prev.x, p.prev.y, p.pos.x, p.pos.y);
}
});
}