Skip to main content

ranim_items/
lib.rs

1//! Ranim's built-in items
2#![recursion_limit = "256"]
3#![warn(missing_docs)]
4#![cfg_attr(docsrs, feature(doc_cfg))]
5#![allow(rustdoc::private_intra_doc_links)]
6#![doc(
7    html_logo_url = "https://raw.githubusercontent.com/AzurIce/ranim/refs/heads/main/assets/ranim.svg",
8    html_favicon_url = "https://raw.githubusercontent.com/AzurIce/ranim/refs/heads/main/assets/ranim.svg"
9)]
10
11pub mod camera;
12pub mod debug;
13/// Hierarchical scene-graph composition for items.
14pub mod hierarchy;
15pub mod mesh;
16pub mod vitem;
17
18#[cfg(feature = "render")]
19pub use {camera::CameraFramePlugin, mesh::MeshItemPlugin, vitem::VItemPlugin};
20
21/// Installs the built-in render plugins: camera frame, vector items, and mesh
22/// items. This is what the default render setup of a project binary uses;
23/// install it explicitly when composing a custom
24/// [`RenderSetup`](ranim_render::RenderSetup) with additional extraction
25/// plugins, and do not combine it with the individual plugins (they are
26/// unique in a bevy app).
27#[cfg(feature = "render")]
28pub struct RanimItemsPlugin;
29
30#[cfg(feature = "render")]
31impl bevy_app::Plugin for RanimItemsPlugin {
32    fn build(&self, app: &mut bevy_app::App) {
33        app.add_plugins((CameraFramePlugin, VItemPlugin, MeshItemPlugin));
34    }
35}