Skip to content

Commit

Permalink
Merge pull request #42 from Monsoonjr99/v0-4
Browse files Browse the repository at this point in the history
Version 0.4.12
  • Loading branch information
Monsoonjr99 committed Aug 6, 2023
2 parents 8e6b1d4 + 6c32566 commit 8c7f9fb
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
About: A p5.js tropical cyclone simulation game

v0.4.12 (2023-08-06):
* Improved the "yellow dots" track prediction by making it an actual cone
> Still fairly rudimentary
v0.4.11 (2023-07-09):
* Scale color schemes changed to use a global setting rather than individually per sub-basin scale for more consistent color experience
> Hotkey: "c"
Expand Down
2 changes: 1 addition & 1 deletion constants.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const TITLE = "Cyclone Simulator";
const VERSION_NUMBER = "0.4.11";
const VERSION_NUMBER = "0.4.12";

const SAVE_FORMAT = 7; // Format #7 in use starting in v0.4
const EARLIEST_COMPATIBLE_FORMAT = 0;
Expand Down
3 changes: 2 additions & 1 deletion sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ function setup(){
stormIcons = createBuffer();
stormIcons.strokeWeight(3);
forecastTracks = createBuffer();
forecastTracks.strokeWeight(3);
forecastTracks.strokeWeight(2);
forecastTracks.stroke(240,240,0);
forecastTracks.noFill();
landBuffer = createImage(fullW,fullH);
landBuffer.loadPixels();
// landBuffer.noStroke();
Expand Down
17 changes: 13 additions & 4 deletions storm.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,19 @@ class Storm{
}
if(selectedStorm===this && this.basin.viewingPresent() && this.current){
forecastTracks.clear();
let p = this.current.trackForecast/* .points */;
for(let n=0;n<p.length;n++){
forecastTracks.point(p[n].x,p[n].y);
}
let p = this.current.trackForecast;
const coneCircle = hour=>{
const n = hour / ADVISORY_TICKS - 1;
forecastTracks.circle(p[n].x, p[n].y, hour * 0.7);
};
coneCircle(12);
coneCircle(24);
coneCircle(36);
coneCircle(48);
coneCircle(60);
coneCircle(72);
coneCircle(96);
coneCircle(120);
}
}
}
Expand Down

0 comments on commit 8c7f9fb

Please sign in to comment.