ft: tri support

This commit is contained in:
djaidjai committed 2026-04-30 16:28:16 +02:00
1 parent 388fbcbb8a
commit 27bdce5882
7 files changed
+204 -12

No files matched your search

+3 -1
View File
@@ -18,6 +18,7 @@ use crate::ray::Ray;
use crate::scenes::scene::Scene;
use crate::vec3::Vec3;
use dotenv::dotenv;
use log::warn;
use rand::RngExt;
// TODO: implement scene serialization
@@ -26,7 +27,8 @@ fn main() {
pretty_env_logger::init();
// TODO: use cli arg for scenefile
let json_file = "./scenes/scene.json";
let json_file = "./scenes/withTriangle.json";
// let json_file = "./scenes/scene.json";
let json_str = fs::read_to_string(json_file).expect("Reading specified scene file failed!");
let mut scene: Scene = serde_json::from_str(&json_str).unwrap();
scene.render();
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.