Remove transparent mesh and block placing and breaking

This commit is contained in:
2026-03-14 15:57:55 -03:00
parent 6cc38e3317
commit 5a368d33a1
8 changed files with 228 additions and 155 deletions
+12 -1
View File
@@ -2,7 +2,7 @@ import { SLOT_SIZE } from "$/common/constants.ts";
import { AssetManager } from "$/client/assets.ts";
import { PlayerInventory } from "../../inventory.ts";
import { draw_item, draw_nine_slice } from "./render_utils.ts";
import { canvas, Texture } from "$/client/renderer/mod.ts";
import { canvas, draw_rect_stroke, Texture } from "$/client/renderer/mod.ts";
const PADDING = 10;
@@ -56,3 +56,14 @@ export function render_player_hotbar(player_inventory: PlayerInventory) {
}
}
}
export function render_player_crosshair() {
const CROSSHAIR_SIZE = 8;
draw_rect_stroke(
(canvas.width - CROSSHAIR_SIZE) / 2,
(canvas.height - CROSSHAIR_SIZE) / 2,
CROSSHAIR_SIZE,
CROSSHAIR_SIZE,
[0, 0, 0, 0.6],
);
}