How alfinurhakim/try-on-batik-nusantara works
Try On Batik Nusantara is a browser experience for exploring Indonesian batik by province and city, then previewing a selected motif on a live camera feed and saving or sharing a photo. The main flow is coordinated by App: it loads geographic data and opens the map, where a user selects a location and motif before entering try-on. Supporting branches include procedural motif art, regional audio and visual effects, a locally persisted Batik Passport, and an informational demo page. Edges reflect shown calls or indexed references; unsampled implementation details are not inferred.
Main entry points: App.tsx Stage coordinator · TryOnView.tsx Try-on screen · MapScene.tsx 3D map scene · AboutPage.tsx Behind-the-scenes page
Components 26
Experience flow
- Stage coordinator
src/App.tsx
Map and regional data
- 3D map scene
src/map/MapScene.tsx - Map controls
src/map/MapOverlay.tsx - Regional catalog
src/data/regions.ts - GeoJSON loader
src/geo/geo.ts - City landmarks
src/map/Landmarks.tsx - Landmark catalog
src/data/landmarks.ts
Camera try-on
- Try-on screen
src/tryon/TryOnView.tsx - Pose and segmentation
src/tryon/vision.ts - MediaPipe models
- WebGL compositor
src/tryon/renderer.ts - Gesture detection
src/tryon/gestures.ts - Photo card builder
src/tryon/shareCard.ts - Share dialog
src/tryon/ShareModal.tsx
Art and audio
- Pattern generator
src/motifs/patterns.ts - Motif tile cache
src/motifs/textures.ts - Visual effects
src/fx/Effects.tsx - Procedural art
src/fx/art.ts - Gamelan engine
src/audio/gamelan.ts - Motif narration
src/audio/narrator.ts
Passport and learning
- Passport display
src/passport/PassportModal.tsx - Passport records
src/passport/passport.ts - Behind-the-scenes page
src/about/AboutPage.tsx - Synthetic mannequin
src/about/mannequin.ts
Other components
- Visitor
- Browser storage
Connections 36
- Visitor → Stage coordinator: starts journey
README.md - Stage coordinator → GeoJSON loader: loads map data
src/App.tsx - GeoJSON loader → Regional catalog: matches provinces
src/geo/geo.ts - Stage coordinator → 3D map scene: shows map
src/App.tsx - Stage coordinator → Map controls: shows controls
src/App.tsx - Map controls → 3D map scene: selects locations
src/map/MapOverlay.tsx - 3D map scene → Regional catalog: reads regional catalog
src/map/MapScene.tsx - 3D map scene → GeoJSON loader: projects coordinates
src/map/MapScene.tsx - 3D map scene → Motif tile cache: paints map motifs
src/map/MapScene.tsx - 3D map scene → City landmarks: renders city landmark
src/map/MapScene.tsx - City landmarks → Landmark catalog: reads landmark catalog
src/map/Landmarks.tsx - Stage coordinator → Try-on screen: opens try-on
src/App.tsx - Try-on screen → Pose and segmentation: uses pose models
src/tryon/TryOnView.tsx - Pose and segmentation → MediaPipe models: loads models
README.md - Try-on screen → WebGL compositor: renders camera frame
src/tryon/TryOnView.tsx - Try-on screen → Gesture detection: handles gestures
src/tryon/TryOnView.tsx - Try-on screen → Motif tile cache: gets motif density
src/tryon/TryOnView.tsx - Motif tile cache → Pattern generator: draws motif tiles
src/motifs/textures.ts - Try-on screen → Photo card builder: builds photo card
src/tryon/TryOnView.tsx - Try-on screen → Share dialog: opens sharing dialog
src/tryon/TryOnView.tsx - Stage coordinator → Passport records: loads and records tries
src/App.tsx - Passport records → Browser storage: persists records
- Stage coordinator → Passport display: shows passport
src/App.tsx - Passport display → Motif tile cache: shows motif thumbnails
src/passport/PassportModal.tsx - Stage coordinator → Visual effects: shows transitions
src/App.tsx - Visual effects → Procedural art: uses generated art
src/fx/Effects.tsx - Procedural art → Motif tile cache: uses motif tiles
src/fx/art.ts - 3D map scene → Gamelan engine: sets regional music
src/map/MapScene.tsx - Stage coordinator → Gamelan engine: sets music style
src/App.tsx - Try-on screen → Gamelan engine: plays photo chime
src/tryon/TryOnView.tsx - Try-on screen → Motif narration: uses narration
src/tryon/TryOnView.tsx - Stage coordinator → Behind-the-scenes page: opens information page
src/App.tsx - Behind-the-scenes page → Synthetic mannequin: builds demo mannequin
src/about/AboutPage.tsx - Behind-the-scenes page → WebGL compositor: renders demo try-on
src/about/AboutPage.tsx - Behind-the-scenes page → Procedural art: renders city backdrop
src/about/AboutPage.tsx - Behind-the-scenes page → Gamelan engine: plays demo audio
src/about/AboutPage.tsx