Something went wrong. Try again.
Homebrew 4D Game Engine In Rust, inspired by Engine4D
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152//! Lua bindings for engine subsystems//!//! This module provides the bridge between Lua scripts and the Rust engine.//!//! ## Available Bindings//!//! - `ecs` - Entity-Component-System access (spawn, query, despawn)//! - `math` - 4D math types (Vec4, Rotor4, Transform4D)//! - `physics` - Physics queries (raycast, sphere query, line of sight)//! - `input` - Input polling (keyboard, mouse, actions)//! - `audio` - 4D spatial audio playback//! - `hud` - HUD/GUI overlay drawing//!//! ## Configuration Types//!//! - [`ScreenConfig`] - Set via `lua.set_app_data()` to provide screen dimensions
pub mod audio;pub mod ecs;pub mod hud;pub mod input;pub mod logging;pub mod math;pub mod physics;
// Re-export configuration types for easy accesspub use hud::ScreenConfig;
use mlua::{Lua, Result as LuaResult};
/// Register all engine bindings with the Lua VM////// This should be called after creating the VM but before loading game scripts./// Registers the following globals:////// - `world` - ECS access table/// - `Vec4`, `Rotor4`, `Transform4D` - Math types/// - `physics` - Physics queries table/// - `input` - Input polling table/// - `audio` - Audio playback table/// - `hud` - HUD drawing tablepub fn register_all(lua: &Lua) -> LuaResult<()> { logging::register(lua)?; ecs::register(lua)?; math::register(lua)?; physics::register(lua)?; input::register(lua)?; audio::register(lua)?; hud::register(lua)?; Ok(())}