use crate::pixel_format::{rgba_add, rgba_div, rgba_mult, rgba_sub, RGBA}; use rhai::Engine; pub fn engine_startup() -> Engine { let mut engine = Engine::new(); engine .register_type::() .register_fn("RGBA", RGBA::new) .register_fn("*", rgba_mult) .register_fn("/", rgba_div) .register_fn("+", rgba_add) .register_fn("-", rgba_sub); // engine.register_global_module(RandomPackage::new().as_shared_module()); engine }