gravity / prompts.txt
madansa7's picture
Add 3 files
f88f685 verified
Here is a full prompt to generate a web-based, cursor and touch-responsive "Google Gravity"-style app using HTML, CSS, and JavaScript. This app will simulate the gravity effect on draggable Google-like elements, and will work on both desktop (cursor) and mobile (touch). 🧠 Prompt (for an AI or code generator): Create a web-based app that simulates "Google Gravity" with the following requirements: HTML Structure: A search bar with a “Google” logo at the top. Several buttons like “Search”, “I’m Feeling Lucky”. All elements should fall with gravity when the page loads. CSS Styling: Center the elements initially like a typical Google homepage. Apply a clean, flat style using basic fonts and spacing. Add smooth transitions when elements are moved or interact. JavaScript (Vanilla): Apply a basic physics engine: gravity, collision detection, and bounce effects. Make all elements draggable using the mouse and touch. On load, apply a gravity drop effect where all elements fall to the bottom. Use requestAnimationFrame() for animation. Support multi-touch on mobile. Responsive: The layout should adapt to different screen sizes (desktop, tablet, mobile). Touch interaction must support dragging elements with fingers. Extras (Optional but Preferred): Allow user to re-trigger gravity with a button. Use realistic bounce and inertia when dragging and dropping elements.
search type should work and redirect to real google with users search request, with each piece should be seperated,