Repository navigation
日の出・日の入りを日付から求め、空の移り変わりと街灯を合わせる - #79
Merged
Merged
Conversation
季節ごとの固定倍率(夏0.90・春秋1.0・冬1.13)で昼の長さを伸び縮みさせて いたため、季節による差が小さく、冬の夕暮れと夏の夜明けが実際より遅かった。 伸縮の中心も12:00固定で、海浜幕張の南中(11:23〜11:54)とずれていた。 - 海浜幕張駅付近の緯度経度と日付から、NOAAの近似式で日の出・日の入りを求める - 空のキーフレームを日の出・南中・日の入りからの前後で持ち、昼の長さだけが 日付で伸び縮みするようにする - 配色に年内の日付(SeasonalDay)を持たせ、ホーム画面と設定画面の プレビューに引き継ぐ - 街灯は日の入り前後に暗くなってから点け、日の出の30分前に消す - 太陽と月は空の暗さではなく、日が出ているかどうかで描き分ける Refs #64 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ATcUWKWDs87zwTrKyiKpY4
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Oct 15, 2026
HR0101
changed the base branch from
fix/issue-63-celestial-orbit-season
to
main
October 15, 2026 12:01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
日の出・日の入りを日付から求め、空の色の移り変わり、太陽・月の軌道、街灯の点灯をその値に合わせます。
Closes #64
原因
変更内容
MakuhariSun: 海浜幕張駅付近(北緯35.648度、東経140.042度)と日付から、NOAAの太陽位置の近似式で日の出・日の入りを求めます。SeasonalDay: 配色に年内の日付を持たせました。日の出・日の入りと季節はここから求めます。ホーム画面の配色と設定画面のプレビューは、背景の時計の日付を引き継ぎます。空のキーフレームを、時計の時刻ではなく日の出・南中・日の入りからの前後で持つようにしました。
街灯は、日の入り前後に空が暗くなってから点け、日の出の30分前に消します(判定を
SkyPalette.isStreetLightOnへ移しました)。太陽と月は、空の暗さではなく日が出ているかどうか(
isSunUp)で描き分けます。キーフレームを日の出・日の入りに合わせたことで、日の出・日の入りの瞬間の空の暗さが0.5前後になりました。空の暗さで描き分けると、日の入り直後に昇る月が数分だけ太陽として描かれるためです。Season.daylightScaleを削除しました。READMEの背景・固定値・テスト一覧を更新しました。
確認
daylightFollowsTheDateAtMakuhari: 夏至・春分・冬至の日の出・日の入りが国立天文台の暦と4分以内で一致し、南中が一年を通して正午より前skyFollowsTheSunriseAndSunsetOfTheDay: 冬至の16:45は日没後の暮れた空、夏至の4:30は日の出後の明るい空seasonalDayKnowsItsMonthInLeapYears: 年内の日数から月と季節を求め、うるう年も扱うstreetLightsFollowSunsetAndSunrise: 4:30固定の判定を再実装していたstreetLightHoursCoverEveningAndNightOnlyを置き換え、実装の判定そのものを全季節で確かめるBusTimeWidgetExtensionを警告をエラーにした設定でビルドpython3 Scripts/generate_l10n.py --checkImageRendererで書き出して目視確認(冬は16:30に夕焼け、17:30に夕暮れ。夏は18:30でもまだ明るい)既知の失敗(この変更とは無関係)
weekendKeepsTheNoticeAndStillShowsWeekdayTimesはmainでも失敗しています。関連
🤖 Generated with Claude Code
https://claude.ai/code/session_01ATcUWKWDs87zwTrKyiKpY4