Skip to main content

ranim/
lib.rs

1//! Ranim is an animation engine written in rust based on wgpu, inspired by [3b1b/manim](https://github.com/3b1b/manim/) and [jkjkil4/JAnim](https://github.com/jkjkil4/JAnim).
2//!
3//!
4//! ## Coordinate System
5//!
6//! Ranim's coordinate system is right-handed coordinate:
7//!
8//! ```text
9//!      +Y
10//!      |
11//!      |
12//!      +----- +X
13//!    /
14//! +Z
15//! ```
16//!
17#![warn(missing_docs)]
18#![recursion_limit = "256"]
19#![cfg_attr(docsrs, feature(doc_cfg))]
20#![allow(rustdoc::private_intra_doc_links)]
21#![doc(
22    html_logo_url = "https://raw.githubusercontent.com/AzurIce/ranim/refs/heads/main/assets/ranim.svg",
23    html_favicon_url = "https://raw.githubusercontent.com/AzurIce/ranim/refs/heads/main/assets/ranim.svg"
24)]
25
26#[cfg(feature = "anims")]
27pub use ranim_anims as anims;
28pub use ranim_core as core;
29#[cfg(feature = "items")]
30pub use ranim_items as items;
31#[cfg(feature = "render")]
32pub use ranim_render as render;
33
34/// Commands like preview and render
35pub mod cmd;
36pub use core::color;
37
38/// Utils
39pub mod utils {
40    pub use ranim_core::utils::*;
41}
42
43/// Scene types for dylib / inventory registration and runtime use.
44mod link_magic;
45pub use link_magic::*;
46
47/// Scene description types (Scene, Output, OutputFormat, etc.)
48mod scene;
49pub use scene::*;
50
51pub use core::glam;
52pub use ranim_core::{RanimScene, lagged, seq, stack};
53
54/// The preludes
55pub mod prelude {
56    pub use ranim_core::prelude::*;
57    pub use ranim_core::{lagged, seq, stack};
58    pub use ranim_macros::{output, scene, wasm_demo_doc};
59}