Clear background

This commit is contained in:
2026-03-14 21:10:01 -03:00
parent 7e90f2ea57
commit 1de6fe5fd1
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -1,7 +1,7 @@
import { AssetManager } from "./assets.ts";
import { ClientWorld } from "./client_world.ts";
import { InputManager } from "./input_manager.ts";
import { begin_drawing, end_drawing, init_font, init_window } from "./renderer/mod.ts";
import { begin_drawing, clear_background, end_drawing, init_font, init_window } from "./renderer/mod.ts";
await import("./blocks/mod.ts");
await import("./items/mod.ts");
@@ -39,6 +39,7 @@ export class ClientLoop {
const delta = (time - this.last_time) / 1000;
begin_drawing();
clear_background(0.69, 0.8, 1, 1.0);
this.world.update(delta);
end_drawing();
+1 -1
View File
@@ -67,7 +67,7 @@ export function init_window(canvas_element: HTMLCanvasElement) {
canvas.width = 1800;
canvas.height = 900;
const ctx = canvas.getContext("webgl2");
const ctx = canvas.getContext("webgl2", { antialias: true, alpha: false });
if (!ctx) {
throw new Error("WebGL2 not supported");
}