Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Sharkey
Manage
Activity
Members
Labels
Plan
Issues
339
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
24
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TransFem.org
Sharkey
Commits
eba0c2cc
Commit
eba0c2cc
authored
1 year ago
by
Leah
🍓
Committed by
Amelia Yukii
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Fixed startup crash with seasonal effects
parent
2e55108b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!485
release 2024.3.2
,
!459
Fixed startup crash with seasonal effects
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
packages/frontend/src/boot/main-boot.ts
+24
-20
24 additions, 20 deletions
packages/frontend/src/boot/main-boot.ts
packages/frontend/src/scripts/snowfall-effect.ts
+3
-1
3 additions, 1 deletion
packages/frontend/src/scripts/snowfall-effect.ts
with
27 additions
and
21 deletions
packages/frontend/src/boot/main-boot.ts
+
24
−
20
View file @
eba0c2cc
...
...
@@ -73,27 +73,31 @@ export async function mainBoot() {
mainRouter
.
push
(
'
/search
'
);
},
};
if
(
defaultStore
.
state
.
enableSeasonalScreenEffect
)
{
const
month
=
new
Date
().
getMonth
()
+
1
;
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
();
}
else
if
(
month
===
3
||
month
===
4
)
{
const
SakuraEffect
=
(
await
import
(
'
@/scripts/snowfall-effect.js
'
)).
SnowfallEffect
;
new
SakuraEffect
({
sakura
:
true
,
}).
render
();
try
{
if
(
defaultStore
.
state
.
enableSeasonalScreenEffect
)
{
const
month
=
new
Date
().
getMonth
()
+
1
;
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
();
}
else
if
(
month
===
3
||
month
===
4
)
{
const
SakuraEffect
=
(
await
import
(
'
@/scripts/snowfall-effect.js
'
)).
SnowfallEffect
;
new
SakuraEffect
({
sakura
:
true
,
}).
render
();
}
}
}
}
}
catch
(
error
)
{
// console.error(error);
console
.
error
(
'
Failed to initialise the seasonal screen effect canvas context:
'
,
error
);
}
if
(
$i
)
{
...
...
This diff is collapsed.
Click to expand it.
packages/frontend/src/scripts/snowfall-effect.ts
+
3
−
1
View file @
eba0c2cc
...
...
@@ -155,7 +155,9 @@ export class SnowfallEffect {
max
:
0.125
,
easing
:
0.0005
,
};
/**
* @throws {Error} - Thrown when it fails to get WebGL context for the canvas
*/
constructor
(
options
:
{
sakura
?:
boolean
;
})
{
...
...
This diff is collapsed.
Click to expand it.
dakkar
@dakkar
mentioned in commit
b65203c9
·
11 months ago
mentioned in commit
b65203c9
mentioned in commit b65203c9f852a29a3a6e7ce81c6761e9ac228bf3
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment