🎉 Hidden layer support for wasm render

This commit is contained in:
Alejandro Alonso 2024-12-03 12:57:04 +01:00 committed by Belén Albeza
parent 7c7ede9d0c
commit 07215357d6
5 changed files with 20 additions and 3 deletions

View file

@ -263,6 +263,14 @@ pub extern "C" fn set_shape_opacity(opacity: f32) {
}
}
#[no_mangle]
pub extern "C" fn set_shape_hidden(hidden: bool) {
let state = unsafe { STATE.as_mut() }.expect("got an invalid state pointer");
if let Some(shape) = state.current_shape() {
shape.hidden = hidden;
}
}
fn main() {
init_gl();
}