
# Objective We deprecated quite a few APIs in 0.13. 0.13 has shipped already. It should be OK to remove them in 0.14's release. Fixes #4059. Fixes #9011. ## Solution Remove them.
32 lines
1.1 KiB
Rust
32 lines
1.1 KiB
Rust
#[allow(clippy::module_inception)]
|
|
mod mesh;
|
|
pub mod morph;
|
|
pub mod primitives;
|
|
|
|
pub use mesh::*;
|
|
pub use primitives::*;
|
|
|
|
use crate::{prelude::Image, render_asset::RenderAssetPlugin};
|
|
use bevy_app::{App, Plugin};
|
|
use bevy_asset::{AssetApp, Handle};
|
|
use bevy_ecs::entity::Entity;
|
|
|
|
/// Adds the [`Mesh`] as an asset and makes sure that they are extracted and prepared for the GPU.
|
|
pub struct MeshPlugin;
|
|
|
|
impl Plugin for MeshPlugin {
|
|
fn build(&self, app: &mut App) {
|
|
app.init_asset::<Mesh>()
|
|
.init_asset::<skinning::SkinnedMeshInverseBindposes>()
|
|
.register_asset_reflect::<Mesh>()
|
|
.register_type::<Option<Handle<Image>>>()
|
|
.register_type::<Option<Vec<String>>>()
|
|
.register_type::<Option<Indices>>()
|
|
.register_type::<Indices>()
|
|
.register_type::<skinning::SkinnedMesh>()
|
|
.register_type::<Vec<Entity>>()
|
|
// 'Mesh' must be prepared after 'Image' as meshes rely on the morph target image being ready
|
|
.add_plugins(RenderAssetPlugin::<Mesh, Image>::default());
|
|
}
|
|
}
|