From 13aab0b7c8697feae9a933cd9658677d5e868866 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sun, 19 Jan 2025 21:14:48 +0100 Subject: debug light --- world/src/main.rs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'world/src/main.rs') diff --git a/world/src/main.rs b/world/src/main.rs index 8535490..a2d25ca 100644 --- a/world/src/main.rs +++ b/world/src/main.rs @@ -79,6 +79,9 @@ pub struct Args { scale: Option, #[arg(short, long)] dry_run: bool, + + #[arg(long)] + debug_light: bool, } fn main() -> Result<()> { @@ -185,6 +188,17 @@ fn main() -> Result<()> { .flatten() .map(|n| n.to_owned())); + if args.debug_light { + prefab.light.push(( + vec3a(5., 5., 5.), + store.set(&LightPart { + name: Some("debug light".to_owned()), + emission: Some(vec3a(10., 5., 15.)), + radius: Some(0.3), + })?, + )); + } + prefabs.push(store.set(&prefab)?); } @@ -223,7 +237,7 @@ fn main() -> Result<()> { thread::spawn(move || { let mut x = 0.; loop { - Packet::Position(ob, Vec3A::ZERO, vec3a(x, x * 0.3, x * 0.1)) + Packet::Position(ob, Vec3A::ZERO, vec3a(0., x * 0.1, 0.)) .write(&mut sock2) .unwrap(); sock2.flush().unwrap(); -- cgit v1.2.3-70-g09d2