Remove transparent mesh and block placing and breaking
This commit is contained in:
@@ -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],
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user