terrain-constants.mjs 720 B

12345678910111213141516171819202122232425262728293031
  1. export const terrain_constants = (function() {
  2. const QT_MIN_CELL_SIZE = 100;
  3. // const QT_MIN_CELL_RESOLUTION = 24;
  4. const QT_MIN_CELL_RESOLUTION = 16;
  5. // const QT_MIN_CELL_RESOLUTION = 4;
  6. const PLANET_RADIUS = 8000.0;
  7. const NOISE_HEIGHT = 800.0;
  8. // const NOISE_HEIGHT = 0.0;
  9. const NOISE_SCALE = 1800.0;
  10. return {
  11. QT_MIN_CELL_SIZE: QT_MIN_CELL_SIZE,
  12. QT_MIN_CELL_RESOLUTION: QT_MIN_CELL_RESOLUTION,
  13. PLANET_RADIUS: PLANET_RADIUS,
  14. NOISE_HEIGHT: NOISE_HEIGHT,
  15. NOISE_SCALE: NOISE_SCALE,
  16. NOISE_PARAMS: {
  17. octaves: 10,
  18. persistence: 0.5,
  19. lacunarity: 1.6,
  20. exponentiation: 7.5,
  21. height: NOISE_HEIGHT,
  22. scale: NOISE_SCALE,
  23. seed: 1
  24. },
  25. }
  26. })();