-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbc.html
More file actions
79 lines (73 loc) · 2.28 KB
/
bc.html
File metadata and controls
79 lines (73 loc) · 2.28 KB
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
<!DOCTYPE html><html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>GiftMap Education | World's Largest Free Learning Platform</title>
<link href="https://fonts.googleapis.com/css2?family=Viga&display=swap" rel="stylesheet">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r134/three.min.js"></script>
<style>
body, html {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
overflow: hidden;
font-family: 'Viga', sans-serif;
background: #000;
color: white;
}
#bg-canvas {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
z-index: 0;
}
.overlay {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
z-index: 10;
}
</style>
</head>
<body><canvas id="bg-canvas"></canvas>
<div class="overlay">
<h1 class="text-4xl md:text-6xl text-yellow-400 mb-4">GiftMap Education</h1>
<p class="text-xl md:text-2xl text-gray-300">World's Largest Free Education Platform</p>
</div><script>
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
const renderer = new THREE.WebGLRenderer({ canvas: document.getElementById('bg-canvas'), alpha: true });
renderer.setSize(window.innerWidth, window.innerHeight);
const light = new THREE.PointLight(0xffffff, 1, 100);
light.position.set(10, 10, 10);
scene.add(light);
const objects = [];
const globe = new THREE.Mesh(
new THREE.IcosahedronGeometry(4, 1),
new THREE.MeshStandardMaterial({ color: 0xfacc15, wireframe: true })
);
scene.add(globe);
objects.push(globe);
camera.position.z = 10;
function animate() {
requestAnimationFrame(animate);
objects.forEach(obj => {
obj.rotation.x += 0.002;
obj.rotation.y += 0.003;
});
renderer.render(scene, camera);
}
animate();
window.addEventListener('resize', () => {
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
renderer.setSize(window.innerWidth, window.innerHeight);
});
</script></body>
</html>