From a6f9179ca29f0c354786816697fa76c092d90b38 Mon Sep 17 00:00:00 2001 From: mitoma Date: Sun, 20 Oct 2024 01:05:01 +0900 Subject: [PATCH] =?UTF-8?q?=E7=9B=AE=E7=AB=8B=E3=81=A4=E6=A9=9F=E8=83=BD?= =?UTF-8?q?=E3=82=82=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sample_codes/showcase/src/lib.rs | 15 +++++++++++++++ site/src/showcase.md | 16 +++++++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/sample_codes/showcase/src/lib.rs b/sample_codes/showcase/src/lib.rs index 66c62b4..4e348e6 100644 --- a/sample_codes/showcase/src/lib.rs +++ b/sample_codes/showcase/src/lib.rs @@ -94,6 +94,21 @@ pub fn change_theme_light() { )); } +#[cfg_attr(target_arch = "wasm32", wasm_bindgen)] +pub fn zoom_in() { + send_action(Action::new_command("world", "forward")); +} + +#[cfg_attr(target_arch = "wasm32", wasm_bindgen)] +pub fn zoom_out() { + send_action(Action::new_command("world", "back")); +} + +#[cfg_attr(target_arch = "wasm32", wasm_bindgen)] +pub fn toggle_psychedelic() { + send_action(Action::new_command("world", "toggle-psychedelic")); +} + #[cfg_attr(target_arch = "wasm32", wasm_bindgen)] pub fn send_log(message: &str) { log::warn!("{}", message); diff --git a/site/src/showcase.md b/site/src/showcase.md index 4624c9f..dbc8b22 100644 --- a/site/src/showcase.md +++ b/site/src/showcase.md @@ -10,8 +10,13 @@ Click area and edit it! + + + + +