From d8a7e70f418690bbe83eb948b747832b434bbf79 Mon Sep 17 00:00:00 2001 From: Alessandro Senese Date: Mon, 2 Sep 2024 15:16:19 +0100 Subject: [PATCH] add missing script --- export_presets.cfg | 41 +++++++++++++++++++++++++++++++++++++++++ tests/test.gd | 22 ++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 export_presets.cfg create mode 100644 tests/test.gd diff --git a/export_presets.cfg b/export_presets.cfg new file mode 100644 index 0000000..eaaa944 --- /dev/null +++ b/export_presets.cfg @@ -0,0 +1,41 @@ +[preset.0] + +name="Web" +platform="Web" +runnable=true +advanced_options=false +dedicated_server=false +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="../apks/Anima.html" +encryption_include_filters="" +encryption_exclude_filters="" +encrypt_pck=false +encrypt_directory=false +script_export_mode=2 + +[preset.0.options] + +custom_template/debug="" +custom_template/release="" +variant/extensions_support=false +variant/thread_support=false +vram_texture_compression/for_desktop=true +vram_texture_compression/for_mobile=false +html/export_icon=true +html/custom_html_shell="" +html/head_include="" +html/canvas_resize_policy=2 +html/focus_canvas_on_start=true +html/experimental_virtual_keyboard=false +progressive_web_app/enabled=false +progressive_web_app/ensure_cross_origin_isolation_headers=true +progressive_web_app/offline_page="" +progressive_web_app/display=1 +progressive_web_app/orientation=0 +progressive_web_app/icon_144x144="" +progressive_web_app/icon_180x180="" +progressive_web_app/icon_512x512="" +progressive_web_app/background_color=Color(0, 0, 0, 1) diff --git a/tests/test.gd b/tests/test.gd new file mode 100644 index 0000000..8879e73 --- /dev/null +++ b/tests/test.gd @@ -0,0 +1,22 @@ +@tool +extends Control + +@export var debug_animation: bool = false: + set(value): + debug_animation = value + + if not value or not %Label2: + return + + _animate() + +func _animate(): + await ( + Anima.Node(%Label2) + .clear() + .anima_animation("bounce", 0.5) + .play() + ).animation_completed + +func _on_button_pressed(): + _animate()