Add cancer

This commit is contained in:
Andras Schmelczer 2023-05-21 13:51:09 +01:00
commit 3414f38c3a
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
14 changed files with 246 additions and 149 deletions

View 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);
}
}