Fluid rendering in graphics

This commit is contained in:
2026-10-28 11:49:56 -03:00
parent 8fc08ab41e
commit bcd0690ef5
7 changed files with 59 additions and 20 deletions
+3
View File
@@ -127,6 +127,9 @@ interface Graphics {
direction?: "right" | "up",
): void;
item(id: string, x: number, y: number, count?: number): void; // an item as a slot shows it
// a fluid as a slot shows it, like { id: "bworld:juice", data: { item: "bworld:apple" } }. filled is how much of
// the slot it fills from the bottom up, 0 to 1, like a tank's amount / capacity
fluid(fluid: FluidVariant, x: number, y: number, filled?: number): void;
clip(x: number, y: number, w: number, h: number, draw: () => void): void; // only draws inside the box
button(label: string, x: number, y: number, w: number, h: number): boolean; // true the frame it's clicked