1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
use crate::Position;
use wasm_bindgen::prelude::*;
#[wasm_bindgen(module = "yare-code-sync/client/RenderService")]
extern "C" {
    #[wasm_bindgen]
    pub fn circle(pos: Position, radius: f64, color: &str);
    #[wasm_bindgen(js_name = "circle")]
    pub fn circle_color(pos: Position, radius: f64, color: &str);
    #[wasm_bindgen]
    pub fn ping(pos: Position);
    #[wasm_bindgen]
    pub fn line(pos1: Position, pos2: Position);
    #[wasm_bindgen(js_name = "line")]
    pub fn line_color(pos1: Position, pos2: Position, color: &str);
    #[wasm_bindgen]
    pub fn text(pos: Position, str: &str);
    #[wasm_bindgen(js_name = "text")]
    pub fn text_color(pos: Position, str: &str, color: &str);
    #[wasm_bindgen]
    pub fn log(str: &str);
    #[wasm_bindgen(js_name = "log")]
    pub fn log_js(obj: &JsValue);
}