threejs-capacitor-ios
Installation
SKILL.md
Three.js Capacitor iOS
Build interactive Three.js apps that run in browser and ship in an iOS native shell via Capacitor. This skill focuses on the integration boundary where most breakage happens: web build output, animation contracts, controls, and native sync/run workflow.
Philosophy: Two Runtimes, One Contract
Treat the project as two systems that must agree:
- A web renderer runtime (Three.js + Vite)
- A native runtime wrapper (Capacitor iOS)
Most failures happen when their contract is implicit. Make file paths, animation names, build output, and iOS package manager choices explicit and testable.
Before implementing, ask:
- What is the exact web output directory (
distorwww) and does CapacitorwebDirmatch it? - Are animation names loaded from data (
assets_index.json) instead of hardcoded strings? - Is iOS using SPM or CocoaPods, and are plugin dependencies compatible with that choice?
- Are desktop and touch controls intentionally mapped, or left to defaults that may not match product UX?