How collidingscopes/stark-shapes works
Project type and purpose
• It uses Three.js to render geometric patterns and MediaPipe for real-time hand-gesture controls.
File structure
• Top level:
– index.html: entry point
– main.js: application bootstrap, event wiring, and control logic
– geometry.js: definitions of 3D patterns (cube, sphere, helix, etc.)
– styles.css: basic site styling
– assets/: static images (e.g., OG image)
• No backend code—everything runs in the browser. No build tools or server-side components.
Extract insights from the README
• Live demo is hosted via GitHub Pages (static hosting).
• Core technologies: Three.js (renderer) and MediaPipe (hand-tracking library).
• Feature flows: pinch → zoom, rotate → orbit, clap → next pattern.
Main components
a. Static File Server (e.g., GitHub Pages)
b. Client (Browser)
– index.html (loads all JS/CSS)
– styles.css (UI layout)
– Three.js Renderer
– Scene & Camera Manager (main.js orchestrates)
– Geometry Module (geometry.js)
– Shader Module (chromatic-shader.js)
– Hand-Tracking Module (MediaPipe)
– UI Controller (gesture → camera/pattern events)
c. Device Resources
– Webcam (video feed)
d. External CDNs or libraries
– Three.js (via CDN)
– MediaPipe (via CDN)
Relationships & data flows
• Static File Server → serves index.html, JS, CSS, assets → Browser
• Browser → loads Three.js & MediaPipe libraries
• Browser ↔ Webcam: video frames → feed into MediaPipe
• MediaPipe → outputs hand-landmark events → UI Controller in main.js
• UI Controller → updates Scene & Camera parameters in Three.js Renderer
• Clap gesture → triggers Geometry Module to switch 3D pattern
• Renderer ↔ Shader Module: applies chromatic effects to meshes
• Renderer → draws frame → displayed to user
Architectural patterns & design principles
• Modularity: separate JS modules for geometry, shaders, and control logic.
• Data-flow pipeline: Webcam → Hand Tracking → Event Controller → Renderer.
• Static-site architecture: no server-side logic, all assets pre-built.
Detailed checklist
[ ] Show the index.html → JS/CSS load sequence
[ ] Indicate the webcam → MediaPipe → main.js event flow
[ ] Show main.js invoking geometry.js & chromatic-shader.js
[ ] Mark external CDNs (Three.js, MediaPipe)
[ ] Include the static hosting layer and assets folder