OpenCut Studio — 代理工程規範
-
僅使用確定性影格數學:
- 在
src/remotion-engine/目錄中,禁止使用 CSS@keyframes、transition、requestAnimationFrame或setTimeout。 - 務必使用
const frame = useCurrentFrame()和const { fps } = useVideoConfig()搭配interpolate()或spring()來計算位置、縮放、透明度及 3D 旋轉。
- 在
-
混合本地暫存 + Google Drive 儲存規範:
- 禁止將原始影片
ArrayBuffer二進位資料儲存在localStorage或IndexedDB中。 - 活躍編輯時,直接透過
localFsManager.ts(FileSystemDirectoryHandle)讀取。 - 長期持久化與跨裝置同步則使用
googleDriveClient.ts(媒體檔案使用uploadType=resumable,StyleDNA 與 EditPlan 等中繼資料使用 multipart JSON)。
- 禁止將原始影片
-
零成本離線韌性:
- 每個 AI 功能(
styleAnalyzer.ts、feedbackCompiler.ts)必須包含一個確定性降級實作,讓使用者在尚未設定 Ollama URL 或 Google AI Studio API 金鑰時,仍能測試並使用所有功能。
- 每個 AI 功能(