Skip to content

Commit

Permalink
have simulation frame timing be based on actual performance
Browse files Browse the repository at this point in the history
  • Loading branch information
toddmedema committed Apr 23, 2024
1 parent 22d58d2 commit cdcafd8
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 cdcafd8

Please sign in to comment.