Skip to content

Commit

Permalink
stroke
Browse files Browse the repository at this point in the history
  • Loading branch information
hspencer committed May 19, 2021
1 parent e85663e commit 0e5a3ff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
11 changes: 5 additions & 6 deletions note.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class Note {
this.over = false;
this.touched = false;
this.angle;
this.col = nodeColor();
let options = {
friction: 0,
restitution: 0.77,
Expand Down Expand Up @@ -50,7 +49,7 @@ class Note {
g.line(this.px, this.py, this.x, this.y);
g.blendMode(BLEND);
if (this.over) {
fill(this.col);
fill(180, 30, 0, 45);
noStroke();
ellipse(0, 0, this.r * 2);
stroke(0);
Expand All @@ -74,16 +73,16 @@ class Note {
}else{
stroke(0, 45);
strokeWeight(1.5);
fill(this.col);
fill(0, 125);
ellipse(0, 0, this.r * 2);
}
}
pop();
if (this.creatingSpring) {
// paint growing circle
g.fill(this.col);
g.fill(0, 5);
g.blendMode(MULTIPLY);
g.stroke(0, 5);
g.stroke(0, 1);
g.ellipse(this.x, this.y, this.springDist * 2);
// check all other notes
for (let other of notes) {
Expand All @@ -107,7 +106,7 @@ class Note {
springs.push(spring);
this.creatingSpring = false;
}
this.springDist += 0.01; /* i don't understand this number, it should be 1 */
this.springDist += 1; /* i don't understand this number, it should be 1 */
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ function createObjects() {
let thisResult = data.query.results[key];
let lat = thisResult.printouts['Posición'][0].lat;
let lon = thisResult.printouts['Posición'][0].lon;
let author = thisResult.printouts['Autor'][0].fulltext;
let title = thisResult.fulltext;
let content = thisResult.printouts['Nota'][0];
let author = ""+thisResult.printouts['Autor'][0].fulltext;
let title = ""+thisResult.fulltext;
let content = ""+thisResult.printouts['Nota'][0];

// only create complete notes
// if (!isNaN(lat) &&
Expand Down

0 comments on commit 0e5a3ff

Please sign in to comment.