From 92ec886cf3ecafbd211aca7309d9a1b8fb5ba1ae Mon Sep 17 00:00:00 2001 From: Daniel Jones Date: Sat, 15 Feb 2025 22:13:53 +1100 Subject: add counter to rem clicks, improve jumping --- template.txt | 106 +++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 100 insertions(+), 6 deletions(-) (limited to 'template.txt') diff --git a/template.txt b/template.txt index e08a98a..c455090 100644 --- a/template.txt +++ b/template.txt @@ -156,7 +156,6 @@ transform: scaleX(1); z-index: 1; } -/* Option 1: Jump when clicked */ .running-sprite2 { position: fixed; bottom: 5px; @@ -169,17 +168,18 @@ z-index: 1; transform: scaleX(1); z-index: 1; cursor: pointer; - transition: bottom 0.2s ease-out; } -.running-sprite2:active { - bottom: 50px; +.running-sprite2.jumping { + animation: run-sprite 15s linear infinite, jump 0.5s ease-out; } @keyframes jump { - 0%, 100% { bottom: 5px; } - 50% { bottom: 50px; } + 0% { transform: translateY(0) scaleX(var(--sprite-direction, 1)); } + 50% { transform: translateY(-60px) scaleX(var(--sprite-direction, 1)); } + 100% { transform: translateY(0) scaleX(var(--sprite-direction, 1)); } } + @keyframes run-sprite { 0% { left: 0; @@ -340,6 +340,100 @@ to { + + + +