1#[cfg(feature = "mesh")]
2pub mod mesh;
3#[cfg(feature = "scene")]
4pub mod scene;
5
6mod util;
7
8use bevy::app::{App, Plugin};
9use bevy::asset::AssetApp;
10use serde::{Deserialize, Serialize};
11
12const EXTENSIONS: &[&str; 2] = &["obj", "OBJ"];
13
14#[derive(Default)]
16pub struct ObjPlugin;
17
18impl Plugin for ObjPlugin {
19 fn build(&self, app: &mut App) {
20 #[cfg(feature = "mesh")]
21 app.init_asset_loader::<mesh::ObjLoader>();
22 #[cfg(feature = "scene")]
23 app.init_asset_loader::<scene::ObjLoader>();
24 }
25}
26
27#[derive(Default, Serialize, Deserialize)]
29pub struct ObjSettings {
30 pub force_compute_normals: bool,
32 pub prefer_flat_normals: bool,
34}