Fluid containers

This commit is contained in:
2026-10-25 15:02:31 -03:00
parent fc27771a92
commit 26b59a1899
24 changed files with 486 additions and 82 deletions
+5
View File
@@ -30,6 +30,11 @@ export function is_tint_color(value: unknown): value is TintColor {
(typeof value === "string" && /^#[0-9a-fA-F]{6}$/.test(value));
}
// a color like 0x80a755 as red, green and blue from 0 to 1, for drawing
export function color_rgb(color: number): [number, number, number] {
return [(color >> 16) / 255, ((color >> 8) & 0xff) / 255, (color & 0xff) / 255];
}
// the color outside any biome, for items: the default grass, foliage or water color, or the fixed one
export function tint_without_biome(color: TintColor) {
if (color === "grass") return DEFAULT_GRASS_COLOR;