|
| 1 | +import { d } from 'typegpu'; |
| 2 | + |
| 3 | +export const LEVEL_RADII = [0.12, 0.16, 0.2, 0.24, 0.28, 0.32, 0.36, 0.4, 0.44, 0.48]; |
| 4 | +export const LEVEL_COUNT = LEVEL_RADII.length; |
| 5 | +export const MAX_LEVEL_RADIUS = LEVEL_RADII[LEVEL_COUNT - 1]; |
| 6 | + |
| 7 | +export const WALL_DEFS = [ |
| 8 | + { cx: 0, cy: -0.5, hw: 0.5, hh: 0.05 }, |
| 9 | + { cx: 0.5, cy: 0, hw: 0.05, hh: 0.55 }, |
| 10 | + { cx: -0.5, cy: 0, hw: 0.05, hh: 0.55 }, |
| 11 | +]; |
| 12 | + |
| 13 | +export const SCENE_SCALE = 0.75; |
| 14 | +export const WALL_COLOR = d.vec3f(0.55, 0.5, 0.45); |
| 15 | +export const WALL_ROUNDNESS = 0.035; |
| 16 | +export const MIN_RADIUS = 0.001; |
| 17 | +export const GHOST_ALPHA = 0.45; |
| 18 | +export const SMOOTH_MIN_K = 16.0; |
| 19 | +export const SHARP_FACTOR = 2.4; |
| 20 | +export const SPEED_BLEND_MAX = 0.5; |
| 21 | + |
| 22 | +export const MERGE_SCORES = Array.from({ length: LEVEL_COUNT }, (_, n) => ((n + 1) * (n + 2)) / 2); |
| 23 | + |
| 24 | +export const MAX_FRUITS = 256; |
| 25 | +export const OFFSCREEN = 10; |
| 26 | +export const DROP_Y = 0.65; |
| 27 | +export const SPAWN_WEIGHTS = [4, 3, 2, 1]; |
| 28 | +export const SPAWN_WEIGHT_TOTAL = SPAWN_WEIGHTS.reduce((a, b) => a + b, 0); |
| 29 | +export const MERGE_DISTANCE_FACTOR = 0.4; |
| 30 | +export const PLAYFIELD_HALF_WIDTH = 0.5; |
| 31 | +export const SPAWN_COOLDOWN = 0.35; |
| 32 | +export const GAME_ASPECT = 1; |
0 commit comments