1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//! # 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
//! ```bash
//! cargo add motion
//! ```
//! With this you already have record installed in your project, you can start with a simple event loop
//!```rust
//!use std::{thread, time::Duration};
//!
//!use motion::event_loop::EventLoopBuilder;
//!
// 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 = EventLoopBuilder::new().fps(1).build();
//!
//! el.start(|_config| println!("Hello! in the event loop"), sleep);
//!}
//! https://github.com/Juanperias/motion/blob/main/examples/event_loop_example/src/main.rs
//!```
//! More examples in <https://github.com/Juanperias/motion/tree/main/examples>
//!