mirror of
https://github.com/storytold/storyteller-bevy.git
synced 2026-10-17 00:13:17 +00:00
Some more bugs fixed
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user