How luong-15/new-year works
Project type and purpose
• This is a simple, static, front-end only “New Year Celebration” web page that renders JavaScript-powered fireworks in the browser. There is no backend or database—everything lives in the user’s browser.
File structure
• index.html: entry point that pulls in CSS and JS
• style.css: styling for the UI
• script.js: orchestration of fireworks logic and page interactivity
• MyMath.js: utility module for math functions (e.g., randomization, vector math)
• fscreen.1.0.1.js: utility for full-screen toggling
• README.md: high-level project description
README
• Confirms this is a UI-only project for entertainment
• Lists feature set (firework effects, festive UI)
• No mention of external services or build pipelines
Main components
a. Browser (the user’s environment)
b. index.html + CSS (static UI layer)
c. JavaScript modules:
• script.js (controller/orchestrator)
• Stage.0.1.4.js (rendering engine)
• MyMath.js (math utilities)
• fscreen.1.0.1.js (full-screen utility)
d. HTML5 Canvas API (render target)
Relationships and interactions
• Browser loads index.html → applies style.css → brings up UI shell
• index.html loads the JS files in order: MyMath.js → Stage.0.1.4.js → fscreen.1.0.1.js → script.js
• script.js can invoke fscreen API to toggle full screen via user input
• Stage module talks directly to Canvas API to paint frames
Architectural patterns and design principles
• Modular JavaScript: utilities (MyMath), engine (Stage), orchestrator (script.js)
• Clear separation between:
• UI (HTML+CSS)
• Core rendering (Stage)
• Business logic (script.js)
• Utilities (MyMath, fscreen)
Putting it all together
• At the top: “User’s Browser”
• Middle row:
[index.html] → branches to [style.css] and to the JS-load pipeline:
[MyMath.js] → [Stage.0.1.4.js] → [fscreen.1.0.1.js] → [script.js]
• Bottom row:
[Canvas API] (connected from Stage) → “Rendered Fireworks on Screen”
Important details to capture
• The sequence in which scripts are loaded
• The dependency of script.js on all other modules
• The fact that Stage is the only component talking to the Canvas API
• The toggling of full screen via fscreen