Skip to main content

euv_engine/
lib.rs

1//! euv-engine
2//!
3//! A high-performance 2D and 3D game engine built on the euv framework for WebAssembly,
4//! featuring an ECS-style entity system, fixed-timestep game loop, canvas rendering,
5//! WebGPU rendering, physics simulation, collision detection, sprite animation,
6//! scene management, asset loading, and Web Audio integration.
7
8mod asset;
9mod audio;
10mod cell;
11mod collider;
12mod config;
13mod easing;
14mod engine;
15mod entity;
16mod input;
17mod lighting;
18mod math;
19mod particle;
20mod physics;
21mod pool;
22mod raytracing;
23mod renderer;
24mod scene;
25mod scheduler;
26mod spatial;
27mod sprite;
28mod timer;
29mod tween;
30
31#[cfg(test)]
32#[path = "../tests/mod.rs"]
33mod tests;
34
35pub use wasm_bindgen::JsValue;
36pub use {
37    asset::*, audio::*, cell::*, collider::*, config::*, easing::*, engine::*, entity::*, input::*,
38    lighting::*, math::*, particle::*, physics::*, pool::*, raytracing::*, renderer::*, scene::*,
39    scheduler::*, spatial::*, sprite::*, timer::*, tween::*,
40};
41
42pub use wasm_bindgen_futures::JsFuture;
43
44pub use std::{
45    error::Error,
46    // Both forms on purpose: the items are the crate's public numeric
47    // vocabulary, and the module itself is what math/const.rs refers to,
48    // because that file declares its own PI / TWO_PI / HALF_PI and importing
49    // the same names there would shadow the very constants it defines.
50    f64::consts,
51    f64::consts::{FRAC_PI_2, PI, TAU},
52    fmt::{self, Debug, Display, Formatter, Write},
53    future::{Future, Ready, ready},
54    mem::{self, replace},
55    sync::LazyLock,
56};
57
58use euv::*;
59
60use std::{
61    cell::{RefCell, RefMut, UnsafeCell},
62    collections::{HashMap, HashSet},
63    mem::take,
64    ops::{Add, AddAssign, BitOr, Mul, MulAssign, Neg, Sub, SubAssign},
65    rc::Rc,
66    rc::Weak,
67    slice::from_ref,
68    sync::atomic::{AtomicU64, Ordering},
69};