How lafilledepondy/cupcake_bday works
Project type and purpose
• This is a single-sketch Processing (Java mode) desktop application that renders an interactive birthday cake scene.
• It captures mouse movements to adjust lighting and prompts the user for a name to display a custom birthday message.
File structure
• Only one top‐level file: “Cup_cake.pde.”
• No external services, databases, or multiple modules—everything lives in this single sketch.
README for additional insights
• Uses Processing’s 3D renderer (P3D) at 800×800 px.
• Requires a font resource (“Brush Script MT” or substituted).
• Handles two kinds of input: real-time mouse movement and a one-time text prompt.
a. Main components (logical modules)
• Input Handler
– MouseInput: tracks mouseX, mouseY per frame
– TextInput: captures the user’s typed name once at startup
• Renderer
– CanvasManager: sets up the P3D context and camera
– TextRenderer: displays prompt, user name, birthday message
• LightingController
– Computes dynamic point‐light position based on MouseInput
• ResourceLoader
– Loads font file into Processing’s PFont
b. Relationships and data flows
• MouseInput → LightingController → Renderer
• TextInput → TextRenderer
• ResourceLoader → TextRenderer
c. Architectural patterns and design principles
• Modular separation by concern—input, rendering, lighting, resources
• Imperative, frame‐by‐frame update cycle
d. Key technologies/frameworks/libraries
• Processing (Java mode) core library
• P3D graphics context
• Processing’s PFont for text