The Magical Forest Jam
A whimsical interactive musical web toy for children featuring musical fruit trees, a singing frog, magic star cloud, and glowing firefly s…
How it was built
This website was built using a cutting-edge workflow by combining human creative direction with advanced prompt engineering inside Google AI Studio, leveraging the Gemini 1.5 Pro model. The goal was to generate highly optimized, zero-dependency code that satisfies all strict constraints of the competition in a single file. Here is how the system was developed and orchestrated:
- Prompt Engineering & AI Orchestration
• Context Isolation: Google AI Studio was fed a highly structured markdown prompt with absolute constraints. The primary instruction forced the model to generate a strict minimalist structure containing exactly one interactive element and no other selectable DOM text. • Algorithmic Instruction: The AI was instructed to avoid bulky external libraries (like Three.js or WebGL) and instead generate raw, performance-focused Vanilla JavaScript mathematical vector loops to handle the complex 3D rendering.
- Dynamic UI Blueprint (HTML5 & AI Injected Canvas)
• The Architecture: The generated HTML contains only a single wrapped in a pure black . • Dynamic Generation: Rather than hardcoding the background, the Gemini-generated script dynamically injects an HTML5 element into the page only after the user triggers the interaction.
- The Interaction Shield & Styling (CSS3)
• Absolute Center Layout: The layout uses absolute flex centering over a solid pitch-black velvet backdrop (#000000). • The AI Pointer Lock: To safely maintain the "one-button" constraint, the AI added the CSS property pointer-events: none; to the canvas. This mathematically makes the entire 3D neon visual background invisible to mouse clicks, guaranteeing the user can only ever interact with the primary button.
- Procedural 3D Vector Math Engine (Vanilla JavaScript)
• The Matrix Simulation: The core of the 3D infinity neon tunnel relies on a Vector Projection Matrix generated by the AI inside a continuous requestAnimationFrame() render loop. • The Perspective Illusion: The script maintains an array of geometric coordinate nodes mapped onto a virtual Z-axis. The loop constantly decreases the Z values, projecting wireframe neon cubes that expand rapidly toward the viewer to simulate high-speed flight. • The Acceleration Trigger: The AI structured a dynamic click-counter state machine. Every time the user clicks the button, the script alters the button text to show a "grumpy" attitude and directly scales up the velocity variable inside the matrix math equation, forcing the wireframes to warp dynamically until the system safely overloads.
Comments 0
Join the conversation. Ask how it was built, or tell the maker what you love.
Sign in to commentNo comments yet
Be the first. Makers love hearing what clicked, and what didn’t.
More from Rocket
View profile
Built in 1 hourNeon Cyber Tunnel - Enter The Core
Minimalist interactive 3D cyberpunk neon wireframe tunnel with acceleration and overload explosion.
Built in 1 hourNeon Cyber Tunnel - Enter The Core
Minimalist interactive 3D cyberpunk neon wireframe tunnel with acceleration and overload explosion.