proper 3d projection

This commit is contained in:
Chance 2025-03-22 18:19:01 -04:00 committed by BitSyndicate
parent 9ee63d3765
commit 6b3f83ad8b
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 443E4198D6BBA6DE
14 changed files with 3761 additions and 209 deletions

View file

@ -1,4 +1,3 @@
#![feature(panic_payload_as_str)]
use core::{
panic::set_panic_hook,
repl::{handler::COMMAND_MANAGER, setup},
@ -7,43 +6,31 @@ use core::{
use colored::Colorize;
use log::info;
use mlua::Lua;
use parking_lot::Mutex;
use tokio::runtime;
use winit::event_loop::EventLoop;
pub mod core;
fn main() -> anyhow::Result<()> {
#[tokio::main(flavor = "current_thread")]
async fn main() -> anyhow::Result<()> {
if !cfg!(debug_assertions) {
println!("{}", "Debug mode disabled".bright_blue());
set_panic_hook();
}
let runtime = runtime::Builder::new_current_thread()
.enable_all()
.build()?;
setup();
splash::print_splash();
info!("Type 'help' for a list of commands.");
runtime.block_on(async {
setup();
splash::print_splash();
info!("Type 'help' for a list of commands.");
let repl_thread = std::thread::spawn(|| {
let rt = runtime::Builder::new_current_thread().enable_all().build().unwrap();
rt.block_on(core::repl::input::handle_repl())
});
let repl_handle = tokio::spawn(core::repl::input::handle_repl());
let event_loop = EventLoop::new().unwrap();
core::render::init_renderer(event_loop);
// Await the REPL
if let Err(e) = repl_handle.await {
eprintln!("REPL error: {:?}", e);
}
// Wait for the renderer to finish (if needed)
Ok::<(), anyhow::Error>(())
})?;
let event_loop = EventLoop::new().unwrap();
core::render::init_renderer(event_loop);
if let Err(_) = repl_thread.join() {
eprintln!("REPL thread panicked");
}
Ok(())
}