nothing works

This commit is contained in:
2026-03-11 16:55:14 -03:00
parent 680aedc2bb
commit 244f0eb741
3 changed files with 456 additions and 113 deletions
+42 -2
View File
@@ -10,6 +10,7 @@ import { render_dimension } from "./rendering/dimension.ts";
import { render_player_hotbar } from "./rendering/player.ts";
import { begin_mode_2d, end_mode_2d } from "../renderer/mod.ts";
import { PlayerComponent } from "../player.ts";
import { begin_mode_3d, end_mode_3d, push_cube } from "../renderer/core.ts";
export class RenderSystem extends System {
constructor() {
@@ -17,7 +18,7 @@ export class RenderSystem extends System {
}
update(world: World, _delta: number): void {
const camera_entity = world.get_entities().values().find((e) => e.get(Camera)?.active);
/*const camera_entity = world.get_entities().values().find((e) => e.get(Camera)?.active);
const camera = camera_entity?.get(Camera);
if (!camera) {
@@ -55,6 +56,45 @@ export class RenderSystem extends System {
if (player_component) {
render_player_hotbar(player_component.player_inventory);
}
}
}*/
begin_mode_3d();
push_cube(
-0.5,
-0.5,
-0.5,
1,
1,
1,
1,
0,
0,
1,
);
push_cube(
0.5,
0.5,
0.5,
1,
1,
1,
1,
0,
0,
1,
);
push_cube(
0,
0,
0,
1,
1,
1,
1,
0,
0,
1,
);
end_mode_3d();
}
}