Some more bugs fixed

This commit is contained in:
rewin
2024-03-15 20:04:38 +03:00
parent dbf512bb0c
commit 98f1398b9f
3 changed files with 9 additions and 9 deletions
+5 -5
View File
@@ -1,7 +1,7 @@
use bevy::{
math::vec3,
prelude::*,
render::{mesh::Indices, primitives::Aabb, render_resource::PrimitiveTopology},
render::{mesh::Indices, primitives::Aabb, render_asset::RenderAssetUsages, render_resource::PrimitiveTopology},
};
pub struct Cone {
@@ -45,8 +45,8 @@ impl From<Cone> for Mesh {
positions.push(vec3(0., c.length, 0.));
let mut mesh = Mesh::new(PrimitiveTopology::TriangleList);
mesh.set_indices(Some(Indices::U32(indices)));
let mut mesh = Mesh::new(PrimitiveTopology::TriangleList, RenderAssetUsages::all());
mesh.insert_indices(Indices::U32(indices));
mesh.insert_attribute(Mesh::ATTRIBUTE_POSITION, positions);
mesh
@@ -104,8 +104,8 @@ impl From<Plane2Sided> for Mesh {
2, 3, 1,
];
let mut mesh = Mesh::new(PrimitiveTopology::TriangleList);
mesh.set_indices(Some(Indices::U32(indices)));
let mut mesh = Mesh::new(PrimitiveTopology::TriangleList, RenderAssetUsages::all());
mesh.insert_indices(Indices::U32(indices));
mesh.insert_attribute(Mesh::ATTRIBUTE_POSITION, positions);
mesh
+1 -1
View File
@@ -6,7 +6,7 @@ pub struct MixamoPlugin;
impl Plugin for MixamoPlugin {
fn build(&self, app: &mut App) {
app.add_event::<MixamoImportEvent>();
app.add_state::<MixamoState>();
app.init_state::<MixamoState>();
app.add_systems(
Update,
+3 -3
View File
@@ -31,11 +31,11 @@ impl EditorTab for DebugPersistanceTab {
world: &mut World,
) {
if ui.button("Save").clicked() {
world.send_event(EditorEvent::Save(EditorPrefabPath::MemoryCahce));
world.send_event(EditorEvent::Save(EditorPrefabPath::MemoryCache));
}
if ui.button("Load").clicked() {
world.send_event(EditorEvent::Load(EditorPrefabPath::MemoryCahce));
world.send_event(EditorEvent::Load(EditorPrefabPath::MemoryCache));
}
if ui.button("Clear level").clicked() {
@@ -68,7 +68,7 @@ mod wasm {
pub(super) fn forward_save_scene_events(mut ew_editor_events: EventWriter<EditorEvent>) {
if SAVE_SCENE.take_message().is_some() {
ew_editor_events.send(EditorEvent::Save(EditorPrefabPath::MemoryCahce));
ew_editor_events.send(EditorEvent::Save(EditorPrefabPath::MemoryCache));
}
}