Skip to content

Commit

Permalink
Merge pull request #111 from toddmedema/timing
Browse files Browse the repository at this point in the history
have simulation frame timing be based on actual performance
  • Loading branch information
toddmedema authored Apr 23, 2024
2 parents 22d58d2 + cdcafd8 commit 74381ca
Show file tree
Hide file tree
Showing 2 changed files with 215 additions and 204 deletions.
9 changes: 5 additions & 4 deletions src/Constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,12 @@ export const LOCATIONS = {
export const OUTSKIRTS_WIND_MULTIPLIER = 2; // https://github.com/toddmedema/electrify/issues/96
export const EQUATOR_RADIANCE = 1000; // at sea level, equator, clear day, noon https://en.wikipedia.org/wiki/Solar_irradiance

// How long between each simulated frame
export const TICK_MS = {
PAUSED: 250,
SLOW: 100,
NORMAL: 40,
FAST: 1,
PAUSED: 250, // pause doesn't actually simulate frames, this is just the timeout timer
SLOW: 200,
NORMAL: 60,
FAST: 15,
};

export const INFLATION = 0.03;
Expand Down
Loading

0 comments on commit 74381ca

Please sign in to comment.