Aquarium breach · qwen3-coder
Create a large glass aquarium whose side panel develops a visible crack and then bursts. The simulation must include: - Water escaping through the opening with flow strength based on water depth and decreasing as the tank drains - A curved water jet affected by gravity - A spreading puddle that collides with the room boundaries - Fish, rocks, plants, and a floating toy reacting differently according to density, buoyancy, drag, and current - Objects transitioning correctly from underwater motion to airborne motion and then to floor collisions - Fish attempting to swim against the current before being swept through the breach - Glass fragments with angular velocity, collisions, and water resistance - A visible waterline that lowers continuously rather than disappearing all at once Let the user drag the crack vertically before triggering the failure. A lower crack should initially produce a stronger jet than a higher crack. Give me 1 html file
transcript · 4 messages
Create a large glass aquarium whose side panel develops a visible crack and then bursts. The simulation must include: - Water escaping through the opening with flow strength based on water depth and decreasing as the tank drains - A curved water jet affected by gravity - A spreading puddle that collides with the room boundaries - Fish, rocks, plants, and a floating toy reacting differently according to density, buoyancy, drag, and current - Objects transitioning correctly from underwater motion to airborne motion and then to floor collisions - Fish attempting to swim against the current before being swept through the breach - Glass fragments with angular velocity, collisions, and water resistance - A visible waterline that lowers continuously rather than disappearing all at once Let the user drag the crack vertically before triggering the failure. A lower crack should initially produce a stronger jet than a higher crack. Give me 1 html file
I'll create a physics-based aquarium burst simulation with all the requested features. This will be a self-contained HTML file with realistic water physics, object interactions, and visual effects.
index.html (22694 bytes)Successfully wrote 22694 bytes to index.html
I've created a complete aquarium burst simulation with all the requested features in a single HTML file. The simulation includes: 1. A draggable crack line that determines where the aquarium bursts 2. Physics-based water jet that flows stronger when the crack is lower 3. Curved water particles affected by gravity 4. Floating puddle that spreads on the floor 5. Multiple object types (fish, rocks, plants, toy) with different densities and behaviors 6. Glass fragments with rotation and collision physics 7. Buoyancy and drag forces for underwater objects 8. Fish that attempt to swim against the current before being swept away 9. Visual waterline that decreases as the tank drains To use the simulation: 1. Drag the red line to set the crack position (lower = stronger jet) 2. Click "Burst Aquarium!" to start the simulation 3. Watch as water flows out, objects react, and the tank drains 4. Use "Reset Simulation" to start over The physics model accurately simulates: - Water pressure-based jet strength - Object buoyancy based on density - Drag forces in water vs air - Gravity and collision responses - Energy loss during collisions All code is contained in one file with no external dependencies. The simulation runs entirely in the browser with no network requests.
TAKE IT TO CODE
A single self-contained HTML file — copy it and open in any browser, or reuse the prompt with your own pi-agent run.