Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 8 additions & 26 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 28 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ ranim-core = { path = "packages/ranim-core", version = "0.1.5" }
ranim-items = { path = "packages/ranim-items", version = "0.1.5" }
ranim-anims = { path = "packages/ranim-anims", version = "0.1.5" }
ranim-macros = { path = "packages/ranim-macros", version = "0.1.5" }
ranim-app = { path = "packages/ranim-app", version = "0.1.5" }
ranim-render = { path = "packages/ranim-render", version = "0.1.5" }
wgpu-profiler = { version = "0.25.0", features = ["puffin"] }
wasm-bindgen = "0.2.108"
Expand Down Expand Up @@ -68,6 +67,17 @@ render = [
"dep:flate2",
"dep:reqwest",
]
preview = [
"render",
"dep:egui",
"dep:eframe",
"dep:web-time",
"dep:bytemuck",
"dep:wasm-bindgen-futures",
"dep:web-sys",
"dep:console_error_panic_hook",
"dep:wasm-tracing",
]
# serde = ["dep:serde", "glam/serde"]

[dependencies]
Expand All @@ -91,6 +101,10 @@ anyhow = "1.0.100"
ranim-render = { workspace = true, optional = true }
# render feature (wasm-compatible deps here, rest in target-specific section below)
wgpu = { workspace = true, optional = true }
# app feature
egui = { version = "0.33.0", optional = true }
web-time = { version = "1.1.0", optional = true }
bytemuck = { workspace = true, features = ["derive"], optional = true }
# profiling
puffin = { version = "0.19.1", optional = true }
puffin_http = { version = "0.16.1", optional = true }
Expand All @@ -102,6 +116,17 @@ inventory = "0.3.21"

[target.'cfg(target_family = "wasm")'.dependencies]
wasm-bindgen.workspace = true
# app feature (wasm)
eframe = { version = "0.33.0", default-features = false, features = [
"accesskit",
"default_fonts",
"web_screen_reader",
"wgpu",
], optional = true }
wasm-bindgen-futures = { version = "0.4.54", optional = true }
web-sys = { version = "0.3.81", optional = true }
console_error_panic_hook = { version = "0.1.7", optional = true }
wasm-tracing = { version = "2.1.0", optional = true }

[target.'cfg(not(target_family = "wasm"))'.dependencies]
# render deps (wasm-incompatible, only used in cfg(not(wasm)) code)
Expand All @@ -111,13 +136,12 @@ indicatif = { version = "0.18.3", optional = true }
tracing-indicatif = { workspace = true, optional = true }
flate2 = { version = "1.1.8", optional = true }
reqwest = { version = "0.13.1", features = ["blocking"], optional = true }
# app feature (native)
eframe = { version = "0.33.0", features = ["wgpu"], optional = true }

[target.'cfg(not(target_family = "wasm"))'.dev-dependencies]
pretty_env_logger = "0.5.0"

[target.'cfg(target_family = "wasm")'.dev-dependencies]
ranim-app.workspace = true

[dev-dependencies]
assert_float_eq = "1.2.0"
rand = "0.9.2"
Expand Down
3 changes: 1 addition & 2 deletions example-packages/app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ publish = false
console_error_panic_hook = "0.1.7"
log = "0.4.27"
pretty_env_logger = "0.5.0"
ranim.workspace = true
ranim-app.workspace = true
ranim = { workspace = true, features = ["preview", "anims", "items"] }
2 changes: 1 addition & 1 deletion example-packages/app/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ fn main() {
.filter(Some("ranim"), log::LevelFilter::Info)
.init();

ranim_app::preview_scene!(hello_ranim);
ranim::preview_scene!(hello_ranim);
}
2 changes: 0 additions & 2 deletions examples/aabb/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#[cfg(target_arch = "wasm32")]
use ranim_app as _;
use std::f64::consts::PI;

use ranim::{
Expand Down
2 changes: 0 additions & 2 deletions examples/animating_pi/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#[cfg(target_arch = "wasm32")]
use ranim_app as _;
use std::f64::consts::TAU;

use itertools::Itertools;
Expand Down
2 changes: 0 additions & 2 deletions examples/arc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ use ranim::{
items::vitem::geometry::Arc,
prelude::*,
};
#[cfg(target_arch = "wasm32")]
use ranim_app as _;
use ranim_items::vitem::geometry::anchor::Origin;

#[scene]
Expand Down
2 changes: 0 additions & 2 deletions examples/arc_between_points/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ use ranim::{
items::vitem::geometry::ArcBetweenPoints,
prelude::*,
};
#[cfg(target_arch = "wasm32")]
use ranim_app as _;

#[scene]
#[output(dir = "arc_between_points")]
Expand Down
2 changes: 0 additions & 2 deletions examples/basic/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
use ranim::glam;
#[cfg(target_arch = "wasm32")]
use ranim_app as _;

use glam::DVec3;
use ranim::{
Expand Down
3 changes: 0 additions & 3 deletions examples/bubble_sort/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#[cfg(target_arch = "wasm32")]
use ranim_app as _;

use rand::{SeedableRng, seq::SliceRandom};
use ranim::{
anims::morph::MorphAnim,
Expand Down
3 changes: 0 additions & 3 deletions examples/ellipse/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#[cfg(target_arch = "wasm32")]
use ranim_app as _;

use ranim::{
anims::{creation::WritingAnim, fading::FadingAnim, morph::MorphAnim},
color::palettes::manim,
Expand Down
3 changes: 0 additions & 3 deletions examples/extract_vitem_visualize/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#[cfg(target_arch = "wasm32")]
use ranim_app as _;

use ranim::glam;
use ranim_core::core_item::CoreItem;
use ranim_items::vitem::DEFAULT_STROKE_WIDTH;
Expand Down
3 changes: 0 additions & 3 deletions examples/getting_started0/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#[cfg(target_arch = "wasm32")]
use ranim_app as _;

use ranim::{
anims::fading::FadingAnim, color::palettes::manim, items::vitem::geometry::Square, prelude::*,
};
Expand Down
3 changes: 0 additions & 3 deletions examples/getting_started1/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#[cfg(target_arch = "wasm32")]
use ranim_app as _;

use ranim::{
anims::{creation::WritingAnim, morph::MorphAnim},
color::palettes::manim,
Expand Down
3 changes: 0 additions & 3 deletions examples/getting_started2/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#[cfg(target_arch = "wasm32")]
use ranim_app as _;

use ranim::{
anims::{
creation::{CreationAnim, WritingAnim},
Expand Down
2 changes: 0 additions & 2 deletions examples/hanoi/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ use ranim::{
prelude::*,
utils::rate_functions::{ease_in_quad, ease_out_quad, linear},
};
#[cfg(target_arch = "wasm32")]
use ranim_app as _;

fn solve_hanoi(
n: usize,
Expand Down
3 changes: 0 additions & 3 deletions examples/hello_ranim/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#[cfg(target_arch = "wasm32")]
use ranim_app as _;

use std::f64::consts::PI;

use ranim::{
Expand Down
3 changes: 0 additions & 3 deletions examples/perspective_blend/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#[cfg(target_arch = "wasm32")]
use ranim_app as _;

use ranim::{
anims::morph::MorphAnim,
color,
Expand Down
3 changes: 0 additions & 3 deletions examples/ranim_logo/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#[cfg(target_arch = "wasm32")]
use ranim_app as _;

use ranim::glam;
use std::f64::consts::PI;

Expand Down
3 changes: 0 additions & 3 deletions examples/regular_polygon/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#[cfg(target_arch = "wasm32")]
use ranim_app as _;

use std::f64::consts::PI;

use ranim::{
Expand Down
3 changes: 0 additions & 3 deletions examples/selective_sort/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#[cfg(target_arch = "wasm32")]
use ranim_app as _;

use glam::{DVec3, dvec2};
use rand::{SeedableRng, seq::SliceRandom};
use ranim::glam::{self, dvec3};
Expand Down
3 changes: 0 additions & 3 deletions examples/text_item/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#[cfg(target_arch = "wasm32")]
use ranim_app as _;

use std::f64::consts::TAU;

use ranim::{color::palettes::manim, glam::DVec3, prelude::*};
Expand Down
49 changes: 0 additions & 49 deletions packages/ranim-app/Cargo.toml

This file was deleted.

5 changes: 2 additions & 3 deletions packages/ranim-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@ license.workspace = true
repository.workspace = true

[features]
profiling = ["ranim/profiling", "ranim-app/profiling"]
profiling = ["ranim/profiling"]

[[bin]]
name = "ranim"
path = "src/main.rs"
doc = false

[dependencies]
ranim = { workspace = true, features = ["render"] }
ranim-app.workspace = true
ranim = { workspace = true, features = ["render", "preview"] }
anyhow = "1.0.100"
cargo_toml = "0.22.3"
clap = { version = "4.5.53", features = ["derive"] }
Expand Down
Loading