Dynamic Sky & Grass: A pleasant sky that transitions to a grassy field, creating a sense of depth. The grass area occupies approximately 55.5% of the vertical scene.
"Happy Mother's Day!" Message: A festive, centrally displayed message.
Animated Clouds: Clouds drift lazily across the sky, with randomized shapes, sizes, and speeds, reappearing on the other side for continuous animation.
Layered Hills: Multiple layers of randomly generated, curved hills create a parallax effect and add to the scene's depth. Hills are positioned above the grass line.
Dirt Path: A randomly generated, perspective-correct dirt path winds its way from the bottom of the scene towards the horizon on the grass.
Swaying Trees: Trees are randomly placed on the grass (avoiding the dirt path), sway gently in the breeze, and are scaled according to perspective.
Interactive Sun: A sun with a friendly face is positioned in the upper-right sky. Its face rotates to "look" at the average position (centroid) of all active rabbits. If no rabbits are present, it looks towards the center of the grass field. The sun hides during rain.
Rain Effect: At random intervals (15-40 seconds), rain will start and last for a random duration (10-25 seconds). Raindrops fall from the sky and appear to be stopped by tree canopies, or hit the ground. The sky color transitions to gray during rain and back to blue when it stops.
Rabbit Behaviors:
Initial Population: The scene starts with a set number of rabbits.
Click & Drag: You can click and drag any rabbit to a new location. Upon release, it will resume its previous behavior (or a sensible default like wandering). Rabbits cannot be dragged if they are exiting the path or actively targeting a carrot. When the mouse hovers over a rabbit, it will pause its current movement to make it easier to click.
Wandering: This is the default active state. Rabbits pick random target locations on the grass and move towards them.
Resting: After a period of wandering (5-20 seconds), a rabbit will enter a 'RESTING' state for 5 seconds before wandering again.
Carrot Interaction:
Targeting Carrot: When a carrot appears (either by click or automatically after rain), one available rabbit (not already exiting, sheltering, or targeting another carrot) will be assigned to it and enter the 'TARGETING_CARROT' state.
Eating Carrot: Upon reaching the carrot, the rabbit will "eat" it, causing the carrot to shrink and fade over 1 second.
Post-Carrot State: After a carrot is gone, if it's not raining, the rabbit will typically start 'WANDERING'. If it's raining, it will seek shelter.
Path Exiting (Remove Rabbit):
When the "Remove Rabbit" function is triggered, a random eligible rabbit (not exiting or targeting a carrot) enters the 'PATH_EXITING' state.
Stage 1 (To Entrance): The rabbit navigates to the bottom-center of the dirt path.
Stage 2 (Up Path): The rabbit moves straight up along the centerline of the path. Its visual orientation is fixed upwards, and it does not flip horizontally.
Removal: Once the rabbit's visual top edge moves above the top of the grass field, it is removed from the scene and the simulation.
Rain Response:
When rain starts, rabbits in 'WANDERING' or 'RESTING' states will transition to 'SEEKING_SHELTER'.
They will find the closest tree and move towards its base.
Once near the tree base, they enter the 'SHELTERING' state and remain still.
When the rain stops, sheltering rabbits will transition to 'WANDERING' (or target a carrot if one is available and they are chosen).
Rabbits targeting a carrot will finish eating before seeking shelter if it's raining.
Visuals & Animation:
Hopping: Rabbits have a hopping animation when moving.
Head Orientation: Their heads turn to face their current target (carrot, wander point, path entrance, or shelter).
Perspective Scaling: Rabbits appear smaller when they are further "up" the screen (towards the horizon).
Z-Axis Sorting: Rabbits are correctly drawn in front of or behind trees and carrots based on their Y-position, creating a proper sense of depth.
Carrot Mechanics:
Spawning: Carrots can be spawned by clicking on the grass. If no carrots are present, one will also spawn automatically at random intervals. Multiple carrots can exist.
Targeting: Only one rabbit will actively target a specific carrot at a time.
Consumption: Carrots are "eaten" over 1 second, shrinking and fading away.
User Controls & Debug Features:
Debug Button: Toggles the visibility of all debug information.
Rabbit-Specific Debug Display: When active, text appears above each rabbit within a semi-transparent box:
If RESTING: "Time until Wake: \[X]s / 5s" (shows countdown of its 5-second rest).
If WANDERING (and `wanderToRestTimer` is active): "Waiting to Rest: \[Y]s" (shows countdown until it decides to rest).
Blank otherwise.
This debug box maintains a constant size on screen (does not scale with perspective) and is always oriented correctly, regardless of the rabbit's direction.
Global Debug Info Box (Draggable): Located in the lower-right corner (can be dragged anywhere). Displays:
`Carrots`: Number of carrots currently in the scene.
`Carrot Status`: "None", "Present", or "Being Eaten (X%)". (Note: "Being Eaten" applies if any carrot is being eaten).
`Rain Timer`: Countdown in seconds until the next rain event or until current rain stops.
`Raining`: `true` or `false`.
A summary of how many rabbits are currently in each state.
Manage Rabbit Button `[ - ] Rabbit [ + ]`:
Clicking the `[ + ]` (right side) adds a new rabbit to the scene. New rabbits enter from either the far left or far right edge of the grass, at a random Y-coordinate, and initially face inwards.
Clicking the `[ - ]` (left side) selects a random, eligible rabbit (not already exiting or targeting a carrot) and initiates its 'PATH_EXITING' sequence.
Help Button `?`: Displays this detailed information modal.
Technical Details:
SVG Rendering: The entire scene is rendered using Scalable Vector Graphics (SVG).
JavaScript Animation: All animations and interactions are controlled via JavaScript.
Perspective Simulation: Object scaling and placement are adjusted to give a pseudo-3D perspective effect.
Randomness: Many elements, such as cloud/tree/hill generation, rabbit pathing, and rain spawning, incorporate randomness for a more dynamic and less repetitive scene.