javascript constructor

This commit is contained in:
Magnus Ulimoen
2019-12-08 20:55:47 +01:00
parent a473b78756
commit a0a125b61c
2 changed files with 2 additions and 1 deletions

View File

@@ -22,6 +22,7 @@ pub struct Universe {
#[wasm_bindgen]
impl Universe {
#[wasm_bindgen(constructor)]
pub fn new(width: u32, height: u32) -> Self {
Self {
sys: (System::new(width, height), System::new(width, height)),