Add 3 files
Browse files- README.md +7 -5
- index.html +766 -19
- prompts.txt +4 -0
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: flowers
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: purple
|
| 5 |
+
colorTo: blue
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,766 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Flower Wisdom Spinner</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
|
| 9 |
+
<style>
|
| 10 |
+
body {
|
| 11 |
+
margin: 0;
|
| 12 |
+
overflow: hidden;
|
| 13 |
+
font-family: 'Courier New', monospace;
|
| 14 |
+
cursor: grab;
|
| 15 |
+
user-select: none;
|
| 16 |
+
background: linear-gradient(135deg, #000428, #004e92);
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
#spinner-container {
|
| 20 |
+
position: fixed;
|
| 21 |
+
width: 100%;
|
| 22 |
+
height: 100%;
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
#ui-overlay {
|
| 26 |
+
position: fixed;
|
| 27 |
+
top: 0;
|
| 28 |
+
left: 0;
|
| 29 |
+
width: 100%;
|
| 30 |
+
height: 100%;
|
| 31 |
+
pointer-events: none;
|
| 32 |
+
z-index: 100;
|
| 33 |
+
color: white;
|
| 34 |
+
padding: 2rem;
|
| 35 |
+
box-sizing: border-box;
|
| 36 |
+
display: flex;
|
| 37 |
+
flex-direction: column;
|
| 38 |
+
align-items: center;
|
| 39 |
+
justify-content: center;
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
.title {
|
| 43 |
+
font-size: 2.5rem;
|
| 44 |
+
margin-bottom: 1rem;
|
| 45 |
+
text-shadow: 0 0 10px rgba(255,255,255,0.5);
|
| 46 |
+
background: linear-gradient(to right, #fbc2eb, #a6c1ee);
|
| 47 |
+
-webkit-background-clip: text;
|
| 48 |
+
-webkit-text-fill-color: transparent;
|
| 49 |
+
animation: pulse 2s infinite;
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
@keyframes pulse {
|
| 53 |
+
0% { transform: scale(1); }
|
| 54 |
+
50% { transform: scale(1.05); }
|
| 55 |
+
100% { transform: scale(1); }
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
.subtitle {
|
| 59 |
+
font-size: 1rem;
|
| 60 |
+
margin-bottom: 2rem;
|
| 61 |
+
color: rgba(255,255,255,0.7);
|
| 62 |
+
max-width: 500px;
|
| 63 |
+
text-align: center;
|
| 64 |
+
line-height: 1.5;
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
#wisdom-container {
|
| 68 |
+
position: fixed;
|
| 69 |
+
bottom: 2rem;
|
| 70 |
+
left: 50%;
|
| 71 |
+
transform: translateX(-50%);
|
| 72 |
+
width: 80%;
|
| 73 |
+
max-width: 600px;
|
| 74 |
+
max-height: 200px;
|
| 75 |
+
overflow-y: auto;
|
| 76 |
+
background: rgba(0, 0, 0, 0.5);
|
| 77 |
+
border: 1px solid rgba(255,255,255,0.2);
|
| 78 |
+
border-radius: 1rem;
|
| 79 |
+
padding: 1rem;
|
| 80 |
+
backdrop-filter: blur(10px);
|
| 81 |
+
display: flex;
|
| 82 |
+
flex-direction: column;
|
| 83 |
+
align-items: center;
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
.wisdom-bubble {
|
| 87 |
+
background: rgba(255,255,255,0.1);
|
| 88 |
+
border-radius: 1rem;
|
| 89 |
+
padding: 0.8rem 1.2rem;
|
| 90 |
+
margin-bottom: 0.8rem;
|
| 91 |
+
animation: fadeIn 0.5s ease-out;
|
| 92 |
+
border: 1px solid rgba(255,255,255,0.2);
|
| 93 |
+
width: 90%;
|
| 94 |
+
text-align: center;
|
| 95 |
+
font-style: italic;
|
| 96 |
+
color: #fff;
|
| 97 |
+
position: relative;
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
+
.wisdom-bubble::before {
|
| 101 |
+
content: "❝";
|
| 102 |
+
position: absolute;
|
| 103 |
+
left: 0.5rem;
|
| 104 |
+
top: 0.5rem;
|
| 105 |
+
font-size: 1.5rem;
|
| 106 |
+
opacity: 0.5;
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
.wisdom-bubble::after {
|
| 110 |
+
content: "❞";
|
| 111 |
+
position: absolute;
|
| 112 |
+
right: 0.5rem;
|
| 113 |
+
bottom: 0.5rem;
|
| 114 |
+
font-size: 1.5rem;
|
| 115 |
+
opacity: 0.5;
|
| 116 |
+
}
|
| 117 |
+
|
| 118 |
+
@keyframes fadeIn {
|
| 119 |
+
from { opacity: 0; transform: translateY(10px); }
|
| 120 |
+
to { opacity: 1; transform: translateY(0); }
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
.control-btn {
|
| 124 |
+
position: fixed;
|
| 125 |
+
width: 80px;
|
| 126 |
+
height: 80px;
|
| 127 |
+
border-radius: 50%;
|
| 128 |
+
background: rgba(255,255,255,0.1);
|
| 129 |
+
border: 2px solid rgba(255,255,255,0.3);
|
| 130 |
+
backdrop-filter: blur(5px);
|
| 131 |
+
pointer-events: auto;
|
| 132 |
+
cursor: pointer;
|
| 133 |
+
display: flex;
|
| 134 |
+
align-items: center;
|
| 135 |
+
justify-content: center;
|
| 136 |
+
color: white;
|
| 137 |
+
font-size: 0.8rem;
|
| 138 |
+
text-align: center;
|
| 139 |
+
transition: all 0.3s;
|
| 140 |
+
z-index: 200;
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
.control-btn:hover {
|
| 144 |
+
background: rgba(255,255,255,0.2);
|
| 145 |
+
transform: scale(1.1);
|
| 146 |
+
}
|
| 147 |
+
|
| 148 |
+
#color-btn {
|
| 149 |
+
bottom: 12rem;
|
| 150 |
+
left: 2rem;
|
| 151 |
+
}
|
| 152 |
+
|
| 153 |
+
#reset-btn {
|
| 154 |
+
bottom: 2rem;
|
| 155 |
+
right: 2rem;
|
| 156 |
+
}
|
| 157 |
+
|
| 158 |
+
#speed-indicator {
|
| 159 |
+
position: fixed;
|
| 160 |
+
bottom: 12rem;
|
| 161 |
+
right: 2rem;
|
| 162 |
+
width: 80px;
|
| 163 |
+
height: 80px;
|
| 164 |
+
border-radius: 50%;
|
| 165 |
+
background: rgba(255,255,255,0.1);
|
| 166 |
+
border: 2px solid rgba(255,255,255,0.3);
|
| 167 |
+
backdrop-filter: blur(5px);
|
| 168 |
+
display: flex;
|
| 169 |
+
flex-direction: column;
|
| 170 |
+
align-items: center;
|
| 171 |
+
justify-content: center;
|
| 172 |
+
color: white;
|
| 173 |
+
font-size: 0.9rem;
|
| 174 |
+
}
|
| 175 |
+
|
| 176 |
+
#speed-value {
|
| 177 |
+
font-size: 1.2rem;
|
| 178 |
+
font-weight: bold;
|
| 179 |
+
margin-top: 0.2rem;
|
| 180 |
+
}
|
| 181 |
+
|
| 182 |
+
.particle {
|
| 183 |
+
position: absolute;
|
| 184 |
+
width: 10px;
|
| 185 |
+
height: 10px;
|
| 186 |
+
border-radius: 50%;
|
| 187 |
+
pointer-events: none;
|
| 188 |
+
z-index: 10;
|
| 189 |
+
}
|
| 190 |
+
</style>
|
| 191 |
+
</head>
|
| 192 |
+
<body>
|
| 193 |
+
<div id="spinner-container"></div>
|
| 194 |
+
|
| 195 |
+
<div id="ui-overlay">
|
| 196 |
+
<div class="title">FLOWER OF WISDOM</div>
|
| 197 |
+
<div class="subtitle">Spin the flower to release petals of Kabir's wisdom. The faster you spin, the more wisdom blossoms.</div>
|
| 198 |
+
</div>
|
| 199 |
+
|
| 200 |
+
<div id="wisdom-container">
|
| 201 |
+
<div class="wisdom-bubble">"Between the conscious and the unconscious, the mind has put up a swing."</div>
|
| 202 |
+
</div>
|
| 203 |
+
|
| 204 |
+
<div class="control-btn" id="color-btn">CHANGE<br>FLOWER</div>
|
| 205 |
+
<div class="control-btn" id="reset-btn">RESET</div>
|
| 206 |
+
|
| 207 |
+
<div id="speed-indicator">
|
| 208 |
+
<div>SPEED</div>
|
| 209 |
+
<div id="speed-value">0%</div>
|
| 210 |
+
</div>
|
| 211 |
+
|
| 212 |
+
<script>
|
| 213 |
+
// Flower Wisdom Spinner
|
| 214 |
+
const container = document.getElementById('spinner-container');
|
| 215 |
+
const width = container.clientWidth;
|
| 216 |
+
const height = container.clientHeight;
|
| 217 |
+
|
| 218 |
+
// Create scene
|
| 219 |
+
const scene = new THREE.Scene();
|
| 220 |
+
scene.background = new THREE.Color(0x000428);
|
| 221 |
+
|
| 222 |
+
// Camera
|
| 223 |
+
const camera = new THREE.PerspectiveCamera(75, width / height, 0.1, 1000);
|
| 224 |
+
camera.position.z = 5;
|
| 225 |
+
|
| 226 |
+
// Renderer
|
| 227 |
+
const renderer = new THREE.WebGLRenderer({ antialias: true });
|
| 228 |
+
renderer.setSize(width, height);
|
| 229 |
+
renderer.setPixelRatio(window.devicePixelRatio);
|
| 230 |
+
container.appendChild(renderer.domElement);
|
| 231 |
+
|
| 232 |
+
// Add bloom effect for glowing flowers
|
| 233 |
+
const bloomParams = {
|
| 234 |
+
exposure: 1,
|
| 235 |
+
bloomStrength: 1.5,
|
| 236 |
+
bloomThreshold: 0,
|
| 237 |
+
bloomRadius: 0.5
|
| 238 |
+
};
|
| 239 |
+
|
| 240 |
+
// Lights
|
| 241 |
+
const ambientLight = new THREE.AmbientLight(0x404040);
|
| 242 |
+
scene.add(ambientLight);
|
| 243 |
+
|
| 244 |
+
const directionalLight = new THREE.DirectionalLight(0xffffff, 1);
|
| 245 |
+
directionalLight.position.set(1, 1, 1);
|
| 246 |
+
scene.add(directionalLight);
|
| 247 |
+
|
| 248 |
+
// Create the flower spinner
|
| 249 |
+
let flower;
|
| 250 |
+
let flowerSpeed = 0;
|
| 251 |
+
let maxSpeed = 30;
|
| 252 |
+
let isDragging = false;
|
| 253 |
+
let previousMousePosition = { x: 0, y: 0 };
|
| 254 |
+
let currentColor = 0xff69b4; // Start with pink
|
| 255 |
+
let colorChangeInterval;
|
| 256 |
+
let lastWisdomDropTime = 0;
|
| 257 |
+
let wisdomDropped = false;
|
| 258 |
+
let particles = [];
|
| 259 |
+
let particleSystem;
|
| 260 |
+
|
| 261 |
+
// Flower colors
|
| 262 |
+
const flowerColors = [
|
| 263 |
+
0xff69b4, // Hot pink
|
| 264 |
+
0x9370db, // Medium purple
|
| 265 |
+
0xffa500, // Orange
|
| 266 |
+
0x32cd32, // Lime green
|
| 267 |
+
0x00bfff, // Deep sky blue
|
| 268 |
+
0xff6347, // Tomato
|
| 269 |
+
0xda70d6, // Orchid
|
| 270 |
+
0x20b2aa // Light sea green
|
| 271 |
+
];
|
| 272 |
+
|
| 273 |
+
// Kabir's wisdom sayings
|
| 274 |
+
const kabirWisdom = [
|
| 275 |
+
"Between the conscious and the unconscious, the mind has put up a swing.",
|
| 276 |
+
"The river that flows in you also flows in me.",
|
| 277 |
+
"When the drop merges into the ocean, who can find it?",
|
| 278 |
+
"The guest is inside you, and also inside me.",
|
| 279 |
+
"Wherever you are is the entry point.",
|
| 280 |
+
"The truth was a mirror in the hands of God. It fell, and broke into pieces.",
|
| 281 |
+
"I laugh when I hear that the fish in the water is thirsty.",
|
| 282 |
+
"The moon shines in my body, but my blind eyes cannot see it.",
|
| 283 |
+
"What you are searching for is seeking you.",
|
| 284 |
+
"If you don't break your ropes while you're alive, do you think ghosts will do it after?",
|
| 285 |
+
"The water in the vessel is sparkling; the water in the sea is dark.",
|
| 286 |
+
"When you really look for me, you will see me instantly.",
|
| 287 |
+
"The lane of love is narrow—there is room for only one.",
|
| 288 |
+
"What is seen is not the Truth; what is unseen is not a lie.",
|
| 289 |
+
"The flute of the infinite is played without ceasing."
|
| 290 |
+
];
|
| 291 |
+
|
| 292 |
+
// Create flower geometry
|
| 293 |
+
function createFlowerPetal() {
|
| 294 |
+
const shape = new THREE.Shape();
|
| 295 |
+
const x = 0, y = 0;
|
| 296 |
+
|
| 297 |
+
shape.moveTo(x, y);
|
| 298 |
+
shape.bezierCurveTo(x + 0.5, y + 0.5, x + 1, y + 0.8, x + 1.5, y);
|
| 299 |
+
shape.bezierCurveTo(x + 1, y - 0.8, x + 0.5, y - 0.5, x, y);
|
| 300 |
+
|
| 301 |
+
const extrudeSettings = {
|
| 302 |
+
steps: 1,
|
| 303 |
+
depth: 0.1,
|
| 304 |
+
bevelEnabled: true,
|
| 305 |
+
bevelThickness: 0.1,
|
| 306 |
+
bevelSize: 0.1,
|
| 307 |
+
bevelSegments: 8
|
| 308 |
+
};
|
| 309 |
+
|
| 310 |
+
return new THREE.ExtrudeGeometry(shape, extrudeSettings);
|
| 311 |
+
}
|
| 312 |
+
|
| 313 |
+
// Create small flower particle
|
| 314 |
+
function createSmallFlower() {
|
| 315 |
+
const group = new THREE.Group();
|
| 316 |
+
|
| 317 |
+
// Center of small flower
|
| 318 |
+
const centerGeo = new THREE.SphereGeometry(0.05, 16, 16);
|
| 319 |
+
const centerMat = new THREE.MeshPhongMaterial({
|
| 320 |
+
color: 0xffff00,
|
| 321 |
+
emissive: 0xffff00,
|
| 322 |
+
emissiveIntensity: 0.5
|
| 323 |
+
});
|
| 324 |
+
const center = new THREE.Mesh(centerGeo, centerMat);
|
| 325 |
+
group.add(center);
|
| 326 |
+
|
| 327 |
+
// Create 5 simple petals
|
| 328 |
+
const petalGeo = new THREE.ConeGeometry(0.1, 0.2, 4, 1);
|
| 329 |
+
const petalMat = new THREE.MeshPhongMaterial({
|
| 330 |
+
color: currentColor,
|
| 331 |
+
emissive: currentColor,
|
| 332 |
+
emissiveIntensity: 0.3,
|
| 333 |
+
flatShading: true
|
| 334 |
+
});
|
| 335 |
+
|
| 336 |
+
for (let i = 0; i < 5; i++) {
|
| 337 |
+
const petal = new THREE.Mesh(petalGeo, petalMat);
|
| 338 |
+
petal.rotation.z = (i * Math.PI * 2) / 5;
|
| 339 |
+
petal.position.x = Math.cos(petal.rotation.z) * 0.15;
|
| 340 |
+
petal.position.y = Math.sin(petal.rotation.z) * 0.15;
|
| 341 |
+
petal.rotation.x = Math.PI / 2;
|
| 342 |
+
group.add(petal);
|
| 343 |
+
}
|
| 344 |
+
|
| 345 |
+
return group;
|
| 346 |
+
}
|
| 347 |
+
|
| 348 |
+
// Create the main flower spinner
|
| 349 |
+
function createFlowerSpinner() {
|
| 350 |
+
const group = new THREE.Group();
|
| 351 |
+
|
| 352 |
+
// Flower center
|
| 353 |
+
const centerGeometry = new THREE.SphereGeometry(0.4, 32, 32);
|
| 354 |
+
const centerMaterial = new THREE.MeshPhongMaterial({
|
| 355 |
+
color: 0xffff00,
|
| 356 |
+
emissive: 0xffff00,
|
| 357 |
+
emissiveIntensity: 0.8,
|
| 358 |
+
shininess: 100
|
| 359 |
+
});
|
| 360 |
+
const center = new THREE.Mesh(centerGeometry, centerMaterial);
|
| 361 |
+
group.add(center);
|
| 362 |
+
|
| 363 |
+
// Create petals
|
| 364 |
+
const petalGeometry = createFlowerPetal();
|
| 365 |
+
const petalMaterial = new THREE.MeshPhongMaterial({
|
| 366 |
+
color: currentColor,
|
| 367 |
+
emissive: currentColor,
|
| 368 |
+
emissiveIntensity: 0.5,
|
| 369 |
+
side: THREE.DoubleSide,
|
| 370 |
+
specular: 0xffffff,
|
| 371 |
+
shininess: 30
|
| 372 |
+
});
|
| 373 |
+
|
| 374 |
+
// Create 8 petals in a circle
|
| 375 |
+
for (let i = 0; i < 8; i++) {
|
| 376 |
+
const petal = new THREE.Mesh(petalGeometry, petalMaterial);
|
| 377 |
+
petal.rotation.z = (i * Math.PI * 2) / 8;
|
| 378 |
+
petal.position.x = Math.cos(petal.rotation.z) * 0.8;
|
| 379 |
+
petal.position.y = Math.sin(petal.rotation.z) * 0.8;
|
| 380 |
+
group.add(petal);
|
| 381 |
+
|
| 382 |
+
// Add some details to petals
|
| 383 |
+
const lineGeometry = new THREE.BufferGeometry().setFromPoints([
|
| 384 |
+
new THREE.Vector3(0, 0, 0),
|
| 385 |
+
new THREE.Vector3(1.5, 0, 0)
|
| 386 |
+
]);
|
| 387 |
+
const lineMaterial = new THREE.LineBasicMaterial({
|
| 388 |
+
color: 0xffff00,
|
| 389 |
+
linewidth: 2
|
| 390 |
+
});
|
| 391 |
+
const line = new THREE.Line(lineGeometry, lineMaterial);
|
| 392 |
+
line.position.x = Math.cos(petal.rotation.z) * 0.8;
|
| 393 |
+
line.position.y = Math.sin(petal.rotation.z) * 0.8;
|
| 394 |
+
line.rotation.z = petal.rotation.z;
|
| 395 |
+
line.scale.set(0.7, 0.7, 0.7);
|
| 396 |
+
group.add(line);
|
| 397 |
+
}
|
| 398 |
+
|
| 399 |
+
// Add some leaves at the bottom
|
| 400 |
+
const leafGeometry = new THREE.ConeGeometry(0.3, 0.8, 4, 1);
|
| 401 |
+
const leafMaterial = new THREE.MeshPhongMaterial({
|
| 402 |
+
color: 0x32cd32,
|
| 403 |
+
emissive: 0x228b22,
|
| 404 |
+
emissiveIntensity: 0.3
|
| 405 |
+
});
|
| 406 |
+
|
| 407 |
+
for (let i = 0; i < 3; i++) {
|
| 408 |
+
const leaf = new THREE.Mesh(leafGeometry, leafMaterial);
|
| 409 |
+
leaf.rotation.z = (i * Math.PI * 2) / 3;
|
| 410 |
+
leaf.rotation.x = Math.PI / 2;
|
| 411 |
+
leaf.position.y = -0.8;
|
| 412 |
+
group.add(leaf);
|
| 413 |
+
}
|
| 414 |
+
|
| 415 |
+
return group;
|
| 416 |
+
}
|
| 417 |
+
|
| 418 |
+
flower = createFlowerSpinner();
|
| 419 |
+
scene.add(flower);
|
| 420 |
+
|
| 421 |
+
// Create particle system for floating petals
|
| 422 |
+
function createParticleSystem() {
|
| 423 |
+
const particles = [];
|
| 424 |
+
const particleCount = 100;
|
| 425 |
+
|
| 426 |
+
for (let i = 0; i < particleCount; i++) {
|
| 427 |
+
const particle = createSmallFlower();
|
| 428 |
+
|
| 429 |
+
// Random position in a sphere
|
| 430 |
+
const radius = 5 * Math.random() * 0.5;
|
| 431 |
+
const theta = Math.random() * Math.PI * 2;
|
| 432 |
+
const phi = Math.random() * Math.PI * 2;
|
| 433 |
+
|
| 434 |
+
particle.position.x = radius * Math.sin(theta) * Math.cos(phi);
|
| 435 |
+
particle.position.y = radius * Math.sin(theta) * Math.sin(phi);
|
| 436 |
+
particle.position.z = radius * Math.cos(theta);
|
| 437 |
+
|
| 438 |
+
// Random scale and rotation
|
| 439 |
+
const scale = 0.2 + Math.random() * 0.3;
|
| 440 |
+
particle.scale.set(scale, scale, scale);
|
| 441 |
+
particle.rotation.set(
|
| 442 |
+
Math.random() * Math.PI,
|
| 443 |
+
Math.random() * Math.PI,
|
| 444 |
+
Math.random() * Math.PI
|
| 445 |
+
);
|
| 446 |
+
|
| 447 |
+
// Store velocity for animation
|
| 448 |
+
particle.userData = {
|
| 449 |
+
velocity: new THREE.Vector3(
|
| 450 |
+
(Math.random() - 0.5) * 0.01,
|
| 451 |
+
(Math.random() - 0.5) * 0.01,
|
| 452 |
+
(Math.random() - 0.5) * 0.01
|
| 453 |
+
),
|
| 454 |
+
rotationSpeed: new THREE.Vector3(
|
| 455 |
+
(Math.random() - 0.5) * 0.01,
|
| 456 |
+
(Math.random() - 0.5) * 0.01,
|
| 457 |
+
(Math.random() - 0.5) * 0.01
|
| 458 |
+
)
|
| 459 |
+
};
|
| 460 |
+
|
| 461 |
+
particles.push(particle);
|
| 462 |
+
}
|
| 463 |
+
|
| 464 |
+
return particles;
|
| 465 |
+
}
|
| 466 |
+
|
| 467 |
+
// Initialize particle system
|
| 468 |
+
particleSystem = createParticleSystem();
|
| 469 |
+
particleSystem.forEach(particle => scene.add(particle));
|
| 470 |
+
|
| 471 |
+
// Handle window resize
|
| 472 |
+
window.addEventListener('resize', () => {
|
| 473 |
+
const newWidth = container.clientWidth;
|
| 474 |
+
const newHeight = container.clientHeight;
|
| 475 |
+
|
| 476 |
+
camera.aspect = newWidth / newHeight;
|
| 477 |
+
camera.updateProjectionMatrix();
|
| 478 |
+
|
| 479 |
+
renderer.setSize(newWidth, newHeight);
|
| 480 |
+
});
|
| 481 |
+
|
| 482 |
+
// Emit flower particles from the spinner
|
| 483 |
+
function emitParticles() {
|
| 484 |
+
const speedPercent = (Math.abs(flowerSpeed) / maxSpeed) * 100;
|
| 485 |
+
|
| 486 |
+
if (speedPercent > 30) {
|
| 487 |
+
const particlesToEmit = Math.floor(speedPercent / 20);
|
| 488 |
+
|
| 489 |
+
for (let i = 0; i < particlesToEmit; i++) {
|
| 490 |
+
const particle = createSmallFlower();
|
| 491 |
+
|
| 492 |
+
// Position near the edge of the flower
|
| 493 |
+
const angle = Math.random() * Math.PI * 2;
|
| 494 |
+
const distance = 1.5 + Math.random() * 0.5;
|
| 495 |
+
|
| 496 |
+
particle.position.x = Math.cos(angle) * distance;
|
| 497 |
+
particle.position.y = Math.sin(angle) * distance;
|
| 498 |
+
|
| 499 |
+
// Random scale
|
| 500 |
+
const scale = 0.1 + Math.random() * 0.2;
|
| 501 |
+
particle.scale.set(scale, scale, scale);
|
| 502 |
+
|
| 503 |
+
// Random velocity away from center
|
| 504 |
+
particle.userData = {
|
| 505 |
+
velocity: new THREE.Vector3(
|
| 506 |
+
Math.cos(angle) * 0.02,
|
| 507 |
+
Math.sin(angle) * 0.02,
|
| 508 |
+
(Math.random() - 0.5) * 0.01
|
| 509 |
+
),
|
| 510 |
+
rotationSpeed: new THREE.Vector3(
|
| 511 |
+
(Math.random() - 0.5) * 0.02,
|
| 512 |
+
(Math.random() - 0.5) * 0.02,
|
| 513 |
+
(Math.random() - 0.5) * 0.02
|
| 514 |
+
),
|
| 515 |
+
lifetime: 100 + Math.random() * 100
|
| 516 |
+
};
|
| 517 |
+
|
| 518 |
+
scene.add(particle);
|
| 519 |
+
particleSystem.push(particle);
|
| 520 |
+
}
|
| 521 |
+
}
|
| 522 |
+
}
|
| 523 |
+
|
| 524 |
+
// Update particles
|
| 525 |
+
function updateParticles() {
|
| 526 |
+
for (let i = particleSystem.length - 1; i >= 0; i--) {
|
| 527 |
+
const particle = particleSystem[i];
|
| 528 |
+
|
| 529 |
+
// Apply velocity
|
| 530 |
+
particle.position.add(particle.userData.velocity);
|
| 531 |
+
|
| 532 |
+
// Apply rotation
|
| 533 |
+
particle.rotation.x += particle.userData.rotationSpeed.x;
|
| 534 |
+
particle.rotation.y += particle.userData.rotationSpeed.y;
|
| 535 |
+
particle.rotation.z += particle.userData.rotationSpeed.z;
|
| 536 |
+
|
| 537 |
+
// Decrease lifetime
|
| 538 |
+
if (particle.userData.lifetime !== undefined) {
|
| 539 |
+
particle.userData.lifetime--;
|
| 540 |
+
|
| 541 |
+
// Fade out
|
| 542 |
+
if (particle.userData.lifetime < 30) {
|
| 543 |
+
particle.children.forEach(child => {
|
| 544 |
+
if (child.material) {
|
| 545 |
+
child.material.opacity = particle.userData.lifetime / 30;
|
| 546 |
+
}
|
| 547 |
+
});
|
| 548 |
+
}
|
| 549 |
+
|
| 550 |
+
// Remove when lifetime expires
|
| 551 |
+
if (particle.userData.lifetime <= 0) {
|
| 552 |
+
scene.remove(particle);
|
| 553 |
+
particleSystem.splice(i, 1);
|
| 554 |
+
}
|
| 555 |
+
}
|
| 556 |
+
|
| 557 |
+
// Remove if too far away
|
| 558 |
+
if (particle.position.length() > 10) {
|
| 559 |
+
scene.remove(particle);
|
| 560 |
+
particleSystem.splice(i, 1);
|
| 561 |
+
}
|
| 562 |
+
}
|
| 563 |
+
}
|
| 564 |
+
|
| 565 |
+
// Drop wisdom when spinner reaches certain speed
|
| 566 |
+
function dropWisdom() {
|
| 567 |
+
const now = Date.now();
|
| 568 |
+
const speedPercent = (Math.abs(flowerSpeed) / maxSpeed) * 100;
|
| 569 |
+
|
| 570 |
+
// Only drop wisdom if spinning fast enough and not recently
|
| 571 |
+
if (speedPercent > 50 && (now - lastWisdomDropTime > 3000 || !wisdomDropped)) {
|
| 572 |
+
const wisdom = kabirWisdom[Math.floor(Math.random() * kabirWisdom.length)];
|
| 573 |
+
|
| 574 |
+
const bubble = document.createElement('div');
|
| 575 |
+
bubble.className = 'wisdom-bubble';
|
| 576 |
+
bubble.textContent = wisdom;
|
| 577 |
+
|
| 578 |
+
const container = document.getElementById('wisdom-container');
|
| 579 |
+
container.insertBefore(bubble, container.firstChild);
|
| 580 |
+
|
| 581 |
+
// Limit number of wisdom bubbles
|
| 582 |
+
if (container.children.length > 5) {
|
| 583 |
+
container.removeChild(container.lastChild);
|
| 584 |
+
}
|
| 585 |
+
|
| 586 |
+
lastWisdomDropTime = now;
|
| 587 |
+
wisdomDropped = true;
|
| 588 |
+
|
| 589 |
+
// Flash the flower color when wisdom drops
|
| 590 |
+
const originalColor = currentColor;
|
| 591 |
+
currentColor = 0xffffff;
|
| 592 |
+
scene.remove(flower);
|
| 593 |
+
flower = createFlowerSpinner();
|
| 594 |
+
scene.add(flower);
|
| 595 |
+
|
| 596 |
+
setTimeout(() => {
|
| 597 |
+
currentColor = originalColor;
|
| 598 |
+
scene.remove(flower);
|
| 599 |
+
flower = createFlowerSpinner();
|
| 600 |
+
scene.add(flower);
|
| 601 |
+
}, 200);
|
| 602 |
+
} else if (speedPercent < 30) {
|
| 603 |
+
wisdomDropped = false;
|
| 604 |
+
}
|
| 605 |
+
}
|
| 606 |
+
|
| 607 |
+
// Update speed indicator
|
| 608 |
+
function updateSpeedIndicator() {
|
| 609 |
+
const speedPercent = (Math.abs(flowerSpeed) / maxSpeed) * 100;
|
| 610 |
+
document.getElementById('speed-value').textContent = Math.floor(speedPercent) + '%';
|
| 611 |
+
|
| 612 |
+
// Change color based on speed
|
| 613 |
+
const speedIndicator = document.getElementById('speed-indicator');
|
| 614 |
+
if (speedPercent > 70) {
|
| 615 |
+
speedIndicator.style.background = 'rgba(255, 50, 50, 0.3)';
|
| 616 |
+
speedIndicator.style.borderColor = 'rgba(255, 100, 100, 0.5)';
|
| 617 |
+
} else if (speedPercent > 40) {
|
| 618 |
+
speedIndicator.style.background = 'rgba(255, 165, 0, 0.3)';
|
| 619 |
+
speedIndicator.style.borderColor = 'rgba(255, 200, 0, 0.5)';
|
| 620 |
+
} else {
|
| 621 |
+
speedIndicator.style.background = 'rgba(255, 255, 255, 0.1)';
|
| 622 |
+
speedIndicator.style.borderColor = 'rgba(255, 255, 255, 0.3)';
|
| 623 |
+
}
|
| 624 |
+
}
|
| 625 |
+
|
| 626 |
+
// Animation loop
|
| 627 |
+
function animate() {
|
| 628 |
+
requestAnimationFrame(animate);
|
| 629 |
+
|
| 630 |
+
// Rotate flower based on speed
|
| 631 |
+
flower.rotation.z += flowerSpeed;
|
| 632 |
+
|
| 633 |
+
// Apply friction
|
| 634 |
+
if (!isDragging) {
|
| 635 |
+
flowerSpeed *= 0.98;
|
| 636 |
+
if (Math.abs(flowerSpeed) < 0.001) flowerSpeed = 0;
|
| 637 |
+
}
|
| 638 |
+
|
| 639 |
+
// Emit particles, drop wisdom and update UI
|
| 640 |
+
emitParticles();
|
| 641 |
+
updateParticles();
|
| 642 |
+
dropWisdom();
|
| 643 |
+
updateSpeedIndicator();
|
| 644 |
+
|
| 645 |
+
// Make the flower "breathe" when idle
|
| 646 |
+
if (Math.abs(flowerSpeed) < 0.5) {
|
| 647 |
+
const pulse = Math.sin(Date.now() * 0.002) * 0.05 + 1;
|
| 648 |
+
flower.scale.set(pulse, pulse, pulse);
|
| 649 |
+
} else {
|
| 650 |
+
flower.scale.set(1, 1, 1);
|
| 651 |
+
}
|
| 652 |
+
|
| 653 |
+
renderer.render(scene, camera);
|
| 654 |
+
}
|
| 655 |
+
|
| 656 |
+
animate();
|
| 657 |
+
|
| 658 |
+
// Mouse/touch interaction
|
| 659 |
+
container.addEventListener('mousedown', (e) => {
|
| 660 |
+
isDragging = true;
|
| 661 |
+
previousMousePosition = { x: e.clientX, y: e.clientY };
|
| 662 |
+
container.style.cursor = 'grabbing';
|
| 663 |
+
});
|
| 664 |
+
|
| 665 |
+
window.addEventListener('mouseup', () => {
|
| 666 |
+
isDragging = false;
|
| 667 |
+
container.style.cursor = 'grab';
|
| 668 |
+
});
|
| 669 |
+
|
| 670 |
+
container.addEventListener('mousemove', (e) => {
|
| 671 |
+
if (isDragging) {
|
| 672 |
+
const deltaMove = { x: e.clientX - previousMousePosition.x };
|
| 673 |
+
|
| 674 |
+
// Calculate speed based on mouse movement
|
| 675 |
+
flowerSpeed = deltaMove.x * 0.02;
|
| 676 |
+
flowerSpeed = Math.min(Math.max(flowerSpeed, -maxSpeed), maxSpeed);
|
| 677 |
+
|
| 678 |
+
previousMousePosition = { x: e.clientX, y: e.clientY };
|
| 679 |
+
}
|
| 680 |
+
});
|
| 681 |
+
|
| 682 |
+
// Touch support
|
| 683 |
+
container.addEventListener('touchstart', (e) => {
|
| 684 |
+
isDragging = true;
|
| 685 |
+
previousMousePosition = { x: e.touches[0].clientX, y: e.touches[0].clientY };
|
| 686 |
+
container.style.cursor = 'grabbing';
|
| 687 |
+
e.preventDefault();
|
| 688 |
+
});
|
| 689 |
+
|
| 690 |
+
window.addEventListener('touchend', () => {
|
| 691 |
+
isDragging = false;
|
| 692 |
+
container.style.cursor = 'grab';
|
| 693 |
+
});
|
| 694 |
+
|
| 695 |
+
container.addEventListener('touchmove', (e) => {
|
| 696 |
+
if (isDragging) {
|
| 697 |
+
const deltaMove = { x: e.touches[0].clientX - previousMousePosition.x };
|
| 698 |
+
|
| 699 |
+
// Calculate speed based on touch movement
|
| 700 |
+
flowerSpeed = deltaMove.x * 0.03;
|
| 701 |
+
flowerSpeed = Math.min(Math.max(flowerSpeed, -maxSpeed), maxSpeed);
|
| 702 |
+
|
| 703 |
+
previousMousePosition = { x: e.touches[0].clientX, y: e.touches[0].clientY };
|
| 704 |
+
e.preventDefault();
|
| 705 |
+
}
|
| 706 |
+
});
|
| 707 |
+
|
| 708 |
+
// Color change button
|
| 709 |
+
document.getElementById('color-btn').addEventListener('click', () => {
|
| 710 |
+
// Get a random color different from current
|
| 711 |
+
let newColor;
|
| 712 |
+
do {
|
| 713 |
+
newColor = flowerColors[Math.floor(Math.random() * flowerColors.length)];
|
| 714 |
+
} while (newColor === currentColor);
|
| 715 |
+
|
| 716 |
+
currentColor = newColor;
|
| 717 |
+
|
| 718 |
+
// Remove old flower
|
| 719 |
+
scene.remove(flower);
|
| 720 |
+
|
| 721 |
+
// Create new flower with new color
|
| 722 |
+
flower = createFlowerSpinner();
|
| 723 |
+
scene.add(flower);
|
| 724 |
+
|
| 725 |
+
// Also update particle colors
|
| 726 |
+
particleSystem.forEach(particle => {
|
| 727 |
+
particle.children.forEach(child => {
|
| 728 |
+
if (child.material && child.material.color) {
|
| 729 |
+
if (child.material.color.getHex() !== 0xffff00) { // Not the yellow center
|
| 730 |
+
child.material.color.setHex(currentColor);
|
| 731 |
+
child.material.emissive.setHex(currentColor);
|
| 732 |
+
}
|
| 733 |
+
}
|
| 734 |
+
});
|
| 735 |
+
});
|
| 736 |
+
});
|
| 737 |
+
|
| 738 |
+
// Reset button
|
| 739 |
+
document.getElementById('reset-btn').addEventListener('click', () => {
|
| 740 |
+
flowerSpeed = 0;
|
| 741 |
+
document.getElementById('speed-value').textContent = '0%';
|
| 742 |
+
|
| 743 |
+
// Clear wisdom container except initial message
|
| 744 |
+
const container = document.getElementById('wisdom-container');
|
| 745 |
+
while (container.children.length > 1) {
|
| 746 |
+
container.removeChild(container.lastChild);
|
| 747 |
+
}
|
| 748 |
+
|
| 749 |
+
// Reset to default color
|
| 750 |
+
currentColor = 0xff69b4;
|
| 751 |
+
scene.remove(flower);
|
| 752 |
+
flower = createFlowerSpinner();
|
| 753 |
+
scene.add(flower);
|
| 754 |
+
|
| 755 |
+
// Reset speed indicator color
|
| 756 |
+
const speedIndicator = document.getElementById('speed-indicator');
|
| 757 |
+
speedIndicator.style.background = 'rgba(255, 255, 255, 0.1)';
|
| 758 |
+
speedIndicator.style.borderColor = 'rgba(255, 255, 255, 0.3)';
|
| 759 |
+
|
| 760 |
+
// Clear all particles
|
| 761 |
+
particleSystem.forEach(particle => scene.remove(particle));
|
| 762 |
+
particleSystem = [];
|
| 763 |
+
});
|
| 764 |
+
</script>
|
| 765 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=db69/flowers" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 766 |
+
</html>
|
prompts.txt
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
A 3d digital fidget spinner
|
| 2 |
+
rather than buttons make it touch and mouse responsive so we can spin iton our own. Also pretned that you are kabir and bring out UI that breaks all illusions of any user who is here toplay withit
|
| 3 |
+
now make fidget spinnersuch that as it spins it drops out a piece of kabir's wisdom
|
| 4 |
+
now make fidget spinner into flowers and small flower particcles comimg out of it
|