summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2026-09-16 17:46:59 +0200
committerHampusM <hampus@hampusmat.com>2026-09-16 17:46:59 +0200
commit6b9c3658dd3dfedc50de2e139a56a9e8f32880ef (patch)
tree62d964198c245d9c6ddc99361af68bf40f6d9047
parent99bd0d8e78a2f7739344f2a55e0ae7babd91514b (diff)
refactor: make compile again after changes in engineHEADmaster
-rw-r--r--src/main.rs18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/main.rs b/src/main.rs
index cbce739..9e1d56e 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -30,7 +30,7 @@ use engine::input::Extension as InputExtension;
use engine::lighting::DirectionalLight;
use engine::material::Material;
use engine::mesh::Mesh;
-use engine::model::{Materials as ModelMaterials, Model, Spec as ModelSpec};
+use engine::model::{MaterialDescription, Model, Spec as ModelSpec};
use engine::rendering::{
Extension as RenderingExtension,
GraphicsProperties,
@@ -193,24 +193,20 @@ fn init(mut assets: Single<Assets>, mut actions: Actions) -> Result<(), EngineEr
"Floor",
(
Transform::default().position(Vec3 { x: 1.6, y: -3.0, z: 0.0 }),
- Model::new(assets.store_with_name_with("light_cube", |assets| {
+ Model::new(assets.store_with_name_with("floor_model", |assets| {
ModelSpec::builder()
.mesh(assets.store_with_name(
- "light_cube_mesh",
+ "floor_mesh",
Mesh::cube(Dimens3 {
width: 20.0,
height: 0.5,
depth: 20.0,
}),
))
- .materials(ModelMaterials::direct([(
- "surface",
- assets.store_with_name(
- "light_cube_surface_mat",
- Material::builder().ambient(YELLOW * 5.0).build(),
- ),
- )]))
- .material_name("surface")
+ .materials([MaterialDescription::new(assets.store_with_name(
+ "floor_material",
+ Material::builder().ambient(YELLOW * 5.0).build(),
+ ))])
.build()
})),
pair!(ChildOf, { scene_ent_id }),