itsvobby's picture
create a 100 percent same 2d version of a minecraft game
34072fd verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Physics Visualizer Pro</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.globe.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<style>
#vanta-bg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
opacity: 0.15;
}
.branch-card:hover {
transform: translateY(-5px);
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.tooltip {
position: relative;
display: inline-block;
}
.tooltip .tooltiptext {
visibility: hidden;
width: 200px;
background-color: #333;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 5px;
position: absolute;
z-index: 1;
bottom: 125%;
left: 50%;
transform: translateX(-50%);
opacity: 0;
transition: opacity 0.3s;
}
.tooltip:hover .tooltiptext {
visibility: visible;
opacity: 1;
}
</style>
</head>
<body class="bg-gray-50 min-h-screen font-sans">
<div id="vanta-bg"></div>
<!-- Navigation -->
<nav class="bg-indigo-600 text-white shadow-lg">
<div class="container mx-auto px-6 py-3">
<div class="flex justify-between items-center">
<div class="flex space-x-4">
<div>
<a href="#" class="flex items-center py-2 px-2">
<i data-feather="atom" class="mr-2"></i>
<span class="font-bold text-lg">Physics Visualizer Pro</span>
</a>
</div>
</div>
<div class="hidden md:flex items-center space-x-1">
<a href="#" class="py-2 px-3 bg-indigo-700 rounded hover:bg-indigo-800 transition duration-300">Home</a>
<a href="#branches" class="py-2 px-3 hover:bg-indigo-700 rounded transition duration-300">Branches</a>
<a href="#quantities" class="py-2 px-3 hover:bg-indigo-700 rounded transition duration-300">Quantities</a>
<a href="#instruments" class="py-2 px-3 hover:bg-indigo-700 rounded transition duration-300">Instruments</a>
<a href="midjourney.html" class="py-2 px-3 hover:bg-indigo-700 rounded transition duration-300">AI Art Generator</a>
<a href="minecraft2d.html" class="py-2 px-3 hover:bg-indigo-700 rounded transition duration-300">2D Minecraft</a>
</div>
<div class="md:hidden flex items-center">
<button class="outline-none mobile-menu-button">
<i data-feather="menu" class="w-6 h-6"></i>
</button>
</div>
</div>
</div>
<div class="hidden mobile-menu">
<a href="#" class="block py-2 px-4 text-sm hover:bg-indigo-700">Home</a>
<a href="#branches" class="block py-2 px-4 text-sm hover:bg-indigo-700">Branches</a>
<a href="#quantities" class="block py-2 px-4 text-sm hover:bg-indigo-700">Quantities</a>
<a href="#instruments" class="block py-2 px-4 text-sm hover:bg-indigo-700">Instruments</a>
<a href="midjourney.html" class="block py-2 px-4 text-sm hover:bg-indigo-700">AI Art Generator</a>
<a href="minecraft2d.html" class="block py-2 px-4 text-sm hover:bg-indigo-700">2D Minecraft</a>
</div>
</nav>
<!-- Hero Section -->
<header class="bg-gradient-to-r from-indigo-500 to-purple-600 text-white py-20">
<div class="container mx-auto px-6 text-center">
<h1 class="text-4xl md:text-6xl font-bold mb-6">Explore the Universe Through Physics</h1>
<p class="text-xl md:text-2xl mb-8">Visualizing the fundamental concepts that govern our reality</p>
<button class="bg-white text-indigo-600 font-bold py-3 px-8 rounded-full hover:bg-gray-100 transition duration-300 shadow-lg">
Start Exploring
</button>
</div>
</header>
<!-- Branches of Physics Section -->
<section id="branches" class="py-16 bg-white">
<div class="container mx-auto px-6">
<h2 class="text-3xl font-bold text-center mb-12 text-gray-800">Branches of Physics</h2>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
<!-- Mechanics Card -->
<div class="branch-card bg-white rounded-xl shadow-md overflow-hidden transition duration-500 ease-in-out">
<div class="h-48 bg-gradient-to-r from-blue-400 to-blue-600 flex items-center justify-center">
<i data-feather="wind" class="w-16 h-16 text-white"></i>
</div>
<div class="p-6">
<h3 class="text-xl font-semibold text-gray-800 mb-2">Mechanics</h3>
<p class="text-gray-600">The branch of physics related to the laws of motions and gravitation.</p>
<div class="mt-4">
<span class="inline-block bg-blue-100 text-blue-800 text-xs px-2 py-1 rounded">Newton's Laws</span>
<span class="inline-block bg-blue-100 text-blue-800 text-xs px-2 py-1 rounded ml-1">Gravity</span>
</div>
</div>
</div>
<!-- Thermodynamics Card -->
<div class="branch-card bg-white rounded-xl shadow-md overflow-hidden transition duration-500 ease-in-out">
<div class="h-48 bg-gradient-to-r from-red-400 to-red-600 flex items-center justify-center">
<i data-feather="thermometer" class="w-16 h-16 text-white"></i>
</div>
<div class="p-6">
<h3 class="text-xl font-semibold text-gray-800 mb-2">Thermodynamics</h3>
<p class="text-gray-600">The study of heat and temperature and their relationship with energy and work.</p>
<div class="mt-4">
<span class="inline-block bg-red-100 text-red-800 text-xs px-2 py-1 rounded">Heat Transfer</span>
<span class="inline-block bg-red-100 text-red-800 text-xs px-2 py-1 rounded ml-1">Entropy</span>
</div>
</div>
</div>
<!-- Nuclear Physics Card -->
<div class="branch-card bg-white rounded-xl shadow-md overflow-hidden transition duration-500 ease-in-out">
<div class="h-48 bg-gradient-to-r from-purple-400 to-purple-600 flex items-center justify-center">
<i data-feather="zap" class="w-16 h-16 text-white"></i>
</div>
<div class="p-6">
<h3 class="text-xl font-semibold text-gray-800 mb-2">Nuclear Physics</h3>
<p class="text-gray-600">The study of the nucleus of an atom and nuclear reactions.</p>
<div class="mt-4">
<span class="inline-block bg-purple-100 text-purple-800 text-xs px-2 py-1 rounded">Fission</span>
<span class="inline-block bg-purple-100 text-purple-800 text-xs px-2 py-1 rounded ml-1">Fusion</span>
</div>
</div>
</div>
<!-- More branches... -->
</div>
</div>
</section>
<!-- Physical Quantities Section -->
<section id="quantities" class="py-16 bg-gray-50">
<div class="container mx-auto px-6">
<h2 class="text-3xl font-bold text-center mb-12 text-gray-800">Physical Quantities</h2>
<div class="grid grid-cols-1 lg:grid-cols-2 gap-12">
<!-- Fundamental Quantities -->
<div class="bg-white p-8 rounded-xl shadow-md">
<h3 class="text-2xl font-semibold mb-6 text-indigo-600">Fundamental Quantities</h3>
<p class="mb-6 text-gray-700">Physical quantities which cannot be explained by other physical quantities.</p>
<!-- Chart -->
<div class="h-64">
<canvas id="fundamentalChart"></canvas>
</div>
<div class="mt-8">
<h4 class="font-semibold mb-4">Examples:</h4>
<ul class="space-y-2">
<li class="flex items-center">
<i data-feather="clock" class="mr-2 text-blue-500"></i>
<span>Time (s)</span>
</li>
<li class="flex items-center">
<i data-feather="ruler" class="mr-2 text-blue-500"></i>
<span>Length (m)</span>
</li>
<li class="flex items-center">
<i data-feather="box" class="mr-2 text-blue-500"></i>
<span>Mass (kg)</span>
</li>
</ul>
</div>
</div>
<!-- Derived Quantities -->
<div class="bg-white p-8 rounded-xl shadow-md">
<h3 class="text-2xl font-semibold mb-6 text-indigo-600">Derived Quantities</h3>
<p class="mb-6 text-gray-700">Physical quantities which are explained on the basis of fundamental quantities.</p>
<!-- Chart -->
<div class="h-64">
<canvas id="derivedChart"></canvas>
</div>
<div class="mt-8">
<h4 class="font-semibold mb-4">Examples:</h4>
<ul class="space-y-2">
<li class="flex items-center">
<i data-feather="wind" class="mr-2 text-purple-500"></i>
<span>Velocity (m/s)</span>
</li>
<li class="flex items-center">
<i data-feather="layers" class="mr-2 text-purple-500"></i>
<span>Area (m²)</span>
</li>
<li class="flex items-center">
<i data-feather="activity" class="mr-2 text-purple-500"></i>
<span>Acceleration (m/s²)</span>
</li>
</ul>
</div>
</div>
</div>
<!-- Density Section -->
<div class="mt-16 bg-white p-8 rounded-xl shadow-md">
<h3 class="text-2xl font-semibold mb-6 text-indigo-600">Density</h3>
<p class="mb-6 text-gray-700">Mass per unit volume is called density. It is a scalar quantity.</p>
<div class="grid grid-cols-1 md:grid-cols-2 gap-8">
<div>
<h4 class="font-semibold mb-4">Formula:</h4>
<div class="bg-gray-100 p-6 rounded-lg text-center">
<p class="text-2xl font-mono">ρ = m / v</p>
<p class="mt-2 text-gray-600">where ρ is density, m is mass, and v is volume</p>
</div>
<div class="mt-6">
<h4 class="font-semibold mb-2">Units:</h4>
<div class="flex space-x-2">
<span class="bg-indigo-100 text-indigo-800 px-3 py-1 rounded-full text-sm">kg/m³</span>
<span class="bg-indigo-100 text-indigo-800 px-3 py-1 rounded-full text-sm">g/cm³</span>
</div>
</div>
</div>
<div>
<h4 class="font-semibold mb-4">Volume Formulas:</h4>
<div class="space-y-4">
<div class="bg-gray-100 p-4 rounded-lg">
<p class="font-medium">Cylinder:</p>
<p class="text-xl font-mono mt-1">V = πr²h</p>
</div>
<div class="bg-gray-100 p-4 rounded-lg">
<p class="font-medium">Sphere:</p>
<p class="text-xl font-mono mt-1">V = (4/3)πr³</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Measuring Instruments Section -->
<section id="instruments" class="py-16 bg-white">
<div class="container mx-auto px-6">
<h2 class="text-3xl font-bold text-center mb-12 text-gray-800">Measuring Instruments</h2>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
<!-- Vernier Caliper -->
<div class="bg-gray-50 p-6 rounded-xl shadow-sm border border-gray-200">
<div class="flex items-center mb-4">
<div class="bg-indigo-100 p-3 rounded-lg mr-4">
<i data-feather="ruler" class="text-indigo-600"></i>
</div>
<h3 class="text-xl font-semibold">Vernier Caliper</h3>
</div>
<p class="text-gray-600 mb-4">A precision instrument used to measure dimensions with high accuracy.</p>
<div class="space-y-2">
<div class="flex justify-between">
<span class="text-gray-500">Least Count:</span>
<span class="font-medium">0.01 cm</span>
</div>
<div class="flex justify-between">
<span class="text-gray-500">Main Scale:</span>
<span class="font-medium">cm and mm</span>
</div>
</div>
</div>
<!-- Screw Gauge -->
<div class="bg-gray-50 p-6 rounded-xl shadow-sm border border-gray-200">
<div class="flex items-center mb-4">
<div class="bg-purple-100 p-3 rounded-lg mr-4">
<i data-feather="circle" class="text-purple-600"></i>
</div>
<h3 class="text-xl font-semibold">Screw Gauge</h3>
</div>
<p class="text-gray-600 mb-4">Measures small lengths or diameters with high precision.</p>
<div class="space-y-2">
<div class="flex justify-between">
<span class="text-gray-500">Least Count:</span>
<span class="font-medium">0.001 cm</span>
</div>
<div class="flex justify-between">
<span class="text-gray-500">Pitch:</span>
<span class="font-medium">1 mm</span>
</div>
</div>
</div>
<!-- Stopwatch -->
<div class="bg-gray-50 p-6 rounded-xl shadow-sm border border-gray-200">
<div class="flex items-center mb-4">
<div class="bg-blue-100 p-3 rounded-lg mr-4">
<i data-feather="clock" class="text-blue-600"></i>
</div>
<h3 class="text-xl font-semibold">Stopwatch</h3>
</div>
<p class="text-gray-600 mb-4">Measures time intervals between two events with precision.</p>
<div class="space-y-2">
<div class="flex justify-between">
<span class="text-gray-500">Type:</span>
<span class="font-medium">Digital/Mechanical</span>
</div>
<div class="flex justify-between">
<span class="text-gray-500">Least Count:</span>
<span class="font-medium">0.01 s</span>
</div>
</div>
</div>
</div>
<!-- Instrument Comparison Chart -->
<div class="mt-16 bg-white p-8 rounded-xl shadow-md">
<h3 class="text-2xl font-semibold mb-6 text-indigo-600">Instrument Precision Comparison</h3>
<div class="h-80">
<canvas id="instrumentChart"></canvas>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer class="bg-gray-900 text-white py-12">
<div class="container mx-auto px-6">
<div class="grid grid-cols-1 md:grid-cols-3 gap-8">
<div>
<h3 class="text-xl font-semibold mb-4">Physics Visualizer Pro</h3>
<p class="text-gray-400">Making physics concepts visual and interactive for better understanding.</p>
<div class="flex space-x-4 mt-4">
<a href="#" class="text-gray-400 hover:text-white">
<i data-feather="twitter"></i>
</a>
<a href="#" class="text-gray-400 hover:text-white">
<i data-feather="github"></i>
</a>
<a href="#" class="text-gray-400 hover:text-white">
<i data-feather="linkedin"></i>
</a>
</div>
</div>
<div>
<h3 class="text-xl font-semibold mb-4">Quick Links</h3>
<ul class="space-y-2">
<li><a href="#branches" class="text-gray-400 hover:text-white">Branches of Physics</a></li>
<li><a href="#quantities" class="text-gray-400 hover:text-white">Physical Quantities</a></li>
<li><a href="#instruments" class="text-gray-400 hover:text-white">Measuring Instruments</a></li>
</ul>
</div>
<div>
<h3 class="text-xl font-semibold mb-4">Subscribe</h3>
<p class="text-gray-400 mb-4">Stay updated with new visualizations and physics content.</p>
<div class="flex">
<input type="email" placeholder="Your email" class="px-4 py-2 w-full rounded-l focus:outline-none text-gray-800">
<button class="bg-indigo-600 hover:bg-indigo-700 px-4 py-2 rounded-r">
<i data-feather="send"></i>
</button>
</div>
</div>
</div>
<div class="border-t border-gray-800 mt-8 pt-8 text-center text-gray-400">
<p>© 2023 Physics Visualizer Pro. All rights reserved.</p>
</div>
</div>
</footer>
<script>
// Mobile menu toggle
const btn = document.querySelector(".mobile-menu-button");
const menu = document.querySelector(".mobile-menu");
btn.addEventListener("click", () => {
menu.classList.toggle("hidden");
});
// Vanta.js background
VANTA.GLOBE({
el: "#vanta-bg",
mouseControls: true,
touchControls: true,
gyroControls: false,
minHeight: 200.00,
minWidth: 200.00,
scale: 1.00,
scaleMobile: 1.00,
color: 0x4f46e5,
backgroundColor: 0xf9fafb,
size: 0.8
});
// Initialize charts
document.addEventListener('DOMContentLoaded', function() {
// Fundamental Quantities Chart
const fundamentalCtx = document.getElementById('fundamentalChart').getContext('2d');
const fundamentalChart = new Chart(fundamentalCtx, {
type: 'doughnut',
data: {
labels: ['Length', 'Mass', 'Time', 'Electric Current', 'Temperature', 'Amount of Substance', 'Luminous Intensity'],
datasets: [{
data: [20, 20, 20, 15, 10, 10, 5],
backgroundColor: [
'#3b82f6',
'#6366f1',
'#8b5cf6',
'#ec4899',
'#f43f5e',
'#f59e0b',
'#10b981'
],
borderWidth: 0
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: {
position: 'bottom'
}
}
}
});
// Derived Quantities Chart
const derivedCtx = document.getElementById('derivedChart').getContext('2d');
const derivedChart = new Chart(derivedCtx, {
type: 'bar',
data: {
labels: ['Velocity', 'Area', 'Acceleration', 'Force', 'Energy', 'Power'],
datasets: [{
label: 'Common Derived Quantities',
data: [25, 20, 18, 15, 12, 10],
backgroundColor: '#8b5cf6',
borderRadius: 4
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
scales: {
y: {
beginAtZero: true
}
},
plugins: {
legend: {
display: false
}
}
}
});
// Instrument Comparison Chart
const instrumentCtx = document.getElementById('instrumentChart').getContext('2d');
const instrumentChart = new Chart(instrumentCtx, {
type: 'radar',
data: {
labels: ['Precision', 'Ease of Use', 'Versatility', 'Cost', 'Durability'],
datasets: [
{
label: 'Vernier Caliper',
data: [90, 70, 80, 60, 85],
backgroundColor: 'rgba(99, 102, 241, 0.2)',
borderColor: 'rgba(99, 102, 241, 1)',
borderWidth: 2,
pointBackgroundColor: 'rgba(99, 102, 241, 1)'
},
{
label: 'Screw Gauge',
data: [95, 50, 60, 70, 75],
backgroundColor: 'rgba(139, 92, 246, 0.2)',
borderColor: 'rgba(139, 92, 246, 1)',
borderWidth: 2,
pointBackgroundColor: 'rgba(139, 92, 246, 1)'
},
{
label: 'Stopwatch',
data: [80, 85, 50, 40, 90],
backgroundColor: 'rgba(59, 130, 246, 0.2)',
borderColor: 'rgba(59, 130, 246, 1)',
borderWidth: 2,
pointBackgroundColor: 'rgba(59, 130, 246, 1)'
}
]
},
options: {
responsive: true,
maintainAspectRatio: false,
scales: {
r: {
angleLines: {
display: true
},
suggestedMin: 0,
suggestedMax: 100
}
},
plugins: {
legend: {
position: 'bottom'
}
}
}
});
});
// Feather Icons
feather.replace();
</script>
</body>
</html>