Update index.html
Browse files- index.html +51 -50
index.html
CHANGED
|
@@ -2,6 +2,7 @@
|
|
| 2 |
<html>
|
| 3 |
<head>
|
| 4 |
<style>
|
|
|
|
| 5 |
.scene-container {
|
| 6 |
width: 100%;
|
| 7 |
height: 800px;
|
|
@@ -19,30 +20,30 @@
|
|
| 19 |
|
| 20 |
.waterfall-container {
|
| 21 |
position: absolute;
|
| 22 |
-
left:
|
| 23 |
-
top:
|
| 24 |
-
width:
|
| 25 |
-
height:
|
| 26 |
overflow: visible;
|
| 27 |
}
|
| 28 |
|
| 29 |
.river-container {
|
| 30 |
position: absolute;
|
| 31 |
-
bottom:
|
| 32 |
-
left:
|
| 33 |
-
width:
|
| 34 |
-
height:
|
| 35 |
transform: perspective(1000px) rotateX(30deg);
|
| 36 |
transform-origin: bottom;
|
| 37 |
-
overflow:
|
| 38 |
}
|
| 39 |
|
| 40 |
.impact-zone {
|
| 41 |
position: absolute;
|
| 42 |
-
left:
|
| 43 |
-
bottom:
|
| 44 |
-
width:
|
| 45 |
-
height:
|
| 46 |
overflow: visible;
|
| 47 |
}
|
| 48 |
|
|
@@ -52,27 +53,29 @@
|
|
| 52 |
opacity: 0;
|
| 53 |
}
|
| 54 |
|
|
|
|
| 55 |
.waterfall-drop {
|
| 56 |
-
animation: waterfall-fall var(--fall-duration,
|
| 57 |
}
|
| 58 |
|
| 59 |
.impact-splash {
|
| 60 |
-
animation: splash var(--splash-duration,
|
| 61 |
}
|
| 62 |
|
| 63 |
.river-swirl {
|
| 64 |
animation: river-flow var(--flow-duration, 8s) linear infinite;
|
| 65 |
}
|
| 66 |
|
|
|
|
| 67 |
@keyframes waterfall-fall {
|
| 68 |
0% {
|
| 69 |
-
transform: translate(var(--start-x, 0), -
|
| 70 |
opacity: 0;
|
| 71 |
}
|
| 72 |
5% { opacity: var(--opacity, 0.6); }
|
| 73 |
95% { opacity: var(--opacity, 0.6); }
|
| 74 |
100% {
|
| 75 |
-
transform: translate(var(--end-x, 0),
|
| 76 |
opacity: 0;
|
| 77 |
}
|
| 78 |
}
|
|
@@ -82,30 +85,28 @@
|
|
| 82 |
transform: translate(var(--start-x, 0), 0) scale(0.2);
|
| 83 |
opacity: 0;
|
| 84 |
}
|
| 85 |
-
20% {
|
| 86 |
-
|
| 87 |
-
transform: translate(var(--end-x, 0), var(--y-offset, 0)) scale(1);
|
| 88 |
-
}
|
| 89 |
100% {
|
| 90 |
-
transform: translate(var(--final-x, 0), var(--final-y, 0)) scale(
|
| 91 |
opacity: 0;
|
| 92 |
}
|
| 93 |
}
|
| 94 |
|
| 95 |
@keyframes river-flow {
|
| 96 |
0% {
|
| 97 |
-
transform: translate(-
|
| 98 |
opacity: 0;
|
| 99 |
}
|
| 100 |
5% { opacity: var(--opacity, 0.6); }
|
| 101 |
95% { opacity: var(--opacity, 0.6); }
|
| 102 |
100% {
|
| 103 |
-
transform: translate(
|
| 104 |
opacity: 0;
|
| 105 |
}
|
| 106 |
}
|
| 107 |
|
| 108 |
-
/*
|
| 109 |
.climber {
|
| 110 |
position: absolute;
|
| 111 |
width: 40px;
|
|
@@ -125,13 +126,13 @@
|
|
| 125 |
</head>
|
| 126 |
<body>
|
| 127 |
<div class="scene-container">
|
| 128 |
-
<!-- Background
|
| 129 |
<svg width="100%" height="100%" viewBox="0 0 1200 800">
|
| 130 |
<path d="M0,300 L200,100 L300,250 L400,80 L500,220 L600,100 L700,240 L800,120 L1000,280 L1200,150 L1200,800 L0,800 Z"
|
| 131 |
fill="#8B4513"/>
|
| 132 |
</svg>
|
| 133 |
|
| 134 |
-
<!--
|
| 135 |
<svg class="climber climber1" viewBox="0 0 40 60">
|
| 136 |
<path d="M20,10 L20,35 M15,20 L25,20 M20,35 L15,50 M20,35 L25,50"
|
| 137 |
stroke="#333" stroke-width="3" stroke-linecap="round"/>
|
|
@@ -161,65 +162,65 @@
|
|
| 161 |
function createWaterfallDrop() {
|
| 162 |
const drop = document.createElement('div');
|
| 163 |
drop.className = 'water-shape waterfall-drop';
|
| 164 |
-
const size =
|
| 165 |
drop.style.cssText = `
|
| 166 |
width: ${size}px;
|
| 167 |
height: ${size}px;
|
| 168 |
background: var(--water-${Math.random() > 0.5 ? 'blue' : 'white'}-${Math.random() > 0.5 ? '1' : '2'});
|
| 169 |
left: ${Math.random() * 100}%;
|
| 170 |
-
--fall-duration: ${2 + Math.random()}s;
|
| 171 |
--opacity: ${0.4 + Math.random() * 0.3};
|
| 172 |
-
--start-x: ${-
|
| 173 |
-
--end-x: ${-
|
| 174 |
-
--end-scale: ${0.
|
| 175 |
-
filter: blur(${
|
| 176 |
`;
|
| 177 |
waterfall.appendChild(drop);
|
| 178 |
-
setTimeout(() => drop.remove(),
|
| 179 |
}
|
| 180 |
|
| 181 |
function createSplash() {
|
| 182 |
const splash = document.createElement('div');
|
| 183 |
splash.className = 'water-shape impact-splash';
|
| 184 |
-
const size =
|
| 185 |
splash.style.cssText = `
|
| 186 |
width: ${size}px;
|
| 187 |
height: ${size}px;
|
| 188 |
background: var(--water-${Math.random() > 0.5 ? 'blue' : 'white'}-${Math.random() > 0.5 ? '1' : '2'});
|
| 189 |
left: ${Math.random() * 100}%;
|
| 190 |
-
--splash-duration: ${1.
|
| 191 |
--opacity: ${0.3 + Math.random() * 0.4};
|
| 192 |
-
--y-offset: ${-
|
| 193 |
-
--final-y: ${-
|
| 194 |
-
--final-x: ${-
|
| 195 |
-
filter: blur(${
|
| 196 |
`;
|
| 197 |
impactZone.appendChild(splash);
|
| 198 |
-
setTimeout(() => splash.remove(),
|
| 199 |
}
|
| 200 |
|
| 201 |
function createRiverSwirl() {
|
| 202 |
const swirl = document.createElement('div');
|
| 203 |
swirl.className = 'water-shape river-swirl';
|
| 204 |
-
const size =
|
| 205 |
swirl.style.cssText = `
|
| 206 |
width: ${size}px;
|
| 207 |
height: ${size}px;
|
| 208 |
background: var(--water-${Math.random() > 0.5 ? 'blue' : 'white'}-${Math.random() > 0.5 ? '1' : '2'});
|
| 209 |
top: ${Math.random() * 100}%;
|
| 210 |
-
--flow-duration: ${
|
| 211 |
--opacity: ${0.3 + Math.random() * 0.4};
|
| 212 |
-
--y-pos: ${-
|
| 213 |
-
filter: blur(${
|
| 214 |
`;
|
| 215 |
river.appendChild(swirl);
|
| 216 |
-
setTimeout(() => swirl.remove(),
|
| 217 |
}
|
| 218 |
|
| 219 |
-
//
|
| 220 |
-
setInterval(createWaterfallDrop,
|
| 221 |
-
setInterval(createSplash,
|
| 222 |
-
setInterval(createRiverSwirl,
|
| 223 |
}
|
| 224 |
|
| 225 |
createWaterSystem();
|
|
|
|
| 2 |
<html>
|
| 3 |
<head>
|
| 4 |
<style>
|
| 5 |
+
/* Base styles same as before */
|
| 6 |
.scene-container {
|
| 7 |
width: 100%;
|
| 8 |
height: 800px;
|
|
|
|
| 20 |
|
| 21 |
.waterfall-container {
|
| 22 |
position: absolute;
|
| 23 |
+
left: 400px;
|
| 24 |
+
top: 200px;
|
| 25 |
+
width: 80px;
|
| 26 |
+
height: 300px;
|
| 27 |
overflow: visible;
|
| 28 |
}
|
| 29 |
|
| 30 |
.river-container {
|
| 31 |
position: absolute;
|
| 32 |
+
bottom: 100px;
|
| 33 |
+
left: 0;
|
| 34 |
+
width: 100%;
|
| 35 |
+
height: 120px;
|
| 36 |
transform: perspective(1000px) rotateX(30deg);
|
| 37 |
transform-origin: bottom;
|
| 38 |
+
overflow: hidden;
|
| 39 |
}
|
| 40 |
|
| 41 |
.impact-zone {
|
| 42 |
position: absolute;
|
| 43 |
+
left: 380px;
|
| 44 |
+
bottom: 220px;
|
| 45 |
+
width: 160px;
|
| 46 |
+
height: 80px;
|
| 47 |
overflow: visible;
|
| 48 |
}
|
| 49 |
|
|
|
|
| 53 |
opacity: 0;
|
| 54 |
}
|
| 55 |
|
| 56 |
+
/* Extended animation durations */
|
| 57 |
.waterfall-drop {
|
| 58 |
+
animation: waterfall-fall var(--fall-duration, 3s) linear infinite;
|
| 59 |
}
|
| 60 |
|
| 61 |
.impact-splash {
|
| 62 |
+
animation: splash var(--splash-duration, 2s) ease-out infinite;
|
| 63 |
}
|
| 64 |
|
| 65 |
.river-swirl {
|
| 66 |
animation: river-flow var(--flow-duration, 8s) linear infinite;
|
| 67 |
}
|
| 68 |
|
| 69 |
+
/* Adjusted keyframes for smoother transitions */
|
| 70 |
@keyframes waterfall-fall {
|
| 71 |
0% {
|
| 72 |
+
transform: translate(var(--start-x, 0), -50%) scale(1);
|
| 73 |
opacity: 0;
|
| 74 |
}
|
| 75 |
5% { opacity: var(--opacity, 0.6); }
|
| 76 |
95% { opacity: var(--opacity, 0.6); }
|
| 77 |
100% {
|
| 78 |
+
transform: translate(var(--end-x, 0), 150%) scale(var(--end-scale, 0.8));
|
| 79 |
opacity: 0;
|
| 80 |
}
|
| 81 |
}
|
|
|
|
| 85 |
transform: translate(var(--start-x, 0), 0) scale(0.2);
|
| 86 |
opacity: 0;
|
| 87 |
}
|
| 88 |
+
20% { opacity: var(--opacity, 0.6); }
|
| 89 |
+
80% { opacity: var(--opacity, 0.6); }
|
|
|
|
|
|
|
| 90 |
100% {
|
| 91 |
+
transform: translate(var(--final-x, 0), var(--final-y, 0)) scale(1.5);
|
| 92 |
opacity: 0;
|
| 93 |
}
|
| 94 |
}
|
| 95 |
|
| 96 |
@keyframes river-flow {
|
| 97 |
0% {
|
| 98 |
+
transform: translate(-100%, var(--y-pos, 0)) rotate(0deg);
|
| 99 |
opacity: 0;
|
| 100 |
}
|
| 101 |
5% { opacity: var(--opacity, 0.6); }
|
| 102 |
95% { opacity: var(--opacity, 0.6); }
|
| 103 |
100% {
|
| 104 |
+
transform: translate(200%, var(--y-pos, 0)) rotate(360deg);
|
| 105 |
opacity: 0;
|
| 106 |
}
|
| 107 |
}
|
| 108 |
|
| 109 |
+
/* Rest of the styles remain the same */
|
| 110 |
.climber {
|
| 111 |
position: absolute;
|
| 112 |
width: 40px;
|
|
|
|
| 126 |
</head>
|
| 127 |
<body>
|
| 128 |
<div class="scene-container">
|
| 129 |
+
<!-- Background and climbers remain the same -->
|
| 130 |
<svg width="100%" height="100%" viewBox="0 0 1200 800">
|
| 131 |
<path d="M0,300 L200,100 L300,250 L400,80 L500,220 L600,100 L700,240 L800,120 L1000,280 L1200,150 L1200,800 L0,800 Z"
|
| 132 |
fill="#8B4513"/>
|
| 133 |
</svg>
|
| 134 |
|
| 135 |
+
<!-- Same climbers as before -->
|
| 136 |
<svg class="climber climber1" viewBox="0 0 40 60">
|
| 137 |
<path d="M20,10 L20,35 M15,20 L25,20 M20,35 L15,50 M20,35 L25,50"
|
| 138 |
stroke="#333" stroke-width="3" stroke-linecap="round"/>
|
|
|
|
| 162 |
function createWaterfallDrop() {
|
| 163 |
const drop = document.createElement('div');
|
| 164 |
drop.className = 'water-shape waterfall-drop';
|
| 165 |
+
const size = 10 + Math.random() * 30;
|
| 166 |
drop.style.cssText = `
|
| 167 |
width: ${size}px;
|
| 168 |
height: ${size}px;
|
| 169 |
background: var(--water-${Math.random() > 0.5 ? 'blue' : 'white'}-${Math.random() > 0.5 ? '1' : '2'});
|
| 170 |
left: ${Math.random() * 100}%;
|
| 171 |
+
--fall-duration: ${2.5 + Math.random()}s;
|
| 172 |
--opacity: ${0.4 + Math.random() * 0.3};
|
| 173 |
+
--start-x: ${-10 + Math.random() * 20}px;
|
| 174 |
+
--end-x: ${-20 + Math.random() * 40}px;
|
| 175 |
+
--end-scale: ${0.6 + Math.random() * 0.4};
|
| 176 |
+
filter: blur(${1 + Math.random() * 2}px);
|
| 177 |
`;
|
| 178 |
waterfall.appendChild(drop);
|
| 179 |
+
setTimeout(() => drop.remove(), 4000); // Extended lifetime
|
| 180 |
}
|
| 181 |
|
| 182 |
function createSplash() {
|
| 183 |
const splash = document.createElement('div');
|
| 184 |
splash.className = 'water-shape impact-splash';
|
| 185 |
+
const size = 15 + Math.random() * 40;
|
| 186 |
splash.style.cssText = `
|
| 187 |
width: ${size}px;
|
| 188 |
height: ${size}px;
|
| 189 |
background: var(--water-${Math.random() > 0.5 ? 'blue' : 'white'}-${Math.random() > 0.5 ? '1' : '2'});
|
| 190 |
left: ${Math.random() * 100}%;
|
| 191 |
+
--splash-duration: ${1.8 + Math.random() * 0.4}s;
|
| 192 |
--opacity: ${0.3 + Math.random() * 0.4};
|
| 193 |
+
--y-offset: ${-10 - Math.random() * 20}px;
|
| 194 |
+
--final-y: ${-20 - Math.random() * 30}px;
|
| 195 |
+
--final-x: ${-30 + Math.random() * 60}px;
|
| 196 |
+
filter: blur(${2 + Math.random() * 2}px);
|
| 197 |
`;
|
| 198 |
impactZone.appendChild(splash);
|
| 199 |
+
setTimeout(() => splash.remove(), 3000); // Extended lifetime
|
| 200 |
}
|
| 201 |
|
| 202 |
function createRiverSwirl() {
|
| 203 |
const swirl = document.createElement('div');
|
| 204 |
swirl.className = 'water-shape river-swirl';
|
| 205 |
+
const size = 20 + Math.random() * 50;
|
| 206 |
swirl.style.cssText = `
|
| 207 |
width: ${size}px;
|
| 208 |
height: ${size}px;
|
| 209 |
background: var(--water-${Math.random() > 0.5 ? 'blue' : 'white'}-${Math.random() > 0.5 ? '1' : '2'});
|
| 210 |
top: ${Math.random() * 100}%;
|
| 211 |
+
--flow-duration: ${7 + Math.random() * 3}s;
|
| 212 |
--opacity: ${0.3 + Math.random() * 0.4};
|
| 213 |
+
--y-pos: ${-20 + Math.random() * 40}px;
|
| 214 |
+
filter: blur(${1 + Math.random() * 3}px);
|
| 215 |
`;
|
| 216 |
river.appendChild(swirl);
|
| 217 |
+
setTimeout(() => swirl.remove(), 10000); // Extended lifetime
|
| 218 |
}
|
| 219 |
|
| 220 |
+
// Slightly increased generation frequency
|
| 221 |
+
setInterval(createWaterfallDrop, 100);
|
| 222 |
+
setInterval(createSplash, 150);
|
| 223 |
+
setInterval(createRiverSwirl, 200);
|
| 224 |
}
|
| 225 |
|
| 226 |
createWaterSystem();
|