Add cancer
This commit is contained in:
parent
b547dc3339
commit
3414f38c3a
14 changed files with 246 additions and 149 deletions
11
src/game-loop/game-presentation.ts
Normal file
11
src/game-loop/game-presentation.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { hsl } from '../utils/colors/hsl';
|
||||
import { hash } from '../utils/hash';
|
||||
|
||||
import { vec3 } from 'gl-matrix';
|
||||
|
||||
export class GamePresentation {
|
||||
public getGenerationColor(generation: number): vec3 {
|
||||
const hue = Math.round(hash(generation) * 360);
|
||||
return hsl(hue, 100, 50);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue