enhance(frontend): 季節に応じた画面の演出を南半球に対応させる (#12838)

* (enhance) 季節に応じた画面の演出を南半球に対応させる

* Update Changelog

* (add) 半球の簡易自動判定

---------

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
かっこかり 2024-01-21 19:08:07 +09:00 committed by GitHub
parent 676ee87963
commit 3784b39a5f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 44 additions and 3 deletions

View file

@ -77,9 +77,18 @@ export async function mainBoot() {
if (defaultStore.state.enableSeasonalScreenEffect) {
const month = new Date().getMonth() + 1;
if (month === 12 || month === 1) {
const SnowfallEffect = (await import('@/scripts/snowfall-effect.js')).SnowfallEffect;
new SnowfallEffect().render();
if (defaultStore.state.hemisphere === 'S') {
// ▼南半球
if (month === 7 || month === 8) {
const SnowfallEffect = (await import('@/scripts/snowfall-effect.js')).SnowfallEffect;
new SnowfallEffect().render();
}
} else {
// ▼北半球
if (month === 12 || month === 1) {
const SnowfallEffect = (await import('@/scripts/snowfall-effect.js')).SnowfallEffect;
new SnowfallEffect().render();
}
}
}