···11pub mod layer;
22pub mod transform;
33pub mod web;
44+pub mod point;
4556pub use layer::*;
67pub use transform::*;
78pub use web::*;
99+pub use point::*;
+31
src/wasm/point.rs
···11+use crate::Point;
22+use serde_wasm_bindgen;
33+use wasm_bindgen::{JsValue, convert::FromWasmAbi, convert::IntoWasmAbi};
44+55+impl From<Point> for JsValue {
66+ fn from(val: Point) -> Self {
77+ serde_wasm_bindgen::to_value(&val).unwrap()
88+ }
99+}
1010+1111+impl wasm_bindgen::describe::WasmDescribe for Point {
1212+ fn describe() {
1313+ JsValue::describe()
1414+ }
1515+}
1616+1717+impl wasm_bindgen::convert::IntoWasmAbi for Point {
1818+ type Abi = <JsValue as IntoWasmAbi>::Abi;
1919+2020+ fn into_abi(self) -> Self::Abi {
2121+ serde_wasm_bindgen::to_value(&self).unwrap().into_abi()
2222+ }
2323+}
2424+2525+impl wasm_bindgen::convert::FromWasmAbi for Point {
2626+ type Abi = <JsValue as FromWasmAbi>::Abi;
2727+2828+ unsafe fn from_abi(js: Self::Abi) -> Self {
2929+ serde_wasm_bindgen::from_value(unsafe { JsValue::from_abi(js) }).unwrap()
3030+ }
3131+}