joung commited on
Commit
47b1948
·
verified ·
1 Parent(s): 0c60dca

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +5 -3
  2. index.html +379 -19
  3. prompts.txt +1 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Bloom
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: bloom
3
+ emoji: 🐳
4
  colorFrom: yellow
5
  colorTo: red
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,379 @@
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="ko">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>벚꽃 흩날리는 애니메이션</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
+ background: linear-gradient(to bottom, #87CEEB, #E0F7FA);
14
+ }
15
+ canvas {
16
+ display: block;
17
+ }
18
+ .info {
19
+ position: absolute;
20
+ bottom: 20px;
21
+ width: 100%;
22
+ text-align: center;
23
+ color: white;
24
+ font-family: 'Arial', sans-serif;
25
+ text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
26
+ pointer-events: none;
27
+ }
28
+ .controls {
29
+ position: absolute;
30
+ top: 20px;
31
+ right: 20px;
32
+ z-index: 100;
33
+ }
34
+ .control-btn {
35
+ background: rgba(255,255,255,0.7);
36
+ border: none;
37
+ border-radius: 50%;
38
+ width: 40px;
39
+ height: 40px;
40
+ margin: 5px;
41
+ cursor: pointer;
42
+ display: flex;
43
+ align-items: center;
44
+ justify-content: center;
45
+ box-shadow: 0 2px 5px rgba(0,0,0,0.2);
46
+ transition: all 0.3s ease;
47
+ }
48
+ .control-btn:hover {
49
+ background: rgba(255,255,255,0.9);
50
+ transform: scale(1.1);
51
+ }
52
+ </style>
53
+ </head>
54
+ <body>
55
+ <div class="info">
56
+ <h1 class="text-4xl font-bold mb-2">아름다운 벚꽃나무</h1>
57
+ <p class="text-xl">봄의 경이로움을 느껴보세요</p>
58
+ </div>
59
+
60
+ <div class="controls">
61
+ <button class="control-btn" id="zoomIn">+</button>
62
+ <button class="control-btn" id="zoomOut">-</button>
63
+ <button class="control-btn" id="resetView">↻</button>
64
+ </div>
65
+
66
+ <script>
67
+ // Scene setup
68
+ const scene = new THREE.Scene();
69
+ const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
70
+ const renderer = new THREE.WebGLRenderer({ antialias: true });
71
+ renderer.setSize(window.innerWidth, window.innerHeight);
72
+ renderer.setPixelRatio(window.devicePixelRatio);
73
+ document.body.appendChild(renderer.domElement);
74
+
75
+ // Enhanced lighting
76
+ const ambientLight = new THREE.AmbientLight(0xffffff, 0.6);
77
+ scene.add(ambientLight);
78
+
79
+ const directionalLight = new THREE.DirectionalLight(0xffffff, 1.2);
80
+ directionalLight.position.set(5, 10, 7);
81
+ scene.add(directionalLight);
82
+
83
+ // Add hemisphere light for more natural outdoor lighting
84
+ const hemisphereLight = new THREE.HemisphereLight(0xffffbb, 0x080820, 0.5);
85
+ scene.add(hemisphereLight);
86
+
87
+ // Create larger cherry blossom tree trunk
88
+ const trunkGeometry = new THREE.CylinderGeometry(1.5, 2.5, 15, 12);
89
+ const trunkMaterial = new THREE.MeshPhongMaterial({
90
+ color: 0x8B4513,
91
+ flatShading: true,
92
+ shininess: 30
93
+ });
94
+ const trunk = new THREE.Mesh(trunkGeometry, trunkMaterial);
95
+ trunk.position.y = 7.5;
96
+ trunk.castShadow = true;
97
+ scene.add(trunk);
98
+
99
+ // Create branches with more detail
100
+ const branchMaterial = new THREE.MeshPhongMaterial({
101
+ color: 0x8B4513,
102
+ flatShading: true
103
+ });
104
+
105
+ function createBranch(length, angle, position, parent = null) {
106
+ const branchGeometry = new THREE.CylinderGeometry(
107
+ length * 0.05,
108
+ length * 0.1,
109
+ length,
110
+ 8
111
+ );
112
+ const branch = new THREE.Mesh(branchGeometry, branchMaterial);
113
+
114
+ if (parent) {
115
+ parent.add(branch);
116
+ branch.position.copy(position);
117
+ } else {
118
+ scene.add(branch);
119
+ branch.position.copy(position);
120
+ }
121
+
122
+ branch.rotation.z = angle;
123
+
124
+ // Add some randomness to branches
125
+ branch.rotation.x = Math.random() * 0.3 - 0.15;
126
+ branch.rotation.y = Math.random() * 0.3 - 0.15;
127
+
128
+ branch.castShadow = true;
129
+ return branch;
130
+ }
131
+
132
+ // Main branches (more and larger)
133
+ const mainBranches = [];
134
+ const branchCount = 8;
135
+
136
+ for (let i = 0; i < branchCount; i++) {
137
+ const angle = (i / branchCount) * Math.PI * 2;
138
+ const length = 8 + Math.random() * 4;
139
+ const height = 10 + Math.random() * 5;
140
+
141
+ const x = Math.cos(angle) * 1.5;
142
+ const z = Math.sin(angle) * 1.5;
143
+
144
+ const branch = createBranch(length, angle * 0.8, new THREE.Vector3(x, height, z));
145
+ mainBranches.push(branch);
146
+
147
+ // Add secondary branches
148
+ const secondaryCount = 3 + Math.floor(Math.random() * 3);
149
+ for (let j = 0; j < secondaryCount; j++) {
150
+ const secLength = length * (0.4 + Math.random() * 0.2);
151
+ const secAngle = angle + (Math.random() * 0.6 - 0.3);
152
+ const secHeight = height - length * (0.2 + j * 0.2);
153
+
154
+ const secBranch = createBranch(
155
+ secLength,
156
+ secAngle,
157
+ new THREE.Vector3(0, -length * (0.2 + j * 0.2), 0),
158
+ branch
159
+ );
160
+
161
+ // Add tertiary branches
162
+ if (Math.random() > 0.5) {
163
+ const terCount = 2 + Math.floor(Math.random() * 2);
164
+ for (let k = 0; k < terCount; k++) {
165
+ const terLength = secLength * (0.4 + Math.random() * 0.2);
166
+ const terAngle = secAngle + (Math.random() * 0.4 - 0.2);
167
+
168
+ createBranch(
169
+ terLength,
170
+ terAngle,
171
+ new THREE.Vector3(0, -secLength * (0.3 + k * 0.2), 0),
172
+ secBranch
173
+ );
174
+ }
175
+ }
176
+ }
177
+ }
178
+
179
+ // Create cherry blossom petals (more and larger)
180
+ const petals = [];
181
+ const petalCount = 1500; // Increased petal count
182
+ const petalColors = [
183
+ 0xFFB6C1, 0xFF69B4, 0xFF1493, 0xFFC0CB, 0xFFE4E1,
184
+ 0xFFA07A, 0xFF82AB, 0xFF6EB4, 0xFF83A8, 0xFF8FBC
185
+ ];
186
+
187
+ // More detailed petal geometry
188
+ const petalShape = new THREE.Shape();
189
+ petalShape.moveTo(0, 0);
190
+ petalShape.bezierCurveTo(0.5, 0.1, 0.8, 0.3, 0.8, 0.6);
191
+ petalShape.bezierCurveTo(0.8, 0.9, 0.5, 1.0, 0.2, 0.8);
192
+ petalShape.bezierCurveTo(-0.1, 0.6, -0.1, 0.3, 0, 0);
193
+
194
+ const petalGeometry = new THREE.ShapeGeometry(petalShape);
195
+ petalGeometry.scale(0.08, 0.08, 0.08); // Larger petals
196
+
197
+ // Create petals with more variation
198
+ for (let i = 0; i < petalCount; i++) {
199
+ const petalMaterial = new THREE.MeshBasicMaterial({
200
+ color: petalColors[Math.floor(Math.random() * petalColors.length)],
201
+ transparent: true,
202
+ opacity: 0.7 + Math.random() * 0.2,
203
+ side: THREE.DoubleSide
204
+ });
205
+
206
+ const petal = new THREE.Mesh(petalGeometry, petalMaterial);
207
+
208
+ // Initial position around the tree (larger area)
209
+ petal.position.x = (Math.random() - 0.5) * 30;
210
+ petal.position.y = 5 + Math.random() * 25;
211
+ petal.position.z = (Math.random() - 0.5) * 30;
212
+
213
+ // Random rotation and scale
214
+ petal.rotation.x = Math.random() * Math.PI;
215
+ petal.rotation.y = Math.random() * Math.PI;
216
+ petal.rotation.z = Math.random() * Math.PI;
217
+
218
+ const scale = 0.8 + Math.random() * 0.4;
219
+ petal.scale.set(scale, scale, scale);
220
+
221
+ // Store velocity for animation with more variation
222
+ petal.userData = {
223
+ velocity: new THREE.Vector3(
224
+ (Math.random() - 0.5) * 0.02,
225
+ -0.03 - Math.random() * 0.05,
226
+ (Math.random() - 0.5) * 0.02
227
+ ),
228
+ rotationSpeed: new THREE.Vector3(
229
+ Math.random() * 0.02,
230
+ Math.random() * 0.02,
231
+ Math.random() * 0.02
232
+ ),
233
+ wobble: Math.random() * 0.02,
234
+ wobbleSpeed: 0.01 + Math.random() * 0.02
235
+ };
236
+
237
+ scene.add(petal);
238
+ petals.push(petal);
239
+ }
240
+
241
+ // Larger ground with more detail
242
+ const groundGeometry = new THREE.CircleGeometry(50, 64);
243
+ const groundMaterial = new THREE.MeshPhongMaterial({
244
+ color: 0x7CFC00,
245
+ side: THREE.DoubleSide,
246
+ shininess: 10
247
+ });
248
+ const ground = new THREE.Mesh(groundGeometry, groundMaterial);
249
+ ground.rotation.x = -Math.PI / 2;
250
+ ground.position.y = 0;
251
+ ground.receiveShadow = true;
252
+ scene.add(ground);
253
+
254
+ // Add grass texture to ground
255
+ const grassGeometry = new THREE.CircleGeometry(50, 64);
256
+ const grassMaterial = new THREE.MeshPhongMaterial({
257
+ color: 0x5A8F29,
258
+ side: THREE.DoubleSide,
259
+ transparent: true,
260
+ opacity: 0.3
261
+ });
262
+ const grass = new THREE.Mesh(grassGeometry, grassMaterial);
263
+ grass.rotation.x = -Math.PI / 2;
264
+ grass.position.y = 0.01;
265
+ scene.add(grass);
266
+
267
+ // Add more fallen petals on the ground
268
+ for (let i = 0; i < 300; i++) {
269
+ const petal = new THREE.Mesh(petalGeometry, new THREE.MeshBasicMaterial({
270
+ color: petalColors[Math.floor(Math.random() * petalColors.length)],
271
+ transparent: true,
272
+ opacity: 0.6 + Math.random() * 0.3,
273
+ side: THREE.DoubleSide
274
+ }));
275
+
276
+ petal.position.x = (Math.random() - 0.5) * 45;
277
+ petal.position.y = 0.01;
278
+ petal.position.z = (Math.random() - 0.5) * 45;
279
+
280
+ petal.rotation.x = Math.random() * Math.PI;
281
+ petal.rotation.y = Math.random() * Math.PI;
282
+ petal.rotation.z = Math.random() * Math.PI;
283
+
284
+ const scale = 0.06 + Math.random() * 0.04;
285
+ petal.scale.set(scale, scale, scale);
286
+
287
+ scene.add(petal);
288
+ }
289
+
290
+ // Add some background elements (distant trees)
291
+ for (let i = 0; i < 10; i++) {
292
+ const angle = (i / 10) * Math.PI * 2;
293
+ const distance = 35 + Math.random() * 10;
294
+
295
+ const tree = new THREE.Mesh(
296
+ new THREE.ConeGeometry(3, 8, 5),
297
+ new THREE.MeshPhongMaterial({
298
+ color: 0x2E8B57,
299
+ flatShading: true
300
+ })
301
+ );
302
+
303
+ tree.position.x = Math.cos(angle) * distance;
304
+ tree.position.z = Math.sin(angle) * distance;
305
+ tree.position.y = 4;
306
+
307
+ scene.add(tree);
308
+ }
309
+
310
+ // Camera position - start further back to see the whole tree
311
+ camera.position.set(0, 15, 25);
312
+ camera.lookAt(0, 10, 0);
313
+
314
+ // Handle window resize
315
+ window.addEventListener('resize', () => {
316
+ camera.aspect = window.innerWidth / window.innerHeight;
317
+ camera.updateProjectionMatrix();
318
+ renderer.setSize(window.innerWidth, window.innerHeight);
319
+ });
320
+
321
+ // Add controls
322
+ document.getElementById('zoomIn').addEventListener('click', () => {
323
+ camera.position.z *= 0.9;
324
+ });
325
+
326
+ document.getElementById('zoomOut').addEventListener('click', () => {
327
+ camera.position.z *= 1.1;
328
+ });
329
+
330
+ document.getElementById('resetView').addEventListener('click', () => {
331
+ camera.position.set(0, 15, 25);
332
+ camera.lookAt(0, 10, 0);
333
+ });
334
+
335
+ // Enhanced animation loop
336
+ let time = 0;
337
+ function animate() {
338
+ requestAnimationFrame(animate);
339
+ time += 0.01;
340
+
341
+ // Animate petals with more natural movement
342
+ petals.forEach(petal => {
343
+ // Move petal with slight wobble
344
+ petal.position.x += petal.userData.velocity.x + Math.sin(time * petal.userData.wobbleSpeed) * petal.userData.wobble;
345
+ petal.position.y += petal.userData.velocity.y;
346
+ petal.position.z += petal.userData.velocity.z + Math.cos(time * petal.userData.wobbleSpeed) * petal.userData.wobble;
347
+
348
+ // Rotate petal
349
+ petal.rotation.x += petal.userData.rotationSpeed.x;
350
+ petal.rotation.y += petal.userData.rotationSpeed.y;
351
+ petal.rotation.z += petal.userData.rotationSpeed.z;
352
+
353
+ // Reset petal position when it falls below ground
354
+ if (petal.position.y < -5) {
355
+ petal.position.x = (Math.random() - 0.5) * 20;
356
+ petal.position.y = 25 + Math.random() * 10;
357
+ petal.position.z = (Math.random() - 0.5) * 20;
358
+
359
+ // Randomize velocity again
360
+ petal.userData.velocity.set(
361
+ (Math.random() - 0.5) * 0.02,
362
+ -0.03 - Math.random() * 0.05,
363
+ (Math.random() - 0.5) * 0.02
364
+ );
365
+ }
366
+ });
367
+
368
+ // Gentle camera movement
369
+ camera.position.x = Math.sin(time * 0.2) * 5;
370
+ camera.position.z = 25 + Math.cos(time * 0.2) * 5;
371
+ camera.lookAt(0, 10, 0);
372
+
373
+ renderer.render(scene, camera);
374
+ }
375
+
376
+ animate();
377
+ </script>
378
+ <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/bloom" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
379
+ </html>
prompts.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ 큰 벚꽃으로 수정해줘