⚠ ネタバレ注意: 本サイトはSFアニメ「SOLAR LINE」の内容を詳細に分析しています。未視聴の方はご注意ください。
📝 AI生成コンテンツ: 本考証の大部分は AI(Claude Code 等)によって生成されています。内容の正確性については原作および引用元をご確認ください。

Task 436: Sync Calculator.js Presets from Templates.ts

未着手 ← タスク一覧

Task 436: Sync Calculator.js Presets from Templates.ts

Status: DONE

Summary

calculator.js (browser runtime) has its own hardcoded copy of EPISODE_PRESETS with ship parameters (48000t, 9.8 MN, 6.37 MN). These duplicate what templates.ts now derives from KESTREL constants. Make templates.ts inject the preset data as inline JSON that calculator.js reads, eliminating the duplication.

Approach

  1. In templates.ts, serialize the presets into a <script type="application/json" id="calc-presets-data"> tag
  2. In calculator.js, read presets from the data tag instead of hardcoding them
  3. Add a test to verify the data injection works