Based on the class example that replys to input, I wanted to build a tool that translates how people feel into colors and shapes. This project focuses on text-based emotion reflection—users type how they feel, and the system visualizes that feeling as a floating geometric form on a timeline.
f9b00ca74af09e0c0f7c1b97b144926d.mp4
In the first version, I used the Gemini API as a chatbot that returned long textual summaries of emotion, but the results were inconsistent and hard to visualize.
To fix this, I redefined the system prompt to force strict JSON output, limiting Gemini’s reply to four key attributes:
{
"label": "sad",
"intensity": 0.68,
"valence": -0.6,
"arousal": 0.4
}
Each field directly controls part of the drawing:
Logic
localStorage.