.
This commit is contained in:
@@ -3,6 +3,29 @@ name = "terrain.1"
|
|||||||
type = "StaticMesh"
|
type = "StaticMesh"
|
||||||
mesh = "test-textured.obj"
|
mesh = "test-textured.obj"
|
||||||
|
|
||||||
|
[[entities]]
|
||||||
|
name = "ball.1"
|
||||||
|
type = "PhysicsEntity"
|
||||||
|
mesh = "ball.obj"
|
||||||
|
|
||||||
|
[entities.position]
|
||||||
|
x = 15.0
|
||||||
|
y = 15.0
|
||||||
|
z = 15.0
|
||||||
|
|
||||||
|
[entities.position.rotation]
|
||||||
|
x = 0.0
|
||||||
|
y = 0.0
|
||||||
|
z = 0.0
|
||||||
|
|
||||||
|
[entities.physics]
|
||||||
|
body_status = "static"
|
||||||
|
|
||||||
|
[entities.physics.cuboid]
|
||||||
|
x = 1.0
|
||||||
|
y = 1.0
|
||||||
|
z = 1.0
|
||||||
|
|
||||||
[[entities]]
|
[[entities]]
|
||||||
name = "tile.1"
|
name = "tile.1"
|
||||||
type = "Sprite"
|
type = "Sprite"
|
||||||
|
|||||||
@@ -99,10 +99,9 @@ ECS
|
|||||||
entities & behaviours (got the entities!)
|
entities & behaviours (got the entities!)
|
||||||
scripting!
|
scripting!
|
||||||
|
|
||||||
|
|
||||||
Todo:
|
Todo:
|
||||||
Load scene imgui interface w/ toml files
|
Load scene imgui interface w/ toml files
|
||||||
FPS graph port from voxel raycaster
|
This means a scene graph
|
||||||
better imgui interface with components & systems
|
better imgui interface with components & systems
|
||||||
Figure out eventing, GameInput, passing all events, etc.
|
Figure out eventing, GameInput, passing all events, etc.
|
||||||
+ texturing
|
+ texturing
|
||||||
@@ -158,7 +157,7 @@ fn main() {
|
|||||||
|
|
||||||
let mut render_schedule = Schedule::builder()
|
let mut render_schedule = Schedule::builder()
|
||||||
.add_system(render::system::render_imgui_system())
|
.add_system(render::system::render_imgui_system())
|
||||||
//.add_system(render::system::render_test_system())
|
.add_system(render::system::render_function_system())
|
||||||
.add_system(render::system::render_performance_flag_system())
|
.add_system(render::system::render_performance_flag_system())
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
|||||||
@@ -38,10 +38,10 @@ pub fn run_physics(
|
|||||||
Some(handle) => handle,
|
Some(handle) => handle,
|
||||||
};
|
};
|
||||||
if collider.collider_handle == None {
|
if collider.collider_handle == None {
|
||||||
let handle = physics_state.colliders.insert(
|
let handle = physics_state.colliders.insert_with_parent(
|
||||||
collider.collider.clone(),
|
collider.collider.clone(),
|
||||||
//rigid_body_handle,
|
rigid_body_handle,
|
||||||
//&mut physics_state.bodies,
|
&mut physics_state.bodies,
|
||||||
);
|
);
|
||||||
collider.collider_handle = Some(handle);
|
collider.collider_handle = Some(handle);
|
||||||
}
|
}
|
||||||
@@ -106,6 +106,8 @@ pub fn update_models(
|
|||||||
) {
|
) {
|
||||||
|
|
||||||
// Make sure all the entities we care about are added to the system
|
// Make sure all the entities we care about are added to the system
|
||||||
|
// TODO add scenegraph component to compare against
|
||||||
|
// allows per node rotation, better logging
|
||||||
let mut query = <(&mut Collider, &mut Physics, &mut Mesh, &mut Position)>::query();
|
let mut query = <(&mut Collider, &mut Physics, &mut Mesh, &mut Position)>::query();
|
||||||
for (collider, physics, mesh, position) in query.iter_mut(world) {
|
for (collider, physics, mesh, position) in query.iter_mut(world) {
|
||||||
let pos = physics_state
|
let pos = physics_state
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ impl RuntimeState {
|
|||||||
self.mesh_cache.get(mesh)
|
self.mesh_cache.get(mesh)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_entities(&mut self) -> Vec<TomlEntityDescription> {
|
pub fn p(&mut self) -> Vec<TomlEntityDescription> {
|
||||||
self.config_db.entities.clone()
|
self.config_db.entities.clone()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -132,7 +132,5 @@ impl RuntimeState {
|
|||||||
self.mesh_cache.insert(filename, mesh);
|
self.mesh_cache.insert(filename, mesh);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//panic!("nah");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user