Learning Timeline
Key Insights
Keyword Tip: 'Standalone HTML'
Always use the phrase "put everything in a standalone HTML file" in your coding prompts. This ensures the AI includes all dependencies, CSS, and JavaScript within a single file, so you don't have to manually download external libraries.
Preview Window Limitations
The preview display within the AI chat window may appear 'squished' or suboptimal for graphics-heavy content. The best practice is to always copy the code and run it as a local file in your browser to get the authentic UI/UX experience.
Prompts
Simulation Code Generation Prompt
Target:
Kimi K2
Create an animation of fluid dynamics, include interactivity and sliders with multiple color dyes and put everything in a standalone HTML file.
Step by Step
Creating Fluid Simulations with Kimi K2
- Open the Kimi K2 website or app and start a 'New Chat' session.
- Ensure 'web search' is disabled (if the option is available) to force the AI to rely solely on the model's internal capabilities.
- Enter your prompt into the chat box (refer to the Prompts card for the actual text).
- Click the 'Run' button or send the message to start the generation process.
- Expand the 'Thinking Process' section if you want to view the underlying calculation logic, such as 'advection calculations' or particle systems.
- Wait until the full HTML code is displayed in the 'Preview' window.
- Click the 'Copy Code' button (usually a clipboard icon) in the corner of the code block.
- Open a text editor on your computer (such as Notepad, TextEdit, or VS Code).
- Paste the code into a blank file.
- Click 'File' > 'Save As' and name the file with a `.html` extension (e.g., `simulation.html`).
- Locate the saved file and double-click it to open it in your web browser.
- Move your mouse over the screen to interact with the fluid.
- Use the provided sliders to adjust parameters such as 'Viscosity', 'Diffusion', and 'Strength'.