dhishooooom commited on
Commit
f97861c
·
verified ·
1 Parent(s): 739988b

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +7 -5
  2. index.html +233 -19
  3. prompts.txt +1 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Space Pointer
3
- emoji: 🌍
4
- colorFrom: green
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: space-pointer
3
+ emoji: 🐳
4
+ colorFrom: red
5
+ colorTo: green
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,233 @@
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>Cosmic Mouse Travel</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.11.4/gsap.min.js"></script>
9
+ <style>
10
+ body {
11
+ overflow-x: hidden;
12
+ background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
13
+ height: 100vh;
14
+ margin: 0;
15
+ perspective: 1000px;
16
+ cursor: none;
17
+ }
18
+
19
+ .star {
20
+ position: absolute;
21
+ background: white;
22
+ border-radius: 50%;
23
+ animation: twinkle var(--duration) infinite ease-in-out;
24
+ opacity: 0;
25
+ }
26
+
27
+ @keyframes twinkle {
28
+ 0%, 100% { opacity: 0; transform: scale(0.5); }
29
+ 50% { opacity: var(--opacity); transform: scale(1); }
30
+ }
31
+
32
+ .comet {
33
+ position: absolute;
34
+ width: 6px;
35
+ height: 6px;
36
+ border-radius: 50%;
37
+ background: linear-gradient(45deg, rgba(255,255,255,0.8), rgba(64,224,208,0.8));
38
+ box-shadow: 0 0 10px 2px rgba(64, 224, 208, 0.6);
39
+ pointer-events: none;
40
+ z-index: 100;
41
+ }
42
+
43
+ .comet-tail {
44
+ position: absolute;
45
+ width: 100px;
46
+ height: 4px;
47
+ background: linear-gradient(90deg, rgba(64,224,208,0.8), transparent);
48
+ border-radius: 50%;
49
+ pointer-events: none;
50
+ z-index: 99;
51
+ transform-origin: left center;
52
+ }
53
+
54
+ .galaxy {
55
+ position: absolute;
56
+ width: 300px;
57
+ height: 300px;
58
+ border-radius: 50%;
59
+ background: radial-gradient(circle at center, rgba(138, 43, 226, 0.2) 0%, transparent 70%);
60
+ filter: blur(20px);
61
+ animation: rotate 120s linear infinite;
62
+ }
63
+
64
+ @keyframes rotate {
65
+ from { transform: rotate(0deg); }
66
+ to { transform: rotate(360deg); }
67
+ }
68
+
69
+ .planet {
70
+ position: absolute;
71
+ border-radius: 50%;
72
+ box-shadow: inset 0 0 20px rgba(255,255,255,0.2);
73
+ }
74
+
75
+ .scroll-text {
76
+ position: absolute;
77
+ bottom: 20px;
78
+ left: 50%;
79
+ transform: translateX(-50%);
80
+ color: rgba(255,255,255,0.7);
81
+ font-family: 'Arial', sans-serif;
82
+ text-transform: uppercase;
83
+ letter-spacing: 2px;
84
+ font-size: 12px;
85
+ animation: pulse 2s infinite;
86
+ }
87
+
88
+ @keyframes pulse {
89
+ 0%, 100% { opacity: 0.5; }
90
+ 50% { opacity: 1; }
91
+ }
92
+
93
+ .depth-layer {
94
+ position: absolute;
95
+ width: 100%;
96
+ height: 100%;
97
+ top: 0;
98
+ left: 0;
99
+ }
100
+ </style>
101
+ </head>
102
+ <body>
103
+ <div class="depth-layer" id="far-stars"></div>
104
+ <div class="depth-layer" id="mid-stars"></div>
105
+ <div class="depth-layer" id="near-stars"></div>
106
+ <div class="galaxy" style="top: 30%; left: 20%;"></div>
107
+ <div class="galaxy" style="top: 70%; left: 80%;"></div>
108
+
109
+ <div class="comet" id="comet"></div>
110
+ <div class="comet-tail" id="comet-tail"></div>
111
+
112
+ <div class="planet" id="planet1"></div>
113
+ <div class="planet" id="planet2"></div>
114
+
115
+ <div class="scroll-text">Scroll to travel through space</div>
116
+
117
+ <script>
118
+ document.addEventListener('DOMContentLoaded', function() {
119
+ // Create stars at different depth layers
120
+ createStars('far-stars', 100, 0.5, 1);
121
+ createStars('mid-stars', 200, 1, 2);
122
+ createStars('near-stars', 300, 1.5, 3);
123
+
124
+ // Create planets
125
+ createPlanet('planet1', 80, 'linear-gradient(45deg, #4b6cb7, #182848)');
126
+ createPlanet('planet2', 120, 'linear-gradient(45deg, #c31432, #240b36)');
127
+
128
+ // Mouse move effects
129
+ document.addEventListener('mousemove', function(e) {
130
+ const comet = document.getElementById('comet');
131
+ const tail = document.getElementById('comet-tail');
132
+
133
+ // Calculate angle for tail direction
134
+ const prevX = parseFloat(comet.dataset.prevX) || e.clientX;
135
+ const prevY = parseFloat(comet.dataset.prevY) || e.clientY;
136
+ const angle = Math.atan2(e.clientY - prevY, e.clientX - prevX) * 180 / Math.PI;
137
+
138
+ // Update comet position with slight delay for smooth trailing
139
+ gsap.to(comet, {
140
+ x: e.clientX,
141
+ y: e.clientY,
142
+ duration: 0.3,
143
+ ease: "power2.out"
144
+ });
145
+
146
+ // Update tail position and rotation
147
+ gsap.to(tail, {
148
+ x: e.clientX,
149
+ y: e.clientY,
150
+ rotation: angle,
151
+ duration: 0.5,
152
+ ease: "power2.out"
153
+ });
154
+
155
+ // Store current position for next move
156
+ comet.dataset.prevX = e.clientX;
157
+ comet.dataset.prevY = e.clientY;
158
+
159
+ // Parallax effect for depth layers
160
+ const xOffset = (window.innerWidth / 2 - e.clientX) / 20;
161
+ const yOffset = (window.innerHeight / 2 - e.clientY) / 20;
162
+
163
+ document.getElementById('far-stars').style.transform = `translate(${xOffset * 0.3}px, ${yOffset * 0.3}px)`;
164
+ document.getElementById('mid-stars').style.transform = `translate(${xOffset * 0.6}px, ${yOffset * 0.6}px)`;
165
+ document.getElementById('near-stars').style.transform = `translate(${xOffset}px, ${yOffset}px)`;
166
+ });
167
+
168
+ // Scroll effects
169
+ let scrollY = 0;
170
+ window.addEventListener('scroll', function() {
171
+ scrollY = window.scrollY;
172
+
173
+ // Move stars based on scroll
174
+ document.getElementById('far-stars').style.transform = `translateY(${-scrollY * 0.2}px)`;
175
+ document.getElementById('mid-stars').style.transform = `translateY(${-scrollY * 0.5}px)`;
176
+ document.getElementById('near-stars').style.transform = `translateY(${-scrollY * 0.8}px)`;
177
+
178
+ // Scale planets based on scroll (simulating movement)
179
+ document.getElementById('planet1').style.transform = `translateY(${-scrollY * 0.3}px) scale(${1 + scrollY * 0.0005})`;
180
+ document.getElementById('planet2').style.transform = `translateY(${-scrollY * 0.5}px) scale(${1 + scrollY * 0.0008})`;
181
+ });
182
+
183
+ // Window resize - reposition planets
184
+ window.addEventListener('resize', positionPlanets);
185
+ positionPlanets();
186
+ });
187
+
188
+ function createStars(layerId, count, sizeMultiplier, speedMultiplier) {
189
+ const layer = document.getElementById(layerId);
190
+ for (let i = 0; i < count; i++) {
191
+ const star = document.createElement('div');
192
+ star.className = 'star';
193
+
194
+ // Random properties
195
+ const size = Math.random() * sizeMultiplier;
196
+ const opacity = Math.random() * 0.8 + 0.2;
197
+ const duration = (Math.random() * 5 + 3) / speedMultiplier;
198
+ const delay = Math.random() * 5;
199
+
200
+ // Apply styles
201
+ star.style.width = `${size}px`;
202
+ star.style.height = `${size}px`;
203
+ star.style.left = `${Math.random() * 100}%`;
204
+ star.style.top = `${Math.random() * 100}%`;
205
+ star.style.setProperty('--opacity', opacity);
206
+ star.style.setProperty('--duration', `${duration}s`);
207
+ star.style.animationDelay = `${delay}s`;
208
+
209
+ layer.appendChild(star);
210
+ }
211
+ }
212
+
213
+ function createPlanet(id, size, gradient) {
214
+ const planet = document.getElementById(id);
215
+ planet.style.width = `${size}px`;
216
+ planet.style.height = `${size}px`;
217
+ planet.style.background = gradient;
218
+ planet.style.filter = `drop-shadow(0 0 ${size/5}px rgba(255,255,255,0.3))`;
219
+ }
220
+
221
+ function positionPlanets() {
222
+ const planet1 = document.getElementById('planet1');
223
+ const planet2 = document.getElementById('planet2');
224
+
225
+ planet1.style.left = `${window.innerWidth * 0.7}px`;
226
+ planet1.style.top = `${window.innerHeight * 0.2}px`;
227
+
228
+ planet2.style.left = `${window.innerWidth * 0.2}px`;
229
+ planet2.style.top = `${window.innerHeight * 0.6}px`;
230
+ }
231
+ </script>
232
+ <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=dhishooooom/space-pointer" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
233
+ </html>
prompts.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ Develop a cosmic mouse tracking animation that feels like everytime user moves the mouse or scroll they are traveling through infinite space