Expand description
§Motion, Bare Metal physics engine
Motion is a bare metal physics engine which is created to be easy to use.
§Get started!
you can first add the package with
cargo add motionWith this you already have record installed in your project, you can start with a simple event loop
use std::{thread, time::Duration};
use motion::event_loop::{EventLoop, EventLoopConfig};
// The definition of this function depends on the context in which motion is used
fn sleep(duration: Duration) {
thread::sleep(duration);
}
fn main() {
let el = EventLoop::new(EventLoopConfig { fps: 1 });
el.start(|_config| println!("Hello! in the event loop"), sleep);
}
https://github.com/Juanperias/motion/blob/main/examples/event_loop_example/src/main.rsMore examples in https://github.com/Juanperias/motion/tree/main/examples