more cleanup
This commit is contained in:
parent
9d5ced0539
commit
be7c6763f0
1 changed files with 4 additions and 13 deletions
17
src/main.rs
17
src/main.rs
|
@ -55,28 +55,21 @@ fn model(app: &App) -> Model {
|
|||
|
||||
let mut engine = PhysicsEngine {
|
||||
state: PhysicsState {
|
||||
gravity: vector![0.0, -9.81 * 10.0],
|
||||
gravity: vector![0., -9.81 * 10.],
|
||||
..Default::default()
|
||||
},
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
/* Create the ground. */
|
||||
let collider = ColliderBuilder::cuboid(100.0, 10.0)
|
||||
.translation(vector![0.0, -200.0])
|
||||
let collider = ColliderBuilder::cuboid(100., 10.)
|
||||
.translation(vector![0., -200.])
|
||||
.build();
|
||||
engine.state.colliders.insert(collider);
|
||||
|
||||
// let mut particles = Vec::new();
|
||||
|
||||
// fill_particles(app, &mut particles);
|
||||
fill_particles(app, &mut engine.state.colliders, &mut engine.state.bodies);
|
||||
|
||||
Model {
|
||||
_window,
|
||||
// particles,
|
||||
engine,
|
||||
}
|
||||
Model { _window, engine }
|
||||
}
|
||||
|
||||
// Handle events related to the window and update the model if necessary
|
||||
|
@ -111,8 +104,6 @@ fn event(app: &App, model: &mut Model, event: WindowEvent) {
|
|||
&mut model.engine.state.bodies,
|
||||
);
|
||||
}
|
||||
|
||||
// println!("{:?}", event);
|
||||
}
|
||||
|
||||
// Update the state of your application here. By default, this gets called right before `view`.
|
||||
|
|
Loading…
Reference in a new issue