-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
438 lines (369 loc) · 13.6 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="favicon-32x32.png" sizes="32x32" type="image/png">
<link rel="icon" href="favicon-16x16.png" sizes="16x16" type="image/png">
<link rel="icon" href="favicon.ico" type="image/x-icon">
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/gsap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/Draggable.min.js"></script>
<title>$COD4</title>
<style>
@font-face { font-family: 'Bank'; src: url('Bank.ttf') format('truetype'); }
body, html {
margin: 0;
padding: 0;
height: 100%;
overflow: hidden;
background-color: #333;
position: relative;
background-image: url('vveui6.gif'); /* Replace with your GIF URL */
background-size: cover; /* Ensures the GIF covers the entire viewport */
background-repeat: no-repeat; /* Prevents tiling */
background-position: center; /* Centers the GIF */
}
canvas {
display: block;
width: 100%;
height: 100%;
z-index: -1;
}
/* CRT Grainy Overlay */
.crt-overlay {
position: fixed;
top: 0;
left: 0;
width: 300%;
height: 300%;
pointer-events: none;
background: rgba(0, 0, 0, 0.05);
backdrop-filter: blur(3px);
z-index: 999;
animation: flicker 3s infinite;
}
.crt-overlay::before {
z-index: 999;
content: '';
position: absolute;
top: 0;
left: 0;
width: 200%;
height: 200%;
background: repeating-radial-gradient(
circle,
rgba(255, 255, 255, 0.05),
rgba(255, 255, 255, 0.05) 1px,
transparent 1px,
transparent 2px
);
opacity: 0.2;
animation: move 10s linear infinite;
}
/* CRT Scanlines */
.crt-overlay::after {
z-index: 999;
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: repeating-linear-gradient(
to bottom,
rgba(0, 0, 0, 0.02),
rgba(0, 0, 0, 0.02) 2px,
rgba(255, 255, 255, 0.02) 2px,
rgba(255, 255, 255, 0.02) 4px
);
pointer-events: none;
z-index: 11;
animation: scanlines 1s linear infinite;
}
/* CRT Flicker Effect */
@keyframes flicker {
0%, 100% { opacity: 0.15; }
50% { opacity: 0.25; }
}
@keyframes move {
from { transform: translate(0, 0); }
to { transform: translate(-50%, -50%); }
}
@keyframes scanlines {
from { background-position: 0 0; }
to { background-position: 0 4px; }
}
.audio-icon {
width: 48px;
height: 48px;
position: fixed;
top: 2vh;
left: 2vw;
cursor: pointer;
z-index: 20;
background-size: contain;
background-repeat: no-repeat;
transition: transform 0.2s;
}
.audio-icon:hover {
transform: scale(1.1);
}
.audio-icon.off {
background-image: url('mute.png'); /* Replace with your "off" icon URL */
}
/* On state */
.audio-icon.on {
background-image: url('volume.png'); /* Replace with your "on" icon URL */
}
/* Music Toggle Button */
/* Social Icons Container */
.social-icons {
position: fixed;
top: 2vh;
right: 2vw;
z-index: 20;
display: flex;
gap: 35px;
}
.social-icons a {
width: 32px;
height: 32px;
transition: transform 0.3s;
}
.social-icons a:hover {
transform: scale(1.1);
}
.social-icons img {
width: 48px;
height: 48px;
transition: transform 0.3s;
}
.social-icons img:hover {
transform: scale(1.1);
}
.title-logo {
font-family: 'Impact', sans-serif;
color: #ffffff;
background: transparent;
position: fixed;
z-index: 20;
left: 50%;
transform: translate(-50%);
text-align: center;
top: 4vh;
}
.title-logo h1 {
font-size: 3rem;
margin-top: 1vh;
letter-spacing: 6px;
letter-spacing: 0.5rem;
text-shadow:
0px 1px 4px rgba(0, 255, 0, 0.5), /* Greenish glow */
0px 1px 1px rgba(0, 0, 0, 0.8); /* Dark shadow for depth */
}
.title-logo p {
margin-top: -3vh;
font-size: 2rem;
font-family: 'Bank', Impact, sans-serif;
color: #f7f7f7; /* Greenish color */
letter-spacing: 0.2rem;
text-shadow:
0px 4px 8px rgba(0, 255, 0, 0.5), /* Greenish glow */
0px 1px 1px rgba(0, 0, 0, 0.8); /* Dark shadow for depth */
}
.sticker {
position: fixed; /* Ensures the sticker stays in the same position on the screen */
right: 1%; /* Adjust distance from the right edge */
bottom: 0%; /* Adjust distance from the bottom edge */
width: 10vw; /* Proportional to the viewport width for responsiveness */
max-width: 150px; /* Optional: Set a max size for larger screens */
min-width: 120px; /* Optional: Set a minimum size for smaller screens */
height: auto; /* Maintain aspect ratio */
z-index: 20; /* Ensure it's above other elements, if needed */
}
.contract-copy-container {
position: fixed;
bottom: 1rem;
left: 50%;
transform: translateX(-50%);
color: #fff;
padding: 10px 20px;
border-radius: 5px;
display: inline-block;
text-align: center;
font-family: 'Arial', sans-serif;
font-size: 1rem;
cursor: pointer;
}
.contract-copy-container:hover {
background-color: rgba(0, 255, 0, 0.2);
color: #00ff00;
}
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r134/three.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/mrdoob/three.js@r134/examples/js/loaders/GLTFLoader.js"></script>
</head>
<body>
<div class="crt-overlay"></div>
<div class="title-logo">
<h1>$COD4</h1>
<p>A PRE OWNED COPY OF COD 4</p>
</div>
<img src="coodgl.png" class="sticker draggable"></img>
<div id="music-toggle" class="audio-icon off" title="Toggle Music"></div>
<div class="social-icons">
<a href="https://t.me/TenthPrestigeLobby" target="_blank" aria-label="Telegram">
<img alt="Telegram logo, white paper airplane icon" src="cd59ht.png" width="32" height="32">
</a>
<a href="https://x.com/COD4onSOL" target="_blank" aria-label="Twitter">
<img alt="Twitter logo, PNG image" src="20p8b6.png" width="32" height="32">
</a>
<a href="https://dexscreener.com" target="_blank" aria-label="Dexscreener">
<img alt="Dexscreener logo, PNG image" src="ehltah.png" width="32" height="32">
</a>
</div>
<div class="contract-copy-container" id="contract-container">
<span id="contract-address">0x1234567890abcdef1234567890abcdef12345678</span>
</div>
<script>
const contractContainer = document.getElementById('contract-container');
const contractAddress = document.getElementById('contract-address').textContent;
contractContainer.addEventListener('click', () => {
// Copy the contract address to clipboard
navigator.clipboard.writeText(contractAddress)
.then(() => {
// Provide feedback to the user
contractContainer.textContent = 'Copied!';
setTimeout(() => {
contractContainer.textContent = contractAddress;
}, 2000);
})
.catch((error) => {
console.error('Failed to copy text: ', error);
});
});
</script>
<script>
// Set up scene, camera, and renderer
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
const renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true });
renderer.setPixelRatio(window.devicePixelRatio || 1);
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);
// Set up raycaster for click detection
const raycaster = new THREE.Raycaster();
const mouse = new THREE.Vector2();
let modelLoaded = false;
// Make the video element
const video = document.createElement('video');
video.src = 'bg.gif';
video.crossOrigin = 'anonymous';
video.autoplay = true;
video.loop = true;
video.muted = true;
video.play().catch((error) => {
console.error('Video playback failed:', error);
});
// Create a texture from the video
const videoTexture = new THREE.VideoTexture(video);
videoTexture.minFilter = THREE.LinearFilter;
videoTexture.magFilter = THREE.LinearFilter;
videoTexture.format = THREE.RGBFormat;
scene.background = videoTexture;
// Set up lighting
const ambientLight = new THREE.AmbientLight(0xffffff, 0.5);
scene.add(ambientLight);
const pointLight = new THREE.PointLight(0xffffff, 0.5);
pointLight.position.set(20, 20, 20);
scene.add(pointLight);
// Create a group to hold the model
const modelGroup = new THREE.Group();
scene.add(modelGroup);
// Load GLB model
const loader = new THREE.GLTFLoader();
loader.load('https://files.catbox.moe/vmuyy1.glb', (gltf) => {
const model = gltf.scene;
// Add model to the group instead of directly to the scene
modelGroup.add(model);
// Scale the model
model.scale.set(3, 3, 3);
// Center the model using bounding box
const box = new THREE.Box3().setFromObject(model);
const center = box.getCenter(new THREE.Vector3());
// Move the model so its center is at the origin
model.position.sub(center);
// Adjust the camera position based on the bounding box size
const boxSize = box.getSize(new THREE.Vector3());
const maxDim = Math.max(boxSize.x, boxSize.y, boxSize.z);
camera.position.z = maxDim * 2;
modelLoaded = true;
// Make model interactive
model.traverse((child) => {
if (child.isMesh) {
child.cursor = 'pointer';
}
});
// Animation loop
function animate() {
requestAnimationFrame(animate);
modelGroup.rotation.y += 0.02;
renderer.render(scene, camera);
}
animate();
}, undefined, function(error) {
console.error(error);
});
// Click event handler
function onModelClick(event) {
if (!modelLoaded) return;
// Calculate mouse position in normalized device coordinates
mouse.x = (event.clientX / window.innerWidth) * 2 - 1;
mouse.y = -(event.clientY / window.innerHeight) * 2 + 1;
// Update the picking ray with the camera and mouse position
raycaster.setFromCamera(mouse, camera);
// Calculate objects intersecting the picking ray
const intersects = raycaster.intersectObjects(modelGroup.children, true);
if (intersects.length > 0) {
// Open link when model is clicked
window.open('https://dexscreener.com', '_blank');
}
}
// Add click event listener
renderer.domElement.addEventListener('click', onModelClick);
// Handle window resize
window.addEventListener('resize', () => {
const width = window.innerWidth;
const height = window.innerHeight;
renderer.setSize(width, height);
camera.aspect = width / height;
camera.updateProjectionMatrix();
});
const audio = new Audio('593klv.mp3');
audio.loop = true;
const musicToggle = document.getElementById('music-toggle');
// Toggle music on click
musicToggle.addEventListener('click', () => {
if (audio.paused) {
audio.play().catch((error) => {
console.error('Audio playback failed:', error);
});
musicToggle.classList.remove('off');
musicToggle.classList.add('on');
} else {
audio.pause();
musicToggle.classList.remove('on');
musicToggle.classList.add('off');
}
});
</script>
<script>
// Initialize Draggable on the green window
Draggable.create(".draggable", {
type: "x,y", // Allow dragging on both x and y axes
edgeResistance: 0.65, // Adds resistance when dragging near edges
bounds: window, // Constrain dragging within the window bounds
inertia: true // Allows the window to "slide" after release
});
</script>
</body>
</html>