update bevy 0.11 - fix compile errors

This commit is contained in:
johnny-smitherson
2023-10-23 16:21:07 +00:00
parent 82416e3ca6
commit 780ba4a216
20 changed files with 148 additions and 108 deletions

View File

@@ -5,9 +5,13 @@ use bevy::render::mesh::{Indices, VertexAttributeValues};
use na::{point, Point3, Vector3};
use std::collections::HashMap;
use bevy::pbr::wireframe::Wireframe;
use bevy::render::render_resource::PrimitiveTopology;
use bevy_pbr::wireframe::Wireframe;
use bevy_pbr::PbrBundle;
use bevy_pbr::StandardMaterial;
use bevy_sprite::ColorMaterial;
use rapier::geometry::{ColliderHandle, ColliderSet, Shape, ShapeType};
#[cfg(feature = "dim3")]
use rapier::geometry::{Cone, Cylinder};
use rapier::math::{Isometry, Real, Vector};
@@ -15,7 +19,7 @@ use rapier::math::{Isometry, Real, Vector};
use crate::graphics::BevyMaterial;
#[cfg(feature = "dim2")]
use {
bevy::sprite::MaterialMesh2dBundle,
bevy_sprite::MaterialMesh2dBundle,
na::{Point2, Vector2},
rapier::geometry::{Ball, Cuboid},
};
@@ -235,10 +239,11 @@ impl EntityWithGraphics {
//
// Ball mesh
//
let ball = Mesh::from(shape::Icosphere {
let ball = Mesh::try_from(shape::Icosphere {
subdivisions: 2,
radius: 1.0,
});
})
.unwrap();
out.insert(ShapeType::Ball, meshes.add(ball));
//