joung commited on
Commit
99eb336
·
verified ·
1 Parent(s): dbdd9e3

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +7 -5
  2. index.html +332 -19
  3. prompts.txt +0 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: T T
3
- emoji: 😻
4
- colorFrom: yellow
5
- colorTo: red
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: t-t
3
+ emoji: 🐳
4
+ colorFrom: green
5
+ colorTo: yellow
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,332 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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>Cherry Blossoms & Snowfall</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: 'Arial', sans-serif;
14
+ }
15
+ #info {
16
+ position: absolute;
17
+ bottom: 20px;
18
+ width: 100%;
19
+ text-align: center;
20
+ color: white;
21
+ text-shadow: 0 0 5px rgba(0,0,0,0.5);
22
+ z-index: 100;
23
+ pointer-events: none;
24
+ }
25
+ #title {
26
+ position: absolute;
27
+ top: 20px;
28
+ width: 100%;
29
+ text-align: center;
30
+ color: white;
31
+ font-size: 2.5rem;
32
+ text-shadow: 0 0 10px rgba(0,0,0,0.7);
33
+ z-index: 100;
34
+ font-weight: 300;
35
+ letter-spacing: 2px;
36
+ pointer-events: none;
37
+ }
38
+ .petal {
39
+ position: absolute;
40
+ width: 15px;
41
+ height: 15px;
42
+ background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="%23ffb6c1" d="M50 0 Q75 25 100 50 Q75 75 50 100 Q25 75 0 50 Q25 25 50 0"/></svg>') no-repeat;
43
+ background-size: contain;
44
+ opacity: 0.8;
45
+ animation: petal-fall linear infinite;
46
+ filter: drop-shadow(0 0 2px rgba(255,182,193,0.7));
47
+ }
48
+ @keyframes petal-fall {
49
+ 0% {
50
+ transform: translate(0, -10px) rotate(0deg);
51
+ }
52
+ 100% {
53
+ transform: translate(calc(var(--sway) * 100px), calc(100vh + 10px)) rotate(360deg);
54
+ }
55
+ }
56
+ </style>
57
+ </head>
58
+ <body class="bg-gradient-to-b from-blue-900 to-purple-900">
59
+ <div id="title">春の舞 (Spring Dance)</div>
60
+ <div id="info">Cherry blossoms and snowflakes dancing together</div>
61
+
62
+ <script>
63
+ document.addEventListener('DOMContentLoaded', () => {
64
+ // Scene setup
65
+ const scene = new THREE.Scene();
66
+ scene.background = new THREE.Color(0x0a1128);
67
+
68
+ // Camera setup
69
+ const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
70
+ camera.position.set(0, 5, 30);
71
+ camera.lookAt(0, 0, 0);
72
+
73
+ // Renderer setup
74
+ const renderer = new THREE.WebGLRenderer({ antialias: true });
75
+ renderer.setSize(window.innerWidth, window.innerHeight);
76
+ renderer.setPixelRatio(window.devicePixelRatio);
77
+ document.body.appendChild(renderer.domElement);
78
+
79
+ // Create cherry blossom tree
80
+ createCherryTree(scene);
81
+
82
+ // Create snowflakes
83
+ const snowflakes = createSnowflakes(scene);
84
+
85
+ // Create cherry blossom petals
86
+ const petals = createPetals(scene);
87
+
88
+ // Add stars in the background
89
+ const stars = createStars(scene);
90
+
91
+ // Lighting
92
+ const ambientLight = new THREE.AmbientLight(0x404040);
93
+ scene.add(ambientLight);
94
+
95
+ const directionalLight = new THREE.DirectionalLight(0xffffff, 0.7);
96
+ directionalLight.position.set(1, 1, 1);
97
+ scene.add(directionalLight);
98
+
99
+ // Moon
100
+ const moonGeometry = new THREE.SphereGeometry(3, 32, 32);
101
+ const moonMaterial = new THREE.MeshBasicMaterial({
102
+ color: 0xffffcc,
103
+ transparent: true,
104
+ opacity: 0.9
105
+ });
106
+ const moon = new THREE.Mesh(moonGeometry, moonMaterial);
107
+ moon.position.set(-20, 20, -30);
108
+ scene.add(moon);
109
+
110
+ // Animation loop
111
+ function animate() {
112
+ requestAnimationFrame(animate);
113
+
114
+ // Update snowflakes
115
+ snowflakes.forEach(flake => {
116
+ flake.position.y -= flake.speed;
117
+ flake.position.x += Math.sin(Date.now() * 0.001 + flake.id) * 0.05;
118
+
119
+ if (flake.position.y < -20) {
120
+ flake.position.y = 20;
121
+ flake.position.x = Math.random() * 40 - 20;
122
+ flake.position.z = Math.random() * 40 - 20;
123
+ }
124
+ });
125
+
126
+ // Update petals
127
+ petals.forEach(petal => {
128
+ petal.position.y -= petal.speed;
129
+ petal.position.x += Math.sin(Date.now() * 0.001 + petal.id) * 0.03;
130
+ petal.rotation.y += 0.01;
131
+
132
+ if (petal.position.y < -5) {
133
+ petal.position.y = 15;
134
+ petal.position.x = Math.random() * 10 - 5;
135
+ petal.position.z = Math.random() * 10 - 5;
136
+ }
137
+ });
138
+
139
+ // Rotate stars slightly
140
+ stars.rotation.x += 0.0001;
141
+ stars.rotation.y += 0.0001;
142
+
143
+ renderer.render(scene, camera);
144
+ }
145
+
146
+ // Handle window resize
147
+ window.addEventListener('resize', () => {
148
+ camera.aspect = window.innerWidth / window.innerHeight;
149
+ camera.updateProjectionMatrix();
150
+ renderer.setSize(window.innerWidth, window.innerHeight);
151
+ });
152
+
153
+ // Start animation
154
+ animate();
155
+
156
+ // Add CSS petals for variety
157
+ for (let i = 0; i < 20; i++) {
158
+ const petal = document.createElement('div');
159
+ petal.className = 'petal';
160
+
161
+ // Random properties
162
+ const size = Math.random() * 15 + 10;
163
+ petal.style.width = `${size}px`;
164
+ petal.style.height = `${size}px`;
165
+ petal.style.left = `${Math.random() * 100}vw`;
166
+ petal.style.top = `${Math.random() * 20 - 10}vh`;
167
+ petal.style.setProperty('--sway', Math.random() * 2 - 1);
168
+
169
+ // Random animation duration (5-15 seconds)
170
+ const duration = Math.random() * 10 + 5;
171
+ petal.style.animationDuration = `${duration}s`;
172
+
173
+ // Random opacity
174
+ petal.style.opacity = Math.random() * 0.5 + 0.3;
175
+
176
+ document.body.appendChild(petal);
177
+ }
178
+ });
179
+
180
+ function createCherryTree(scene) {
181
+ // Trunk
182
+ const trunkGeometry = new THREE.CylinderGeometry(0.5, 1, 10, 8);
183
+ const trunkMaterial = new THREE.MeshPhongMaterial({
184
+ color: 0x8B4513,
185
+ flatShading: true
186
+ });
187
+ const trunk = new THREE.Mesh(trunkGeometry, trunkMaterial);
188
+ trunk.position.y = 5;
189
+ trunk.rotation.z = Math.PI / 20;
190
+ scene.add(trunk);
191
+
192
+ // Branches
193
+ const branchMaterial = new THREE.MeshPhongMaterial({
194
+ color: 0x8B4513,
195
+ flatShading: true
196
+ });
197
+
198
+ for (let i = 0; i < 5; i++) {
199
+ const length = 5 + Math.random() * 3;
200
+ const angle = Math.PI * 0.2 + Math.random() * Math.PI * 0.3;
201
+ const branchGeometry = new THREE.CylinderGeometry(0.2, 0.4, length, 6);
202
+ const branch = new THREE.Mesh(branchGeometry, branchMaterial);
203
+
204
+ branch.position.y = 8 + i * 0.5;
205
+ branch.position.x = (Math.random() - 0.5) * 3;
206
+ branch.rotation.z = angle * (Math.random() > 0.5 ? 1 : -1);
207
+
208
+ scene.add(branch);
209
+ }
210
+
211
+ // Blossom clusters
212
+ const blossomGeometry = new THREE.SphereGeometry(0.1, 8, 8);
213
+ const blossomMaterial = new THREE.MeshPhongMaterial({
214
+ color: 0xffb6c1,
215
+ transparent: true,
216
+ opacity: 0.9
217
+ });
218
+
219
+ for (let i = 0; i < 100; i++) {
220
+ const blossom = new THREE.Mesh(blossomGeometry, blossomMaterial);
221
+
222
+ // Position around branches
223
+ const angle = Math.random() * Math.PI * 2;
224
+ const radius = 1 + Math.random() * 4;
225
+ const height = 5 + Math.random() * 8;
226
+
227
+ blossom.position.x = Math.cos(angle) * radius;
228
+ blossom.position.y = height;
229
+ blossom.position.z = Math.sin(angle) * radius;
230
+
231
+ scene.add(blossom);
232
+ }
233
+ }
234
+
235
+ function createSnowflakes(scene) {
236
+ const snowflakes = [];
237
+ const snowflakeGeometry = new THREE.BufferGeometry();
238
+ const snowflakeMaterial = new THREE.PointsMaterial({
239
+ color: 0xffffff,
240
+ size: 0.15,
241
+ transparent: true,
242
+ opacity: 0.8,
243
+ blending: THREE.AdditiveBlending
244
+ });
245
+
246
+ const snowflakeCount = 1500;
247
+ const positions = new Float32Array(snowflakeCount * 3);
248
+
249
+ for (let i = 0; i < snowflakeCount; i++) {
250
+ positions[i * 3] = Math.random() * 40 - 20;
251
+ positions[i * 3 + 1] = Math.random() * 40 - 10;
252
+ positions[i * 3 + 2] = Math.random() * 40 - 20;
253
+ }
254
+
255
+ snowflakeGeometry.setAttribute('position', new THREE.BufferAttribute(positions, 3));
256
+
257
+ const snowflakeSystem = new THREE.Points(snowflakeGeometry, snowflakeMaterial);
258
+ scene.add(snowflakeSystem);
259
+
260
+ // Add individual properties to each snowflake
261
+ for (let i = 0; i < snowflakeCount; i++) {
262
+ snowflakes.push({
263
+ position: snowflakeSystem.geometry.attributes.position,
264
+ index: i,
265
+ speed: 0.05 + Math.random() * 0.1,
266
+ id: i
267
+ });
268
+ }
269
+
270
+ return snowflakes;
271
+ }
272
+
273
+ function createPetals(scene) {
274
+ const petals = [];
275
+ const petalGeometry = new THREE.PlaneGeometry(0.3, 0.3);
276
+ const petalMaterial = new THREE.MeshPhongMaterial({
277
+ color: 0xffb6c1,
278
+ transparent: true,
279
+ opacity: 0.7,
280
+ side: THREE.DoubleSide
281
+ });
282
+
283
+ const petalCount = 100;
284
+
285
+ for (let i = 0; i < petalCount; i++) {
286
+ const petal = new THREE.Mesh(petalGeometry, petalMaterial);
287
+
288
+ petal.position.x = Math.random() * 10 - 5;
289
+ petal.position.y = 5 + Math.random() * 10;
290
+ petal.position.z = Math.random() * 10 - 5;
291
+
292
+ petal.rotation.x = Math.random() * Math.PI;
293
+ petal.rotation.y = Math.random() * Math.PI;
294
+ petal.rotation.z = Math.random() * Math.PI;
295
+
296
+ petal.speed = 0.02 + Math.random() * 0.03;
297
+ petal.id = i;
298
+
299
+ scene.add(petal);
300
+ petals.push(petal);
301
+ }
302
+
303
+ return petals;
304
+ }
305
+
306
+ function createStars(scene) {
307
+ const starGeometry = new THREE.BufferGeometry();
308
+ const starMaterial = new THREE.PointsMaterial({
309
+ color: 0xffffff,
310
+ size: 0.1,
311
+ transparent: true,
312
+ opacity: 0.7
313
+ });
314
+
315
+ const starCount = 1000;
316
+ const starPositions = new Float32Array(starCount * 3);
317
+
318
+ for (let i = 0; i < starCount; i++) {
319
+ starPositions[i * 3] = (Math.random() - 0.5) * 2000;
320
+ starPositions[i * 3 + 1] = (Math.random() - 0.5) * 2000;
321
+ starPositions[i * 3 + 2] = (Math.random() - 0.5) * 2000;
322
+ }
323
+
324
+ starGeometry.setAttribute('position', new THREE.BufferAttribute(starPositions, 3));
325
+ const stars = new THREE.Points(starGeometry, starMaterial);
326
+ scene.add(stars);
327
+
328
+ return stars;
329
+ }
330
+ </script>
331
+ <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=joung/t-t" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
332
+ </html>
prompts.txt ADDED
File without changes