Tool Request: 308600903 - create_file
{"content":"<!DOCTYPE html>\\n<html lang=\\\"en\\\">\\n<head>\\n<meta charset=\\\"UTF-8\\\">\\n<title>Rotating Hexagon with Bouncing Balls</title>\\n<style>\\nbody, html {\\n height: 100%;\\n margin: 0;\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n}\\n#hexContainer {\\n position: relative;\\n width: 250px; /* Adjust the size of your container */\\n height: 433.013px; /* The ratio for a perfect hexagon is (sqrt(3)/2) * width */\\n perspective: 800px;\\n}\\n#hex {\\n position: absolute;\\n top: -50%; left: -50%;\\n bottom: -50%; right: -50%;\\n margin: auto; /* Centering the hexagon inside its container */\\n border-left: 125px solid transparent;\\n border-right: 125px solid transparent;\\n border-top: 176.777px solid #ccc; /* The ratio for a perfect hexagon is sqrt(3) * height */\\n}\\n#hex::before, #hex::after {\\n content: '';\\n position: absolute;\\n top: -100%;\\n left: 0;\\n width: 250px;\\n height: 176.777px; /* The ratio for a perfect hexagon is sqrt(3) * height */\\n background-color: #ccc;\\n}\\n#hex::before {\\n transform: rotate(-60deg);\\n}\\n#hex::after {\\n transform: rotate(60deg);\\n}\\n.balls {\\n position: absolute;\\n width: 15px; /* Size of the balls */\\n height: 15px;\\n background-color: red;\\n border-radius: 50%;\\n animation: bounce 2s infinite ease-out, rotateHex 4s linear infinite;\\n}\\n@keyframes bounce {\\n 0% { top: -7.5px; left: calc(50% - 7.5px); }\\n 15%, 85% { top: calc(50% - 15px); left: calc(50% - 7.5px); }\\n 30%, 70% { top: calc(50% - 22.5px); left: calc(50% + 15px); }\\n 45%, 55% { top: calc(50% - 30px); left: calc(50% + 22.5px); }\\n 60% { top: calc(50% - 37.5px); left: calc(50% + 30px); }\\n 100% { transform: translateY(-433px) rotateZ(360deg); } \\n}\\n@keyframes rotateHex {\\n from { transform: rotateY(0deg); }\\n to { transform: rotateY(360deg); }\\n}\\n</style>\\n</head>\\n<body>\\n<div id=\\\"hexContainer\\\">\\n <div id=\\\"hex\\\"></div>\\n <!-- Add more ball elements with unique ids and class balls for different bouncing patterns -->\\n <div class=\\\"balls\\\" style=\\\"top: calc(50% - 7.5px); left: calc(50% - 7.5px); animation-delay: .2s;\\\"></div>\\n <div class=\\\"balls\\\" style=\\\"top: calc(50% - 7.5px); left: calc(50% + 15px);\\\"></div>\\n</div>\\n\\n<script>\\ndocument.addEventListener('DOMContentLoaded', function() {\\n for (let i = 0; i < 20; i++) { // You can adjust the number of balls\\n const ball = document.createElement(\"div\");\\n ball.classList.add(\"balls\");\\n\\n const x = Math.random() * window.innerWidth / 2;\\n const y = Math.random() * window.innerHeight / 2;\\n\\n ball.style.left = `\\${x}px`;\\n ball.style.top = `\\${y}px`;\\n ball.style.animationDelay = `\\${Math.random() * 4}s`; // Random delay from 0 to 4 seconds\\n\\n document.getElementById(\"hexContainer\").appendChild(ball);\\n }\\n});\\n</script>\\n</body>\\n</html>","file_name":"index.html"}