1
0
Fork 0
forked from AbleOS/ableos
ableOS_v1Change/shadeable/src/engine_internals.rs

19 lines
490 B
Rust
Raw Normal View History

2022-01-16 19:42:11 -06:00
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::<RGBA>()
.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
}