summaryrefslogtreecommitdiff
path: root/world/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'world/src/main.rs')
-rw-r--r--world/src/main.rs27
1 files changed, 23 insertions, 4 deletions
diff --git a/world/src/main.rs b/world/src/main.rs
index 37ea88a..081aa09 100644
--- a/world/src/main.rs
+++ b/world/src/main.rs
@@ -58,9 +58,7 @@ pub struct Args {
/// Send all resources to the server then quit
#[arg(short, long)]
push: bool,
- /// Spin the object
- #[arg(long)]
- spin: bool,
+
/// Remove all other object from the world
#[arg(short, long)]
clear: bool,
@@ -84,8 +82,15 @@ pub struct Args {
#[arg(long)]
use_cache: bool,
+ /// Spins the object
+ #[arg(long)]
+ debug_spin: bool,
+ /// Adds a light
#[arg(long)]
debug_light: bool,
+ /// Wiggles joint index 6
+ #[arg(long)]
+ debug_armature: bool,
}
fn main() -> Result<()> {
@@ -291,7 +296,7 @@ fn main() -> Result<()> {
sock.flush()?;
}
- if args.spin {
+ if args.debug_spin {
let ob = obs[0];
let mut sock2 = sock.try_clone().unwrap();
thread::spawn(move || {
@@ -306,6 +311,20 @@ fn main() -> Result<()> {
}
});
}
+ if args.debug_armature {
+ let ob = obs[0];
+ let mut sock2 = sock.try_clone().unwrap();
+ thread::spawn(move || {
+ let mut x = 0f32;
+ loop {
+ let a = Affine3A::from_rotation_y(x.sin());
+ Packet::Pose(ob, vec![(6, a)]).write(&mut sock2).unwrap();
+ sock2.flush().unwrap();
+ x += 0.1;
+ sleep(Duration::from_millis(50));
+ }
+ });
+ }
if args.push {
if args.use_cache {